Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- tasks/eatthismuch/environment/agent-browser/browser-use +152 -0
- tasks/eatthismuch/environment/agent-browser/gateway.py +524 -0
- tasks/eatthismuch/environment/candidate-abi/websitebench-candidate-preflight +5 -0
- tasks/eatthismuch/environment/mailbox/Dockerfile +5 -0
- tasks/eatthismuch/environment/mailbox/mailbox.py +2433 -0
- tasks/eatthismuch/environment/reference/.websitebench-reference-tls/ca.crt +20 -0
- tasks/eatthismuch/environment/reference/.websitebench-reference-tls/reference.crt +20 -0
- tasks/eatthismuch/environment/reference/.websitebench-reference-tls/reference.key +28 -0
- tasks/eatthismuch/environment/reference/.websitebench-reference-tls/tls_proxy.py +164 -0
- tasks/eatthismuch/environment/reference/Dockerfile +19 -0
- tasks/eatthismuch/environment/reference/README.md +5 -0
- tasks/eatthismuch/environment/reference/backend/model.json +435 -0
- tasks/eatthismuch/environment/reference/backend/runtime.json +104 -0
- tasks/eatthismuch/environment/reference/clone/app.py +1873 -0
- tasks/eatthismuch/environment/reference/clone/backend/app_api.py +655 -0
- tasks/eatthismuch/environment/reference/clone/backend/auth_mailer.py +122 -0
- tasks/eatthismuch/environment/reference/clone/backend/content_store.py +186 -0
- tasks/eatthismuch/environment/reference/clone/backend/g_api.py +285 -0
- tasks/eatthismuch/environment/reference/clone/backend/macro_calculator.py +228 -0
- tasks/eatthismuch/environment/reference/clone/backend/runtime.json +103 -0
- tasks/eatthismuch/environment/reference/clone/backend/site_backend_integration.py +112 -0
- tasks/eatthismuch/environment/reference/clone/backend/site_services.py +77 -0
- tasks/eatthismuch/environment/reference/clone/pytest.ini +5 -0
- tasks/eatthismuch/environment/reference/clone/requirements.txt +5 -0
- tasks/eatthismuch/environment/reference/clone/sitepack.py +451 -0
- tasks/eatthismuch/environment/reference/clone/static/_app/version.json +1 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/adsbygoogle.js +10 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/auth-flow.css +80 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/auth-flow.js +93 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/boundary.css +12 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/home-actions.js +42 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/noop.js +2 -0
- tasks/eatthismuch/environment/reference/clone/static/clone/pixel.png +3 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css2__q80af5b3067f6 +389 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css2__qe4dfecdd8323 +100 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css2__qffa3829fad18 +26 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__q21b767d8bb7f +16 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__q5d7a4806e74a +49 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__q86a49a307346 +624 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qab3d58ea25ae +0 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qac9cb8a8b4c3 +624 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qf78552406adb +1147 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qf88de823c099 +416 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qfae27d2e1f05 +416 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR1SDk.woff2 +0 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR2SDktYw.woff2 +0 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR4SDktYw.woff2 +0 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR5SDktYw.woff2 +0 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR6SDktYw.woff2 +0 -0
- tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR7SDktYw.woff2 +3 -0
tasks/eatthismuch/environment/agent-browser/browser-use
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Forward the safe Browser Use CLI subset to the isolated browser sidecar."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import json
|
| 7 |
+
import os
|
| 8 |
+
import shutil
|
| 9 |
+
import sys
|
| 10 |
+
import urllib.error
|
| 11 |
+
import urllib.request
|
| 12 |
+
import uuid
|
| 13 |
+
from pathlib import Path
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
GATEWAY_URL = os.environ.get(
|
| 17 |
+
"WEBSITEBENCH_BROWSER_GATEWAY_URL",
|
| 18 |
+
"http://browser:9224/v1/command",
|
| 19 |
+
)
|
| 20 |
+
SHARED_ROOT = Path("/browser-share")
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def _translate_candidate_origin(arguments: list[str]) -> list[str]:
|
| 24 |
+
public_origin = os.environ.get(
|
| 25 |
+
"WEBSITEBENCH_CANDIDATE_URL", "http://127.0.0.1:3000"
|
| 26 |
+
).rstrip("/")
|
| 27 |
+
browser_origin = os.environ.get(
|
| 28 |
+
"WEBSITEBENCH_BROWSER_CANDIDATE_URL", "http://candidate:3000"
|
| 29 |
+
).rstrip("/")
|
| 30 |
+
return [
|
| 31 |
+
browser_origin + value[len(public_origin) :]
|
| 32 |
+
if value == public_origin or value.startswith(public_origin + "/")
|
| 33 |
+
else value
|
| 34 |
+
for value in arguments
|
| 35 |
+
]
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def _command_index(arguments: list[str]) -> int | None:
|
| 39 |
+
index = 0
|
| 40 |
+
while index < len(arguments):
|
| 41 |
+
value = arguments[index]
|
| 42 |
+
if value in {"--session"}:
|
| 43 |
+
index += 2
|
| 44 |
+
continue
|
| 45 |
+
if value.startswith("--session=") or value == "--json":
|
| 46 |
+
index += 1
|
| 47 |
+
continue
|
| 48 |
+
if value in {"-h", "--help"}:
|
| 49 |
+
return None
|
| 50 |
+
if value.startswith("-"):
|
| 51 |
+
return index
|
| 52 |
+
return index
|
| 53 |
+
return None
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def _prepare_screenshot(arguments: list[str]) -> tuple[list[str], Path | None, Path | None]:
|
| 57 |
+
forwarded = list(arguments)
|
| 58 |
+
command_index = _command_index(forwarded)
|
| 59 |
+
if command_index is None or forwarded[command_index] != "screenshot":
|
| 60 |
+
return forwarded, None, None
|
| 61 |
+
|
| 62 |
+
local_path: Path | None = None
|
| 63 |
+
path_index: int | None = None
|
| 64 |
+
for index in range(command_index + 1, len(forwarded)):
|
| 65 |
+
if forwarded[index] == "--path" and index + 1 < len(forwarded):
|
| 66 |
+
path_index = index + 1
|
| 67 |
+
local_path = Path(forwarded[path_index])
|
| 68 |
+
break
|
| 69 |
+
if not forwarded[index].startswith("-"):
|
| 70 |
+
path_index = index
|
| 71 |
+
local_path = Path(forwarded[path_index])
|
| 72 |
+
break
|
| 73 |
+
if local_path is None:
|
| 74 |
+
local_path = Path("screenshot.png")
|
| 75 |
+
forwarded.append(str(local_path))
|
| 76 |
+
path_index = len(forwarded) - 1
|
| 77 |
+
|
| 78 |
+
shared_path = SHARED_ROOT / f"screenshot-{uuid.uuid4().hex}.png"
|
| 79 |
+
assert path_index is not None
|
| 80 |
+
forwarded[path_index] = str(shared_path)
|
| 81 |
+
return forwarded, local_path, shared_path
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def _prepare_asset(arguments: list[str]) -> tuple[list[str], Path | None, Path | None]:
|
| 85 |
+
forwarded = list(arguments)
|
| 86 |
+
command_index = _command_index(forwarded)
|
| 87 |
+
if command_index is None or forwarded[command_index] != "save-asset":
|
| 88 |
+
return forwarded, None, None
|
| 89 |
+
tail = forwarded[command_index + 1 :]
|
| 90 |
+
if len(tail) != 2:
|
| 91 |
+
# Let the gateway reject the malformed command with its own message.
|
| 92 |
+
return forwarded, None, None
|
| 93 |
+
local_path = Path(tail[1])
|
| 94 |
+
shared_path = SHARED_ROOT / f"asset-{uuid.uuid4().hex}"
|
| 95 |
+
forwarded[command_index + 2] = str(shared_path)
|
| 96 |
+
return forwarded, local_path, shared_path
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
def main() -> int:
|
| 100 |
+
translated = _translate_candidate_origin(sys.argv[1:])
|
| 101 |
+
arguments, local_screenshot, shared_screenshot = _prepare_screenshot(translated)
|
| 102 |
+
if local_screenshot is None:
|
| 103 |
+
arguments, local_screenshot, shared_screenshot = _prepare_asset(arguments)
|
| 104 |
+
request = urllib.request.Request(
|
| 105 |
+
GATEWAY_URL,
|
| 106 |
+
data=json.dumps({"argv": arguments}, separators=(",", ":")).encode("utf-8"),
|
| 107 |
+
headers={"Content-Type": "application/json"},
|
| 108 |
+
method="POST",
|
| 109 |
+
)
|
| 110 |
+
try:
|
| 111 |
+
with urllib.request.urlopen(request, timeout=240) as response:
|
| 112 |
+
payload = json.load(response)
|
| 113 |
+
except urllib.error.HTTPError as exc:
|
| 114 |
+
try:
|
| 115 |
+
detail = json.loads(exc.read().decode("utf-8")).get("error")
|
| 116 |
+
except (UnicodeError, ValueError, AttributeError):
|
| 117 |
+
detail = None
|
| 118 |
+
print(detail or f"Browser Use gateway refused the command (HTTP {exc.code})", file=sys.stderr)
|
| 119 |
+
return 2
|
| 120 |
+
except (OSError, UnicodeError, ValueError) as exc:
|
| 121 |
+
print(f"Browser Use gateway unavailable: {exc}", file=sys.stderr)
|
| 122 |
+
return 2
|
| 123 |
+
|
| 124 |
+
stdout = payload.get("stdout", "")
|
| 125 |
+
stderr = payload.get("stderr", "")
|
| 126 |
+
if local_screenshot is not None and shared_screenshot is not None:
|
| 127 |
+
# The shared file is moved to the caller's path below; report that path, not the
|
| 128 |
+
# transient gateway-owned one, so a later read of the printed path succeeds.
|
| 129 |
+
if isinstance(stdout, str):
|
| 130 |
+
stdout = stdout.replace(str(shared_screenshot), str(local_screenshot))
|
| 131 |
+
if isinstance(stderr, str):
|
| 132 |
+
stderr = stderr.replace(str(shared_screenshot), str(local_screenshot))
|
| 133 |
+
if isinstance(stdout, str) and stdout:
|
| 134 |
+
print(stdout, end="" if stdout.endswith("\n") else "\n")
|
| 135 |
+
if isinstance(stderr, str) and stderr:
|
| 136 |
+
print(stderr, end="" if stderr.endswith("\n") else "\n", file=sys.stderr)
|
| 137 |
+
|
| 138 |
+
if local_screenshot is not None and shared_screenshot is not None and shared_screenshot.exists():
|
| 139 |
+
try:
|
| 140 |
+
local_screenshot.parent.mkdir(parents=True, exist_ok=True)
|
| 141 |
+
shutil.copyfile(shared_screenshot, local_screenshot)
|
| 142 |
+
shared_screenshot.unlink(missing_ok=True)
|
| 143 |
+
except OSError as exc:
|
| 144 |
+
print(f"Browser file transfer failed: {exc}", file=sys.stderr)
|
| 145 |
+
return 2
|
| 146 |
+
|
| 147 |
+
exit_code = payload.get("exit_code", 2)
|
| 148 |
+
return exit_code if isinstance(exit_code, int) and 0 <= exit_code <= 255 else 2
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
if __name__ == "__main__":
|
| 152 |
+
raise SystemExit(main())
|
tasks/eatthismuch/environment/agent-browser/gateway.py
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Constrained Browser Use command gateway for browser-only references.
|
| 3 |
+
|
| 4 |
+
The gateway is the only process that joins the reference network. It exposes
|
| 5 |
+
interactive browser actions, but deliberately excludes arbitrary Python,
|
| 6 |
+
JavaScript evaluation, DOM serialization, cloud/tunnel commands, and direct
|
| 7 |
+
CDP attachment. The Agent container can inspect the rendered site without
|
| 8 |
+
obtaining a general-purpose HTTP path to its source responses.
|
| 9 |
+
|
| 10 |
+
Static assets are the one exception to that boundary. ``assets`` lists the
|
| 11 |
+
reference-origin images, icons, fonts and media the current page uses, and
|
| 12 |
+
``save-asset`` copies one of them into the Agent's repository. Stylesheets and
|
| 13 |
+
scripts are the reference's code: formal runs never hand them to the Agent, so
|
| 14 |
+
both commands refuse them, as they refuse documents and API responses.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
from __future__ import annotations
|
| 18 |
+
|
| 19 |
+
import json
|
| 20 |
+
import os
|
| 21 |
+
import re
|
| 22 |
+
import ssl
|
| 23 |
+
import subprocess
|
| 24 |
+
import threading
|
| 25 |
+
import urllib.error
|
| 26 |
+
import urllib.parse
|
| 27 |
+
import urllib.request
|
| 28 |
+
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
| 29 |
+
from pathlib import Path
|
| 30 |
+
from typing import Any
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
MAX_REQUEST_BYTES = 64 * 1024
|
| 34 |
+
MAX_OUTPUT_BYTES = 4 * 1024 * 1024
|
| 35 |
+
COMMAND_TIMEOUT_SEC = 180
|
| 36 |
+
SESSION_PATTERN = re.compile(r"[A-Za-z0-9][A-Za-z0-9_.-]{0,63}\Z")
|
| 37 |
+
SHARED_ROOT = Path("/browser-share").resolve()
|
| 38 |
+
ASSET_MAX_BYTES = 32 * 1024 * 1024
|
| 39 |
+
ASSET_TIMEOUT_SEC = 60
|
| 40 |
+
ASSET_LIST_LIMIT = 2000
|
| 41 |
+
ASSET_SHARED_NAME = re.compile(r"asset-[0-9a-f]{32}\Z")
|
| 42 |
+
# Static media only: a document, JSON or other API body is never an asset, and neither is
|
| 43 |
+
# a stylesheet or script (the agent must not receive the reference's CSS or JavaScript).
|
| 44 |
+
STATIC_CONTENT_PREFIXES = ("image/", "font/", "audio/", "video/")
|
| 45 |
+
STATIC_CONTENT_TYPES = frozenset(
|
| 46 |
+
{
|
| 47 |
+
"application/font-woff",
|
| 48 |
+
"application/font-woff2",
|
| 49 |
+
"application/x-font-woff",
|
| 50 |
+
"application/x-font-ttf",
|
| 51 |
+
"application/x-font-otf",
|
| 52 |
+
"application/font-sfnt",
|
| 53 |
+
"application/vnd.ms-fontobject",
|
| 54 |
+
}
|
| 55 |
+
)
|
| 56 |
+
# Servers often label fonts and media application/octet-stream; accept that
|
| 57 |
+
# label only when the path itself names a static file.
|
| 58 |
+
STATIC_EXTENSIONS = frozenset(
|
| 59 |
+
{
|
| 60 |
+
".png", ".jpg", ".jpeg", ".gif", ".webp", ".avif", ".svg", ".ico", ".bmp",
|
| 61 |
+
".woff", ".woff2", ".ttf", ".otf", ".eot",
|
| 62 |
+
".mp4", ".webm", ".ogv", ".mp3", ".ogg", ".wav", ".m4a",
|
| 63 |
+
}
|
| 64 |
+
)
|
| 65 |
+
# Reference code is refused whatever its declared type: a script served as octet-stream or a
|
| 66 |
+
# stylesheet under an image-like path must not pass.
|
| 67 |
+
CODE_CONTENT_TYPES = frozenset(
|
| 68 |
+
{
|
| 69 |
+
"text/css",
|
| 70 |
+
"text/javascript",
|
| 71 |
+
"text/ecmascript",
|
| 72 |
+
"application/javascript",
|
| 73 |
+
"application/x-javascript",
|
| 74 |
+
"application/ecmascript",
|
| 75 |
+
"application/wasm",
|
| 76 |
+
}
|
| 77 |
+
)
|
| 78 |
+
CODE_EXTENSIONS = frozenset({".css", ".scss", ".less", ".js", ".mjs", ".cjs", ".jsx", ".ts", ".tsx", ".map", ".wasm"})
|
| 79 |
+
# Gateway-owned inventory script: returns only URLs the page references or loaded.
|
| 80 |
+
ASSET_INVENTORY_JS = r"""JSON.stringify((() => {
|
| 81 |
+
const found = new Set();
|
| 82 |
+
const add = (value, base) => { try { if (value) found.add(new URL(value, base || location.href).href); } catch (e) {} };
|
| 83 |
+
const urls = (text, base) => { for (const m of String(text || '').matchAll(/url\(\s*["']?([^"')]+)["']?\s*\)/g)) add(m[1], base); };
|
| 84 |
+
for (const entry of performance.getEntriesByType('resource')) add(entry.name);
|
| 85 |
+
for (const image of document.images) { add(image.currentSrc); add(image.src); }
|
| 86 |
+
for (const node of document.querySelectorAll('link[href]')) add(node.href);
|
| 87 |
+
for (const node of document.querySelectorAll('script[src]')) add(node.src);
|
| 88 |
+
for (const node of document.querySelectorAll('source[src], source[srcset], video[src], video[poster], audio[src], img[srcset]')) {
|
| 89 |
+
add(node.src); add(node.poster);
|
| 90 |
+
for (const part of String(node.srcset || '').split(',')) add(part.trim().split(/\s+/)[0]);
|
| 91 |
+
}
|
| 92 |
+
let count = 0;
|
| 93 |
+
for (const element of document.querySelectorAll('*')) {
|
| 94 |
+
if (++count > 5000) break;
|
| 95 |
+
const style = getComputedStyle(element);
|
| 96 |
+
urls(style.backgroundImage); urls(style.listStyleImage); urls(style.content);
|
| 97 |
+
}
|
| 98 |
+
for (const sheet of document.styleSheets) {
|
| 99 |
+
try { for (const rule of sheet.cssRules) urls(rule.cssText, sheet.href || location.href); } catch (e) {}
|
| 100 |
+
}
|
| 101 |
+
return [...found];
|
| 102 |
+
})())"""
|
| 103 |
+
REAL_BROWSER_USE = os.environ.get(
|
| 104 |
+
"WEBSITEBENCH_BROWSER_USE_REAL",
|
| 105 |
+
"/usr/local/bin/browser-use-real",
|
| 106 |
+
)
|
| 107 |
+
SAFE_COMMANDS = frozenset(
|
| 108 |
+
{
|
| 109 |
+
"open",
|
| 110 |
+
"click",
|
| 111 |
+
"type",
|
| 112 |
+
"input",
|
| 113 |
+
"scroll",
|
| 114 |
+
"back",
|
| 115 |
+
"screenshot",
|
| 116 |
+
"state",
|
| 117 |
+
"switch",
|
| 118 |
+
"close-tab",
|
| 119 |
+
"keys",
|
| 120 |
+
"select",
|
| 121 |
+
"hover",
|
| 122 |
+
"dblclick",
|
| 123 |
+
"rightclick",
|
| 124 |
+
"cookies",
|
| 125 |
+
"close",
|
| 126 |
+
"sessions",
|
| 127 |
+
}
|
| 128 |
+
)
|
| 129 |
+
FORBIDDEN_COMMANDS = frozenset(
|
| 130 |
+
{
|
| 131 |
+
"install",
|
| 132 |
+
"init",
|
| 133 |
+
"setup",
|
| 134 |
+
"doctor",
|
| 135 |
+
"upload",
|
| 136 |
+
"eval",
|
| 137 |
+
"extract",
|
| 138 |
+
"get",
|
| 139 |
+
"python",
|
| 140 |
+
"tunnel",
|
| 141 |
+
"cloud",
|
| 142 |
+
"profile",
|
| 143 |
+
"wait",
|
| 144 |
+
}
|
| 145 |
+
)
|
| 146 |
+
FORBIDDEN_GLOBAL_OPTIONS = frozenset(
|
| 147 |
+
{"--headed", "--profile", "--cdp-url", "--connect", "--mcp", "--template"}
|
| 148 |
+
)
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
class CommandRejected(ValueError):
|
| 152 |
+
"""Raised when an Agent command crosses the browser-only boundary."""
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
def _origin(value: str) -> tuple[str, str, int]:
|
| 156 |
+
parsed = urllib.parse.urlsplit(value)
|
| 157 |
+
if parsed.scheme not in {"http", "https"} or not parsed.hostname:
|
| 158 |
+
raise ValueError(f"invalid browser origin: {value!r}")
|
| 159 |
+
port = parsed.port or (443 if parsed.scheme == "https" else 80)
|
| 160 |
+
return parsed.scheme, parsed.hostname.lower(), port
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
def allowed_origins() -> frozenset[tuple[str, str, int]]:
|
| 164 |
+
values = (
|
| 165 |
+
os.environ.get(
|
| 166 |
+
"WEBSITEBENCH_BROWSER_REFERENCE_URL", "https://reference:8080"
|
| 167 |
+
),
|
| 168 |
+
os.environ.get(
|
| 169 |
+
"WEBSITEBENCH_BROWSER_CANDIDATE_URL", "http://candidate:3000"
|
| 170 |
+
),
|
| 171 |
+
os.environ.get(
|
| 172 |
+
"WEBSITEBENCH_BROWSER_MAILBOX_URL", "http://mailbox:8026"
|
| 173 |
+
),
|
| 174 |
+
)
|
| 175 |
+
return frozenset(_origin(value) for value in values)
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
def reference_origin() -> tuple[str, str, int]:
|
| 179 |
+
return _origin(
|
| 180 |
+
os.environ.get("WEBSITEBENCH_BROWSER_REFERENCE_URL", "https://reference:8080")
|
| 181 |
+
)
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
def _reference_asset_url(value: str) -> str:
|
| 185 |
+
try:
|
| 186 |
+
requested = _origin(value)
|
| 187 |
+
except (TypeError, ValueError) as exc:
|
| 188 |
+
raise CommandRejected(str(exc)) from exc
|
| 189 |
+
if requested != reference_origin():
|
| 190 |
+
raise CommandRejected("static assets can only be saved from the reference origin")
|
| 191 |
+
parsed = urllib.parse.urlsplit(value)
|
| 192 |
+
if parsed.username is not None or parsed.password is not None:
|
| 193 |
+
raise CommandRejected("asset URL must not carry credentials")
|
| 194 |
+
return urllib.parse.urlunsplit(parsed._replace(fragment=""))
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
def is_reference_code(url: str, content_type: str = "") -> bool:
|
| 198 |
+
media = content_type.split(";", 1)[0].strip().lower()
|
| 199 |
+
suffix = Path(urllib.parse.urlsplit(url).path).suffix.lower()
|
| 200 |
+
return media in CODE_CONTENT_TYPES or suffix in CODE_EXTENSIONS
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
def is_static_asset(url: str, content_type: str) -> bool:
|
| 204 |
+
if is_reference_code(url, content_type):
|
| 205 |
+
return False
|
| 206 |
+
media = content_type.split(";", 1)[0].strip().lower()
|
| 207 |
+
if media.startswith(STATIC_CONTENT_PREFIXES) or media in STATIC_CONTENT_TYPES:
|
| 208 |
+
return True
|
| 209 |
+
suffix = Path(urllib.parse.urlsplit(url).path).suffix.lower()
|
| 210 |
+
return media in {"application/octet-stream", "binary/octet-stream", ""} and suffix in STATIC_EXTENSIONS
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
def _parse_global_options(arguments: list[str]) -> tuple[str, int]:
|
| 214 |
+
session = "default"
|
| 215 |
+
index = 0
|
| 216 |
+
while index < len(arguments):
|
| 217 |
+
value = arguments[index]
|
| 218 |
+
if value == "--session":
|
| 219 |
+
if index + 1 >= len(arguments):
|
| 220 |
+
raise CommandRejected("--session requires a value")
|
| 221 |
+
session = arguments[index + 1]
|
| 222 |
+
index += 2
|
| 223 |
+
continue
|
| 224 |
+
if value.startswith("--session="):
|
| 225 |
+
session = value.partition("=")[2]
|
| 226 |
+
index += 1
|
| 227 |
+
continue
|
| 228 |
+
if value == "--json":
|
| 229 |
+
index += 1
|
| 230 |
+
continue
|
| 231 |
+
if value in {"-h", "--help"}:
|
| 232 |
+
break
|
| 233 |
+
if value in FORBIDDEN_GLOBAL_OPTIONS or any(
|
| 234 |
+
value.startswith(option + "=") for option in FORBIDDEN_GLOBAL_OPTIONS
|
| 235 |
+
):
|
| 236 |
+
raise CommandRejected(f"Browser Use option {value!r} is disabled")
|
| 237 |
+
if value.startswith("-"):
|
| 238 |
+
raise CommandRejected(f"unsupported Browser Use option {value!r}")
|
| 239 |
+
break
|
| 240 |
+
if not SESSION_PATTERN.fullmatch(session):
|
| 241 |
+
raise CommandRejected("invalid Browser Use session name")
|
| 242 |
+
return session, index
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
def validate_command(raw_arguments: Any) -> list[str]:
|
| 246 |
+
if not isinstance(raw_arguments, list) or not raw_arguments:
|
| 247 |
+
raise CommandRejected("argv must be a non-empty string array")
|
| 248 |
+
if len(raw_arguments) > 128:
|
| 249 |
+
raise CommandRejected("too many Browser Use arguments")
|
| 250 |
+
arguments: list[str] = []
|
| 251 |
+
for value in raw_arguments:
|
| 252 |
+
if not isinstance(value, str) or "\x00" in value or len(value) > 16_384:
|
| 253 |
+
raise CommandRejected("invalid Browser Use argument")
|
| 254 |
+
arguments.append(value)
|
| 255 |
+
|
| 256 |
+
for value in arguments:
|
| 257 |
+
if value in FORBIDDEN_GLOBAL_OPTIONS or any(
|
| 258 |
+
value.startswith(option + "=") for option in FORBIDDEN_GLOBAL_OPTIONS
|
| 259 |
+
):
|
| 260 |
+
raise CommandRejected(f"Browser Use option {value!r} is disabled")
|
| 261 |
+
|
| 262 |
+
_session, command_index = _parse_global_options(arguments)
|
| 263 |
+
if (
|
| 264 |
+
command_index == len(arguments) - 1
|
| 265 |
+
and arguments[command_index] in {"-h", "--help"}
|
| 266 |
+
):
|
| 267 |
+
return arguments
|
| 268 |
+
if command_index >= len(arguments):
|
| 269 |
+
raise CommandRejected("missing Browser Use command")
|
| 270 |
+
command = arguments[command_index]
|
| 271 |
+
if command == "assets":
|
| 272 |
+
if len(arguments) != command_index + 1:
|
| 273 |
+
raise CommandRejected("assets takes no arguments; it lists the current page")
|
| 274 |
+
return arguments
|
| 275 |
+
if command == "save-asset":
|
| 276 |
+
tail = arguments[command_index + 1 :]
|
| 277 |
+
if len(tail) != 2:
|
| 278 |
+
raise CommandRejected("save-asset requires a reference asset URL and a destination path")
|
| 279 |
+
url = _reference_asset_url(tail[0])
|
| 280 |
+
if is_reference_code(url):
|
| 281 |
+
raise CommandRejected("reference stylesheets and scripts are not available to the agent")
|
| 282 |
+
destination = Path(tail[1]).resolve()
|
| 283 |
+
if destination.parent != SHARED_ROOT or ASSET_SHARED_NAME.fullmatch(destination.name) is None:
|
| 284 |
+
raise CommandRejected("saved assets must use one gateway-owned path")
|
| 285 |
+
return arguments[: command_index + 1] + [url, str(destination)]
|
| 286 |
+
if command in FORBIDDEN_COMMANDS:
|
| 287 |
+
raise CommandRejected(
|
| 288 |
+
f"Browser Use command {command!r} is disabled for browser-only references"
|
| 289 |
+
)
|
| 290 |
+
if command not in SAFE_COMMANDS:
|
| 291 |
+
raise CommandRejected(f"unsupported Browser Use command {command!r}")
|
| 292 |
+
|
| 293 |
+
if command == "open":
|
| 294 |
+
urls = [
|
| 295 |
+
value
|
| 296 |
+
for value in arguments[command_index + 1 :]
|
| 297 |
+
if "://" in value
|
| 298 |
+
]
|
| 299 |
+
if len(urls) != 1:
|
| 300 |
+
raise CommandRejected("open requires exactly one absolute URL")
|
| 301 |
+
try:
|
| 302 |
+
requested_origin = _origin(urls[0])
|
| 303 |
+
except (TypeError, ValueError) as exc:
|
| 304 |
+
raise CommandRejected(str(exc)) from exc
|
| 305 |
+
if requested_origin not in allowed_origins():
|
| 306 |
+
raise CommandRejected("browser navigation target is outside task origins")
|
| 307 |
+
|
| 308 |
+
if command == "screenshot":
|
| 309 |
+
# The bundled Browser Use CLI is `screenshot [--full] [path]`; accept the spellings
|
| 310 |
+
# agents reach for (`--full-page`, `--path X`, `--path=X`) and hand the CLI its own.
|
| 311 |
+
path_values: list[str] = []
|
| 312 |
+
options: list[str] = []
|
| 313 |
+
tail = arguments[command_index + 1 :]
|
| 314 |
+
index = 0
|
| 315 |
+
while index < len(tail):
|
| 316 |
+
value = tail[index]
|
| 317 |
+
if value == "--path":
|
| 318 |
+
if index + 1 >= len(tail):
|
| 319 |
+
raise CommandRejected("screenshot --path requires a value")
|
| 320 |
+
path_values.append(tail[index + 1])
|
| 321 |
+
index += 2
|
| 322 |
+
continue
|
| 323 |
+
if value.startswith("--path="):
|
| 324 |
+
path_values.append(value.partition("=")[2])
|
| 325 |
+
index += 1
|
| 326 |
+
continue
|
| 327 |
+
if value in {"--full", "--full-page"}:
|
| 328 |
+
if "--full" not in options:
|
| 329 |
+
options.append("--full")
|
| 330 |
+
index += 1
|
| 331 |
+
continue
|
| 332 |
+
if value in {"--json", "-h", "--help"}:
|
| 333 |
+
options.append(value)
|
| 334 |
+
index += 1
|
| 335 |
+
continue
|
| 336 |
+
if value.startswith("-"):
|
| 337 |
+
raise CommandRejected(f"unsupported screenshot option {value!r}")
|
| 338 |
+
path_values.append(value)
|
| 339 |
+
index += 1
|
| 340 |
+
paths = [Path(value).resolve() for value in path_values]
|
| 341 |
+
if (
|
| 342 |
+
len(paths) != 1
|
| 343 |
+
or paths[0].parent != SHARED_ROOT
|
| 344 |
+
or re.fullmatch(r"screenshot-[0-9a-f]{32}\.png", paths[0].name) is None
|
| 345 |
+
):
|
| 346 |
+
raise CommandRejected("screenshots must use one gateway-owned PNG path")
|
| 347 |
+
return arguments[: command_index + 1] + options + [str(paths[0])]
|
| 348 |
+
|
| 349 |
+
return arguments
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
_COMMAND_LOCK = threading.Lock()
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
def execute(arguments: list[str]) -> dict[str, Any]:
|
| 356 |
+
with _COMMAND_LOCK:
|
| 357 |
+
try:
|
| 358 |
+
completed = subprocess.run(
|
| 359 |
+
[REAL_BROWSER_USE, *arguments],
|
| 360 |
+
stdin=subprocess.DEVNULL,
|
| 361 |
+
stdout=subprocess.PIPE,
|
| 362 |
+
stderr=subprocess.PIPE,
|
| 363 |
+
timeout=COMMAND_TIMEOUT_SEC,
|
| 364 |
+
check=False,
|
| 365 |
+
)
|
| 366 |
+
except subprocess.TimeoutExpired as exc:
|
| 367 |
+
raise CommandRejected("Browser Use command exceeded 180 seconds") from exc
|
| 368 |
+
except OSError as exc:
|
| 369 |
+
raise CommandRejected(f"Browser Use runtime unavailable: {exc}") from exc
|
| 370 |
+
stdout = completed.stdout[:MAX_OUTPUT_BYTES]
|
| 371 |
+
stderr = completed.stderr[:MAX_OUTPUT_BYTES]
|
| 372 |
+
if len(completed.stdout) > MAX_OUTPUT_BYTES or len(completed.stderr) > MAX_OUTPUT_BYTES:
|
| 373 |
+
raise CommandRejected("Browser Use output exceeded the interactive limit")
|
| 374 |
+
return {
|
| 375 |
+
"exit_code": completed.returncode,
|
| 376 |
+
"stdout": stdout.decode("utf-8", errors="replace"),
|
| 377 |
+
"stderr": stderr.decode("utf-8", errors="replace"),
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
|
| 381 |
+
GATEWAY_HELP = """
|
| 382 |
+
WebsiteBench gateway commands:
|
| 383 |
+
assets List the reference-origin images, icons, fonts and media that the
|
| 384 |
+
current page references or loaded.
|
| 385 |
+
save-asset URL PATH Save one of those assets to PATH (for example under /app/repo).
|
| 386 |
+
Stylesheets, scripts, HTML documents, JSON and other API responses are refused.
|
| 387 |
+
"""
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
def _find_result(value: Any) -> Any:
|
| 391 |
+
if isinstance(value, dict):
|
| 392 |
+
if "result" in value:
|
| 393 |
+
return value["result"]
|
| 394 |
+
for nested in value.values():
|
| 395 |
+
found = _find_result(nested)
|
| 396 |
+
if found is not None:
|
| 397 |
+
return found
|
| 398 |
+
return None
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
def list_assets(arguments: list[str], command_index: int) -> dict[str, Any]:
|
| 402 |
+
inventory = execute(arguments[:command_index] + ["--json", "eval", ASSET_INVENTORY_JS])
|
| 403 |
+
if inventory["exit_code"] != 0:
|
| 404 |
+
return {"exit_code": inventory["exit_code"], "stdout": "", "stderr": "could not list assets: " + inventory["stderr"][-400:]}
|
| 405 |
+
try:
|
| 406 |
+
urls = json.loads(_find_result(json.loads(inventory["stdout"])) or "[]")
|
| 407 |
+
except (TypeError, ValueError):
|
| 408 |
+
return {"exit_code": 1, "stdout": "", "stderr": "could not list assets: no page is open"}
|
| 409 |
+
origin = reference_origin()
|
| 410 |
+
assets = []
|
| 411 |
+
for url in urls if isinstance(urls, list) else []:
|
| 412 |
+
try:
|
| 413 |
+
if not isinstance(url, str) or _origin(url) != origin:
|
| 414 |
+
continue
|
| 415 |
+
except ValueError:
|
| 416 |
+
continue
|
| 417 |
+
path = urllib.parse.urlsplit(url).path
|
| 418 |
+
if is_reference_code(url):
|
| 419 |
+
continue
|
| 420 |
+
if Path(path).suffix.lower() in STATIC_EXTENSIONS or "/static/" in path or "/assets/" in path:
|
| 421 |
+
assets.append(urllib.parse.urlunsplit(urllib.parse.urlsplit(url)._replace(fragment="")))
|
| 422 |
+
assets = sorted(set(assets))[:ASSET_LIST_LIMIT]
|
| 423 |
+
text = "\n".join(assets) + ("\n" if assets else "no reference static assets found on the current page\n")
|
| 424 |
+
return {"exit_code": 0, "stdout": text, "stderr": ""}
|
| 425 |
+
|
| 426 |
+
|
| 427 |
+
class _SameOriginRedirect(urllib.request.HTTPRedirectHandler):
|
| 428 |
+
def redirect_request(self, req, fp, code, msg, headers, newurl): # type: ignore[override]
|
| 429 |
+
_reference_asset_url(urllib.parse.urljoin(req.full_url, newurl))
|
| 430 |
+
return super().redirect_request(req, fp, code, msg, headers, newurl)
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
def save_asset(url: str, destination: Path) -> dict[str, Any]:
|
| 434 |
+
opener = urllib.request.build_opener(
|
| 435 |
+
urllib.request.HTTPSHandler(context=ssl.create_default_context()), _SameOriginRedirect()
|
| 436 |
+
)
|
| 437 |
+
request = urllib.request.Request(url, headers={"User-Agent": "WebsiteBenchAssetGateway/1", "Accept": "*/*"})
|
| 438 |
+
try:
|
| 439 |
+
with opener.open(request, timeout=ASSET_TIMEOUT_SEC) as response:
|
| 440 |
+
content_type = response.headers.get("Content-Type", "")
|
| 441 |
+
final_url = response.geturl()
|
| 442 |
+
if is_reference_code(final_url, content_type):
|
| 443 |
+
raise CommandRejected(f"refused stylesheet or script ({content_type or 'no content type'}): reference CSS and JavaScript are not available to the agent")
|
| 444 |
+
if not is_static_asset(final_url, content_type):
|
| 445 |
+
raise CommandRejected(f"refused non-static response ({content_type or 'no content type'})")
|
| 446 |
+
body = response.read(ASSET_MAX_BYTES + 1)
|
| 447 |
+
except urllib.error.HTTPError as exc:
|
| 448 |
+
raise CommandRejected(f"reference returned HTTP {exc.code} for {url}") from exc
|
| 449 |
+
except (urllib.error.URLError, OSError) as exc:
|
| 450 |
+
raise CommandRejected(f"asset download failed: {exc}") from exc
|
| 451 |
+
if len(body) > ASSET_MAX_BYTES:
|
| 452 |
+
raise CommandRejected("asset exceeds the 32 MiB limit")
|
| 453 |
+
temporary = destination.with_name(destination.name + ".partial")
|
| 454 |
+
temporary.write_bytes(body)
|
| 455 |
+
os.replace(temporary, destination)
|
| 456 |
+
return {
|
| 457 |
+
"exit_code": 0,
|
| 458 |
+
"stdout": f"saved {url} -> {destination} ({len(body)} bytes, {content_type.split(';', 1)[0].strip() or 'unknown type'})\n",
|
| 459 |
+
"stderr": "",
|
| 460 |
+
}
|
| 461 |
+
|
| 462 |
+
|
| 463 |
+
def run(arguments: list[str]) -> dict[str, Any]:
|
| 464 |
+
_session, command_index = _parse_global_options(arguments)
|
| 465 |
+
command = arguments[command_index] if command_index < len(arguments) else None
|
| 466 |
+
if command == "assets":
|
| 467 |
+
return list_assets(arguments, command_index)
|
| 468 |
+
if command == "save-asset":
|
| 469 |
+
return save_asset(arguments[command_index + 1], Path(arguments[command_index + 2]))
|
| 470 |
+
result = execute(arguments)
|
| 471 |
+
if command in {None, "-h", "--help"}:
|
| 472 |
+
result["stdout"] = result["stdout"] + GATEWAY_HELP
|
| 473 |
+
return result
|
| 474 |
+
|
| 475 |
+
|
| 476 |
+
class Handler(BaseHTTPRequestHandler):
|
| 477 |
+
server_version = "WebsiteBenchBrowserGateway/1"
|
| 478 |
+
|
| 479 |
+
def log_message(self, _format: str, *_arguments: object) -> None:
|
| 480 |
+
return
|
| 481 |
+
|
| 482 |
+
def _send(self, status: int, value: dict[str, Any]) -> None:
|
| 483 |
+
body = json.dumps(value, separators=(",", ":")).encode("utf-8")
|
| 484 |
+
self.send_response(status)
|
| 485 |
+
self.send_header("Content-Type", "application/json")
|
| 486 |
+
self.send_header("Content-Length", str(len(body)))
|
| 487 |
+
self.send_header("Cache-Control", "no-store")
|
| 488 |
+
self.end_headers()
|
| 489 |
+
self.wfile.write(body)
|
| 490 |
+
|
| 491 |
+
def do_GET(self) -> None:
|
| 492 |
+
if self.path == "/healthz":
|
| 493 |
+
self._send(200, {"status": "ok"})
|
| 494 |
+
else:
|
| 495 |
+
self._send(404, {"error": "not_found"})
|
| 496 |
+
|
| 497 |
+
def do_POST(self) -> None:
|
| 498 |
+
if self.path != "/v1/command":
|
| 499 |
+
self._send(404, {"error": "not_found"})
|
| 500 |
+
return
|
| 501 |
+
try:
|
| 502 |
+
length = int(self.headers.get("Content-Length", ""))
|
| 503 |
+
if length <= 0 or length > MAX_REQUEST_BYTES:
|
| 504 |
+
raise CommandRejected("invalid request size")
|
| 505 |
+
payload = json.loads(self.rfile.read(length))
|
| 506 |
+
if not isinstance(payload, dict) or set(payload) != {"argv"}:
|
| 507 |
+
raise CommandRejected("request must contain only argv")
|
| 508 |
+
result = run(validate_command(payload["argv"]))
|
| 509 |
+
except (CommandRejected, json.JSONDecodeError, UnicodeError, ValueError) as exc:
|
| 510 |
+
self._send(400, {"error": str(exc)})
|
| 511 |
+
return
|
| 512 |
+
self._send(200, result)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
def main() -> None:
|
| 516 |
+
bind = os.environ.get("WEBSITEBENCH_BROWSER_GATEWAY_BIND", "0.0.0.0")
|
| 517 |
+
port = int(os.environ.get("WEBSITEBENCH_BROWSER_GATEWAY_PORT", "9224"))
|
| 518 |
+
server = ThreadingHTTPServer((bind, port), Handler)
|
| 519 |
+
server.daemon_threads = True
|
| 520 |
+
server.serve_forever()
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
if __name__ == "__main__":
|
| 524 |
+
main()
|
tasks/eatthismuch/environment/candidate-abi/websitebench-candidate-preflight
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
set -eu
|
| 3 |
+
PYTHONPATH=/opt/websitebench/candidate-abi
|
| 4 |
+
export PYTHONPATH
|
| 5 |
+
exec python3 -m websitebench.harbor.candidate_preflight "$@"
|
tasks/eatthismuch/environment/mailbox/Dockerfile
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.12.11-slim-bookworm@sha256:519591d6871b7bc437060736b9f7456b8731f1499a57e22e6c285135ae657bf7
|
| 2 |
+
WORKDIR /srv/mailbox
|
| 3 |
+
COPY mailbox.py .
|
| 4 |
+
HEALTHCHECK --interval=2s --timeout=2s --retries=30 CMD python -c "import os,urllib.request as r;a=os.environ.get('WEBSITEBENCH_MAILBOX_API_BIND') or '127.0.0.1';i=os.environ.get('WEBSITEBENCH_MAILBOX_INBOX_BIND') or '127.0.0.1';r.urlopen(f'http://{a}:8025/healthz',timeout=1);r.urlopen(f'http://{i}:8026/healthz',timeout=1)"
|
| 5 |
+
CMD ["python", "mailbox.py", "--smtp-port", "1025", "--http-port", "8025", "--inbox-port", "8026"]
|
tasks/eatthismuch/environment/mailbox/mailbox.py
ADDED
|
@@ -0,0 +1,2433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Local-only mail writers plus Inbox HTTP sidecar for deterministic tasks.
|
| 2 |
+
|
| 3 |
+
The sidecar serves two disjoint listeners so the agent and the evaluator never
|
| 4 |
+
share a surface:
|
| 5 |
+
|
| 6 |
+
``api``
|
| 7 |
+
The Bearer-gated JSON API plus ``/internal/bootstrap``. The reference site
|
| 8 |
+
and the evaluator reach it; it is where every capability lives.
|
| 9 |
+
``inbox``
|
| 10 |
+
An HTML-only inbox for exactly one namespace, reachable without a
|
| 11 |
+
credential because a browser has none to present. It exposes no JSON, no
|
| 12 |
+
capability, and no way to name a second namespace.
|
| 13 |
+
|
| 14 |
+
Formal candidates receive a separate per-case write listener. Its primary
|
| 15 |
+
surface is a text-only Resend-style ``POST /emails`` API; legacy SMTP and the
|
| 16 |
+
``websitebench.site_backend`` bootstrap remain compatibility writers. None of
|
| 17 |
+
those surfaces exposes an inbox or a JSON read route.
|
| 18 |
+
|
| 19 |
+
This module is copied *alone* into the mailbox container build context, so it
|
| 20 |
+
must stay self-contained: no imports outside the standard library.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
from __future__ import annotations
|
| 24 |
+
|
| 25 |
+
import email
|
| 26 |
+
import hashlib
|
| 27 |
+
import hmac
|
| 28 |
+
import html
|
| 29 |
+
import http.client
|
| 30 |
+
import json
|
| 31 |
+
import os
|
| 32 |
+
import re
|
| 33 |
+
import secrets
|
| 34 |
+
import shutil
|
| 35 |
+
import socket
|
| 36 |
+
import socketserver
|
| 37 |
+
import signal
|
| 38 |
+
import subprocess
|
| 39 |
+
import sys
|
| 40 |
+
import tempfile
|
| 41 |
+
import threading
|
| 42 |
+
import time
|
| 43 |
+
import urllib.parse
|
| 44 |
+
from collections.abc import Mapping
|
| 45 |
+
from dataclasses import dataclass, field, replace
|
| 46 |
+
from email.message import EmailMessage
|
| 47 |
+
from email.policy import default
|
| 48 |
+
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
| 49 |
+
from typing import Any
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
_NAMESPACE = re.compile(r"^[a-zA-Z0-9._-]{1,160}$")
|
| 53 |
+
_OTP = re.compile(r"(?<!\d)(\d{4,8})(?!\d)")
|
| 54 |
+
_MAX_MESSAGE_BYTES = 1024 * 1024
|
| 55 |
+
_MAX_MESSAGES_PER_NAMESPACE = 32
|
| 56 |
+
_MAX_STORED_BYTES_PER_NAMESPACE = 2 * 1024 * 1024
|
| 57 |
+
_MAX_RECIPIENTS = 16
|
| 58 |
+
_MAX_COMMANDS_PER_CONNECTION = 256
|
| 59 |
+
_CONNECTION_TIMEOUT_SECONDS = 10
|
| 60 |
+
_MAX_CONNECTION_LIFETIME_SECONDS = 30
|
| 61 |
+
_MAX_CONCURRENT_CONNECTIONS = 16
|
| 62 |
+
MAILPIT_IMAGE = (
|
| 63 |
+
"ghcr.io/axllent/mailpit:v1.30.6@"
|
| 64 |
+
"sha256:7f33095f80e901f6ad08028f06ca284aa58fe84942be5496008d041d3b9f4d4d"
|
| 65 |
+
)
|
| 66 |
+
#: The one variable that names the Mailpit a trial or capture must use. It is
|
| 67 |
+
#: read in exactly one place, :meth:`MailPlane.from_environment`.
|
| 68 |
+
MAILPIT_HTTP_SOCKET_ENV = "WEBSITEBENCH_MAILPIT_HTTP_SOCKET"
|
| 69 |
+
#: Where Mailpit's private sockets live inside the compose sidecar. A value
|
| 70 |
+
#: mentioning this path in a candidate environment is an evaluator-side leak.
|
| 71 |
+
MAILPIT_RUNTIME_DIR = "/run/websitebench-mailpit"
|
| 72 |
+
#: The envelope sender every benchmark mail writer presents. Some captured
|
| 73 |
+
#: runtimes pin this exact suffix before opening SMTP, so paired capture and a
|
| 74 |
+
#: scored candidate trial must agree on it to the byte.
|
| 75 |
+
CANDIDATE_MAIL_SENDER = "no-reply@candidate.websitebench.local"
|
| 76 |
+
#: The complete optional mail ABI a candidate runtime may be handed. Nothing
|
| 77 |
+
#: outside this set ever reaches a candidate process.
|
| 78 |
+
CANDIDATE_MAIL_ENVIRONMENT = frozenset(
|
| 79 |
+
{
|
| 80 |
+
"WEBSITEBENCH_MAIL_API_URL",
|
| 81 |
+
"WEBSITEBENCH_MAIL_API_TOKEN",
|
| 82 |
+
"WEBSITEBENCH_MAIL_FROM",
|
| 83 |
+
"WEBSITEBENCH_SMTP_HOST",
|
| 84 |
+
"WEBSITEBENCH_SMTP_PORT",
|
| 85 |
+
"WEBSITEBENCH_SMTP_FROM",
|
| 86 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL",
|
| 87 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN",
|
| 88 |
+
}
|
| 89 |
+
)
|
| 90 |
+
#: Every mail variable an authoring capture exports into its own process, so
|
| 91 |
+
#: capture can save and restore exactly this set around a shard.
|
| 92 |
+
AUTHORING_MAIL_ENVIRONMENT = (
|
| 93 |
+
"WEBSITEBENCH_MAIL_API_URL",
|
| 94 |
+
"WEBSITEBENCH_MAIL_API_TOKEN",
|
| 95 |
+
"WEBSITEBENCH_MAIL_FROM",
|
| 96 |
+
"WEBSITEBENCH_SMTP_FROM",
|
| 97 |
+
"WEBSITEBENCH_MAILBOX_URL",
|
| 98 |
+
"WEBSITEBENCH_MAILBOX_ALLOWLIST",
|
| 99 |
+
"WEBSITEBENCH_MAILBOX_NAMESPACE",
|
| 100 |
+
"WEBSITEBENCH_SMTP_HOST",
|
| 101 |
+
"WEBSITEBENCH_SMTP_PORT",
|
| 102 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL",
|
| 103 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN",
|
| 104 |
+
"WEBSITEBENCH_MAILBOX_CREDENTIAL",
|
| 105 |
+
)
|
| 106 |
+
_LOG_SECRET = re.compile(
|
| 107 |
+
r"(?i)(?:bearer\s+[^\s\"']+|"
|
| 108 |
+
r"(?:authorization|cookie|credential|password|secret|token|otp|"
|
| 109 |
+
r"verification[-_ ]?code|card[-_ ]?number)\s*[:=]\s*"
|
| 110 |
+
r"(?:bearer\s+)?[^\s,;]+)"
|
| 111 |
+
)
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
class MailpitInfrastructureError(RuntimeError):
|
| 115 |
+
"""Mailpit is missing or unhealthy, as distinct from rejected candidate mail."""
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
class MailInfrastructureUnavailable(MailpitInfrastructureError):
|
| 119 |
+
"""No Mailpit is configured for this process, or the configured one is down."""
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
class MailboxCapacityError(RuntimeError):
|
| 123 |
+
"""A namespace exhausted its fixed message or submitted-byte quota."""
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
class _UnixHTTPConnection(http.client.HTTPConnection):
|
| 127 |
+
"""A minimal HTTP/1.1 connection transported over one Unix socket."""
|
| 128 |
+
|
| 129 |
+
def __init__(self, socket_path: str, timeout: float) -> None:
|
| 130 |
+
super().__init__("localhost", timeout=timeout)
|
| 131 |
+
self._socket_path = socket_path
|
| 132 |
+
|
| 133 |
+
def connect(self) -> None:
|
| 134 |
+
connection = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
| 135 |
+
connection.settimeout(self.timeout)
|
| 136 |
+
connection.connect(self._socket_path)
|
| 137 |
+
self.sock = connection
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
class MailpitClient:
|
| 141 |
+
"""Trusted Mailpit client: HTTP UDS reads and sibling SMTP UDS writes.
|
| 142 |
+
|
| 143 |
+
This is intentionally not a general Mailpit client. It never exposes the
|
| 144 |
+
UI, delete, release, tag-mutation, or remote-content endpoints. All
|
| 145 |
+
candidate-authored control headers are discarded and the SMTP writer adds
|
| 146 |
+
exactly one trusted tag.
|
| 147 |
+
"""
|
| 148 |
+
|
| 149 |
+
_MAX_RESPONSE_BYTES = 8 * 1024 * 1024
|
| 150 |
+
|
| 151 |
+
def __init__(
|
| 152 |
+
self,
|
| 153 |
+
socket_path: str | os.PathLike[str],
|
| 154 |
+
*,
|
| 155 |
+
smtp_socket_path: str | os.PathLike[str] | None = None,
|
| 156 |
+
timeout: float = 5.0,
|
| 157 |
+
) -> None:
|
| 158 |
+
self.socket_path = os.fspath(socket_path)
|
| 159 |
+
if not self.socket_path:
|
| 160 |
+
raise ValueError("Mailpit HTTP socket path must not be empty")
|
| 161 |
+
if timeout <= 0:
|
| 162 |
+
raise ValueError("Mailpit timeout must be positive")
|
| 163 |
+
self.smtp_socket_path = (
|
| 164 |
+
os.fspath(smtp_socket_path)
|
| 165 |
+
if smtp_socket_path is not None
|
| 166 |
+
else os.path.join(os.path.dirname(self.socket_path), "smtp.sock")
|
| 167 |
+
)
|
| 168 |
+
self.timeout = float(timeout)
|
| 169 |
+
|
| 170 |
+
def _request(
|
| 171 |
+
self, method: str, path: str, body: dict[str, Any] | None = None
|
| 172 |
+
) -> tuple[int, bytes]:
|
| 173 |
+
encoded = None if body is None else json.dumps(body).encode("utf-8")
|
| 174 |
+
headers = {"Accept": "application/json", "Connection": "close"}
|
| 175 |
+
if encoded is not None:
|
| 176 |
+
headers["Content-Type"] = "application/json"
|
| 177 |
+
headers["Content-Length"] = str(len(encoded))
|
| 178 |
+
connection = _UnixHTTPConnection(self.socket_path, self.timeout)
|
| 179 |
+
try:
|
| 180 |
+
connection.request(method, path, body=encoded, headers=headers)
|
| 181 |
+
response = connection.getresponse()
|
| 182 |
+
length = response.getheader("Content-Length")
|
| 183 |
+
if length is not None and int(length) > self._MAX_RESPONSE_BYTES:
|
| 184 |
+
raise MailpitInfrastructureError("Mailpit response exceeded limit")
|
| 185 |
+
value = response.read(self._MAX_RESPONSE_BYTES + 1)
|
| 186 |
+
if len(value) > self._MAX_RESPONSE_BYTES:
|
| 187 |
+
raise MailpitInfrastructureError("Mailpit response exceeded limit")
|
| 188 |
+
return int(response.status), value
|
| 189 |
+
except (OSError, TimeoutError, http.client.HTTPException, ValueError) as error:
|
| 190 |
+
raise MailpitInfrastructureError(
|
| 191 |
+
f"Mailpit request failed: {redact_text(str(error))}"
|
| 192 |
+
) from error
|
| 193 |
+
finally:
|
| 194 |
+
connection.close()
|
| 195 |
+
|
| 196 |
+
def _json(
|
| 197 |
+
self, method: str, path: str, body: dict[str, Any] | None = None
|
| 198 |
+
) -> dict[str, Any]:
|
| 199 |
+
status, raw = self._request(method, path, body)
|
| 200 |
+
if not 200 <= status < 300:
|
| 201 |
+
raise MailpitInfrastructureError(f"Mailpit API returned HTTP {status}")
|
| 202 |
+
try:
|
| 203 |
+
value = json.loads(raw)
|
| 204 |
+
except (UnicodeDecodeError, json.JSONDecodeError) as error:
|
| 205 |
+
raise MailpitInfrastructureError("Mailpit returned invalid JSON") from error
|
| 206 |
+
if not isinstance(value, dict):
|
| 207 |
+
raise MailpitInfrastructureError("Mailpit returned an invalid response")
|
| 208 |
+
return value
|
| 209 |
+
|
| 210 |
+
def ready(self) -> bool:
|
| 211 |
+
"""Return whether Mailpit's built-in readiness endpoint is healthy."""
|
| 212 |
+
|
| 213 |
+
try:
|
| 214 |
+
status, _body = self._request("GET", "/readyz")
|
| 215 |
+
except MailpitInfrastructureError:
|
| 216 |
+
return False
|
| 217 |
+
return status == 200
|
| 218 |
+
|
| 219 |
+
def send(
|
| 220 |
+
self,
|
| 221 |
+
raw: bytes,
|
| 222 |
+
envelope_from: str,
|
| 223 |
+
recipients: list[str],
|
| 224 |
+
*,
|
| 225 |
+
tag: str,
|
| 226 |
+
) -> str:
|
| 227 |
+
"""Store mail with one trusted tag, ignoring all untrusted X-headers."""
|
| 228 |
+
|
| 229 |
+
if any(
|
| 230 |
+
"\r" in value or "\n" in value for value in [envelope_from, *recipients]
|
| 231 |
+
):
|
| 232 |
+
raise ValueError("invalid SMTP envelope")
|
| 233 |
+
message = email.message_from_bytes(raw, policy=default)
|
| 234 |
+
for part in message.walk():
|
| 235 |
+
for header in list(part.keys()):
|
| 236 |
+
lowered = header.lower()
|
| 237 |
+
if lowered == "x-tags" or lowered.startswith("x-websitebench-"):
|
| 238 |
+
del part[header]
|
| 239 |
+
for header in ("From", "To", "Cc", "Bcc"):
|
| 240 |
+
if message.get(header) is not None:
|
| 241 |
+
del message[header]
|
| 242 |
+
message["From"] = envelope_from
|
| 243 |
+
message["To"] = ", ".join(recipients)
|
| 244 |
+
message["X-Tags"] = tag
|
| 245 |
+
wire = message.as_bytes(policy=default.clone(linesep="\r\n"))
|
| 246 |
+
|
| 247 |
+
connection = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
| 248 |
+
connection.settimeout(self.timeout)
|
| 249 |
+
stream = None
|
| 250 |
+
try:
|
| 251 |
+
connection.connect(self.smtp_socket_path)
|
| 252 |
+
stream = connection.makefile("rb")
|
| 253 |
+
|
| 254 |
+
def response() -> tuple[int, str]:
|
| 255 |
+
lines: list[str] = []
|
| 256 |
+
while True:
|
| 257 |
+
line = stream.readline(65537)
|
| 258 |
+
if not line or len(line) > 65536:
|
| 259 |
+
raise MailpitInfrastructureError(
|
| 260 |
+
"invalid Mailpit SMTP response"
|
| 261 |
+
)
|
| 262 |
+
decoded = line.decode("utf-8", "replace").rstrip("\r\n")
|
| 263 |
+
lines.append(decoded)
|
| 264 |
+
if len(decoded) < 4 or decoded[3:4] != "-":
|
| 265 |
+
break
|
| 266 |
+
try:
|
| 267 |
+
return int(lines[-1][:3]), "\n".join(lines)
|
| 268 |
+
except ValueError as error:
|
| 269 |
+
raise MailpitInfrastructureError(
|
| 270 |
+
"invalid Mailpit SMTP status"
|
| 271 |
+
) from error
|
| 272 |
+
|
| 273 |
+
def command(value: bytes, expected: set[int]) -> str:
|
| 274 |
+
connection.sendall(value + b"\r\n")
|
| 275 |
+
status, reply = response()
|
| 276 |
+
if status not in expected:
|
| 277 |
+
raise MailpitInfrastructureError(
|
| 278 |
+
f"Mailpit SMTP returned status {status}: "
|
| 279 |
+
f"{redact_text(reply)[:200]}"
|
| 280 |
+
)
|
| 281 |
+
return reply
|
| 282 |
+
|
| 283 |
+
status, _greeting = response()
|
| 284 |
+
if status != 220:
|
| 285 |
+
raise MailpitInfrastructureError(
|
| 286 |
+
"Mailpit SMTP did not greet the gateway"
|
| 287 |
+
)
|
| 288 |
+
command(b"EHLO websitebench.local", {250})
|
| 289 |
+
command(f"MAIL FROM:<{envelope_from}>".encode("utf-8"), {250})
|
| 290 |
+
for recipient in recipients:
|
| 291 |
+
command(f"RCPT TO:<{recipient}>".encode("utf-8"), {250})
|
| 292 |
+
command(b"DATA", {354})
|
| 293 |
+
stuffed = b"\r\n".join(
|
| 294 |
+
(b"." + line if line.startswith(b".") else line)
|
| 295 |
+
for line in wire.split(b"\r\n")
|
| 296 |
+
)
|
| 297 |
+
connection.sendall(stuffed + b"\r\n.\r\n")
|
| 298 |
+
status, reply = response()
|
| 299 |
+
if status != 250:
|
| 300 |
+
raise MailpitInfrastructureError(
|
| 301 |
+
f"Mailpit SMTP returned status {status}: {redact_text(reply)[:200]}"
|
| 302 |
+
)
|
| 303 |
+
match = re.search(r"queued as ([A-Za-z0-9_-]+)", reply)
|
| 304 |
+
return match.group(1) if match else hashlib.sha256(wire).hexdigest()[:24]
|
| 305 |
+
except (OSError, TimeoutError) as error:
|
| 306 |
+
raise MailpitInfrastructureError("Mailpit SMTP request failed") from error
|
| 307 |
+
finally:
|
| 308 |
+
if stream is not None:
|
| 309 |
+
stream.close()
|
| 310 |
+
connection.close()
|
| 311 |
+
|
| 312 |
+
@staticmethod
|
| 313 |
+
def _addresses(value: Any) -> list[str]:
|
| 314 |
+
if not isinstance(value, list):
|
| 315 |
+
return []
|
| 316 |
+
return [
|
| 317 |
+
str(item.get("Address", item.get("Email")))
|
| 318 |
+
for item in value
|
| 319 |
+
if isinstance(item, dict)
|
| 320 |
+
and isinstance(item.get("Address", item.get("Email")), str)
|
| 321 |
+
]
|
| 322 |
+
|
| 323 |
+
def messages(self, *, tag: str, recipient: str) -> list[dict[str, Any]]:
|
| 324 |
+
"""Read only exact-tag, exact-recipient messages, oldest first."""
|
| 325 |
+
|
| 326 |
+
query = urllib.parse.urlencode(
|
| 327 |
+
{"query": f"tag:{tag}", "start": "0", "limit": "512"}
|
| 328 |
+
)
|
| 329 |
+
listing = self._json("GET", f"/api/v1/search?{query}")
|
| 330 |
+
summaries = listing.get("messages", [])
|
| 331 |
+
if not isinstance(summaries, list):
|
| 332 |
+
raise MailpitInfrastructureError(
|
| 333 |
+
"Mailpit returned invalid message summaries"
|
| 334 |
+
)
|
| 335 |
+
values: list[dict[str, Any]] = []
|
| 336 |
+
for summary in reversed(summaries):
|
| 337 |
+
if not isinstance(summary, dict):
|
| 338 |
+
continue
|
| 339 |
+
tags = summary.get("Tags", [])
|
| 340 |
+
all_recipients = (
|
| 341 |
+
self._addresses(summary.get("To"))
|
| 342 |
+
+ self._addresses(summary.get("Cc"))
|
| 343 |
+
+ self._addresses(summary.get("Bcc"))
|
| 344 |
+
)
|
| 345 |
+
identifier = summary.get("ID")
|
| 346 |
+
if (
|
| 347 |
+
tag not in tags
|
| 348 |
+
or recipient not in all_recipients
|
| 349 |
+
or not isinstance(identifier, str)
|
| 350 |
+
):
|
| 351 |
+
continue
|
| 352 |
+
detail = self._json(
|
| 353 |
+
"GET", "/api/v1/message/" + urllib.parse.quote(identifier, safe="")
|
| 354 |
+
)
|
| 355 |
+
# Recheck authorization against the detailed record. Search is an
|
| 356 |
+
# index, never an authorization decision.
|
| 357 |
+
detail_tags = detail.get("Tags", [])
|
| 358 |
+
detailed_recipients = (
|
| 359 |
+
self._addresses(detail.get("To"))
|
| 360 |
+
+ self._addresses(detail.get("Cc"))
|
| 361 |
+
+ self._addresses(detail.get("Bcc"))
|
| 362 |
+
)
|
| 363 |
+
if tag not in detail_tags or recipient not in detailed_recipients:
|
| 364 |
+
continue
|
| 365 |
+
sender = detail.get("From", {})
|
| 366 |
+
attachments = detail.get("Attachments", [])
|
| 367 |
+
inline = detail.get("Inline", [])
|
| 368 |
+
metadata = [
|
| 369 |
+
*(attachments if isinstance(attachments, list) else []),
|
| 370 |
+
*(inline if isinstance(inline, list) else []),
|
| 371 |
+
]
|
| 372 |
+
values.append(
|
| 373 |
+
{
|
| 374 |
+
"mailpit_id": identifier,
|
| 375 |
+
"envelope_from": str(sender.get("Address", sender.get("Email", "")))
|
| 376 |
+
if isinstance(sender, dict)
|
| 377 |
+
else "",
|
| 378 |
+
"recipients": detailed_recipients,
|
| 379 |
+
"subject": str(detail.get("Subject", "")),
|
| 380 |
+
"text": str(detail.get("Text", "")),
|
| 381 |
+
"attachments": metadata,
|
| 382 |
+
"stored_bytes": int(detail.get("Size", 0)),
|
| 383 |
+
}
|
| 384 |
+
)
|
| 385 |
+
for index, item in enumerate(values, 1):
|
| 386 |
+
item["id"] = index
|
| 387 |
+
match = _OTP.search(str(item["text"]))
|
| 388 |
+
item["otp"] = match.group(1) if match else None
|
| 389 |
+
return values
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
@dataclass
|
| 393 |
+
class MailAccount:
|
| 394 |
+
"""Internal ``websitebench.mail-account.v1`` logical account."""
|
| 395 |
+
|
| 396 |
+
account_id: str
|
| 397 |
+
tag: str
|
| 398 |
+
address: str
|
| 399 |
+
role: str
|
| 400 |
+
allowed_from: set[str]
|
| 401 |
+
allowed_to: set[str]
|
| 402 |
+
send_capability: str = field(repr=False)
|
| 403 |
+
read_capability: str = field(repr=False)
|
| 404 |
+
state: str = "active"
|
| 405 |
+
schema: str = field(default="websitebench.mail-account.v1", init=False)
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
class MailAccountBroker:
|
| 409 |
+
"""Authorize logical accounts before calling the untrusted storage engine."""
|
| 410 |
+
|
| 411 |
+
_SEND_ROLES = frozenset(
|
| 412 |
+
{
|
| 413 |
+
"reference-backend",
|
| 414 |
+
"formal-candidate",
|
| 415 |
+
"capture-writer",
|
| 416 |
+
"gateway",
|
| 417 |
+
"selfhost-pair",
|
| 418 |
+
"formal-pair",
|
| 419 |
+
"capture-pair",
|
| 420 |
+
}
|
| 421 |
+
)
|
| 422 |
+
_READ_ROLES = frozenset(
|
| 423 |
+
{
|
| 424 |
+
"agent",
|
| 425 |
+
"formal-verifier",
|
| 426 |
+
"capture-reader",
|
| 427 |
+
"gateway",
|
| 428 |
+
"selfhost-pair",
|
| 429 |
+
"formal-pair",
|
| 430 |
+
"capture-pair",
|
| 431 |
+
}
|
| 432 |
+
)
|
| 433 |
+
_ROLES = _SEND_ROLES | _READ_ROLES
|
| 434 |
+
|
| 435 |
+
def __init__(self, client: MailpitClient) -> None:
|
| 436 |
+
self.client = client
|
| 437 |
+
self._accounts: dict[str, MailAccount] = {}
|
| 438 |
+
self._lock = threading.Lock()
|
| 439 |
+
|
| 440 |
+
def create_account(
|
| 441 |
+
self,
|
| 442 |
+
*,
|
| 443 |
+
address: str,
|
| 444 |
+
role: str,
|
| 445 |
+
allowed_from: Any = (),
|
| 446 |
+
allowed_to: Any = (),
|
| 447 |
+
) -> MailAccount:
|
| 448 |
+
if address and ("@" not in address or "\r" in address or "\n" in address):
|
| 449 |
+
raise ValueError("invalid mail account address")
|
| 450 |
+
if role not in self._ROLES:
|
| 451 |
+
raise ValueError("invalid mail account role")
|
| 452 |
+
account = MailAccount(
|
| 453 |
+
account_id="acct_" + secrets.token_hex(24),
|
| 454 |
+
tag="wb-" + secrets.token_hex(24),
|
| 455 |
+
address=address,
|
| 456 |
+
role=role,
|
| 457 |
+
allowed_from=set(allowed_from),
|
| 458 |
+
allowed_to=set(allowed_to) | ({address} if address else set()),
|
| 459 |
+
send_capability="send_" + secrets.token_hex(32),
|
| 460 |
+
read_capability="read_" + secrets.token_hex(32),
|
| 461 |
+
)
|
| 462 |
+
with self._lock:
|
| 463 |
+
self._accounts[account.account_id] = account
|
| 464 |
+
return account
|
| 465 |
+
|
| 466 |
+
def _account(self, account_id: str) -> MailAccount:
|
| 467 |
+
with self._lock:
|
| 468 |
+
account = self._accounts.get(account_id)
|
| 469 |
+
if account is None or account.state == "destroyed":
|
| 470 |
+
raise PermissionError("mail account is unavailable")
|
| 471 |
+
return account
|
| 472 |
+
|
| 473 |
+
def send(
|
| 474 |
+
self,
|
| 475 |
+
account_id: str,
|
| 476 |
+
capability: str,
|
| 477 |
+
raw: bytes,
|
| 478 |
+
envelope_from: str,
|
| 479 |
+
recipients: list[str],
|
| 480 |
+
) -> str:
|
| 481 |
+
account = self._account(account_id)
|
| 482 |
+
if (
|
| 483 |
+
account.role not in self._SEND_ROLES
|
| 484 |
+
or account.state != "active"
|
| 485 |
+
or not hmac.compare_digest(account.send_capability, capability)
|
| 486 |
+
):
|
| 487 |
+
raise PermissionError("mail account cannot send")
|
| 488 |
+
if (
|
| 489 |
+
not envelope_from
|
| 490 |
+
or "@" not in envelope_from
|
| 491 |
+
or "\r" in envelope_from
|
| 492 |
+
or "\n" in envelope_from
|
| 493 |
+
or not 1 <= len(recipients) <= _MAX_RECIPIENTS
|
| 494 |
+
or len(raw) > _MAX_MESSAGE_BYTES
|
| 495 |
+
or any(
|
| 496 |
+
not recipient
|
| 497 |
+
or len(recipient) > 320
|
| 498 |
+
or "@" not in recipient
|
| 499 |
+
or "\r" in recipient
|
| 500 |
+
or "\n" in recipient
|
| 501 |
+
for recipient in recipients
|
| 502 |
+
)
|
| 503 |
+
):
|
| 504 |
+
raise PermissionError("mail envelope is not allowed")
|
| 505 |
+
if account.allowed_from and envelope_from not in account.allowed_from:
|
| 506 |
+
raise PermissionError("mail sender is not allowed")
|
| 507 |
+
learn_recipients = account.role == "gateway" or not account.allowed_to
|
| 508 |
+
if account.role != "gateway" and account.allowed_to and any(
|
| 509 |
+
value not in account.allowed_to for value in recipients
|
| 510 |
+
):
|
| 511 |
+
raise PermissionError("mail recipient is not allowed")
|
| 512 |
+
provider_id = self.client.send(raw, envelope_from, recipients, tag=account.tag)
|
| 513 |
+
if learn_recipients:
|
| 514 |
+
# A trial can legitimately exercise more than one authentication
|
| 515 |
+
# address. Namespace-scoped gateway accounts therefore learn every
|
| 516 |
+
# address from a Mailpit-accepted envelope; reads remain limited to
|
| 517 |
+
# those exact delivered addresses and still require the capability.
|
| 518 |
+
with self._lock:
|
| 519 |
+
account.allowed_to.update(recipients)
|
| 520 |
+
if not account.address and recipients:
|
| 521 |
+
account.address = recipients[0]
|
| 522 |
+
return provider_id
|
| 523 |
+
|
| 524 |
+
def messages(
|
| 525 |
+
self, account_id: str, capability: str, recipient: str | None = None
|
| 526 |
+
) -> list[dict[str, Any]]:
|
| 527 |
+
account = self._account(account_id)
|
| 528 |
+
if account.role not in self._READ_ROLES or not hmac.compare_digest(
|
| 529 |
+
account.read_capability, capability
|
| 530 |
+
):
|
| 531 |
+
raise PermissionError("mail account cannot read")
|
| 532 |
+
with self._lock:
|
| 533 |
+
allowed_to = set(account.allowed_to)
|
| 534 |
+
# SMTP delivery is asynchronous. A verifier can legitimately poll the
|
| 535 |
+
# exact recipient before the writer has learned its first envelope. An
|
| 536 |
+
# empty account therefore means "not delivered yet", not "forbidden".
|
| 537 |
+
# Once the first envelope arrives, the usual exact-recipient boundary
|
| 538 |
+
# applies and a different address is still rejected.
|
| 539 |
+
if recipient is not None and not allowed_to:
|
| 540 |
+
return []
|
| 541 |
+
targets = [recipient] if recipient is not None else sorted(allowed_to)
|
| 542 |
+
if any(target not in allowed_to for target in targets):
|
| 543 |
+
raise PermissionError("mail recipient is not allowed")
|
| 544 |
+
combined: dict[str, dict[str, Any]] = {}
|
| 545 |
+
for target in targets:
|
| 546 |
+
for message in self.client.messages(tag=account.tag, recipient=target):
|
| 547 |
+
combined[str(message["mailpit_id"])] = message
|
| 548 |
+
values = list(combined.values())
|
| 549 |
+
for index, item in enumerate(values, 1):
|
| 550 |
+
item["id"] = index
|
| 551 |
+
return values
|
| 552 |
+
|
| 553 |
+
def seal(self, account_id: str) -> None:
|
| 554 |
+
account = self._account(account_id)
|
| 555 |
+
with self._lock:
|
| 556 |
+
account.state = "sealed"
|
| 557 |
+
|
| 558 |
+
def destroy(self, account_id: str) -> None:
|
| 559 |
+
account = self._account(account_id)
|
| 560 |
+
with self._lock:
|
| 561 |
+
account.state = "destroyed"
|
| 562 |
+
|
| 563 |
+
|
| 564 |
+
class EphemeralMailpit:
|
| 565 |
+
"""One pinned, networkless Mailpit container with a private UDS directory."""
|
| 566 |
+
|
| 567 |
+
def __init__(
|
| 568 |
+
self,
|
| 569 |
+
runtime_dir: str | os.PathLike[str] | None = None,
|
| 570 |
+
*,
|
| 571 |
+
docker_binary: str = "docker",
|
| 572 |
+
startup_timeout: float = 45.0,
|
| 573 |
+
) -> None:
|
| 574 |
+
if startup_timeout <= 0:
|
| 575 |
+
raise ValueError("startup timeout must be positive")
|
| 576 |
+
self._owns_runtime_dir = runtime_dir is None
|
| 577 |
+
self.runtime_dir = (
|
| 578 |
+
tempfile.mkdtemp(prefix="websitebench-mailpit-")
|
| 579 |
+
if runtime_dir is None
|
| 580 |
+
else os.path.abspath(os.fspath(runtime_dir))
|
| 581 |
+
)
|
| 582 |
+
os.makedirs(self.runtime_dir, mode=0o700, exist_ok=True)
|
| 583 |
+
os.chmod(self.runtime_dir, 0o700)
|
| 584 |
+
self.docker_binary = docker_binary
|
| 585 |
+
self.startup_timeout = float(startup_timeout)
|
| 586 |
+
self.container_name = "websitebench-mailpit-" + secrets.token_hex(12)
|
| 587 |
+
self.client = MailpitClient(os.path.join(self.runtime_dir, "http.sock"))
|
| 588 |
+
self._process: subprocess.Popen[bytes] | None = None
|
| 589 |
+
|
| 590 |
+
def _uses_rootless_podman(self) -> bool:
|
| 591 |
+
"""Detect the Podman Docker shim that needs the host uid preserved."""
|
| 592 |
+
|
| 593 |
+
try:
|
| 594 |
+
result = subprocess.run(
|
| 595 |
+
[self.docker_binary, "info"],
|
| 596 |
+
stdin=subprocess.DEVNULL,
|
| 597 |
+
stdout=subprocess.PIPE,
|
| 598 |
+
stderr=subprocess.STDOUT,
|
| 599 |
+
text=True,
|
| 600 |
+
timeout=5,
|
| 601 |
+
check=False,
|
| 602 |
+
)
|
| 603 |
+
except (OSError, subprocess.TimeoutExpired):
|
| 604 |
+
return False
|
| 605 |
+
output = result.stdout.casefold()
|
| 606 |
+
return result.returncode == 0 and "podman" in output and "rootless" in output
|
| 607 |
+
|
| 608 |
+
def start(self) -> "EphemeralMailpit":
|
| 609 |
+
if self._process is not None:
|
| 610 |
+
return self
|
| 611 |
+
command = [
|
| 612 |
+
self.docker_binary,
|
| 613 |
+
"run",
|
| 614 |
+
"--rm",
|
| 615 |
+
"--name",
|
| 616 |
+
self.container_name,
|
| 617 |
+
]
|
| 618 |
+
if self._uses_rootless_podman():
|
| 619 |
+
command.append("--userns=keep-id")
|
| 620 |
+
command.extend(
|
| 621 |
+
[
|
| 622 |
+
"--user",
|
| 623 |
+
f"{os.getuid()}:{os.getgid()}",
|
| 624 |
+
"--network",
|
| 625 |
+
"none",
|
| 626 |
+
"--tmpfs",
|
| 627 |
+
"/tmp:rw,noexec,nosuid,nodev,size=64m",
|
| 628 |
+
"--mount",
|
| 629 |
+
f"type=bind,src={self.runtime_dir},dst=/run/websitebench-mailpit",
|
| 630 |
+
]
|
| 631 |
+
)
|
| 632 |
+
settings = {
|
| 633 |
+
"MP_UI_BIND_ADDR": "unix:/run/websitebench-mailpit/http.sock:660",
|
| 634 |
+
"MP_SMTP_BIND_ADDR": "unix:/run/websitebench-mailpit/smtp.sock:660",
|
| 635 |
+
"MP_DATABASE": "/tmp/mailpit.db",
|
| 636 |
+
"MP_MAX_MESSAGES": "512",
|
| 637 |
+
"MP_MAX_MESSAGE_SIZE": "1",
|
| 638 |
+
"MP_SMTP_MAX_RECIPIENTS": "16",
|
| 639 |
+
"MP_POP3_BIND_ADDR": "",
|
| 640 |
+
"MP_POP3_AUTH_FILE": "",
|
| 641 |
+
"MP_SMTP_RELAY_CONFIG": "",
|
| 642 |
+
"MP_SMTP_RELAY_ALL": "false",
|
| 643 |
+
"MP_SMTP_FORWARD_CONFIG": "",
|
| 644 |
+
"MP_WEBHOOK_URL": "",
|
| 645 |
+
"MP_ENABLE_CHAOS": "false",
|
| 646 |
+
"MP_ENABLE_PROMETHEUS": "false",
|
| 647 |
+
"MP_DISABLE_VERSION_CHECK": "true",
|
| 648 |
+
"MP_BLOCK_REMOTE_CSS_AND_FONTS": "true",
|
| 649 |
+
"MP_ALLOW_INTERNAL_HTTP_REQUESTS": "false",
|
| 650 |
+
}
|
| 651 |
+
for key, value in settings.items():
|
| 652 |
+
command.extend(("--env", f"{key}={value}"))
|
| 653 |
+
command.append(MAILPIT_IMAGE)
|
| 654 |
+
try:
|
| 655 |
+
self._process = subprocess.Popen(
|
| 656 |
+
command,
|
| 657 |
+
stdin=subprocess.DEVNULL,
|
| 658 |
+
stdout=subprocess.DEVNULL,
|
| 659 |
+
stderr=subprocess.DEVNULL,
|
| 660 |
+
)
|
| 661 |
+
except OSError as error:
|
| 662 |
+
self.close()
|
| 663 |
+
raise MailpitInfrastructureError(
|
| 664 |
+
"Docker is unavailable for Mailpit"
|
| 665 |
+
) from error
|
| 666 |
+
deadline = time.monotonic() + self.startup_timeout
|
| 667 |
+
while time.monotonic() < deadline:
|
| 668 |
+
if self._process.poll() is not None:
|
| 669 |
+
self.close()
|
| 670 |
+
raise MailpitInfrastructureError(
|
| 671 |
+
"Mailpit container exited during startup"
|
| 672 |
+
)
|
| 673 |
+
if self.client.ready():
|
| 674 |
+
return self
|
| 675 |
+
time.sleep(0.1)
|
| 676 |
+
self.close()
|
| 677 |
+
raise MailpitInfrastructureError("Mailpit did not become ready")
|
| 678 |
+
|
| 679 |
+
def close(self) -> None:
|
| 680 |
+
process, self._process = self._process, None
|
| 681 |
+
if process is not None and process.poll() is None:
|
| 682 |
+
try:
|
| 683 |
+
subprocess.run(
|
| 684 |
+
[self.docker_binary, "stop", "--time", "3", self.container_name],
|
| 685 |
+
stdin=subprocess.DEVNULL,
|
| 686 |
+
stdout=subprocess.DEVNULL,
|
| 687 |
+
stderr=subprocess.DEVNULL,
|
| 688 |
+
timeout=8,
|
| 689 |
+
check=False,
|
| 690 |
+
)
|
| 691 |
+
except (OSError, subprocess.TimeoutExpired):
|
| 692 |
+
process.terminate()
|
| 693 |
+
try:
|
| 694 |
+
process.wait(timeout=5)
|
| 695 |
+
except subprocess.TimeoutExpired:
|
| 696 |
+
process.kill()
|
| 697 |
+
process.wait(timeout=5)
|
| 698 |
+
if self._owns_runtime_dir:
|
| 699 |
+
shutil.rmtree(self.runtime_dir, ignore_errors=True)
|
| 700 |
+
else:
|
| 701 |
+
for name in ("http.sock", "smtp.sock"):
|
| 702 |
+
try:
|
| 703 |
+
os.unlink(os.path.join(self.runtime_dir, name))
|
| 704 |
+
except FileNotFoundError:
|
| 705 |
+
pass
|
| 706 |
+
|
| 707 |
+
def __enter__(self) -> "EphemeralMailpit":
|
| 708 |
+
return self.start()
|
| 709 |
+
|
| 710 |
+
def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
|
| 711 |
+
self.close()
|
| 712 |
+
|
| 713 |
+
|
| 714 |
+
def redact_text(value: str) -> str:
|
| 715 |
+
"""Redact secret-like log fragments without retaining the matched value."""
|
| 716 |
+
|
| 717 |
+
return _LOG_SECRET.sub("[REDACTED]", value)
|
| 718 |
+
|
| 719 |
+
|
| 720 |
+
def redact_log_file(path: str) -> None:
|
| 721 |
+
"""Sanitize one UTF-8 verifier log in place before it is published."""
|
| 722 |
+
|
| 723 |
+
from pathlib import Path
|
| 724 |
+
|
| 725 |
+
target = Path(path)
|
| 726 |
+
if not target.is_file():
|
| 727 |
+
return
|
| 728 |
+
value = target.read_text(encoding="utf-8", errors="replace")
|
| 729 |
+
target.write_text(redact_text(value), encoding="utf-8", newline="\n")
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
def redact_evidence(value: Any) -> Any:
|
| 733 |
+
"""Remove credentials and sensitive form values from retained evidence."""
|
| 734 |
+
|
| 735 |
+
sensitive = re.compile(
|
| 736 |
+
r"(?:authorization|cookie|credential|password|secret|token|otp|code|payment|card)",
|
| 737 |
+
re.IGNORECASE,
|
| 738 |
+
)
|
| 739 |
+
if isinstance(value, dict):
|
| 740 |
+
return {
|
| 741 |
+
str(key): "[REDACTED]"
|
| 742 |
+
if sensitive.search(str(key))
|
| 743 |
+
else redact_evidence(child)
|
| 744 |
+
for key, child in value.items()
|
| 745 |
+
}
|
| 746 |
+
if isinstance(value, list):
|
| 747 |
+
return [redact_evidence(child) for child in value]
|
| 748 |
+
return value
|
| 749 |
+
|
| 750 |
+
|
| 751 |
+
@dataclass
|
| 752 |
+
class MailboxStore:
|
| 753 |
+
mailpit_client: MailpitClient
|
| 754 |
+
_capabilities: dict[str, str] = field(default_factory=dict)
|
| 755 |
+
_idempotency: dict[tuple[str, str], str] = field(default_factory=dict)
|
| 756 |
+
_namespace_message_counts: dict[str, int] = field(default_factory=dict)
|
| 757 |
+
_namespace_stored_bytes: dict[str, int] = field(default_factory=dict)
|
| 758 |
+
_lock: threading.Lock = field(default_factory=threading.Lock)
|
| 759 |
+
_broker: MailAccountBroker = field(init=False)
|
| 760 |
+
_accounts: dict[str, MailAccount] = field(default_factory=dict, init=False)
|
| 761 |
+
|
| 762 |
+
def __post_init__(self) -> None:
|
| 763 |
+
if not isinstance(self.mailpit_client, MailpitClient):
|
| 764 |
+
raise MailpitInfrastructureError("Mailpit client is required")
|
| 765 |
+
self._broker = MailAccountBroker(self.mailpit_client)
|
| 766 |
+
|
| 767 |
+
def healthy(self) -> bool:
|
| 768 |
+
return self.mailpit_client.ready()
|
| 769 |
+
|
| 770 |
+
def register(
|
| 771 |
+
self,
|
| 772 |
+
namespace: str,
|
| 773 |
+
capability: str,
|
| 774 |
+
*,
|
| 775 |
+
allowed_from: tuple[str, ...] = (),
|
| 776 |
+
) -> None:
|
| 777 |
+
if not _NAMESPACE.fullmatch(namespace) or len(capability) < 32:
|
| 778 |
+
raise ValueError("invalid mailbox namespace capability")
|
| 779 |
+
if any(
|
| 780 |
+
not value or "@" not in value or "\r" in value or "\n" in value
|
| 781 |
+
for value in allowed_from
|
| 782 |
+
):
|
| 783 |
+
raise ValueError("invalid allowed mail sender")
|
| 784 |
+
allowed_senders = set(allowed_from)
|
| 785 |
+
with self._lock:
|
| 786 |
+
existing = self._capabilities.get(namespace)
|
| 787 |
+
if existing is not None and existing != capability:
|
| 788 |
+
raise ValueError("mailbox namespace is already registered")
|
| 789 |
+
self._capabilities[namespace] = capability
|
| 790 |
+
account = self._accounts.get(namespace)
|
| 791 |
+
if account is None:
|
| 792 |
+
self._accounts[namespace] = self._broker.create_account(
|
| 793 |
+
address="", role="gateway", allowed_from=allowed_senders
|
| 794 |
+
)
|
| 795 |
+
elif account.allowed_from != allowed_senders:
|
| 796 |
+
raise ValueError("mailbox namespace sender policy is already registered")
|
| 797 |
+
|
| 798 |
+
def authorized(self, namespace: str, capability: str | None) -> bool:
|
| 799 |
+
with self._lock:
|
| 800 |
+
expected = self._capabilities.get(namespace)
|
| 801 |
+
return (
|
| 802 |
+
expected is not None
|
| 803 |
+
and capability is not None
|
| 804 |
+
and hmac.compare_digest(expected, capability)
|
| 805 |
+
)
|
| 806 |
+
|
| 807 |
+
def seal_namespace(self, namespace: str) -> None:
|
| 808 |
+
"""Retire one writer while retaining trusted reads until teardown."""
|
| 809 |
+
|
| 810 |
+
with self._lock:
|
| 811 |
+
self._capabilities.pop(namespace, None)
|
| 812 |
+
account = self._accounts.get(namespace)
|
| 813 |
+
self._namespace_message_counts.pop(namespace, None)
|
| 814 |
+
self._namespace_stored_bytes.pop(namespace, None)
|
| 815 |
+
self._idempotency = {
|
| 816 |
+
identity: provider_id
|
| 817 |
+
for identity, provider_id in self._idempotency.items()
|
| 818 |
+
if identity[0] != namespace
|
| 819 |
+
}
|
| 820 |
+
if account is not None:
|
| 821 |
+
self._broker.seal(account.account_id)
|
| 822 |
+
|
| 823 |
+
def destroy_namespaces(self) -> None:
|
| 824 |
+
"""Revoke every logical account without deleting Mailpit messages."""
|
| 825 |
+
|
| 826 |
+
with self._lock:
|
| 827 |
+
accounts = list(self._accounts.values())
|
| 828 |
+
self._capabilities.clear()
|
| 829 |
+
self._accounts.clear()
|
| 830 |
+
self._namespace_message_counts.clear()
|
| 831 |
+
self._namespace_stored_bytes.clear()
|
| 832 |
+
self._idempotency.clear()
|
| 833 |
+
for account in accounts:
|
| 834 |
+
if account.state != "destroyed":
|
| 835 |
+
self._broker.destroy(account.account_id)
|
| 836 |
+
|
| 837 |
+
def _store_message(
|
| 838 |
+
self,
|
| 839 |
+
message: Any,
|
| 840 |
+
envelope_from: str,
|
| 841 |
+
recipients: list[str],
|
| 842 |
+
*,
|
| 843 |
+
namespace: str,
|
| 844 |
+
idempotency_key: str | None = None,
|
| 845 |
+
raw: bytes | None = None,
|
| 846 |
+
) -> tuple[bool, str | None]:
|
| 847 |
+
with self._lock:
|
| 848 |
+
idempotency_identity = (
|
| 849 |
+
(namespace, idempotency_key) if idempotency_key else None
|
| 850 |
+
)
|
| 851 |
+
if idempotency_identity is not None:
|
| 852 |
+
previous = self._idempotency.get(idempotency_identity)
|
| 853 |
+
if previous is not None:
|
| 854 |
+
return True, previous
|
| 855 |
+
account = self._accounts.get(namespace)
|
| 856 |
+
if account is None:
|
| 857 |
+
return False, None
|
| 858 |
+
wire = raw if raw is not None else message.as_bytes()
|
| 859 |
+
message_count = self._namespace_message_counts.get(namespace, 0)
|
| 860 |
+
stored_bytes = self._namespace_stored_bytes.get(namespace, 0)
|
| 861 |
+
if (
|
| 862 |
+
message_count >= _MAX_MESSAGES_PER_NAMESPACE
|
| 863 |
+
or stored_bytes + len(wire) > _MAX_STORED_BYTES_PER_NAMESPACE
|
| 864 |
+
):
|
| 865 |
+
raise MailboxCapacityError("mailbox namespace capacity exceeded")
|
| 866 |
+
# Keep the lock across the final hop so concurrent requests with
|
| 867 |
+
# one idempotency key cannot manufacture two accepted messages.
|
| 868 |
+
# No message body or code is retained after Mailpit acknowledges
|
| 869 |
+
# the SMTP DATA command.
|
| 870 |
+
provider_id = self._broker.send(
|
| 871 |
+
account.account_id,
|
| 872 |
+
account.send_capability,
|
| 873 |
+
wire,
|
| 874 |
+
envelope_from,
|
| 875 |
+
recipients,
|
| 876 |
+
)
|
| 877 |
+
self._namespace_message_counts[namespace] = message_count + 1
|
| 878 |
+
self._namespace_stored_bytes[namespace] = stored_bytes + len(wire)
|
| 879 |
+
if idempotency_identity is not None:
|
| 880 |
+
self._idempotency[idempotency_identity] = provider_id
|
| 881 |
+
return True, provider_id
|
| 882 |
+
|
| 883 |
+
def deliver(self, raw: bytes, envelope_from: str, recipients: list[str]) -> bool:
|
| 884 |
+
message = email.message_from_bytes(raw, policy=default)
|
| 885 |
+
namespace = str(message.get("X-WebsiteBench-Namespace", "default"))
|
| 886 |
+
capability = str(message.get("X-WebsiteBench-Capability", ""))
|
| 887 |
+
if not _NAMESPACE.fullmatch(namespace) or not self.authorized(
|
| 888 |
+
namespace, capability
|
| 889 |
+
):
|
| 890 |
+
return False
|
| 891 |
+
accepted, _provider_id = self._store_message(
|
| 892 |
+
message,
|
| 893 |
+
envelope_from,
|
| 894 |
+
recipients,
|
| 895 |
+
namespace=namespace,
|
| 896 |
+
raw=raw,
|
| 897 |
+
)
|
| 898 |
+
return accepted
|
| 899 |
+
|
| 900 |
+
def deliver_to(
|
| 901 |
+
self,
|
| 902 |
+
namespace: str,
|
| 903 |
+
raw: bytes,
|
| 904 |
+
envelope_from: str,
|
| 905 |
+
recipients: list[str],
|
| 906 |
+
) -> bool:
|
| 907 |
+
"""Store mail on a listener already fixed to one registered namespace.
|
| 908 |
+
|
| 909 |
+
Formal candidate runtimes receive access to that write-only listener,
|
| 910 |
+
not to the namespace-selecting SMTP or JSON API used by reference
|
| 911 |
+
capture. The routing decision therefore belongs to trusted verifier
|
| 912 |
+
infrastructure rather than to candidate-authored message headers.
|
| 913 |
+
"""
|
| 914 |
+
|
| 915 |
+
if not _NAMESPACE.fullmatch(namespace):
|
| 916 |
+
return False
|
| 917 |
+
with self._lock:
|
| 918 |
+
registered = namespace in self._capabilities
|
| 919 |
+
if not registered:
|
| 920 |
+
return False
|
| 921 |
+
message = email.message_from_bytes(raw, policy=default)
|
| 922 |
+
accepted, _provider_id = self._store_message(
|
| 923 |
+
message,
|
| 924 |
+
envelope_from,
|
| 925 |
+
recipients,
|
| 926 |
+
namespace=namespace,
|
| 927 |
+
raw=raw,
|
| 928 |
+
)
|
| 929 |
+
return accepted
|
| 930 |
+
|
| 931 |
+
def deliver_resend_style_to(
|
| 932 |
+
self,
|
| 933 |
+
namespace: str,
|
| 934 |
+
*,
|
| 935 |
+
envelope_from: str,
|
| 936 |
+
recipients: list[str],
|
| 937 |
+
subject: str,
|
| 938 |
+
text: str,
|
| 939 |
+
idempotency_key: str | None,
|
| 940 |
+
) -> tuple[bool, str | None]:
|
| 941 |
+
"""Store one text-only Resend-style request in a fixed namespace."""
|
| 942 |
+
|
| 943 |
+
if not _NAMESPACE.fullmatch(namespace):
|
| 944 |
+
return False, None
|
| 945 |
+
with self._lock:
|
| 946 |
+
registered = namespace in self._capabilities
|
| 947 |
+
if not registered:
|
| 948 |
+
return False, None
|
| 949 |
+
message = EmailMessage()
|
| 950 |
+
message["From"] = envelope_from
|
| 951 |
+
message["To"] = ", ".join(recipients)
|
| 952 |
+
message["Subject"] = subject
|
| 953 |
+
message.set_content(text)
|
| 954 |
+
return self._store_message(
|
| 955 |
+
message,
|
| 956 |
+
envelope_from,
|
| 957 |
+
recipients,
|
| 958 |
+
namespace=namespace,
|
| 959 |
+
idempotency_key=idempotency_key,
|
| 960 |
+
raw=message.as_bytes(),
|
| 961 |
+
)
|
| 962 |
+
|
| 963 |
+
def messages(
|
| 964 |
+
self, namespace: str, recipient: str | None = None
|
| 965 |
+
) -> list[dict[str, Any]]:
|
| 966 |
+
with self._lock:
|
| 967 |
+
account = self._accounts.get(namespace)
|
| 968 |
+
if account is None:
|
| 969 |
+
return []
|
| 970 |
+
values = self._broker.messages(
|
| 971 |
+
account.account_id, account.read_capability, recipient
|
| 972 |
+
)
|
| 973 |
+
for item in values:
|
| 974 |
+
item["namespace"] = namespace
|
| 975 |
+
item.pop("stored_bytes", None)
|
| 976 |
+
item.pop("mailpit_id", None)
|
| 977 |
+
return values
|
| 978 |
+
|
| 979 |
+
|
| 980 |
+
_INBOX_STYLE = (
|
| 981 |
+
"body{font:16px/1.5 system-ui,sans-serif;margin:0;background:#f6f7f9;"
|
| 982 |
+
"color:#1b1f24}"
|
| 983 |
+
"header{background:#fff;border-bottom:1px solid #d8dee4;padding:16px 24px}"
|
| 984 |
+
"h1{font-size:20px;margin:0}"
|
| 985 |
+
"main{max-width:52rem;margin:0 auto;padding:24px}"
|
| 986 |
+
"a{color:#0b62d0}"
|
| 987 |
+
".msg{background:#fff;border:1px solid #d8dee4;border-radius:8px;"
|
| 988 |
+
"padding:12px 16px;margin-bottom:12px}"
|
| 989 |
+
".msg h2{font-size:16px;margin:0 0 4px}"
|
| 990 |
+
".meta{color:#57606a;font-size:13px;margin:0}"
|
| 991 |
+
".empty{color:#57606a}"
|
| 992 |
+
"pre{white-space:pre-wrap;word-break:break-word;background:#f6f8fa;"
|
| 993 |
+
"border-radius:6px;padding:12px;margin:12px 0 0}"
|
| 994 |
+
)
|
| 995 |
+
|
| 996 |
+
|
| 997 |
+
def _document(title: str, body: str) -> bytes:
|
| 998 |
+
"""One self-contained HTML page. Every interpolated value is escaped."""
|
| 999 |
+
|
| 1000 |
+
return (
|
| 1001 |
+
"<!doctype html><html lang=en><meta charset=utf-8>"
|
| 1002 |
+
'<meta name=viewport content="width=device-width,initial-scale=1">'
|
| 1003 |
+
f"<title>{html.escape(title)}</title>"
|
| 1004 |
+
f"<style>{_INBOX_STYLE}</style>"
|
| 1005 |
+
f"<header><h1>{html.escape(title)}</h1></header><main>{body}</main>"
|
| 1006 |
+
"</html>"
|
| 1007 |
+
).encode("utf-8")
|
| 1008 |
+
|
| 1009 |
+
|
| 1010 |
+
def _recipients(message: dict[str, Any]) -> str:
|
| 1011 |
+
return ", ".join(str(item) for item in message.get("recipients", []))
|
| 1012 |
+
|
| 1013 |
+
|
| 1014 |
+
def render_inbox(messages: list[dict[str, Any]], *, base_path: str = "") -> bytes:
|
| 1015 |
+
"""The message list an agent reads in a browser.
|
| 1016 |
+
|
| 1017 |
+
The extracted ``otp`` is deliberately absent: an agent should read the code
|
| 1018 |
+
out of the body the way a person would. That field stays an evaluator-side
|
| 1019 |
+
convenience on the JSON API.
|
| 1020 |
+
"""
|
| 1021 |
+
|
| 1022 |
+
if not messages:
|
| 1023 |
+
body = (
|
| 1024 |
+
"<p class=empty id=inbox-empty>No messages yet. Mail sent to this "
|
| 1025 |
+
"mailbox appears here.</p>"
|
| 1026 |
+
)
|
| 1027 |
+
else:
|
| 1028 |
+
body = "".join(
|
| 1029 |
+
"<article class=msg>"
|
| 1030 |
+
f'<h2><a href="{html.escape(base_path)}/messages/{int(item["id"])}">'
|
| 1031 |
+
f"{html.escape(str(item.get('subject', '')))}</a></h2>"
|
| 1032 |
+
f"<p class=meta>From {html.escape(str(item.get('envelope_from', '')))}"
|
| 1033 |
+
f" · To {html.escape(_recipients(item))}"
|
| 1034 |
+
f" · Message {int(item['id'])}</p>"
|
| 1035 |
+
"</article>"
|
| 1036 |
+
for item in messages
|
| 1037 |
+
)
|
| 1038 |
+
refresh = f'<p><a href="{html.escape(base_path)}" id=inbox-refresh>Refresh</a></p>'
|
| 1039 |
+
return _document("Inbox", body + refresh)
|
| 1040 |
+
|
| 1041 |
+
|
| 1042 |
+
def render_message(message: dict[str, Any], *, base_path: str = "") -> bytes:
|
| 1043 |
+
"""One message, body included, for the agent to read the code out of."""
|
| 1044 |
+
|
| 1045 |
+
body = (
|
| 1046 |
+
"<article class=msg>"
|
| 1047 |
+
f"<h2>{html.escape(str(message.get('subject', '')))}</h2>"
|
| 1048 |
+
f"<p class=meta>From {html.escape(str(message.get('envelope_from', '')))}"
|
| 1049 |
+
f" · To {html.escape(_recipients(message))}</p>"
|
| 1050 |
+
f"<pre id=message-body>{html.escape(str(message.get('text', '')))}</pre>"
|
| 1051 |
+
"</article>"
|
| 1052 |
+
f'<p><a href="{html.escape(base_path)}" id=inbox-back>Back to inbox</a></p>'
|
| 1053 |
+
)
|
| 1054 |
+
return _document("Message", body)
|
| 1055 |
+
|
| 1056 |
+
|
| 1057 |
+
class _SmtpHandler(socketserver.StreamRequestHandler):
|
| 1058 |
+
def handle(self) -> None:
|
| 1059 |
+
timer = threading.Timer(
|
| 1060 |
+
_MAX_CONNECTION_LIFETIME_SECONDS, self._expire_connection
|
| 1061 |
+
)
|
| 1062 |
+
timer.daemon = True
|
| 1063 |
+
timer.start()
|
| 1064 |
+
try:
|
| 1065 |
+
self._handle_session()
|
| 1066 |
+
finally:
|
| 1067 |
+
timer.cancel()
|
| 1068 |
+
|
| 1069 |
+
def _expire_connection(self) -> None:
|
| 1070 |
+
try:
|
| 1071 |
+
self.connection.shutdown(socket.SHUT_RDWR)
|
| 1072 |
+
except OSError:
|
| 1073 |
+
pass
|
| 1074 |
+
|
| 1075 |
+
def _handle_session(self) -> None:
|
| 1076 |
+
store: MailboxStore = self.server.store # type: ignore[attr-defined]
|
| 1077 |
+
self.connection.settimeout(_CONNECTION_TIMEOUT_SECONDS)
|
| 1078 |
+
self.wfile.write(b"220 websitebench.local ESMTP\r\n")
|
| 1079 |
+
envelope_from = ""
|
| 1080 |
+
recipients: list[str] = []
|
| 1081 |
+
for _command_count in range(_MAX_COMMANDS_PER_CONNECTION):
|
| 1082 |
+
try:
|
| 1083 |
+
line = self.rfile.readline(65537)
|
| 1084 |
+
except (TimeoutError, socket.timeout):
|
| 1085 |
+
return
|
| 1086 |
+
if not line:
|
| 1087 |
+
return
|
| 1088 |
+
if len(line) > 65536:
|
| 1089 |
+
self.wfile.write(b"500 Command line too long\r\n")
|
| 1090 |
+
return
|
| 1091 |
+
command = line.decode("utf-8", "replace").rstrip("\r\n")
|
| 1092 |
+
upper = command.upper()
|
| 1093 |
+
if upper.startswith(("EHLO", "HELO")):
|
| 1094 |
+
self.wfile.write(b"250-websitebench.local\r\n250 SIZE 1048576\r\n")
|
| 1095 |
+
elif upper.startswith("MAIL FROM:"):
|
| 1096 |
+
path = command.split(":", 1)[1].strip()
|
| 1097 |
+
envelope_from = (
|
| 1098 |
+
path[1:].split(">", 1)[0]
|
| 1099 |
+
if path.startswith("<") and ">" in path
|
| 1100 |
+
else path.split(None, 1)[0].strip("<>")
|
| 1101 |
+
)
|
| 1102 |
+
recipients = []
|
| 1103 |
+
self.wfile.write(b"250 OK\r\n")
|
| 1104 |
+
elif upper.startswith("RCPT TO:"):
|
| 1105 |
+
if len(recipients) >= _MAX_RECIPIENTS:
|
| 1106 |
+
self.wfile.write(b"452 Too many recipients\r\n")
|
| 1107 |
+
continue
|
| 1108 |
+
path = command.split(":", 1)[1].strip()
|
| 1109 |
+
recipients.append(
|
| 1110 |
+
path[1:].split(">", 1)[0]
|
| 1111 |
+
if path.startswith("<") and ">" in path
|
| 1112 |
+
else path.split(None, 1)[0].strip("<>")
|
| 1113 |
+
)
|
| 1114 |
+
self.wfile.write(b"250 OK\r\n")
|
| 1115 |
+
elif upper == "DATA":
|
| 1116 |
+
self.wfile.write(b"354 End data with <CR><LF>.<CR><LF>\r\n")
|
| 1117 |
+
chunks = bytearray()
|
| 1118 |
+
oversized = False
|
| 1119 |
+
while True:
|
| 1120 |
+
try:
|
| 1121 |
+
data_line = self.rfile.readline(65537)
|
| 1122 |
+
except (TimeoutError, socket.timeout):
|
| 1123 |
+
return
|
| 1124 |
+
if data_line in {b".\r\n", b".\n", b""}:
|
| 1125 |
+
break
|
| 1126 |
+
if len(data_line) > 65536:
|
| 1127 |
+
oversized = True
|
| 1128 |
+
value = data_line[1:] if data_line.startswith(b"..") else data_line
|
| 1129 |
+
if len(chunks) + len(value) > _MAX_MESSAGE_BYTES:
|
| 1130 |
+
oversized = True
|
| 1131 |
+
elif not oversized:
|
| 1132 |
+
chunks.extend(value)
|
| 1133 |
+
if oversized:
|
| 1134 |
+
self.wfile.write(b"552 Message exceeds fixed local limit\r\n")
|
| 1135 |
+
continue
|
| 1136 |
+
fixed_namespace = getattr(self.server, "fixed_namespace", None)
|
| 1137 |
+
try:
|
| 1138 |
+
accepted = (
|
| 1139 |
+
store.deliver_to(
|
| 1140 |
+
fixed_namespace,
|
| 1141 |
+
bytes(chunks),
|
| 1142 |
+
envelope_from,
|
| 1143 |
+
recipients,
|
| 1144 |
+
)
|
| 1145 |
+
if isinstance(fixed_namespace, str)
|
| 1146 |
+
else store.deliver(bytes(chunks), envelope_from, recipients)
|
| 1147 |
+
)
|
| 1148 |
+
except MailboxCapacityError:
|
| 1149 |
+
self.wfile.write(b"452 Mailbox capacity exceeded\r\n")
|
| 1150 |
+
continue
|
| 1151 |
+
except PermissionError:
|
| 1152 |
+
self.wfile.write(b"550 Mail sender or recipient is not allowed\r\n")
|
| 1153 |
+
continue
|
| 1154 |
+
except MailpitInfrastructureError:
|
| 1155 |
+
self.wfile.write(b"451 Mailpit delivery unavailable\r\n")
|
| 1156 |
+
continue
|
| 1157 |
+
self.wfile.write(
|
| 1158 |
+
b"250 Accepted by Mailpit\r\n"
|
| 1159 |
+
if accepted
|
| 1160 |
+
else b"550 Invalid namespace capability\r\n"
|
| 1161 |
+
)
|
| 1162 |
+
elif upper == "RSET":
|
| 1163 |
+
envelope_from, recipients = "", []
|
| 1164 |
+
self.wfile.write(b"250 OK\r\n")
|
| 1165 |
+
elif upper == "NOOP":
|
| 1166 |
+
self.wfile.write(b"250 OK\r\n")
|
| 1167 |
+
elif upper == "QUIT":
|
| 1168 |
+
self.wfile.write(b"221 Bye\r\n")
|
| 1169 |
+
return
|
| 1170 |
+
else:
|
| 1171 |
+
self.wfile.write(b"502 Command not implemented\r\n")
|
| 1172 |
+
self.wfile.write(b"421 Command limit exceeded\r\n")
|
| 1173 |
+
|
| 1174 |
+
|
| 1175 |
+
class _SmtpServer(socketserver.ThreadingTCPServer):
|
| 1176 |
+
allow_reuse_address = True
|
| 1177 |
+
daemon_threads = True
|
| 1178 |
+
|
| 1179 |
+
def __init__(
|
| 1180 |
+
self,
|
| 1181 |
+
address: tuple[str, int],
|
| 1182 |
+
store: MailboxStore,
|
| 1183 |
+
*,
|
| 1184 |
+
fixed_namespace: str | None = None,
|
| 1185 |
+
) -> None:
|
| 1186 |
+
self.store = store
|
| 1187 |
+
self.fixed_namespace = fixed_namespace
|
| 1188 |
+
self._connection_slots = threading.BoundedSemaphore(_MAX_CONCURRENT_CONNECTIONS)
|
| 1189 |
+
super().__init__(address, _SmtpHandler)
|
| 1190 |
+
|
| 1191 |
+
def process_request(self, request: Any, client_address: Any) -> None:
|
| 1192 |
+
if not self._connection_slots.acquire(blocking=False):
|
| 1193 |
+
request.close()
|
| 1194 |
+
return
|
| 1195 |
+
super().process_request(request, client_address)
|
| 1196 |
+
|
| 1197 |
+
def process_request_thread(self, request: Any, client_address: Any) -> None:
|
| 1198 |
+
try:
|
| 1199 |
+
super().process_request_thread(request, client_address)
|
| 1200 |
+
finally:
|
| 1201 |
+
self._connection_slots.release()
|
| 1202 |
+
|
| 1203 |
+
|
| 1204 |
+
class _HttpServer(ThreadingHTTPServer):
|
| 1205 |
+
daemon_threads = True
|
| 1206 |
+
|
| 1207 |
+
def __init__(self, address: tuple[str, int], handler: Any) -> None:
|
| 1208 |
+
self._connection_slots = threading.BoundedSemaphore(_MAX_CONCURRENT_CONNECTIONS)
|
| 1209 |
+
super().__init__(address, handler)
|
| 1210 |
+
|
| 1211 |
+
def process_request(self, request: Any, client_address: Any) -> None:
|
| 1212 |
+
if not self._connection_slots.acquire(blocking=False):
|
| 1213 |
+
request.close()
|
| 1214 |
+
return
|
| 1215 |
+
super().process_request(request, client_address)
|
| 1216 |
+
|
| 1217 |
+
def process_request_thread(self, request: Any, client_address: Any) -> None:
|
| 1218 |
+
def expire() -> None:
|
| 1219 |
+
try:
|
| 1220 |
+
request.shutdown(socket.SHUT_RDWR)
|
| 1221 |
+
except OSError:
|
| 1222 |
+
pass
|
| 1223 |
+
|
| 1224 |
+
timer = threading.Timer(_MAX_CONNECTION_LIFETIME_SECONDS, expire)
|
| 1225 |
+
timer.daemon = True
|
| 1226 |
+
timer.start()
|
| 1227 |
+
try:
|
| 1228 |
+
request.settimeout(_CONNECTION_TIMEOUT_SECONDS)
|
| 1229 |
+
super().process_request_thread(request, client_address)
|
| 1230 |
+
finally:
|
| 1231 |
+
timer.cancel()
|
| 1232 |
+
self._connection_slots.release()
|
| 1233 |
+
|
| 1234 |
+
|
| 1235 |
+
def _http_handler(
|
| 1236 |
+
store: MailboxStore,
|
| 1237 |
+
bootstrap: "_Bootstrap | _BootstrapSlot | None" = None,
|
| 1238 |
+
) -> type[BaseHTTPRequestHandler]:
|
| 1239 |
+
"""The evaluator- and site-facing listener: JSON, Bearer-gated throughout."""
|
| 1240 |
+
|
| 1241 |
+
slot = (
|
| 1242 |
+
bootstrap
|
| 1243 |
+
if isinstance(bootstrap, _BootstrapSlot)
|
| 1244 |
+
else _BootstrapSlot(bootstrap)
|
| 1245 |
+
)
|
| 1246 |
+
|
| 1247 |
+
class Handler(BaseHTTPRequestHandler):
|
| 1248 |
+
def _authorized(self, namespace: str) -> bool:
|
| 1249 |
+
prefix = "Bearer "
|
| 1250 |
+
header = self.headers.get("Authorization", "")
|
| 1251 |
+
capability = header[len(prefix) :] if header.startswith(prefix) else None
|
| 1252 |
+
if store.authorized(namespace, capability):
|
| 1253 |
+
return True
|
| 1254 |
+
self._json(403, {"error": "forbidden"})
|
| 1255 |
+
return False
|
| 1256 |
+
|
| 1257 |
+
def _json(self, status: int, value: Any) -> None:
|
| 1258 |
+
body = json.dumps(value, ensure_ascii=False, sort_keys=True).encode("utf-8")
|
| 1259 |
+
self.send_response(status)
|
| 1260 |
+
self.send_header("Content-Type", "application/json; charset=utf-8")
|
| 1261 |
+
self.send_header("Content-Length", str(len(body)))
|
| 1262 |
+
self.end_headers()
|
| 1263 |
+
self.wfile.write(body)
|
| 1264 |
+
|
| 1265 |
+
def _html(self, status: int, body: bytes) -> None:
|
| 1266 |
+
self.send_response(status)
|
| 1267 |
+
self.send_header("Content-Type", "text/html; charset=utf-8")
|
| 1268 |
+
self.send_header("Content-Length", str(len(body)))
|
| 1269 |
+
self.end_headers()
|
| 1270 |
+
self.wfile.write(body)
|
| 1271 |
+
|
| 1272 |
+
def do_GET(self) -> None: # noqa: N802
|
| 1273 |
+
parsed = urllib.parse.urlsplit(self.path)
|
| 1274 |
+
if parsed.path == "/healthz":
|
| 1275 |
+
if store.healthy():
|
| 1276 |
+
self._json(200, {"status": "ok"})
|
| 1277 |
+
else:
|
| 1278 |
+
self._json(503, {"status": "unavailable"})
|
| 1279 |
+
return
|
| 1280 |
+
if parsed.path == "/internal/bootstrap":
|
| 1281 |
+
# The site process learns this trial's namespace and capability
|
| 1282 |
+
# here. It is gated on its own token so the route stays closed
|
| 1283 |
+
# even if the internal network were misrouted.
|
| 1284 |
+
identity = slot.get()
|
| 1285 |
+
if identity is None:
|
| 1286 |
+
self._json(404, {"error": "not_found"})
|
| 1287 |
+
return
|
| 1288 |
+
prefix = "Bearer "
|
| 1289 |
+
header = self.headers.get("Authorization", "")
|
| 1290 |
+
presented = header[len(prefix) :] if header.startswith(prefix) else ""
|
| 1291 |
+
if not hmac.compare_digest(identity.token, presented):
|
| 1292 |
+
self._json(403, {"error": "forbidden"})
|
| 1293 |
+
return
|
| 1294 |
+
self._json(200, identity.payload())
|
| 1295 |
+
return
|
| 1296 |
+
parts = parsed.path.strip("/").split("/")
|
| 1297 |
+
if (
|
| 1298 |
+
len(parts) >= 4
|
| 1299 |
+
and parts[:2] == ["api", "namespaces"]
|
| 1300 |
+
and parts[3] == "messages"
|
| 1301 |
+
):
|
| 1302 |
+
namespace = urllib.parse.unquote(parts[2])
|
| 1303 |
+
if not _NAMESPACE.fullmatch(namespace):
|
| 1304 |
+
self._json(400, {"error": "invalid_namespace"})
|
| 1305 |
+
return
|
| 1306 |
+
if not self._authorized(namespace):
|
| 1307 |
+
return
|
| 1308 |
+
recipient = urllib.parse.parse_qs(parsed.query).get(
|
| 1309 |
+
"recipient", [None]
|
| 1310 |
+
)[0]
|
| 1311 |
+
try:
|
| 1312 |
+
values = store.messages(namespace, recipient)
|
| 1313 |
+
except PermissionError:
|
| 1314 |
+
self._json(403, {"error": "recipient_forbidden"})
|
| 1315 |
+
return
|
| 1316 |
+
except MailpitInfrastructureError:
|
| 1317 |
+
self._json(503, {"error": "mailpit_unavailable"})
|
| 1318 |
+
return
|
| 1319 |
+
if len(parts) == 5 and parts[4] == "latest":
|
| 1320 |
+
if not values:
|
| 1321 |
+
self._json(404, {"error": "message_not_found"})
|
| 1322 |
+
else:
|
| 1323 |
+
self._json(200, values[-1])
|
| 1324 |
+
else:
|
| 1325 |
+
self._json(200, {"messages": values})
|
| 1326 |
+
return
|
| 1327 |
+
if len(parts) == 2 and parts[0] == "inbox":
|
| 1328 |
+
namespace = urllib.parse.unquote(parts[1])
|
| 1329 |
+
if not _NAMESPACE.fullmatch(namespace):
|
| 1330 |
+
self._json(400, {"error": "invalid_namespace"})
|
| 1331 |
+
return
|
| 1332 |
+
if not self._authorized(namespace):
|
| 1333 |
+
return
|
| 1334 |
+
try:
|
| 1335 |
+
messages = store.messages(namespace)
|
| 1336 |
+
except PermissionError:
|
| 1337 |
+
self._json(403, {"error": "forbidden"})
|
| 1338 |
+
return
|
| 1339 |
+
except MailpitInfrastructureError:
|
| 1340 |
+
self._json(503, {"error": "mailpit_unavailable"})
|
| 1341 |
+
return
|
| 1342 |
+
body = render_inbox(
|
| 1343 |
+
messages, base_path=f"/inbox/{urllib.parse.quote(namespace)}"
|
| 1344 |
+
)
|
| 1345 |
+
self._html(200, body)
|
| 1346 |
+
return
|
| 1347 |
+
self._json(404, {"error": "not_found"})
|
| 1348 |
+
|
| 1349 |
+
def do_POST(self) -> None: # noqa: N802
|
| 1350 |
+
"""Accept reference mail through a bootstrap-token write-only API."""
|
| 1351 |
+
|
| 1352 |
+
parsed = urllib.parse.urlsplit(self.path)
|
| 1353 |
+
if parsed.path != "/emails" or parsed.query or parsed.fragment:
|
| 1354 |
+
self._json(404, {"error": "not_found"})
|
| 1355 |
+
return
|
| 1356 |
+
identity = slot.get()
|
| 1357 |
+
if identity is None:
|
| 1358 |
+
self._json(404, {"error": "not_found"})
|
| 1359 |
+
return
|
| 1360 |
+
prefix = "Bearer "
|
| 1361 |
+
header = self.headers.get("Authorization", "")
|
| 1362 |
+
presented = header[len(prefix) :] if header.startswith(prefix) else ""
|
| 1363 |
+
if not hmac.compare_digest(identity.token, presented):
|
| 1364 |
+
self._json(401, {"error": "unauthorized"})
|
| 1365 |
+
return
|
| 1366 |
+
if self.headers.get("Content-Type", "").split(";", 1)[0].strip().lower() != "application/json":
|
| 1367 |
+
self._json(415, {"error": "application_json_required"})
|
| 1368 |
+
return
|
| 1369 |
+
try:
|
| 1370 |
+
content_length = int(self.headers.get("Content-Length", ""))
|
| 1371 |
+
except ValueError:
|
| 1372 |
+
self._json(411, {"error": "content_length_required"})
|
| 1373 |
+
return
|
| 1374 |
+
if content_length < 0 or content_length > _MAX_MESSAGE_BYTES:
|
| 1375 |
+
self._json(413, {"error": "message_too_large"})
|
| 1376 |
+
return
|
| 1377 |
+
try:
|
| 1378 |
+
value = json.loads(self.rfile.read(content_length).decode("utf-8"))
|
| 1379 |
+
except (UnicodeDecodeError, json.JSONDecodeError):
|
| 1380 |
+
self._json(400, {"error": "invalid_json"})
|
| 1381 |
+
return
|
| 1382 |
+
if not isinstance(value, dict) or set(value) != {"from", "to", "subject", "text"}:
|
| 1383 |
+
self._json(400, {"error": "invalid_message_fields"})
|
| 1384 |
+
return
|
| 1385 |
+
envelope_from = value.get("from")
|
| 1386 |
+
recipients = value.get("to")
|
| 1387 |
+
subject = value.get("subject")
|
| 1388 |
+
message_text = value.get("text")
|
| 1389 |
+
recipients = [recipients] if isinstance(recipients, str) else recipients
|
| 1390 |
+
if (
|
| 1391 |
+
not isinstance(envelope_from, str)
|
| 1392 |
+
or not envelope_from
|
| 1393 |
+
or "@" not in envelope_from
|
| 1394 |
+
or "\r" in envelope_from
|
| 1395 |
+
or "\n" in envelope_from
|
| 1396 |
+
or not isinstance(recipients, list)
|
| 1397 |
+
or not 1 <= len(recipients) <= _MAX_RECIPIENTS
|
| 1398 |
+
or any(
|
| 1399 |
+
not isinstance(recipient, str)
|
| 1400 |
+
or not recipient
|
| 1401 |
+
or len(recipient) > 320
|
| 1402 |
+
or "@" not in recipient
|
| 1403 |
+
or "\r" in recipient
|
| 1404 |
+
or "\n" in recipient
|
| 1405 |
+
for recipient in recipients
|
| 1406 |
+
)
|
| 1407 |
+
or not isinstance(subject, str)
|
| 1408 |
+
or len(subject) > 998
|
| 1409 |
+
or "\r" in subject
|
| 1410 |
+
or "\n" in subject
|
| 1411 |
+
or not isinstance(message_text, str)
|
| 1412 |
+
or len(message_text.encode("utf-8")) > _MAX_MESSAGE_BYTES
|
| 1413 |
+
):
|
| 1414 |
+
self._json(400, {"error": "invalid_message"})
|
| 1415 |
+
return
|
| 1416 |
+
idempotency_key = self.headers.get("Idempotency-Key")
|
| 1417 |
+
if idempotency_key is not None and (
|
| 1418 |
+
not idempotency_key
|
| 1419 |
+
or len(idempotency_key) > 256
|
| 1420 |
+
or "\r" in idempotency_key
|
| 1421 |
+
or "\n" in idempotency_key
|
| 1422 |
+
):
|
| 1423 |
+
self._json(400, {"error": "invalid_idempotency_key"})
|
| 1424 |
+
return
|
| 1425 |
+
try:
|
| 1426 |
+
accepted, provider_id = store.deliver_resend_style_to(
|
| 1427 |
+
identity.namespace,
|
| 1428 |
+
envelope_from=envelope_from,
|
| 1429 |
+
recipients=recipients,
|
| 1430 |
+
subject=subject,
|
| 1431 |
+
text=message_text,
|
| 1432 |
+
idempotency_key=idempotency_key,
|
| 1433 |
+
)
|
| 1434 |
+
except MailboxCapacityError:
|
| 1435 |
+
self._json(429, {"error": "mailbox_capacity"})
|
| 1436 |
+
return
|
| 1437 |
+
except MailpitInfrastructureError:
|
| 1438 |
+
self._json(503, {"error": "mailpit_unavailable"})
|
| 1439 |
+
return
|
| 1440 |
+
if not accepted or provider_id is None:
|
| 1441 |
+
self._json(503, {"error": "delivery_failed"})
|
| 1442 |
+
return
|
| 1443 |
+
self._json(200, {"id": provider_id})
|
| 1444 |
+
|
| 1445 |
+
def log_message(self, format: str, *args: Any) -> None:
|
| 1446 |
+
return
|
| 1447 |
+
|
| 1448 |
+
return Handler
|
| 1449 |
+
|
| 1450 |
+
|
| 1451 |
+
def _candidate_bootstrap_handler(
|
| 1452 |
+
*,
|
| 1453 |
+
store: MailboxStore,
|
| 1454 |
+
bootstrap_token: str,
|
| 1455 |
+
mail_api_token: str,
|
| 1456 |
+
namespace: str,
|
| 1457 |
+
capability: str,
|
| 1458 |
+
smtp_host: str,
|
| 1459 |
+
smtp_port: int,
|
| 1460 |
+
sender: str,
|
| 1461 |
+
) -> type[BaseHTTPRequestHandler]:
|
| 1462 |
+
"""Expose write-only mail paths without exposing the mailbox read API.
|
| 1463 |
+
|
| 1464 |
+
``POST /emails`` is deliberately a small Resend-style subset: one fixed
|
| 1465 |
+
sender, one or more recipients, a subject, and a plain-text body. The
|
| 1466 |
+
endpoint owns the trial namespace, so candidate input can never select a
|
| 1467 |
+
second mailbox. The legacy bootstrap and SMTP coordinates remain here for
|
| 1468 |
+
candidates using the vendored ``websitebench.site_backend`` transport.
|
| 1469 |
+
"""
|
| 1470 |
+
|
| 1471 |
+
payload = {
|
| 1472 |
+
"namespace": namespace,
|
| 1473 |
+
"capability": capability,
|
| 1474 |
+
"smtp_host": smtp_host,
|
| 1475 |
+
"smtp_port": smtp_port,
|
| 1476 |
+
}
|
| 1477 |
+
|
| 1478 |
+
class CandidateBootstrapHandler(BaseHTTPRequestHandler):
|
| 1479 |
+
def _json(self, status: int, value: Any) -> None:
|
| 1480 |
+
body = json.dumps(value, ensure_ascii=False, sort_keys=True).encode("utf-8")
|
| 1481 |
+
self.send_response(status)
|
| 1482 |
+
self.send_header("Content-Type", "application/json; charset=utf-8")
|
| 1483 |
+
self.send_header("Content-Length", str(len(body)))
|
| 1484 |
+
self.send_header("Cache-Control", "no-store")
|
| 1485 |
+
self.end_headers()
|
| 1486 |
+
self.wfile.write(body)
|
| 1487 |
+
|
| 1488 |
+
def do_GET(self) -> None: # noqa: N802
|
| 1489 |
+
parsed = urllib.parse.urlsplit(self.path)
|
| 1490 |
+
if parsed.path == "/healthz":
|
| 1491 |
+
healthy = store.healthy()
|
| 1492 |
+
self._json(200 if healthy else 503, {"status": "ok" if healthy else "unavailable"})
|
| 1493 |
+
return
|
| 1494 |
+
if parsed.path != "/internal/bootstrap":
|
| 1495 |
+
self._json(404, {"error": "not_found"})
|
| 1496 |
+
return
|
| 1497 |
+
prefix = "Bearer "
|
| 1498 |
+
header = self.headers.get("Authorization", "")
|
| 1499 |
+
presented = header[len(prefix) :] if header.startswith(prefix) else ""
|
| 1500 |
+
if not hmac.compare_digest(bootstrap_token, presented):
|
| 1501 |
+
self._json(403, {"error": "forbidden"})
|
| 1502 |
+
return
|
| 1503 |
+
self._json(200, payload)
|
| 1504 |
+
|
| 1505 |
+
def do_POST(self) -> None: # noqa: N802
|
| 1506 |
+
parsed = urllib.parse.urlsplit(self.path)
|
| 1507 |
+
if parsed.path != "/emails" or parsed.query or parsed.fragment:
|
| 1508 |
+
self._json(404, {"error": "not_found"})
|
| 1509 |
+
return
|
| 1510 |
+
prefix = "Bearer "
|
| 1511 |
+
header = self.headers.get("Authorization", "")
|
| 1512 |
+
presented = header[len(prefix) :] if header.startswith(prefix) else ""
|
| 1513 |
+
if not hmac.compare_digest(mail_api_token, presented):
|
| 1514 |
+
self._json(401, {"error": "unauthorized"})
|
| 1515 |
+
return
|
| 1516 |
+
content_type = self.headers.get("Content-Type", "").split(";", 1)[0]
|
| 1517 |
+
if content_type.strip().lower() != "application/json":
|
| 1518 |
+
self._json(415, {"error": "application_json_required"})
|
| 1519 |
+
return
|
| 1520 |
+
try:
|
| 1521 |
+
content_length = int(self.headers.get("Content-Length", ""))
|
| 1522 |
+
except ValueError:
|
| 1523 |
+
self._json(411, {"error": "content_length_required"})
|
| 1524 |
+
return
|
| 1525 |
+
if content_length < 0 or content_length > _MAX_MESSAGE_BYTES:
|
| 1526 |
+
self._json(413, {"error": "message_too_large"})
|
| 1527 |
+
return
|
| 1528 |
+
raw = self.rfile.read(content_length)
|
| 1529 |
+
if len(raw) != content_length:
|
| 1530 |
+
self._json(400, {"error": "incomplete_request"})
|
| 1531 |
+
return
|
| 1532 |
+
try:
|
| 1533 |
+
value = json.loads(raw.decode("utf-8"))
|
| 1534 |
+
except (UnicodeDecodeError, json.JSONDecodeError):
|
| 1535 |
+
self._json(400, {"error": "invalid_json"})
|
| 1536 |
+
return
|
| 1537 |
+
if not isinstance(value, dict) or set(value) != {
|
| 1538 |
+
"from",
|
| 1539 |
+
"to",
|
| 1540 |
+
"subject",
|
| 1541 |
+
"text",
|
| 1542 |
+
}:
|
| 1543 |
+
self._json(400, {"error": "invalid_message_fields"})
|
| 1544 |
+
return
|
| 1545 |
+
envelope_from = value.get("from")
|
| 1546 |
+
subject = value.get("subject")
|
| 1547 |
+
text = value.get("text")
|
| 1548 |
+
raw_recipients = value.get("to")
|
| 1549 |
+
recipients = (
|
| 1550 |
+
[raw_recipients] if isinstance(raw_recipients, str) else raw_recipients
|
| 1551 |
+
)
|
| 1552 |
+
if (
|
| 1553 |
+
envelope_from != sender
|
| 1554 |
+
or not isinstance(subject, str)
|
| 1555 |
+
or not isinstance(text, str)
|
| 1556 |
+
or not isinstance(recipients, list)
|
| 1557 |
+
or not 1 <= len(recipients) <= _MAX_RECIPIENTS
|
| 1558 |
+
or any(
|
| 1559 |
+
not isinstance(recipient, str)
|
| 1560 |
+
or not recipient
|
| 1561 |
+
or len(recipient) > 320
|
| 1562 |
+
or "@" not in recipient
|
| 1563 |
+
or "\r" in recipient
|
| 1564 |
+
or "\n" in recipient
|
| 1565 |
+
for recipient in recipients
|
| 1566 |
+
)
|
| 1567 |
+
or len(subject) > 998
|
| 1568 |
+
or "\r" in subject
|
| 1569 |
+
or "\n" in subject
|
| 1570 |
+
):
|
| 1571 |
+
self._json(400, {"error": "invalid_message"})
|
| 1572 |
+
return
|
| 1573 |
+
try:
|
| 1574 |
+
encoded_text = text.encode("utf-8")
|
| 1575 |
+
subject.encode("utf-8")
|
| 1576 |
+
for recipient in recipients:
|
| 1577 |
+
recipient.encode("utf-8")
|
| 1578 |
+
except UnicodeEncodeError:
|
| 1579 |
+
self._json(400, {"error": "invalid_message"})
|
| 1580 |
+
return
|
| 1581 |
+
if len(encoded_text) > _MAX_MESSAGE_BYTES:
|
| 1582 |
+
self._json(413, {"error": "message_too_large"})
|
| 1583 |
+
return
|
| 1584 |
+
idempotency_key = self.headers.get("Idempotency-Key")
|
| 1585 |
+
if idempotency_key is not None and (
|
| 1586 |
+
not idempotency_key
|
| 1587 |
+
or len(idempotency_key) > 256
|
| 1588 |
+
or "\r" in idempotency_key
|
| 1589 |
+
or "\n" in idempotency_key
|
| 1590 |
+
):
|
| 1591 |
+
self._json(400, {"error": "invalid_idempotency_key"})
|
| 1592 |
+
return
|
| 1593 |
+
try:
|
| 1594 |
+
accepted, provider_id = store.deliver_resend_style_to(
|
| 1595 |
+
namespace,
|
| 1596 |
+
envelope_from=envelope_from,
|
| 1597 |
+
recipients=recipients,
|
| 1598 |
+
subject=subject,
|
| 1599 |
+
text=text,
|
| 1600 |
+
idempotency_key=idempotency_key,
|
| 1601 |
+
)
|
| 1602 |
+
except MailboxCapacityError:
|
| 1603 |
+
self._json(429, {"error": "mailbox_capacity"})
|
| 1604 |
+
return
|
| 1605 |
+
except MailpitInfrastructureError:
|
| 1606 |
+
self._json(503, {"error": "mailpit_unavailable"})
|
| 1607 |
+
return
|
| 1608 |
+
if not accepted or provider_id is None:
|
| 1609 |
+
self._json(429, {"error": "mailbox_capacity"})
|
| 1610 |
+
return
|
| 1611 |
+
self._json(200, {"id": provider_id})
|
| 1612 |
+
|
| 1613 |
+
def log_message(self, format: str, *args: Any) -> None:
|
| 1614 |
+
return
|
| 1615 |
+
|
| 1616 |
+
return CandidateBootstrapHandler
|
| 1617 |
+
|
| 1618 |
+
|
| 1619 |
+
@dataclass(frozen=True, repr=False)
|
| 1620 |
+
class _Bootstrap:
|
| 1621 |
+
"""What the site process is allowed to learn, and the token that gates it."""
|
| 1622 |
+
|
| 1623 |
+
token: str
|
| 1624 |
+
namespace: str
|
| 1625 |
+
capability: str
|
| 1626 |
+
smtp_host: str
|
| 1627 |
+
smtp_port: int
|
| 1628 |
+
|
| 1629 |
+
def __repr__(self) -> str:
|
| 1630 |
+
return f"_Bootstrap(namespace={self.namespace!r}, token=<redacted>)"
|
| 1631 |
+
|
| 1632 |
+
def payload(self) -> dict[str, Any]:
|
| 1633 |
+
return {
|
| 1634 |
+
"namespace": self.namespace,
|
| 1635 |
+
"capability": self.capability,
|
| 1636 |
+
"smtp_host": self.smtp_host,
|
| 1637 |
+
"smtp_port": self.smtp_port,
|
| 1638 |
+
}
|
| 1639 |
+
|
| 1640 |
+
|
| 1641 |
+
class _BootstrapSlot:
|
| 1642 |
+
"""The identity ``/internal/bootstrap`` is serving right now.
|
| 1643 |
+
|
| 1644 |
+
A trial's mailbox identity is minted once and never moves, so the slot is
|
| 1645 |
+
written once and read forever. Reference capture is the exception that
|
| 1646 |
+
makes it a slot at all: it relaunches the reference between tasks, and each
|
| 1647 |
+
relaunch has to be its own trial -- same bootstrap token, because that is
|
| 1648 |
+
the site process's own credential and the site is what stays the same, but
|
| 1649 |
+
a namespace and capability nothing before it could have seen. Rotating
|
| 1650 |
+
behind the slot lets the operator do that without tearing down the listener
|
| 1651 |
+
the site is about to call.
|
| 1652 |
+
"""
|
| 1653 |
+
|
| 1654 |
+
def __init__(self, bootstrap: "_Bootstrap | None" = None) -> None:
|
| 1655 |
+
self._lock = threading.Lock()
|
| 1656 |
+
self._value = bootstrap
|
| 1657 |
+
|
| 1658 |
+
def __repr__(self) -> str:
|
| 1659 |
+
return f"_BootstrapSlot({self._value!r})"
|
| 1660 |
+
|
| 1661 |
+
def get(self) -> "_Bootstrap | None":
|
| 1662 |
+
with self._lock:
|
| 1663 |
+
return self._value
|
| 1664 |
+
|
| 1665 |
+
def rotate(self, *, namespace: str, capability: str) -> "_Bootstrap":
|
| 1666 |
+
"""Swap in a fresh namespace and capability, keeping the token."""
|
| 1667 |
+
|
| 1668 |
+
with self._lock:
|
| 1669 |
+
current = self._value
|
| 1670 |
+
if current is None:
|
| 1671 |
+
raise RuntimeError("this mailbox serves no bootstrap identity")
|
| 1672 |
+
rotated = replace(current, namespace=namespace, capability=capability)
|
| 1673 |
+
self._value = rotated
|
| 1674 |
+
return rotated
|
| 1675 |
+
|
| 1676 |
+
|
| 1677 |
+
def _inbox_handler(
|
| 1678 |
+
store: MailboxStore, namespace: str, token: str
|
| 1679 |
+
) -> type[BaseHTTPRequestHandler]:
|
| 1680 |
+
"""The agent-facing listener: one namespace, HTML only, no capability.
|
| 1681 |
+
|
| 1682 |
+
The namespace is closed over at construction, so there is no request-time
|
| 1683 |
+
parameter an agent could vary to reach a second mailbox. Requirement 5
|
| 1684 |
+
holds by construction rather than by a check that could be bypassed.
|
| 1685 |
+
"""
|
| 1686 |
+
|
| 1687 |
+
inbox_path = "/inbox/" + urllib.parse.quote(token, safe="")
|
| 1688 |
+
|
| 1689 |
+
class InboxHandler(BaseHTTPRequestHandler):
|
| 1690 |
+
def _send(self, status: int, body: bytes, content_type: str) -> None:
|
| 1691 |
+
self.send_response(status)
|
| 1692 |
+
self.send_header("Content-Type", content_type)
|
| 1693 |
+
self.send_header("Content-Length", str(len(body)))
|
| 1694 |
+
# The inbox is per-trial and mutates; never let it be cached.
|
| 1695 |
+
self.send_header("Cache-Control", "no-store")
|
| 1696 |
+
self.send_header("Referrer-Policy", "no-referrer")
|
| 1697 |
+
self.end_headers()
|
| 1698 |
+
self.wfile.write(body)
|
| 1699 |
+
|
| 1700 |
+
def _not_found(self) -> None:
|
| 1701 |
+
self._send(
|
| 1702 |
+
404,
|
| 1703 |
+
_document("Not found", "<p>No such page.</p>"),
|
| 1704 |
+
"text/html; charset=utf-8",
|
| 1705 |
+
)
|
| 1706 |
+
|
| 1707 |
+
def do_GET(self) -> None: # noqa: N802
|
| 1708 |
+
parsed = urllib.parse.urlsplit(self.path)
|
| 1709 |
+
if parsed.path == "/healthz":
|
| 1710 |
+
healthy = store.healthy()
|
| 1711 |
+
body = json.dumps(
|
| 1712 |
+
{"status": "ok" if healthy else "unavailable"}
|
| 1713 |
+
).encode("utf-8")
|
| 1714 |
+
self._send(
|
| 1715 |
+
200 if healthy else 503,
|
| 1716 |
+
body,
|
| 1717 |
+
"application/json; charset=utf-8",
|
| 1718 |
+
)
|
| 1719 |
+
return
|
| 1720 |
+
if parsed.path in {"", "/"}:
|
| 1721 |
+
self.send_response(302)
|
| 1722 |
+
self.send_header("Location", inbox_path)
|
| 1723 |
+
self.send_header("Content-Length", "0")
|
| 1724 |
+
self.end_headers()
|
| 1725 |
+
return
|
| 1726 |
+
parts = [
|
| 1727 |
+
urllib.parse.unquote(part) for part in parsed.path.strip("/").split("/")
|
| 1728 |
+
]
|
| 1729 |
+
# Defence in depth for the shared-origin topology, where the path is
|
| 1730 |
+
# the only thing separating one trial's inbox from another's.
|
| 1731 |
+
if len(parts) < 2 or parts[0] != "inbox":
|
| 1732 |
+
self._not_found()
|
| 1733 |
+
return
|
| 1734 |
+
if not hmac.compare_digest(token, parts[1]):
|
| 1735 |
+
self._not_found()
|
| 1736 |
+
return
|
| 1737 |
+
try:
|
| 1738 |
+
values = store.messages(namespace)
|
| 1739 |
+
except MailpitInfrastructureError:
|
| 1740 |
+
body = json.dumps({"status": "unavailable"}).encode("utf-8")
|
| 1741 |
+
self._send(503, body, "application/json; charset=utf-8")
|
| 1742 |
+
return
|
| 1743 |
+
if len(parts) == 2:
|
| 1744 |
+
self._send(
|
| 1745 |
+
200,
|
| 1746 |
+
render_inbox(values, base_path=inbox_path),
|
| 1747 |
+
"text/html; charset=utf-8",
|
| 1748 |
+
)
|
| 1749 |
+
return
|
| 1750 |
+
if len(parts) == 4 and parts[2] == "messages":
|
| 1751 |
+
try:
|
| 1752 |
+
identifier = int(parts[3])
|
| 1753 |
+
except ValueError:
|
| 1754 |
+
self._not_found()
|
| 1755 |
+
return
|
| 1756 |
+
for item in values:
|
| 1757 |
+
if int(item["id"]) == identifier:
|
| 1758 |
+
self._send(
|
| 1759 |
+
200,
|
| 1760 |
+
render_message(item, base_path=inbox_path),
|
| 1761 |
+
"text/html; charset=utf-8",
|
| 1762 |
+
)
|
| 1763 |
+
return
|
| 1764 |
+
self._not_found()
|
| 1765 |
+
|
| 1766 |
+
def log_message(self, format: str, *args: Any) -> None:
|
| 1767 |
+
return
|
| 1768 |
+
|
| 1769 |
+
return InboxHandler
|
| 1770 |
+
|
| 1771 |
+
|
| 1772 |
+
class LocalMailboxSidecar:
|
| 1773 |
+
"""A loopback-only SMTP and Inbox API pair with namespace isolation."""
|
| 1774 |
+
|
| 1775 |
+
def __init__(
|
| 1776 |
+
self,
|
| 1777 |
+
*,
|
| 1778 |
+
smtp_port: int = 0,
|
| 1779 |
+
http_port: int = 0,
|
| 1780 |
+
bind_host: str = "127.0.0.1",
|
| 1781 |
+
inbox_port: int | None = None,
|
| 1782 |
+
inbox_bind_host: str | None = None,
|
| 1783 |
+
inbox_namespace: str | None = None,
|
| 1784 |
+
inbox_token: str | None = None,
|
| 1785 |
+
bootstrap: "_Bootstrap | None" = None,
|
| 1786 |
+
mailpit_client: MailpitClient,
|
| 1787 |
+
) -> None:
|
| 1788 |
+
self.store = MailboxStore(mailpit_client=mailpit_client)
|
| 1789 |
+
self._bootstrap = _BootstrapSlot(bootstrap)
|
| 1790 |
+
self.smtp = _SmtpServer((bind_host, smtp_port), self.store)
|
| 1791 |
+
self.http = _HttpServer(
|
| 1792 |
+
(bind_host, http_port), _http_handler(self.store, self._bootstrap)
|
| 1793 |
+
)
|
| 1794 |
+
self.inbox: _HttpServer | None = None
|
| 1795 |
+
self._inbox_token = inbox_token
|
| 1796 |
+
if inbox_namespace is not None or inbox_token is not None:
|
| 1797 |
+
if not inbox_namespace or not inbox_token:
|
| 1798 |
+
raise ValueError("an inbox listener needs both namespace and token")
|
| 1799 |
+
self.inbox = _HttpServer(
|
| 1800 |
+
(inbox_bind_host or bind_host, inbox_port or 0),
|
| 1801 |
+
_inbox_handler(self.store, inbox_namespace, inbox_token),
|
| 1802 |
+
)
|
| 1803 |
+
self._threads: list[threading.Thread] = []
|
| 1804 |
+
|
| 1805 |
+
@property
|
| 1806 |
+
def smtp_port(self) -> int:
|
| 1807 |
+
return int(self.smtp.server_address[1])
|
| 1808 |
+
|
| 1809 |
+
@property
|
| 1810 |
+
def http_port(self) -> int:
|
| 1811 |
+
return int(self.http.server_address[1])
|
| 1812 |
+
|
| 1813 |
+
@property
|
| 1814 |
+
def inbox_port(self) -> int:
|
| 1815 |
+
if self.inbox is None:
|
| 1816 |
+
raise RuntimeError("this sidecar has no inbox listener")
|
| 1817 |
+
return int(self.inbox.server_address[1])
|
| 1818 |
+
|
| 1819 |
+
@property
|
| 1820 |
+
def url(self) -> str:
|
| 1821 |
+
return f"http://127.0.0.1:{self.http_port}"
|
| 1822 |
+
|
| 1823 |
+
@property
|
| 1824 |
+
def inbox_url(self) -> str:
|
| 1825 |
+
"""The bare origin an agent is handed. It carries no secret."""
|
| 1826 |
+
|
| 1827 |
+
return f"http://127.0.0.1:{self.inbox_port}"
|
| 1828 |
+
|
| 1829 |
+
@property
|
| 1830 |
+
def _servers(self) -> tuple[Any, ...]:
|
| 1831 |
+
return (
|
| 1832 |
+
(self.smtp, self.http)
|
| 1833 |
+
if self.inbox is None
|
| 1834 |
+
else (
|
| 1835 |
+
self.smtp,
|
| 1836 |
+
self.http,
|
| 1837 |
+
self.inbox,
|
| 1838 |
+
)
|
| 1839 |
+
)
|
| 1840 |
+
|
| 1841 |
+
def register_namespace(self, namespace: str, capability: str) -> None:
|
| 1842 |
+
"""Bind one opaque namespace to its unguessable per-worker capability."""
|
| 1843 |
+
|
| 1844 |
+
self.store.register(namespace, capability)
|
| 1845 |
+
|
| 1846 |
+
def rotate_bootstrap(self, namespace: str, capability: str) -> None:
|
| 1847 |
+
"""Point ``/internal/bootstrap`` at a freshly minted namespace.
|
| 1848 |
+
|
| 1849 |
+
Registration happens first on purpose: a site that fetched the new
|
| 1850 |
+
identity and sent before the store knew it would have its message
|
| 1851 |
+
dropped at the SMTP door, which reads as a flaky mailbox rather than
|
| 1852 |
+
the ordering bug it is.
|
| 1853 |
+
"""
|
| 1854 |
+
|
| 1855 |
+
previous = self._bootstrap.get()
|
| 1856 |
+
self.register_namespace(namespace, capability)
|
| 1857 |
+
# Candidate trials route direct SMTP into one fixed namespace. Mirror
|
| 1858 |
+
# that ABI during paired reference capture so runtimes using the direct
|
| 1859 |
+
# writer do not need the structured transport's namespace headers.
|
| 1860 |
+
self.smtp.fixed_namespace = namespace
|
| 1861 |
+
self._bootstrap.rotate(namespace=namespace, capability=capability)
|
| 1862 |
+
if previous is not None and previous.namespace != namespace:
|
| 1863 |
+
self.store.seal_namespace(previous.namespace)
|
| 1864 |
+
|
| 1865 |
+
def start(self) -> "LocalMailboxSidecar":
|
| 1866 |
+
if not self.store.healthy():
|
| 1867 |
+
raise MailpitInfrastructureError("Mailpit is not ready")
|
| 1868 |
+
for server in self._servers:
|
| 1869 |
+
thread = threading.Thread(target=server.serve_forever, daemon=True)
|
| 1870 |
+
thread.start()
|
| 1871 |
+
self._threads.append(thread)
|
| 1872 |
+
return self
|
| 1873 |
+
|
| 1874 |
+
def close(self) -> None:
|
| 1875 |
+
for server in self._servers:
|
| 1876 |
+
server.shutdown()
|
| 1877 |
+
server.server_close()
|
| 1878 |
+
for thread in self._threads:
|
| 1879 |
+
thread.join(timeout=5)
|
| 1880 |
+
self._threads.clear()
|
| 1881 |
+
self.store.destroy_namespaces()
|
| 1882 |
+
|
| 1883 |
+
def __enter__(self) -> "LocalMailboxSidecar":
|
| 1884 |
+
return self.start()
|
| 1885 |
+
|
| 1886 |
+
def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
|
| 1887 |
+
self.close()
|
| 1888 |
+
|
| 1889 |
+
|
| 1890 |
+
class CandidateMailboxTrial:
|
| 1891 |
+
"""One formal case's write-only candidate mailbox and trusted reader.
|
| 1892 |
+
|
| 1893 |
+
Candidate code prefers the Resend-style ``POST /emails`` endpoint and may
|
| 1894 |
+
use ``smtp``/``bootstrap`` for compatibility. Both writers are fixed to
|
| 1895 |
+
this trial's namespace. The verifier API listens on a third, unadvertised
|
| 1896 |
+
port that the candidate sandbox does not permit, and it uses a distinct
|
| 1897 |
+
read credential that never enters the candidate environment.
|
| 1898 |
+
"""
|
| 1899 |
+
|
| 1900 |
+
def __init__(
|
| 1901 |
+
self,
|
| 1902 |
+
*,
|
| 1903 |
+
bind_host: str = "127.0.0.1",
|
| 1904 |
+
mailpit_client: MailpitClient | None = None,
|
| 1905 |
+
) -> None:
|
| 1906 |
+
self._runtime = None if mailpit_client is not None else EphemeralMailpit()
|
| 1907 |
+
storage_client = (
|
| 1908 |
+
mailpit_client
|
| 1909 |
+
if mailpit_client is not None
|
| 1910 |
+
else self._runtime.client
|
| 1911 |
+
if self._runtime is not None
|
| 1912 |
+
else None
|
| 1913 |
+
)
|
| 1914 |
+
namespace, read_credential, _inbox_token = _mint_identity()
|
| 1915 |
+
self.namespace = namespace
|
| 1916 |
+
self.read_credential = read_credential
|
| 1917 |
+
self._write_capability = secrets.token_hex(32)
|
| 1918 |
+
self._bootstrap_token = secrets.token_hex(32)
|
| 1919 |
+
self._mail_api_token = secrets.token_hex(32)
|
| 1920 |
+
self._sender = CANDIDATE_MAIL_SENDER
|
| 1921 |
+
self.store = MailboxStore(mailpit_client=storage_client)
|
| 1922 |
+
self.store.register(
|
| 1923 |
+
namespace,
|
| 1924 |
+
read_credential,
|
| 1925 |
+
allowed_from=(self._sender,),
|
| 1926 |
+
)
|
| 1927 |
+
self.smtp = _SmtpServer(
|
| 1928 |
+
(bind_host, 0),
|
| 1929 |
+
self.store,
|
| 1930 |
+
fixed_namespace=namespace,
|
| 1931 |
+
)
|
| 1932 |
+
self.http = _HttpServer(
|
| 1933 |
+
(bind_host, 0),
|
| 1934 |
+
_http_handler(self.store),
|
| 1935 |
+
)
|
| 1936 |
+
self.bootstrap = _HttpServer(
|
| 1937 |
+
(bind_host, 0),
|
| 1938 |
+
_candidate_bootstrap_handler(
|
| 1939 |
+
store=self.store,
|
| 1940 |
+
bootstrap_token=self._bootstrap_token,
|
| 1941 |
+
mail_api_token=self._mail_api_token,
|
| 1942 |
+
namespace=namespace,
|
| 1943 |
+
capability=self._write_capability,
|
| 1944 |
+
smtp_host=bind_host,
|
| 1945 |
+
smtp_port=self.smtp_port,
|
| 1946 |
+
sender=self._sender,
|
| 1947 |
+
),
|
| 1948 |
+
)
|
| 1949 |
+
self._threads: list[threading.Thread] = []
|
| 1950 |
+
|
| 1951 |
+
@property
|
| 1952 |
+
def smtp_port(self) -> int:
|
| 1953 |
+
return int(self.smtp.server_address[1])
|
| 1954 |
+
|
| 1955 |
+
@property
|
| 1956 |
+
def http_port(self) -> int:
|
| 1957 |
+
return int(self.http.server_address[1])
|
| 1958 |
+
|
| 1959 |
+
@property
|
| 1960 |
+
def bootstrap_port(self) -> int:
|
| 1961 |
+
return int(self.bootstrap.server_address[1])
|
| 1962 |
+
|
| 1963 |
+
@property
|
| 1964 |
+
def url(self) -> str:
|
| 1965 |
+
return f"http://127.0.0.1:{self.http_port}"
|
| 1966 |
+
|
| 1967 |
+
@property
|
| 1968 |
+
def candidate_environment(self) -> dict[str, str]:
|
| 1969 |
+
"""The complete optional mail ABI handed to the candidate runtime."""
|
| 1970 |
+
|
| 1971 |
+
return {
|
| 1972 |
+
"WEBSITEBENCH_MAIL_API_URL": (
|
| 1973 |
+
f"http://127.0.0.1:{self.bootstrap_port}/emails"
|
| 1974 |
+
),
|
| 1975 |
+
"WEBSITEBENCH_MAIL_API_TOKEN": self._mail_api_token,
|
| 1976 |
+
"WEBSITEBENCH_MAIL_FROM": self._sender,
|
| 1977 |
+
"WEBSITEBENCH_SMTP_HOST": "127.0.0.1",
|
| 1978 |
+
"WEBSITEBENCH_SMTP_PORT": str(self.smtp_port),
|
| 1979 |
+
"WEBSITEBENCH_SMTP_FROM": self._sender,
|
| 1980 |
+
# Compatibility seam for candidates using websitebench.site_backend.
|
| 1981 |
+
# It serves write coordinates only and has no read routes.
|
| 1982 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL": (
|
| 1983 |
+
f"http://127.0.0.1:{self.bootstrap_port}/internal/bootstrap"
|
| 1984 |
+
),
|
| 1985 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN": self._bootstrap_token,
|
| 1986 |
+
}
|
| 1987 |
+
|
| 1988 |
+
@property
|
| 1989 |
+
def candidate_connect_ports(self) -> frozenset[int]:
|
| 1990 |
+
return frozenset({self.smtp_port, self.bootstrap_port})
|
| 1991 |
+
|
| 1992 |
+
def start(self) -> "CandidateMailboxTrial":
|
| 1993 |
+
if self._runtime is not None:
|
| 1994 |
+
try:
|
| 1995 |
+
self._runtime.start()
|
| 1996 |
+
except BaseException:
|
| 1997 |
+
for server in (self.smtp, self.http, self.bootstrap):
|
| 1998 |
+
server.server_close()
|
| 1999 |
+
raise
|
| 2000 |
+
if not self.store.healthy():
|
| 2001 |
+
for server in (self.smtp, self.http, self.bootstrap):
|
| 2002 |
+
server.server_close()
|
| 2003 |
+
if self._runtime is not None:
|
| 2004 |
+
self._runtime.close()
|
| 2005 |
+
raise MailpitInfrastructureError("Mailpit is not ready")
|
| 2006 |
+
for server in (self.smtp, self.http, self.bootstrap):
|
| 2007 |
+
thread = threading.Thread(
|
| 2008 |
+
target=server.serve_forever,
|
| 2009 |
+
name=f"candidate-mailbox-{server.server_address[1]}",
|
| 2010 |
+
daemon=True,
|
| 2011 |
+
)
|
| 2012 |
+
thread.start()
|
| 2013 |
+
self._threads.append(thread)
|
| 2014 |
+
return self
|
| 2015 |
+
|
| 2016 |
+
def close(self) -> None:
|
| 2017 |
+
for server in (self.smtp, self.http, self.bootstrap):
|
| 2018 |
+
server.shutdown()
|
| 2019 |
+
server.server_close()
|
| 2020 |
+
for thread in self._threads:
|
| 2021 |
+
thread.join(timeout=5)
|
| 2022 |
+
self._threads.clear()
|
| 2023 |
+
self.store.destroy_namespaces()
|
| 2024 |
+
if self._runtime is not None:
|
| 2025 |
+
self._runtime.close()
|
| 2026 |
+
|
| 2027 |
+
def __enter__(self) -> "CandidateMailboxTrial":
|
| 2028 |
+
return self.start()
|
| 2029 |
+
|
| 2030 |
+
def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
|
| 2031 |
+
self.close()
|
| 2032 |
+
|
| 2033 |
+
|
| 2034 |
+
def _candidate_environment_problem(
|
| 2035 |
+
environment: Mapping[str, str], private_values: tuple[str, ...]
|
| 2036 |
+
) -> str | None:
|
| 2037 |
+
"""Return why ``environment`` may not be handed to a candidate, or ``None``.
|
| 2038 |
+
|
| 2039 |
+
The candidate mail ABI is a closed set of names carrying loopback
|
| 2040 |
+
coordinates only. A name outside the set, a Mailpit control variable, or
|
| 2041 |
+
any value naming the evaluator's own Mailpit socket would hand a candidate
|
| 2042 |
+
the trusted store instead of its write-only door.
|
| 2043 |
+
"""
|
| 2044 |
+
|
| 2045 |
+
unknown = sorted(set(environment) - CANDIDATE_MAIL_ENVIRONMENT)
|
| 2046 |
+
if unknown:
|
| 2047 |
+
return f"candidate mailbox environment has unknown names: {unknown}"
|
| 2048 |
+
leaked = any(
|
| 2049 |
+
name.startswith("WEBSITEBENCH_MAILPIT_")
|
| 2050 |
+
or MAILPIT_RUNTIME_DIR in str(value)
|
| 2051 |
+
or any(private and private in str(value) for private in private_values)
|
| 2052 |
+
for name, value in environment.items()
|
| 2053 |
+
)
|
| 2054 |
+
if leaked:
|
| 2055 |
+
return "candidate mailbox environment exposed the Mailpit UDS"
|
| 2056 |
+
return None
|
| 2057 |
+
|
| 2058 |
+
|
| 2059 |
+
class MailTrial:
|
| 2060 |
+
"""One case's candidate mailbox, as the rest of the evaluator sees it.
|
| 2061 |
+
|
| 2062 |
+
The candidate environment handed out here is already proved to be the
|
| 2063 |
+
closed mail ABI and free of evaluator-side coordinates, so no caller
|
| 2064 |
+
re-scans it. Reads stay on the trusted side: :meth:`deliveries` is the
|
| 2065 |
+
only way out of the store and it never leaves this trial's namespace.
|
| 2066 |
+
"""
|
| 2067 |
+
|
| 2068 |
+
def __init__(
|
| 2069 |
+
self,
|
| 2070 |
+
trial: CandidateMailboxTrial,
|
| 2071 |
+
*,
|
| 2072 |
+
private_values: tuple[str, ...] = (),
|
| 2073 |
+
) -> None:
|
| 2074 |
+
environment = dict(trial.candidate_environment)
|
| 2075 |
+
problem = _candidate_environment_problem(environment, private_values)
|
| 2076 |
+
if problem is not None:
|
| 2077 |
+
trial.close()
|
| 2078 |
+
raise MailpitInfrastructureError(problem)
|
| 2079 |
+
self._trial = trial
|
| 2080 |
+
self._environment = environment
|
| 2081 |
+
|
| 2082 |
+
@property
|
| 2083 |
+
def namespace(self) -> str:
|
| 2084 |
+
return self._trial.namespace
|
| 2085 |
+
|
| 2086 |
+
@property
|
| 2087 |
+
def read_credential(self) -> str:
|
| 2088 |
+
return self._trial.read_credential
|
| 2089 |
+
|
| 2090 |
+
@property
|
| 2091 |
+
def url(self) -> str:
|
| 2092 |
+
"""The verifier-only reader origin; the candidate cannot reach it."""
|
| 2093 |
+
|
| 2094 |
+
return self._trial.url
|
| 2095 |
+
|
| 2096 |
+
@property
|
| 2097 |
+
def http_port(self) -> int:
|
| 2098 |
+
return self._trial.http_port
|
| 2099 |
+
|
| 2100 |
+
@property
|
| 2101 |
+
def store(self) -> MailboxStore:
|
| 2102 |
+
return self._trial.store
|
| 2103 |
+
|
| 2104 |
+
@property
|
| 2105 |
+
def candidate_environment(self) -> dict[str, str]:
|
| 2106 |
+
"""The complete optional mail ABI this case's candidate receives."""
|
| 2107 |
+
|
| 2108 |
+
return dict(self._environment)
|
| 2109 |
+
|
| 2110 |
+
@property
|
| 2111 |
+
def candidate_connect_ports(self) -> frozenset[int]:
|
| 2112 |
+
"""The loopback ports the candidate sandbox may connect out to."""
|
| 2113 |
+
|
| 2114 |
+
return self._trial.candidate_connect_ports
|
| 2115 |
+
|
| 2116 |
+
def healthy(self) -> bool:
|
| 2117 |
+
"""Whether the backing store still answers, so an outage is not scored."""
|
| 2118 |
+
|
| 2119 |
+
return self._trial.store.healthy()
|
| 2120 |
+
|
| 2121 |
+
def deliveries(self) -> list[dict[str, Any]]:
|
| 2122 |
+
"""Every message this trial's namespace received, newest first."""
|
| 2123 |
+
|
| 2124 |
+
return self._trial.store.messages(self._trial.namespace)
|
| 2125 |
+
|
| 2126 |
+
def close(self) -> None:
|
| 2127 |
+
self._trial.close()
|
| 2128 |
+
|
| 2129 |
+
def __enter__(self) -> "MailTrial":
|
| 2130 |
+
return self
|
| 2131 |
+
|
| 2132 |
+
def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
|
| 2133 |
+
self.close()
|
| 2134 |
+
|
| 2135 |
+
|
| 2136 |
+
class MailPlane:
|
| 2137 |
+
"""The evaluator's single door to Mailpit.
|
| 2138 |
+
|
| 2139 |
+
Everything that knows a socket path, a container lifetime, a namespace or
|
| 2140 |
+
the candidate mail ABI lives behind this facade. ``formal``,
|
| 2141 |
+
``trusted_check`` and ``capture`` ask the plane for a trial, a runner
|
| 2142 |
+
passthrough or an authoring gateway; they never build a Mailpit client,
|
| 2143 |
+
read a Mailpit variable, or inspect what they hand a candidate.
|
| 2144 |
+
"""
|
| 2145 |
+
|
| 2146 |
+
def __init__(
|
| 2147 |
+
self, client: MailpitClient, *, runtime: EphemeralMailpit | None = None
|
| 2148 |
+
) -> None:
|
| 2149 |
+
self.client = client
|
| 2150 |
+
self._runtime = runtime
|
| 2151 |
+
|
| 2152 |
+
@staticmethod
|
| 2153 |
+
def _configured_socket(env: Mapping[str, str]) -> str:
|
| 2154 |
+
"""The evaluator's only read of :data:`MAILPIT_HTTP_SOCKET_ENV`."""
|
| 2155 |
+
|
| 2156 |
+
return str(env.get(MAILPIT_HTTP_SOCKET_ENV, "") or "").strip()
|
| 2157 |
+
|
| 2158 |
+
@classmethod
|
| 2159 |
+
def from_environment(cls, env: Mapping[str, str] = os.environ) -> "MailPlane":
|
| 2160 |
+
"""Open the Mailpit the environment advertises.
|
| 2161 |
+
|
| 2162 |
+
A missing variable and an unhealthy Mailpit are the same answer to the
|
| 2163 |
+
caller: this process has no mail plane.
|
| 2164 |
+
"""
|
| 2165 |
+
|
| 2166 |
+
socket_path = cls._configured_socket(env)
|
| 2167 |
+
if not socket_path:
|
| 2168 |
+
raise MailInfrastructureUnavailable(
|
| 2169 |
+
f"{MAILPIT_HTTP_SOCKET_ENV} is not configured"
|
| 2170 |
+
)
|
| 2171 |
+
client = MailpitClient(socket_path)
|
| 2172 |
+
if not client.ready():
|
| 2173 |
+
raise MailInfrastructureUnavailable(
|
| 2174 |
+
"Mailpit is not ready on its configured HTTP socket"
|
| 2175 |
+
)
|
| 2176 |
+
return cls(client)
|
| 2177 |
+
|
| 2178 |
+
@classmethod
|
| 2179 |
+
def ephemeral(
|
| 2180 |
+
cls, runtime_dir: str | os.PathLike[str] | None = None
|
| 2181 |
+
) -> "MailPlane":
|
| 2182 |
+
"""Start a private, networkless Mailpit this plane owns and will stop.
|
| 2183 |
+
|
| 2184 |
+
Host-side only: a Harbor trial has no Docker binary, so a scored run
|
| 2185 |
+
always goes through :meth:`from_environment` instead.
|
| 2186 |
+
"""
|
| 2187 |
+
|
| 2188 |
+
runtime = EphemeralMailpit(runtime_dir=runtime_dir).start()
|
| 2189 |
+
return cls(runtime.client, runtime=runtime)
|
| 2190 |
+
|
| 2191 |
+
@classmethod
|
| 2192 |
+
def open(
|
| 2193 |
+
cls,
|
| 2194 |
+
*,
|
| 2195 |
+
runtime_dir: str | os.PathLike[str] | None = None,
|
| 2196 |
+
env: Mapping[str, str] = os.environ,
|
| 2197 |
+
) -> "MailPlane":
|
| 2198 |
+
"""Prefer the advertised Mailpit; start a private one when there is none."""
|
| 2199 |
+
|
| 2200 |
+
if cls._configured_socket(env):
|
| 2201 |
+
return cls.from_environment(env)
|
| 2202 |
+
return cls.ephemeral(runtime_dir=runtime_dir)
|
| 2203 |
+
|
| 2204 |
+
@property
|
| 2205 |
+
def socket_path(self) -> str:
|
| 2206 |
+
return self.client.socket_path
|
| 2207 |
+
|
| 2208 |
+
@property
|
| 2209 |
+
def owns_runtime(self) -> bool:
|
| 2210 |
+
"""Whether closing this plane stops a Mailpit container."""
|
| 2211 |
+
|
| 2212 |
+
return self._runtime is not None
|
| 2213 |
+
|
| 2214 |
+
def healthy(self) -> bool:
|
| 2215 |
+
return self.client.ready()
|
| 2216 |
+
|
| 2217 |
+
def trial(self, *, bind_host: str = "127.0.0.1") -> MailTrial:
|
| 2218 |
+
"""Start one case's write-only candidate mailbox on this plane.
|
| 2219 |
+
|
| 2220 |
+
The result is a context manager, so a caller that owns the mailbox for
|
| 2221 |
+
the length of a ``with`` block needs no other cleanup; a caller that
|
| 2222 |
+
owns it for the length of a case calls :meth:`MailTrial.close`.
|
| 2223 |
+
"""
|
| 2224 |
+
|
| 2225 |
+
trial = CandidateMailboxTrial(
|
| 2226 |
+
bind_host=bind_host, mailpit_client=self.client
|
| 2227 |
+
).start()
|
| 2228 |
+
return MailTrial(trial, private_values=(self.socket_path,))
|
| 2229 |
+
|
| 2230 |
+
def runner_environment(self, base: Mapping[str, str]) -> dict[str, str]:
|
| 2231 |
+
"""Add to ``base`` exactly what a child verifier runner needs.
|
| 2232 |
+
|
| 2233 |
+
A trusted CI/CD runner is launched with a scrubbed environment and has
|
| 2234 |
+
to find the same Mailpit; that is one variable, and no other mail
|
| 2235 |
+
coordinate crosses the boundary.
|
| 2236 |
+
"""
|
| 2237 |
+
|
| 2238 |
+
return {**dict(base), MAILPIT_HTTP_SOCKET_ENV: self.socket_path}
|
| 2239 |
+
|
| 2240 |
+
def authoring_gateway(
|
| 2241 |
+
self,
|
| 2242 |
+
*,
|
| 2243 |
+
namespace: str,
|
| 2244 |
+
capability: str,
|
| 2245 |
+
bootstrap_token: str,
|
| 2246 |
+
smtp_port: int,
|
| 2247 |
+
bind_host: str = "127.0.0.1",
|
| 2248 |
+
) -> LocalMailboxSidecar:
|
| 2249 |
+
"""Expose the stable loopback writer ABI over this plane, for authoring.
|
| 2250 |
+
|
| 2251 |
+
Capture hands a reference site the same SMTP/bootstrap door a scored
|
| 2252 |
+
candidate gets, so what capture exercises is what a trial will run.
|
| 2253 |
+
There is intentionally no in-memory fallback.
|
| 2254 |
+
"""
|
| 2255 |
+
|
| 2256 |
+
if not self.client.ready():
|
| 2257 |
+
raise MailInfrastructureUnavailable("Mailpit is not ready for capture")
|
| 2258 |
+
sidecar = LocalMailboxSidecar(
|
| 2259 |
+
smtp_port=smtp_port,
|
| 2260 |
+
bind_host=bind_host,
|
| 2261 |
+
bootstrap=_Bootstrap(
|
| 2262 |
+
token=bootstrap_token,
|
| 2263 |
+
namespace=namespace,
|
| 2264 |
+
capability=capability,
|
| 2265 |
+
smtp_host=bind_host,
|
| 2266 |
+
smtp_port=smtp_port,
|
| 2267 |
+
),
|
| 2268 |
+
mailpit_client=self.client,
|
| 2269 |
+
)
|
| 2270 |
+
sidecar.register_namespace(namespace, capability)
|
| 2271 |
+
sidecar.start()
|
| 2272 |
+
return sidecar
|
| 2273 |
+
|
| 2274 |
+
def close(self) -> None:
|
| 2275 |
+
runtime, self._runtime = self._runtime, None
|
| 2276 |
+
if runtime is not None:
|
| 2277 |
+
runtime.close()
|
| 2278 |
+
|
| 2279 |
+
def __enter__(self) -> "MailPlane":
|
| 2280 |
+
return self
|
| 2281 |
+
|
| 2282 |
+
def __exit__(self, exc_type: object, exc: object, traceback: object) -> None:
|
| 2283 |
+
self.close()
|
| 2284 |
+
|
| 2285 |
+
|
| 2286 |
+
def authoring_environment(
|
| 2287 |
+
sidecar: LocalMailboxSidecar,
|
| 2288 |
+
*,
|
| 2289 |
+
namespace: str,
|
| 2290 |
+
capability: str,
|
| 2291 |
+
bootstrap_token: str,
|
| 2292 |
+
smtp_port: int,
|
| 2293 |
+
smtp_host: str = "127.0.0.1",
|
| 2294 |
+
) -> dict[str, str]:
|
| 2295 |
+
"""The complete mail ABI an authoring capture exports around a reference site.
|
| 2296 |
+
|
| 2297 |
+
It is a superset of the candidate ABI: authoring also owns the read
|
| 2298 |
+
credential and the namespace, which a scored candidate never sees. The
|
| 2299 |
+
names are exactly :data:`AUTHORING_MAIL_ENVIRONMENT`.
|
| 2300 |
+
"""
|
| 2301 |
+
|
| 2302 |
+
gateway = sidecar.url.rstrip("/")
|
| 2303 |
+
return {
|
| 2304 |
+
"WEBSITEBENCH_MAILBOX_URL": sidecar.url,
|
| 2305 |
+
"WEBSITEBENCH_MAILBOX_ALLOWLIST": "",
|
| 2306 |
+
"WEBSITEBENCH_MAILBOX_CREDENTIAL": capability,
|
| 2307 |
+
"WEBSITEBENCH_MAILBOX_NAMESPACE": namespace,
|
| 2308 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_URL": f"{gateway}/internal/bootstrap",
|
| 2309 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN": bootstrap_token,
|
| 2310 |
+
"WEBSITEBENCH_SMTP_HOST": smtp_host,
|
| 2311 |
+
"WEBSITEBENCH_SMTP_PORT": str(smtp_port),
|
| 2312 |
+
# Paired capture must present the same sender ABI as a formal candidate
|
| 2313 |
+
# trial: some runtimes pin this exact suffix before opening SMTP, so a
|
| 2314 |
+
# site-specific authoring sender would disable their only mail path.
|
| 2315 |
+
"WEBSITEBENCH_MAIL_API_URL": f"{gateway}/emails",
|
| 2316 |
+
"WEBSITEBENCH_MAIL_API_TOKEN": bootstrap_token,
|
| 2317 |
+
"WEBSITEBENCH_MAIL_FROM": CANDIDATE_MAIL_SENDER,
|
| 2318 |
+
"WEBSITEBENCH_SMTP_FROM": CANDIDATE_MAIL_SENDER,
|
| 2319 |
+
}
|
| 2320 |
+
|
| 2321 |
+
|
| 2322 |
+
def _mint_identity() -> tuple[str, str, str]:
|
| 2323 |
+
"""Mint one trial's mailbox identity.
|
| 2324 |
+
|
| 2325 |
+
Minted from ``secrets``, never derived from the public ``seed-<seed>``
|
| 2326 |
+
trial ID, while the inbox token doubles as the browser's access token.
|
| 2327 |
+
Determinism is not lost, because scoring reads no mail.
|
| 2328 |
+
"""
|
| 2329 |
+
|
| 2330 |
+
return (
|
| 2331 |
+
f"trial-{secrets.token_hex(16)}",
|
| 2332 |
+
secrets.token_hex(32),
|
| 2333 |
+
secrets.token_urlsafe(32),
|
| 2334 |
+
)
|
| 2335 |
+
|
| 2336 |
+
|
| 2337 |
+
def main(argv: list[str] | None = None) -> int:
|
| 2338 |
+
"""Run one trial's mailbox, minting that trial's identity at boot.
|
| 2339 |
+
|
| 2340 |
+
``materialize`` runs once per *bundle*; a trial is one *run* of that
|
| 2341 |
+
bundle, so a value written into ``docker-compose.yaml`` can never be
|
| 2342 |
+
per-trial. The identity is therefore minted here, by the one process that
|
| 2343 |
+
owns it, and each party learns only its own half over the listener it is
|
| 2344 |
+
allowed to reach: the site reads ``/internal/bootstrap`` on the API
|
| 2345 |
+
listener, the agent gets a bare inbox URL and no credential at all.
|
| 2346 |
+
|
| 2347 |
+
The values come from ``secrets`` rather than from the public
|
| 2348 |
+
``seed-<seed>`` trial ID. Determinism is not lost, because formal scoring
|
| 2349 |
+
never reads mail.
|
| 2350 |
+
"""
|
| 2351 |
+
|
| 2352 |
+
import argparse
|
| 2353 |
+
|
| 2354 |
+
parser = argparse.ArgumentParser(prog="websitebench-local-mailbox")
|
| 2355 |
+
parser.add_argument("--smtp-port", type=int, default=1025)
|
| 2356 |
+
parser.add_argument("--http-port", type=int, default=8025)
|
| 2357 |
+
parser.add_argument("--inbox-port", type=int, default=8026)
|
| 2358 |
+
parser.add_argument("--bind-host", default="127.0.0.1")
|
| 2359 |
+
parser.add_argument(
|
| 2360 |
+
"--api-bind-host",
|
| 2361 |
+
default=None,
|
| 2362 |
+
help="interface for the SMTP and JSON API listeners (defaults to --bind-host)",
|
| 2363 |
+
)
|
| 2364 |
+
parser.add_argument(
|
| 2365 |
+
"--inbox-bind-host",
|
| 2366 |
+
default=None,
|
| 2367 |
+
help="interface for the agent inbox listener (defaults to --bind-host)",
|
| 2368 |
+
)
|
| 2369 |
+
args = parser.parse_args(argv)
|
| 2370 |
+
|
| 2371 |
+
api_bind = (
|
| 2372 |
+
args.api_bind_host
|
| 2373 |
+
or os.environ.get("WEBSITEBENCH_MAILBOX_API_BIND")
|
| 2374 |
+
or args.bind_host
|
| 2375 |
+
)
|
| 2376 |
+
inbox_bind = (
|
| 2377 |
+
args.inbox_bind_host
|
| 2378 |
+
or os.environ.get("WEBSITEBENCH_MAILBOX_INBOX_BIND")
|
| 2379 |
+
or args.bind_host
|
| 2380 |
+
)
|
| 2381 |
+
smtp_advertise_host = (
|
| 2382 |
+
os.environ.get("WEBSITEBENCH_MAILBOX_SMTP_ADVERTISE_HOST", "").strip()
|
| 2383 |
+
or api_bind
|
| 2384 |
+
)
|
| 2385 |
+
|
| 2386 |
+
namespace, capability, inbox_token = _mint_identity()
|
| 2387 |
+
bootstrap_token = os.environ.get("WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN", "")
|
| 2388 |
+
if len(bootstrap_token) < 32:
|
| 2389 |
+
raise SystemExit(
|
| 2390 |
+
"WEBSITEBENCH_MAILBOX_BOOTSTRAP_TOKEN must be at least 32 characters"
|
| 2391 |
+
)
|
| 2392 |
+
try:
|
| 2393 |
+
mailpit_client = MailPlane.from_environment().client
|
| 2394 |
+
except MailInfrastructureUnavailable as error:
|
| 2395 |
+
# The sidecar discovers its store the same way the evaluator does, and
|
| 2396 |
+
# refuses to serve an in-memory production mailbox when there is none.
|
| 2397 |
+
raise SystemExit(f"{error}; refusing an in-memory production mailbox")
|
| 2398 |
+
|
| 2399 |
+
stopped = threading.Event()
|
| 2400 |
+
signal.signal(signal.SIGTERM, lambda _signum, _frame: stopped.set())
|
| 2401 |
+
signal.signal(signal.SIGINT, lambda _signum, _frame: stopped.set())
|
| 2402 |
+
sidecar = LocalMailboxSidecar(
|
| 2403 |
+
smtp_port=args.smtp_port,
|
| 2404 |
+
http_port=args.http_port,
|
| 2405 |
+
bind_host=api_bind,
|
| 2406 |
+
inbox_port=args.inbox_port,
|
| 2407 |
+
inbox_bind_host=inbox_bind,
|
| 2408 |
+
inbox_namespace=namespace,
|
| 2409 |
+
inbox_token=inbox_token,
|
| 2410 |
+
bootstrap=_Bootstrap(
|
| 2411 |
+
token=bootstrap_token,
|
| 2412 |
+
namespace=namespace,
|
| 2413 |
+
capability=capability,
|
| 2414 |
+
smtp_host=smtp_advertise_host,
|
| 2415 |
+
smtp_port=args.smtp_port,
|
| 2416 |
+
),
|
| 2417 |
+
mailpit_client=mailpit_client,
|
| 2418 |
+
)
|
| 2419 |
+
sidecar.register_namespace(namespace, capability)
|
| 2420 |
+
sidecar.start()
|
| 2421 |
+
# The inbox path is the agent's entry point and holds no secret beyond the
|
| 2422 |
+
# token that scopes it to this trial; nothing else about the trial is
|
| 2423 |
+
# printed, and the capability never is.
|
| 2424 |
+
print(f"inbox listening on {inbox_bind}:{args.inbox_port}", flush=True)
|
| 2425 |
+
try:
|
| 2426 |
+
stopped.wait()
|
| 2427 |
+
finally:
|
| 2428 |
+
sidecar.close()
|
| 2429 |
+
return 0
|
| 2430 |
+
|
| 2431 |
+
|
| 2432 |
+
if __name__ == "__main__":
|
| 2433 |
+
raise SystemExit(main(sys.argv[1:]))
|
tasks/eatthismuch/environment/reference/.websitebench-reference-tls/ca.crt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-----BEGIN CERTIFICATE-----
|
| 2 |
+
MIIDSzCCAjOgAwIBAgIJV1NCSEFSQk9SMA0GCSqGSIb3DQEBCwUAMDExLzAtBgNV
|
| 3 |
+
BAMMJldlYnNpdGVCZW5jaCBIYXJib3IgTG9jYWwgUmVmZXJlbmNlIENBMB4XDTI2
|
| 4 |
+
MDgyMjEzMDg1NloXDTQ2MDgyMjEzMDg1NlowMTEvMC0GA1UEAwwmV2Vic2l0ZUJl
|
| 5 |
+
bmNoIEhhcmJvciBMb2NhbCBSZWZlcmVuY2UgQ0EwggEiMA0GCSqGSIb3DQEBAQUA
|
| 6 |
+
A4IBDwAwggEKAoIBAQCnBZES7bXJo/hajL5T54GDV/FLmQxmk0dGN+aPwRrgpiN6
|
| 7 |
+
syddg/krh/dhiUzfxgJV+6ajnYuYyQ4BVo1rQGY0va95T8cjcHgC7EyEAaDUZF+i
|
| 8 |
+
qo3v/ucMmquZodezEkghWz6FDcGH3dDtz0bQyYgoGQKnioeYXsVlfvIzXJpE1VTW
|
| 9 |
+
iGUH83/APzvPInZ5jRRrCEnqj1WtSoi+Yycs/eaYueDomoZeT3xvK5MTz6tC6EvW
|
| 10 |
+
hAh8qyv2DjPZUSToiZH23X6qXYRkKkLDXHWHfhamRwlFoh9pp2s4D+Cq/Wke+o2f
|
| 11 |
+
/cj8KvAkTnMo4iMmZFpb/NRaGjhfy8UBPuM7SwMJAgMBAAGjZjBkMB0GA1UdDgQW
|
| 12 |
+
BBQn+U1eizvlvKbfavSxHoXFYQ/UfTAfBgNVHSMEGDAWgBQn+U1eizvlvKbfavSx
|
| 13 |
+
HoXFYQ/UfTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjANBgkq
|
| 14 |
+
hkiG9w0BAQsFAAOCAQEAoSC3zzZEAs2eigloiDkdeh98+2cPmcs44TG+TU6sq6SP
|
| 15 |
+
EBEgHg/c6yzh74UijEImksT9aZ+LxtTNM+nfNFzWku1T3R7gSimP5TSnC4rTEhfM
|
| 16 |
+
Ih8fMoUbcAe/uFwVE9UHn/QQNsqRg6hg2jdUlmwr206e62/eBQXDNeuLcapAxcdU
|
| 17 |
+
VYno4HNi5gAaakS2dM/IgiorRqM7SVT+s8B9Fl0mzMdRNCUeOOU4q8zGtQGp4IV+
|
| 18 |
+
x/LZIMsLogP2Rpks8ecyanRSXYpGbqpZ+14rcO5bdWQ7P8B/sFssT3b1mR3H/aVh
|
| 19 |
+
yZycwgzCbkbdMaxyz2Vm/c7PVb3so5Xb98jufp2L9A==
|
| 20 |
+
-----END CERTIFICATE-----
|
tasks/eatthismuch/environment/reference/.websitebench-reference-tls/reference.crt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-----BEGIN CERTIFICATE-----
|
| 2 |
+
MIIDWjCCAkKgAwIBAgIIV1NCUkVGMDEwDQYJKoZIhvcNAQELBQAwMTEvMC0GA1UE
|
| 3 |
+
AwwmV2Vic2l0ZUJlbmNoIEhhcmJvciBMb2Nhb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pfSRcGYM2
|
| 18 |
+
tB+zMBccmP/hrB3eJcrjiediwhSBNJjdKysK66GzFRqcyGwwvsz1YPbWcpcQXoVZ
|
| 19 |
+
nnNXEs5TrxTj67/DLuP/233oEoz2XQNh1O2ohq1o5JMu4hbotqkepCwcidNBmQ==
|
| 20 |
+
-----END CERTIFICATE-----
|
tasks/eatthismuch/environment/reference/.websitebench-reference-tls/reference.key
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-----BEGIN PRIVATE KEY-----
|
| 2 |
+
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDNJXc7onbK78Ri
|
| 3 |
+
LSAe3LjIeko9xNumYRejoB+kKFGLBL4U7vY+02coiXpne4e1CMzUVzRiaQ9i9XHB
|
| 4 |
+
e0Oq4CR1HW7wzMRV8XVM5/dVq+j0vZVarZbITyHSWHwypa7yPL7o/kBekdwi8ncd
|
| 5 |
+
Uy/mhYqw7sOdM4Nq0ifj+lcJ/rwSqjvcML4//4THY9CP5iB2YT+U+Z7F/JfLOJFZ
|
| 6 |
+
12l4SglxRDf1awDLJpGfpX0kRgW7jYuWf49C5VcPjggTRl1WYy1qrgaNIFu75sre
|
| 7 |
+
sXYkDgRxuLiXfc/6wNwykh9fQo+GNFqBGy2lC8Ey425m4XEROraenAGMqVMfxJsJ
|
| 8 |
+
5wjqRhlVAgMBAAECggEAIdiyWyGzKUjVVSBeWhEvII6CpL3Pwpvmz02KIuavC3l5
|
| 9 |
+
FhGWCagN71N9YUjxizYcO1V29FyimABoaBR7BdyMz1DPnsWeCBL6ODnWZilimkyU
|
| 10 |
+
MX2N8NcTfLWy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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Terminate trusted local TLS in front of a Harbor reference process.
|
| 2 |
+
|
| 3 |
+
The reference application's own launch contract remains HTTP on loopback. The
|
| 4 |
+
Agent-facing Docker service is HTTPS only, so Secure ``__Host-`` cookies have
|
| 5 |
+
the same browser semantics as the source site without changing clone code.
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
from __future__ import annotations
|
| 9 |
+
|
| 10 |
+
import asyncio
|
| 11 |
+
import contextlib
|
| 12 |
+
import os
|
| 13 |
+
import signal
|
| 14 |
+
import ssl
|
| 15 |
+
import subprocess
|
| 16 |
+
import sys
|
| 17 |
+
from pathlib import Path
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
BUFFER_SIZE = 64 * 1024
|
| 21 |
+
STARTUP_TIMEOUT_SECONDS = 30.0
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
async def _copy_stream(
|
| 25 |
+
reader: asyncio.StreamReader,
|
| 26 |
+
writer: asyncio.StreamWriter,
|
| 27 |
+
) -> None:
|
| 28 |
+
while block := await reader.read(BUFFER_SIZE):
|
| 29 |
+
writer.write(block)
|
| 30 |
+
await writer.drain()
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
async def _forward(
|
| 34 |
+
client_reader: asyncio.StreamReader,
|
| 35 |
+
client_writer: asyncio.StreamWriter,
|
| 36 |
+
*,
|
| 37 |
+
upstream_port: int,
|
| 38 |
+
) -> None:
|
| 39 |
+
try:
|
| 40 |
+
upstream_reader, upstream_writer = await asyncio.open_connection(
|
| 41 |
+
"127.0.0.1", upstream_port
|
| 42 |
+
)
|
| 43 |
+
except OSError:
|
| 44 |
+
client_writer.close()
|
| 45 |
+
await client_writer.wait_closed()
|
| 46 |
+
return
|
| 47 |
+
|
| 48 |
+
tasks = {
|
| 49 |
+
asyncio.create_task(_copy_stream(client_reader, upstream_writer)),
|
| 50 |
+
asyncio.create_task(_copy_stream(upstream_reader, client_writer)),
|
| 51 |
+
}
|
| 52 |
+
try:
|
| 53 |
+
_done, pending = await asyncio.wait(
|
| 54 |
+
tasks, return_when=asyncio.FIRST_COMPLETED
|
| 55 |
+
)
|
| 56 |
+
for task in pending:
|
| 57 |
+
task.cancel()
|
| 58 |
+
await asyncio.gather(*tasks, return_exceptions=True)
|
| 59 |
+
finally:
|
| 60 |
+
upstream_writer.close()
|
| 61 |
+
client_writer.close()
|
| 62 |
+
with contextlib.suppress(OSError):
|
| 63 |
+
await upstream_writer.wait_closed()
|
| 64 |
+
with contextlib.suppress(OSError):
|
| 65 |
+
await client_writer.wait_closed()
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
async def _wait_for_upstream(process: subprocess.Popen[bytes], port: int) -> None:
|
| 69 |
+
loop = asyncio.get_running_loop()
|
| 70 |
+
deadline = loop.time() + STARTUP_TIMEOUT_SECONDS
|
| 71 |
+
while loop.time() < deadline:
|
| 72 |
+
return_code = process.poll()
|
| 73 |
+
if return_code is not None:
|
| 74 |
+
raise RuntimeError(
|
| 75 |
+
f"reference process exited before readiness with {return_code}"
|
| 76 |
+
)
|
| 77 |
+
try:
|
| 78 |
+
_reader, writer = await asyncio.open_connection("127.0.0.1", port)
|
| 79 |
+
except OSError:
|
| 80 |
+
await asyncio.sleep(0.1)
|
| 81 |
+
continue
|
| 82 |
+
writer.close()
|
| 83 |
+
await writer.wait_closed()
|
| 84 |
+
return
|
| 85 |
+
raise TimeoutError("reference process did not open its loopback port")
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
async def _terminate(process: subprocess.Popen[bytes]) -> None:
|
| 89 |
+
if process.poll() is not None:
|
| 90 |
+
return
|
| 91 |
+
process.terminate()
|
| 92 |
+
try:
|
| 93 |
+
await asyncio.wait_for(asyncio.to_thread(process.wait), timeout=10.0)
|
| 94 |
+
except TimeoutError:
|
| 95 |
+
process.kill()
|
| 96 |
+
await asyncio.to_thread(process.wait)
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
async def _serve(command: list[str]) -> int:
|
| 100 |
+
external_port = int(os.environ.get("PORT", "8080"))
|
| 101 |
+
upstream_port = int(
|
| 102 |
+
os.environ.get("WEBSITEBENCH_REFERENCE_UPSTREAM_PORT", "18080")
|
| 103 |
+
)
|
| 104 |
+
if external_port == upstream_port:
|
| 105 |
+
raise ValueError("reference TLS and upstream ports must differ")
|
| 106 |
+
|
| 107 |
+
child_environment = dict(os.environ)
|
| 108 |
+
child_environment["HOST"] = "127.0.0.1"
|
| 109 |
+
child_environment["PORT"] = str(upstream_port)
|
| 110 |
+
process = subprocess.Popen(command, env=child_environment)
|
| 111 |
+
server: asyncio.AbstractServer | None = None
|
| 112 |
+
try:
|
| 113 |
+
await _wait_for_upstream(process, upstream_port)
|
| 114 |
+
tls_root = Path(__file__).resolve().parent
|
| 115 |
+
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
| 116 |
+
context.minimum_version = ssl.TLSVersion.TLSv1_2
|
| 117 |
+
context.load_cert_chain(
|
| 118 |
+
certfile=tls_root / "reference.crt",
|
| 119 |
+
keyfile=tls_root / "reference.key",
|
| 120 |
+
)
|
| 121 |
+
server = await asyncio.start_server(
|
| 122 |
+
lambda reader, writer: _forward(
|
| 123 |
+
reader, writer, upstream_port=upstream_port
|
| 124 |
+
),
|
| 125 |
+
"0.0.0.0",
|
| 126 |
+
external_port,
|
| 127 |
+
ssl=context,
|
| 128 |
+
)
|
| 129 |
+
print(
|
| 130 |
+
"WebsiteBench reference HTTPS ready on "
|
| 131 |
+
f"0.0.0.0:{external_port}; upstream=127.0.0.1:{upstream_port}",
|
| 132 |
+
flush=True,
|
| 133 |
+
)
|
| 134 |
+
|
| 135 |
+
stop = asyncio.Event()
|
| 136 |
+
loop = asyncio.get_running_loop()
|
| 137 |
+
for signum in (signal.SIGINT, signal.SIGTERM):
|
| 138 |
+
loop.add_signal_handler(signum, stop.set)
|
| 139 |
+
process_wait = asyncio.create_task(asyncio.to_thread(process.wait))
|
| 140 |
+
stop_wait = asyncio.create_task(stop.wait())
|
| 141 |
+
done, pending = await asyncio.wait(
|
| 142 |
+
{process_wait, stop_wait}, return_when=asyncio.FIRST_COMPLETED
|
| 143 |
+
)
|
| 144 |
+
for task in pending:
|
| 145 |
+
task.cancel()
|
| 146 |
+
await asyncio.gather(*pending, return_exceptions=True)
|
| 147 |
+
if process_wait in done:
|
| 148 |
+
return process_wait.result()
|
| 149 |
+
return 0
|
| 150 |
+
finally:
|
| 151 |
+
if server is not None:
|
| 152 |
+
server.close()
|
| 153 |
+
await server.wait_closed()
|
| 154 |
+
await _terminate(process)
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
def main() -> int:
|
| 158 |
+
if len(sys.argv) < 2:
|
| 159 |
+
raise SystemExit("usage: tls_proxy.py COMMAND [ARG ...]")
|
| 160 |
+
return asyncio.run(_serve(sys.argv[1:]))
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
if __name__ == "__main__":
|
| 164 |
+
raise SystemExit(main())
|
tasks/eatthismuch/environment/reference/Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.12.11-slim-bookworm@sha256:519591d6871b7bc437060736b9f7456b8731f1499a57e22e6c285135ae657bf7
|
| 2 |
+
WORKDIR /srv/reference
|
| 3 |
+
# BEGIN WebsiteBench runtime dependencies
|
| 4 |
+
COPY --from=ghcr.io/astral-sh/uv:0.12.8@sha256:d1cbaeadc234fe19c0d93daabcf5e98738cd93c6d1dd4918ef6aa30735feb23a /uv /usr/local/bin/uv
|
| 5 |
+
COPY vendor.requirements.lock vendor.requirements.lock
|
| 6 |
+
RUN uv pip install --python /usr/local/bin/python --no-cache --no-deps --require-hashes --only-binary :all: --link-mode copy --target vendor -r vendor.requirements.lock && rm -f vendor/.lock
|
| 7 |
+
# END WebsiteBench runtime dependencies
|
| 8 |
+
COPY . .
|
| 9 |
+
ENV HOST=0.0.0.0 PORT=8080 DATA_DIR=/tmp/websitebench-eatthismuch-reference-data SEED=0 TZ=UTC
|
| 10 |
+
RUN ./compile.sh
|
| 11 |
+
HEALTHCHECK --interval=2s --timeout=3s --retries=30 CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=2)"
|
| 12 |
+
CMD ["./executable"]
|
| 13 |
+
|
| 14 |
+
# Added by the WebsiteBench Harbor materializer. The original app runs only on loopback; the Agent-facing reference is trusted HTTPS.
|
| 15 |
+
COPY .websitebench-reference-tls/ /opt/websitebench/reference-tls/
|
| 16 |
+
RUN chmod 600 /opt/websitebench/reference-tls/reference.key && chmod 755 /opt/websitebench/reference-tls/tls_proxy.py
|
| 17 |
+
ENV WEBSITEBENCH_REFERENCE_UPSTREAM_PORT=18080
|
| 18 |
+
HEALTHCHECK --interval=2s --timeout=3s --retries=30 CMD python3 -c "import os,ssl,urllib.request as r;c=ssl.create_default_context(cafile='/opt/websitebench/reference-tls/ca.crt');u='https://127.0.0.1:'+os.environ.get('PORT','8080')+'/healthz';r.urlopen(u,context=c,timeout=2).close()"
|
| 19 |
+
CMD ["python3", "/opt/websitebench/reference-tls/tls_proxy.py", "./run.sh"]
|
tasks/eatthismuch/environment/reference/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Direct reference adapter
|
| 2 |
+
|
| 3 |
+
The materializer overlays these ABI files on the frozen Eat This Much clone and
|
| 4 |
+
backend. The same assembled bytes form the private oracle implementation; the
|
| 5 |
+
clone and backend are not duplicated in this authoring directory.
|
tasks/eatthismuch/environment/reference/backend/model.json
ADDED
|
@@ -0,0 +1,435 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "offline-clone.backend-model.v1",
|
| 3 |
+
"site_id": "eatthismuch",
|
| 4 |
+
"status": "draft",
|
| 5 |
+
"profile": "offline-benchmark",
|
| 6 |
+
"database": {
|
| 7 |
+
"engine": "sqlite",
|
| 8 |
+
"location_policy": "runtime-data-outside-candidate",
|
| 9 |
+
"concurrency_model": "wal-transactional-single-writer",
|
| 10 |
+
"migration_strategy": "versioned-forward-migrations",
|
| 11 |
+
"deterministic_reset": true,
|
| 12 |
+
"restart_persistence": true,
|
| 13 |
+
"site_isolation": "one-database-per-site",
|
| 14 |
+
"proofs": [
|
| 15 |
+
{
|
| 16 |
+
"obligation": "data-location",
|
| 17 |
+
"status": "planned",
|
| 18 |
+
"evidence": []
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"obligation": "schema-migration",
|
| 22 |
+
"status": "planned",
|
| 23 |
+
"evidence": []
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"obligation": "deterministic-reset",
|
| 27 |
+
"status": "planned",
|
| 28 |
+
"evidence": []
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"obligation": "restart-persistence",
|
| 32 |
+
"status": "planned",
|
| 33 |
+
"evidence": []
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"obligation": "backup-restore",
|
| 37 |
+
"status": "planned",
|
| 38 |
+
"evidence": []
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"obligation": "concurrency",
|
| 42 |
+
"status": "planned",
|
| 43 |
+
"evidence": []
|
| 44 |
+
}
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
"auth_semantics": {
|
| 48 |
+
"account_database_scope": "site-isolated",
|
| 49 |
+
"credential_storage": "salted-scrypt-hash",
|
| 50 |
+
"session_storage": "opaque-cookie-digest-at-rest",
|
| 51 |
+
"registration_account_creation": "after-email-verification",
|
| 52 |
+
"verification_challenge_storage": "salted-hash",
|
| 53 |
+
"password_reset_enumeration": "indistinguishable-public-response",
|
| 54 |
+
"mail_default": "LOCAL_ONLY",
|
| 55 |
+
"mail_statuses": [
|
| 56 |
+
"LOCAL_ONLY",
|
| 57 |
+
"SMTP_PENDING",
|
| 58 |
+
"SMTP_SENT",
|
| 59 |
+
"SMTP_FAILED"
|
| 60 |
+
],
|
| 61 |
+
"smtp_activation": "explicit-complete-config-only",
|
| 62 |
+
"smtp_delivery_ceiling": 3,
|
| 63 |
+
"rejected_secret_journaling": "forbidden",
|
| 64 |
+
"legacy_write_policy": "read-compatible-write-rejected"
|
| 65 |
+
},
|
| 66 |
+
"common_capabilities": {
|
| 67 |
+
"account_registration": "account-registration",
|
| 68 |
+
"account_sign_in": "account-sign-in",
|
| 69 |
+
"session_lifecycle": "session-lifecycle",
|
| 70 |
+
"password_recovery": "password-recovery",
|
| 71 |
+
"email_delivery": "email-delivery"
|
| 72 |
+
},
|
| 73 |
+
"capabilities": [
|
| 74 |
+
{
|
| 75 |
+
"id": "account-registration",
|
| 76 |
+
"label": "Verified local account registration",
|
| 77 |
+
"priority": "p0",
|
| 78 |
+
"category": "authentication",
|
| 79 |
+
"implementation_status": "planned",
|
| 80 |
+
"entities": [
|
| 81 |
+
{
|
| 82 |
+
"name": "pending-registration",
|
| 83 |
+
"identity": "opaque pending id bound to one browser session",
|
| 84 |
+
"owner_scope": "session",
|
| 85 |
+
"persistence": "durable"
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"name": "local-account",
|
| 89 |
+
"identity": "site-local account id and unique normalized email",
|
| 90 |
+
"owner_scope": "account",
|
| 91 |
+
"persistence": "durable"
|
| 92 |
+
}
|
| 93 |
+
],
|
| 94 |
+
"state_machine": {
|
| 95 |
+
"kind": "challenge-lifecycle",
|
| 96 |
+
"states": [
|
| 97 |
+
"collecting",
|
| 98 |
+
"pending-verification",
|
| 99 |
+
"verified",
|
| 100 |
+
"account-created",
|
| 101 |
+
"expired",
|
| 102 |
+
"locked"
|
| 103 |
+
],
|
| 104 |
+
"transitions": [
|
| 105 |
+
{
|
| 106 |
+
"from": "collecting",
|
| 107 |
+
"to": "pending-verification",
|
| 108 |
+
"trigger": "validated registration request"
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"from": "pending-verification",
|
| 112 |
+
"to": "verified",
|
| 113 |
+
"trigger": "correct unexpired code within attempt budget"
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"from": "verified",
|
| 117 |
+
"to": "account-created",
|
| 118 |
+
"trigger": "transactional account creation and session rotation"
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"from": "pending-verification",
|
| 122 |
+
"to": "expired",
|
| 123 |
+
"trigger": "challenge expiry"
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"from": "pending-verification",
|
| 127 |
+
"to": "locked",
|
| 128 |
+
"trigger": "verification attempt budget exhausted"
|
| 129 |
+
}
|
| 130 |
+
]
|
| 131 |
+
},
|
| 132 |
+
"server_authorities": [
|
| 133 |
+
"The server normalizes identity and hashes password and code.",
|
| 134 |
+
"An account is created only after successful verification.",
|
| 135 |
+
"Duplicate normalized email creation is rejected transactionally."
|
| 136 |
+
],
|
| 137 |
+
"external_effect": "none",
|
| 138 |
+
"journey_ids": [],
|
| 139 |
+
"invariant_ids": [],
|
| 140 |
+
"proofs": {
|
| 141 |
+
"evidence": {},
|
| 142 |
+
"planned": [
|
| 143 |
+
"valid",
|
| 144 |
+
"invalid",
|
| 145 |
+
"duplicate",
|
| 146 |
+
"stale",
|
| 147 |
+
"foreign-owner",
|
| 148 |
+
"unauthorized-role",
|
| 149 |
+
"restart",
|
| 150 |
+
"migration",
|
| 151 |
+
"concurrency"
|
| 152 |
+
],
|
| 153 |
+
"not_applicable": []
|
| 154 |
+
}
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"id": "account-sign-in",
|
| 158 |
+
"label": "Password-based local account sign-in",
|
| 159 |
+
"priority": "p0",
|
| 160 |
+
"category": "authentication",
|
| 161 |
+
"implementation_status": "planned",
|
| 162 |
+
"entities": [
|
| 163 |
+
{
|
| 164 |
+
"name": "local-account",
|
| 165 |
+
"identity": "site-local account id and normalized email",
|
| 166 |
+
"owner_scope": "account",
|
| 167 |
+
"persistence": "durable"
|
| 168 |
+
}
|
| 169 |
+
],
|
| 170 |
+
"state_machine": {
|
| 171 |
+
"kind": "entity-lifecycle",
|
| 172 |
+
"states": [
|
| 173 |
+
"signed-out",
|
| 174 |
+
"identified",
|
| 175 |
+
"authenticated",
|
| 176 |
+
"rejected"
|
| 177 |
+
],
|
| 178 |
+
"transitions": [
|
| 179 |
+
{
|
| 180 |
+
"from": "signed-out",
|
| 181 |
+
"to": "identified",
|
| 182 |
+
"trigger": "normalized email submitted"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"from": "identified",
|
| 186 |
+
"to": "authenticated",
|
| 187 |
+
"trigger": "constant-time password verification succeeds"
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"from": "identified",
|
| 191 |
+
"to": "rejected",
|
| 192 |
+
"trigger": "credentials are invalid"
|
| 193 |
+
}
|
| 194 |
+
]
|
| 195 |
+
},
|
| 196 |
+
"server_authorities": [
|
| 197 |
+
"The server verifies salted password hashes.",
|
| 198 |
+
"The server rotates the authenticated session.",
|
| 199 |
+
"Client-selected fixture identity is not authentication."
|
| 200 |
+
],
|
| 201 |
+
"external_effect": "none",
|
| 202 |
+
"journey_ids": [],
|
| 203 |
+
"invariant_ids": [],
|
| 204 |
+
"proofs": {
|
| 205 |
+
"evidence": {},
|
| 206 |
+
"planned": [
|
| 207 |
+
"valid",
|
| 208 |
+
"invalid",
|
| 209 |
+
"duplicate",
|
| 210 |
+
"stale",
|
| 211 |
+
"foreign-owner",
|
| 212 |
+
"unauthorized-role",
|
| 213 |
+
"restart",
|
| 214 |
+
"migration",
|
| 215 |
+
"concurrency"
|
| 216 |
+
],
|
| 217 |
+
"not_applicable": []
|
| 218 |
+
}
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"id": "session-lifecycle",
|
| 222 |
+
"label": "Anonymous and authenticated browser sessions",
|
| 223 |
+
"priority": "p0",
|
| 224 |
+
"category": "authentication",
|
| 225 |
+
"implementation_status": "planned",
|
| 226 |
+
"entities": [
|
| 227 |
+
{
|
| 228 |
+
"name": "browser-session",
|
| 229 |
+
"identity": "opaque cookie token with digest persisted at rest",
|
| 230 |
+
"owner_scope": "session",
|
| 231 |
+
"persistence": "durable"
|
| 232 |
+
}
|
| 233 |
+
],
|
| 234 |
+
"state_machine": {
|
| 235 |
+
"kind": "session-lifecycle",
|
| 236 |
+
"states": [
|
| 237 |
+
"anonymous",
|
| 238 |
+
"authenticated",
|
| 239 |
+
"revoked",
|
| 240 |
+
"expired"
|
| 241 |
+
],
|
| 242 |
+
"transitions": [
|
| 243 |
+
{
|
| 244 |
+
"from": "anonymous",
|
| 245 |
+
"to": "authenticated",
|
| 246 |
+
"trigger": "successful sign-in or registration rotates session"
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"from": "authenticated",
|
| 250 |
+
"to": "revoked",
|
| 251 |
+
"trigger": "sign-out or security reset"
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"from": "anonymous",
|
| 255 |
+
"to": "expired",
|
| 256 |
+
"trigger": "session expiry"
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"from": "authenticated",
|
| 260 |
+
"to": "expired",
|
| 261 |
+
"trigger": "session expiry"
|
| 262 |
+
}
|
| 263 |
+
]
|
| 264 |
+
},
|
| 265 |
+
"server_authorities": [
|
| 266 |
+
"Raw session tokens are never stored in the database.",
|
| 267 |
+
"Ownership is resolved from the server-side session record.",
|
| 268 |
+
"Sign-out revokes server-side authority before deleting the cookie."
|
| 269 |
+
],
|
| 270 |
+
"external_effect": "none",
|
| 271 |
+
"journey_ids": [],
|
| 272 |
+
"invariant_ids": [],
|
| 273 |
+
"proofs": {
|
| 274 |
+
"evidence": {},
|
| 275 |
+
"planned": [
|
| 276 |
+
"valid",
|
| 277 |
+
"invalid",
|
| 278 |
+
"duplicate",
|
| 279 |
+
"stale",
|
| 280 |
+
"foreign-owner",
|
| 281 |
+
"unauthorized-role",
|
| 282 |
+
"restart",
|
| 283 |
+
"migration",
|
| 284 |
+
"concurrency"
|
| 285 |
+
],
|
| 286 |
+
"not_applicable": []
|
| 287 |
+
}
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"id": "password-recovery",
|
| 291 |
+
"label": "Enumeration-resistant local password recovery",
|
| 292 |
+
"priority": "p0",
|
| 293 |
+
"category": "authentication",
|
| 294 |
+
"implementation_status": "planned",
|
| 295 |
+
"entities": [
|
| 296 |
+
{
|
| 297 |
+
"name": "password-reset-challenge",
|
| 298 |
+
"identity": "opaque reset id bound to one browser session",
|
| 299 |
+
"owner_scope": "session",
|
| 300 |
+
"persistence": "durable"
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"name": "local-account",
|
| 304 |
+
"identity": "nullable concealed account binding",
|
| 305 |
+
"owner_scope": "account",
|
| 306 |
+
"persistence": "durable"
|
| 307 |
+
}
|
| 308 |
+
],
|
| 309 |
+
"state_machine": {
|
| 310 |
+
"kind": "challenge-lifecycle",
|
| 311 |
+
"states": [
|
| 312 |
+
"requested",
|
| 313 |
+
"verified",
|
| 314 |
+
"consumed",
|
| 315 |
+
"expired",
|
| 316 |
+
"locked"
|
| 317 |
+
],
|
| 318 |
+
"transitions": [
|
| 319 |
+
{
|
| 320 |
+
"from": "requested",
|
| 321 |
+
"to": "verified",
|
| 322 |
+
"trigger": "correct unexpired code within attempt budget"
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"from": "verified",
|
| 326 |
+
"to": "consumed",
|
| 327 |
+
"trigger": "password is replaced and sessions are revoked"
|
| 328 |
+
},
|
| 329 |
+
{
|
| 330 |
+
"from": "requested",
|
| 331 |
+
"to": "expired",
|
| 332 |
+
"trigger": "challenge expiry"
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"from": "requested",
|
| 336 |
+
"to": "locked",
|
| 337 |
+
"trigger": "verification attempt budget exhausted"
|
| 338 |
+
}
|
| 339 |
+
]
|
| 340 |
+
},
|
| 341 |
+
"server_authorities": [
|
| 342 |
+
"Known and unknown emails receive indistinguishable public responses.",
|
| 343 |
+
"Only the server binds a reset flow to an account.",
|
| 344 |
+
"Password replacement revokes prior authenticated sessions."
|
| 345 |
+
],
|
| 346 |
+
"external_effect": "local-only",
|
| 347 |
+
"journey_ids": [],
|
| 348 |
+
"invariant_ids": [],
|
| 349 |
+
"proofs": {
|
| 350 |
+
"evidence": {},
|
| 351 |
+
"planned": [
|
| 352 |
+
"valid",
|
| 353 |
+
"invalid",
|
| 354 |
+
"duplicate",
|
| 355 |
+
"stale",
|
| 356 |
+
"foreign-owner",
|
| 357 |
+
"unauthorized-role",
|
| 358 |
+
"restart",
|
| 359 |
+
"migration",
|
| 360 |
+
"concurrency"
|
| 361 |
+
],
|
| 362 |
+
"not_applicable": []
|
| 363 |
+
}
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"id": "email-delivery",
|
| 367 |
+
"label": "Truthful local verification and recovery mail outbox",
|
| 368 |
+
"priority": "p0",
|
| 369 |
+
"category": "communication",
|
| 370 |
+
"implementation_status": "planned",
|
| 371 |
+
"entities": [
|
| 372 |
+
{
|
| 373 |
+
"name": "mail-outbox-entry",
|
| 374 |
+
"identity": "site-local outbox id and purpose-bound flow id",
|
| 375 |
+
"owner_scope": "system",
|
| 376 |
+
"persistence": "durable"
|
| 377 |
+
}
|
| 378 |
+
],
|
| 379 |
+
"state_machine": {
|
| 380 |
+
"kind": "delivery-lifecycle",
|
| 381 |
+
"states": [
|
| 382 |
+
"local-only",
|
| 383 |
+
"smtp-pending",
|
| 384 |
+
"smtp-sent",
|
| 385 |
+
"smtp-failed"
|
| 386 |
+
],
|
| 387 |
+
"transitions": [
|
| 388 |
+
{
|
| 389 |
+
"from": "local-only",
|
| 390 |
+
"to": "smtp-pending",
|
| 391 |
+
"trigger": "operator enables complete explicit SMTP configuration"
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"from": "smtp-pending",
|
| 395 |
+
"to": "smtp-sent",
|
| 396 |
+
"trigger": "SMTP transport confirms delivery handoff"
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"from": "smtp-pending",
|
| 400 |
+
"to": "smtp-failed",
|
| 401 |
+
"trigger": "delivery attempt fails or ceiling is reached"
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"from": "smtp-failed",
|
| 405 |
+
"to": "smtp-pending",
|
| 406 |
+
"trigger": "bounded idempotent retry below the delivery ceiling"
|
| 407 |
+
}
|
| 408 |
+
]
|
| 409 |
+
},
|
| 410 |
+
"server_authorities": [
|
| 411 |
+
"Offline mode records LOCAL_ONLY and never claims external delivery.",
|
| 412 |
+
"SMTP is disabled unless every required setting is present.",
|
| 413 |
+
"Claim, retry, and startup replay share one delivery ceiling."
|
| 414 |
+
],
|
| 415 |
+
"external_effect": "local-only",
|
| 416 |
+
"journey_ids": [],
|
| 417 |
+
"invariant_ids": [],
|
| 418 |
+
"proofs": {
|
| 419 |
+
"evidence": {},
|
| 420 |
+
"planned": [
|
| 421 |
+
"valid",
|
| 422 |
+
"invalid",
|
| 423 |
+
"duplicate",
|
| 424 |
+
"stale",
|
| 425 |
+
"foreign-owner",
|
| 426 |
+
"unauthorized-role",
|
| 427 |
+
"restart",
|
| 428 |
+
"migration",
|
| 429 |
+
"concurrency"
|
| 430 |
+
],
|
| 431 |
+
"not_applicable": []
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
]
|
| 435 |
+
}
|
tasks/eatthismuch/environment/reference/backend/runtime.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"database": {
|
| 3 |
+
"data_dir": "data",
|
| 4 |
+
"engine": "sqlite",
|
| 5 |
+
"filename": "eatthismuch.sqlite3",
|
| 6 |
+
"legacy_unbound_migration": false,
|
| 7 |
+
"migration_hook": null,
|
| 8 |
+
"seed_hook": null
|
| 9 |
+
},
|
| 10 |
+
"deployment": {
|
| 11 |
+
"profiles": {
|
| 12 |
+
"cloudflare-review": {
|
| 13 |
+
"mail_adapter": "redis-resend",
|
| 14 |
+
"payment_adapter": "local-sandbox",
|
| 15 |
+
"persistence": "ephemeral-reset"
|
| 16 |
+
},
|
| 17 |
+
"docker-volume": {
|
| 18 |
+
"mail_adapter": "effects-gateway",
|
| 19 |
+
"payment_adapter": "local-sandbox",
|
| 20 |
+
"persistence": "persistent-volume"
|
| 21 |
+
},
|
| 22 |
+
"offline-harbor": {
|
| 23 |
+
"mail_adapter": "local-outbox",
|
| 24 |
+
"payment_adapter": "local-sandbox",
|
| 25 |
+
"persistence": "persistent"
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"mail": {
|
| 30 |
+
"purposes": {
|
| 31 |
+
"password-reset": {
|
| 32 |
+
"body": "Your password reset code is ${code}.",
|
| 33 |
+
"expiry": "This code expires in ${minutes} minutes.",
|
| 34 |
+
"footer": "Ignore this message if you did not contact Eat This Much.",
|
| 35 |
+
"lead": "A password reset was requested for Eat This Much.",
|
| 36 |
+
"required_variables": [
|
| 37 |
+
"code",
|
| 38 |
+
"minutes"
|
| 39 |
+
],
|
| 40 |
+
"secret_variables": [
|
| 41 |
+
"code"
|
| 42 |
+
],
|
| 43 |
+
"subject": "Reset your Eat This Much password",
|
| 44 |
+
"template_id": "eatthismuch.password-reset.v1"
|
| 45 |
+
},
|
| 46 |
+
"registration": {
|
| 47 |
+
"body": "Your verification code is ${code}.",
|
| 48 |
+
"expiry": "This code expires in ${minutes} minutes.",
|
| 49 |
+
"footer": "This code is only for Eat This Much.",
|
| 50 |
+
"lead": "Finish creating your Eat This Much account.",
|
| 51 |
+
"required_variables": [
|
| 52 |
+
"code",
|
| 53 |
+
"minutes"
|
| 54 |
+
],
|
| 55 |
+
"secret_variables": [
|
| 56 |
+
"code"
|
| 57 |
+
],
|
| 58 |
+
"subject": "Verify your Eat This Much account",
|
| 59 |
+
"template_id": "eatthismuch.registration.v1"
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
"sender": {
|
| 63 |
+
"address_env": "RESEND_FROM_EMAIL",
|
| 64 |
+
"display_name": "Eat This Much"
|
| 65 |
+
}
|
| 66 |
+
},
|
| 67 |
+
"payments": {
|
| 68 |
+
"currency": "USD",
|
| 69 |
+
"default_adapter": "local-sandbox",
|
| 70 |
+
"enabled": false,
|
| 71 |
+
"local_sandbox": {
|
| 72 |
+
"scenarios": [
|
| 73 |
+
{
|
| 74 |
+
"display_label": "Simulated approval",
|
| 75 |
+
"id": "sandbox-approved",
|
| 76 |
+
"outcome": "approved"
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"display_label": "Simulated decline",
|
| 80 |
+
"id": "sandbox-declined",
|
| 81 |
+
"outcome": "declined"
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"display_label": "Simulated retry",
|
| 85 |
+
"id": "sandbox-retry",
|
| 86 |
+
"outcome": "retryable"
|
| 87 |
+
}
|
| 88 |
+
]
|
| 89 |
+
},
|
| 90 |
+
"stripe_test": null
|
| 91 |
+
},
|
| 92 |
+
"schema_version": "websitebench.site-backend-runtime.v1",
|
| 93 |
+
"session": {
|
| 94 |
+
"host_only": true,
|
| 95 |
+
"http_only": true,
|
| 96 |
+
"same_site": "Lax",
|
| 97 |
+
"secure": true
|
| 98 |
+
},
|
| 99 |
+
"site": {
|
| 100 |
+
"id": "eatthismuch",
|
| 101 |
+
"label": "Eat This Much",
|
| 102 |
+
"public_origin": "https://eatthismuch.offline.invalid"
|
| 103 |
+
}
|
| 104 |
+
}
|
tasks/eatthismuch/environment/reference/clone/app.py
ADDED
|
@@ -0,0 +1,1873 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Eat This Much 离线克隆 —— FastAPI 组合根。
|
| 2 |
+
|
| 3 |
+
布局与判据:
|
| 4 |
+
|
| 5 |
+
* ``frontend/pages`` 是每条范围内路由的本地化存档文档,``static/`` 是冻结的
|
| 6 |
+
静态资源。运行时不可达任何远端来源(CSP 把 connect/img/frame/script 全锁在本源)。
|
| 7 |
+
* 源站的 www 与 /app 都是 SvelteKit。www 走服务端渲染,正文在 HTML 里,可以直接
|
| 8 |
+
存档;``/app`` 是纯客户端渲染,页面外壳没有内容,全靠 ``/api/v1/*`` ——所以
|
| 9 |
+
``/app`` 这一面必须把接口实现出来,让源站自己的 bundle 在本地跑起来。
|
| 10 |
+
* SvelteKit 按页面深度写相对资源前缀(``./_app/…``、``../../_app/…``)。克隆不改这些
|
| 11 |
+
标记,改的是路由:任意深度的 ``**/_app/immutable/**`` 都落到同一份冻结资源上。
|
| 12 |
+
* ``/calories/<slug>-<id>``:数字是权威的,slug 是装饰性的。换个 slug 源站 301 回
|
| 13 |
+
规范地址,克隆照做——不比源站更严格,也不更宽松。
|
| 14 |
+
* ``/app`` 对未匹配路径答 **200 + 404 文案外壳**(源站如此)。克隆答真 404 会比
|
| 15 |
+
源站更严格,那是错的。
|
| 16 |
+
* 站外链接落到 ``/external/{host}`` 边界页,答 200:链接确实通向了某处,只是那个
|
| 17 |
+
某处在离线包里。
|
| 18 |
+
* 账号、邮件、支付全部走引擎自带的 ``websitebench.local_clone_auth`` 与
|
| 19 |
+
``websitebench.site_backend``:口令 scrypt 存哈希、会话只存摘要、找回密码对
|
| 20 |
+
已知/未知邮箱给不可区分的公开响应、邮件默认 LOCAL_ONLY、支付只有本地沙箱。
|
| 21 |
+
* ``GET /healthz`` 恒返回 ``{"ok":true,"site_id":"eatthismuch"}``。
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
from __future__ import annotations
|
| 25 |
+
|
| 26 |
+
import html
|
| 27 |
+
import json
|
| 28 |
+
import threading
|
| 29 |
+
import os
|
| 30 |
+
import pathlib
|
| 31 |
+
import re
|
| 32 |
+
import sys
|
| 33 |
+
from typing import Any
|
| 34 |
+
from urllib.parse import parse_qsl, quote, unquote, urlencode
|
| 35 |
+
|
| 36 |
+
from fastapi import FastAPI, Request
|
| 37 |
+
from fastapi.responses import (
|
| 38 |
+
FileResponse,
|
| 39 |
+
HTMLResponse,
|
| 40 |
+
JSONResponse,
|
| 41 |
+
PlainTextResponse,
|
| 42 |
+
RedirectResponse,
|
| 43 |
+
Response,
|
| 44 |
+
)
|
| 45 |
+
|
| 46 |
+
ROOT = pathlib.Path(__file__).resolve().parent
|
| 47 |
+
if str(ROOT) not in sys.path:
|
| 48 |
+
sys.path.insert(0, str(ROOT))
|
| 49 |
+
|
| 50 |
+
import sitepack # noqa: E402
|
| 51 |
+
from backend import content_store as store # noqa: E402
|
| 52 |
+
from backend import app_api
|
| 53 |
+
from backend import macro_calculator # noqa: E402
|
| 54 |
+
from backend import g_api # noqa: E402
|
| 55 |
+
from backend.site_services import ( # noqa: E402
|
| 56 |
+
data_dir,
|
| 57 |
+
DEMO_DISPLAY_NAME,
|
| 58 |
+
DEMO_EMAIL,
|
| 59 |
+
open_services,
|
| 60 |
+
)
|
| 61 |
+
# 注册/找回密码要按引擎抛的异常分流:校验不过是字段错,其余归 __all__。
|
| 62 |
+
from websitebench.local_clone_auth import ( # noqa: E402
|
| 63 |
+
AuthError,
|
| 64 |
+
RESET_PUBLIC_MESSAGE,
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
SITE_ID = "eatthismuch"
|
| 68 |
+
STATIC = ROOT / "static"
|
| 69 |
+
# The frozen binary assets and the archived inline-API bodies are read out of
|
| 70 |
+
# ``clone/_sitepack`` when compile.sh has packed them and straight off disk when
|
| 71 |
+
# it has not; see sitepack.py for why the compiled tree may not carry fifteen
|
| 72 |
+
# thousand files.
|
| 73 |
+
STATIC_PACK = sitepack.SitePack.load(ROOT / "_sitepack" / "static.packindex.json")
|
| 74 |
+
INLINE_PACK = sitepack.SitePack.load(ROOT / "_sitepack" / "inline-api.packindex.json")
|
| 75 |
+
PAGES = ROOT / "frontend" / "pages"
|
| 76 |
+
AUTH_PAGES = ROOT / "frontend" / "auth"
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
def _load_static_map(name: str) -> dict[str, str]:
|
| 80 |
+
"""构建期从抓取日志带过来的静态资产索引。"""
|
| 81 |
+
src = ROOT / "backend" / "content" / name
|
| 82 |
+
if not src.is_file():
|
| 83 |
+
return {}
|
| 84 |
+
try:
|
| 85 |
+
data = json.loads(src.read_text(encoding="utf-8"))
|
| 86 |
+
except Exception:
|
| 87 |
+
return {}
|
| 88 |
+
return {str(k): str(v) for k, v in data.items()} if isinstance(data, dict) else {}
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
# 路径 → 实测 content-type
|
| 92 |
+
STATIC_TYPES: dict[str, str] = _load_static_map("static-types.json")
|
| 93 |
+
# "裸路径?归一化查询串" → 实际落盘的那个带哈希的路径
|
| 94 |
+
STATIC_QUERIES: dict[str, str] = _load_static_map("static-queries.json")
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
# ---- 内联接口回放 ---------------------------------------------------------
|
| 98 |
+
#
|
| 99 |
+
# 源站把 load() 里 fetch 到的响应内联在页面里(`<script data-sveltekit-fetched>`),
|
| 100 |
+
# 首屏水合直接读它。那批内联块是**服务端真正发出的响应体**,构建时被收进
|
| 101 |
+
# backend/content/inline-api/(见 tools/build_clone.py:build_inline_api)。
|
| 102 |
+
# 客户端路由跳转时没有内联块可读,会真的发请求——这里就用实测到的响应回答,
|
| 103 |
+
# 不是照消费方代码"还原形状"编出来的。
|
| 104 |
+
|
| 105 |
+
def _load_inline_api() -> dict:
|
| 106 |
+
src = ROOT / "backend" / "content" / "inline-api-index.json"
|
| 107 |
+
if not src.is_file():
|
| 108 |
+
return {"pool": {}, "meta": {}}
|
| 109 |
+
try:
|
| 110 |
+
data = json.loads(src.read_text(encoding="utf-8"))
|
| 111 |
+
except Exception:
|
| 112 |
+
return {"pool": {}, "meta": {}}
|
| 113 |
+
if not isinstance(data, dict):
|
| 114 |
+
return {"pool": {}, "meta": {}}
|
| 115 |
+
return {"pool": data.get("pool") or {}, "meta": data.get("meta") or {}}
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
INLINE_API = _load_inline_api()
|
| 119 |
+
INLINE_DIR = ROOT / "backend" / "content" / "inline-api"
|
| 120 |
+
# 同一个键有多份实测响应时(生成接口每次的餐单都不一样)轮换着答,
|
| 121 |
+
# 与源站"每次调用结果不同"这一点对齐。计数器只用来选一份已有的观测,
|
| 122 |
+
# 不参与任何内容生成。
|
| 123 |
+
_INLINE_TURN: dict[str, int] = {}
|
| 124 |
+
_INLINE_LOCK = threading.Lock()
|
| 125 |
+
|
| 126 |
+
# 客户端每次请求都带的版本号,与响应内容无关,做键时去掉
|
| 127 |
+
_BACKEND_VERSION = "HTTP_BACKEND_VERSION"
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
def _inline_key(path: str, query: str) -> str:
|
| 131 |
+
kept = [
|
| 132 |
+
(k, v)
|
| 133 |
+
for k, v in parse_qsl(query, keep_blank_values=True)
|
| 134 |
+
if k != _BACKEND_VERSION
|
| 135 |
+
]
|
| 136 |
+
kept.sort()
|
| 137 |
+
q = urlencode(kept)
|
| 138 |
+
return f"{path}?{q}" if q else path
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
def inline_replay(path: str, query: str = "") -> Response | None:
|
| 142 |
+
"""有实测响应就回放,没有就返回 None 让调用方走原来的分支。
|
| 143 |
+
|
| 144 |
+
★ 回放要补盖 ``Api-Response-Version``。
|
| 145 |
+
|
| 146 |
+
回放响应带的是**取证当时记下来的那些头**。两批取证记的详略不同:
|
| 147 |
+
浏览器那批(captures/*/raw)记了全套响应头,857 条里带着这个头;
|
| 148 |
+
``recon/api-fetched/`` 那批是直接 GET 下来的,meta 只记了
|
| 149 |
+
``{"url","status","headers":{"content-type"},"bytes"}`` —— 265 条一律没有。
|
| 150 |
+
|
| 151 |
+
没有这个头,源站自己的取数封装(chunks/gotDHXHr.js)走 default 分支,把整个
|
| 152 |
+
信封当 payload 交出去。消费方是**解包后**的写法:
|
| 153 |
+
|
| 154 |
+
a = await Ce(e, `/api/v1/food/${r}/`) // nodes/36.3cnGAiU-.js
|
| 155 |
+
o.pathname = a.canonical_url ?? a.public_url
|
| 156 |
+
if (!a.weights[s.units]) throw be(307, a.public_url)
|
| 157 |
+
|
| 158 |
+
``a`` 变成信封之后 ``a.weights`` 是 undefined,下一步取下标直接 TypeError。
|
| 159 |
+
|
| 160 |
+
实测(run/tmp/probe_spa_nav2.py,SPA 内导航而不是直接 goto——直接 goto 走的是
|
| 161 |
+
服务端预渲染那份 HTML,看不见这个洞):点进 /calories/banana-oatmeal-33511,
|
| 162 |
+
响应 200 但 ``ver=-``,页面渲染成 **「500 Error / An error has occurred.」**。
|
| 163 |
+
换成 captures 批次里的 id(4698529,带头)同一条路径完全正常。
|
| 164 |
+
|
| 165 |
+
所以:捕获时没记到头、而响应体又是信封形状的,按信封补盖。裸对象
|
| 166 |
+
(tastypie 的老接口、``{}``)一个都不补——给它们戴上头,解析器会走进
|
| 167 |
+
case 分支去读 ``t.success``,反而把好端端的接口打坏。
|
| 168 |
+
"""
|
| 169 |
+
|
| 170 |
+
key = _inline_key(path, query)
|
| 171 |
+
digests = INLINE_API["pool"].get(key)
|
| 172 |
+
if not digests:
|
| 173 |
+
return None
|
| 174 |
+
if len(digests) == 1:
|
| 175 |
+
digest = digests[0]
|
| 176 |
+
else:
|
| 177 |
+
with _INLINE_LOCK:
|
| 178 |
+
n = _INLINE_TURN.get(key, 0)
|
| 179 |
+
_INLINE_TURN[key] = n + 1
|
| 180 |
+
digest = digests[n % len(digests)]
|
| 181 |
+
name = f"{digest}.json"
|
| 182 |
+
# 打包过的存档响应从 blob 里按同名读;没打包就还是读盘。见 sitepack.py。
|
| 183 |
+
body = sitepack.packed_bytes(INLINE_PACK, name)
|
| 184 |
+
if body is None:
|
| 185 |
+
body_file = INLINE_DIR / name
|
| 186 |
+
if not body_file.is_file():
|
| 187 |
+
return None
|
| 188 |
+
body = body_file.read_bytes()
|
| 189 |
+
info = INLINE_API["meta"].get(digest) or {}
|
| 190 |
+
headers = {
|
| 191 |
+
str(k): str(v)
|
| 192 |
+
for k, v in (info.get("headers") or {}).items()
|
| 193 |
+
if str(k).lower() not in ("content-length", "content-encoding", "transfer-encoding")
|
| 194 |
+
}
|
| 195 |
+
if not any(k.lower() == "api-response-version" for k in headers):
|
| 196 |
+
try:
|
| 197 |
+
payload = json.loads(body)
|
| 198 |
+
except ValueError:
|
| 199 |
+
payload = None
|
| 200 |
+
if isinstance(payload, dict) and _ENVELOPE_SIGNATURE <= payload.keys():
|
| 201 |
+
headers["Api-Response-Version"] = API_RESPONSE_VERSION
|
| 202 |
+
return Response(
|
| 203 |
+
content=body,
|
| 204 |
+
status_code=int(info.get("status") or 200),
|
| 205 |
+
media_type="application/json",
|
| 206 |
+
headers=headers or None,
|
| 207 |
+
)
|
| 208 |
+
_HEALTH = json.dumps({"ok": True, "site_id": SITE_ID}, separators=(",", ":"))
|
| 209 |
+
|
| 210 |
+
# 源站页面自带 SvelteKit 的水合脚本与内联 style,要放行;但 connect/img/frame
|
| 211 |
+
# 一律限死本源,任何漏网的远端请求都会被 CSP 拦下来变成可见的失败。
|
| 212 |
+
CSP = (
|
| 213 |
+
"default-src 'self'; img-src 'self' data: blob:; "
|
| 214 |
+
"style-src 'self' 'unsafe-inline'; "
|
| 215 |
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval'; "
|
| 216 |
+
"font-src 'self' data:; connect-src 'self'; frame-src 'self'; "
|
| 217 |
+
"media-src 'self' data: blob:; worker-src 'self' blob:; "
|
| 218 |
+
"form-action 'self'; base-uri 'self'; object-src 'none'"
|
| 219 |
+
)
|
| 220 |
+
|
| 221 |
+
app = FastAPI(title="Eat This Much offline clone", docs_url=None, redoc_url=None)
|
| 222 |
+
|
| 223 |
+
BACKEND, AUTH, AUTH_MAILER = open_services()
|
| 224 |
+
COOKIE = BACKEND.session_cookie
|
| 225 |
+
COOKIE_NAME = COOKIE["name"]
|
| 226 |
+
|
| 227 |
+
# /app 的账号状态写在可写数据目录下——clone/ 是只读挂载。
|
| 228 |
+
STATE = app_api.AppState(data_dir() / "app-state.json")
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
# ------------------------------------------------------------------ 基础设施
|
| 232 |
+
|
| 233 |
+
@app.middleware("http")
|
| 234 |
+
async def offline_headers(request: Request, call_next):
|
| 235 |
+
response = await call_next(request)
|
| 236 |
+
response.headers["Content-Security-Policy"] = CSP
|
| 237 |
+
response.headers["Referrer-Policy"] = "no-referrer"
|
| 238 |
+
response.headers["X-Content-Type-Options"] = "nosniff"
|
| 239 |
+
response.headers.setdefault("Cache-Control", "no-store")
|
| 240 |
+
return response
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
# ★ 客户端用**响应头**挑解析分支,不是用 URL。
|
| 244 |
+
# chunks/gotDHXHr.js 里的响应解析器(源站自己的代码,抓回来的):
|
| 245 |
+
# switch(e.headers.get(`Api-Response-Version`)){
|
| 246 |
+
# case`2023-05-10`: let t=await e.json();
|
| 247 |
+
# if(!t.success) throw new L(t.errors);
|
| 248 |
+
# return t.data
|
| 249 |
+
# default: return e.json() ← 信封原样返回
|
| 250 |
+
# }
|
| 251 |
+
# 没有这个头,整个信封会被当成 payload 交给调用方。登录页读的是
|
| 252 |
+
# `e.data.user`(nodes/21.eBjk7AG0.js),于是拿到 undefined 再取 .id ——
|
| 253 |
+
# 实测现象就是三种输入(密码错 / 账号不存在 / 正确)都渲染
|
| 254 |
+
# 「An unknown error has occurred. Please reload the page.」,
|
| 255 |
+
# 控制台一条 `Cannot read properties of undefined (reading 'id')`。
|
| 256 |
+
# 失败信封也一样浮不上来:只有走进 case 分支才会 throw L,
|
| 257 |
+
# `success:false` 本身不触发任何东西。
|
| 258 |
+
# 源站的登录页跑得起来(recon 里 POST /api/login/ 之后就跳 /app/planner),
|
| 259 |
+
# 所以源站的信封响应必然带着这个头——这条是从抓回来的第一方代码推出来的,
|
| 260 |
+
# 不是实测到的响应头(recon 只记了 url/method/status/ct,没记全部响应头)。
|
| 261 |
+
API_RESPONSE_VERSION = "2023-05-10"
|
| 262 |
+
# 认信封只看这两个键。源站自己就有只发四个键的响应(/api/get-stripe-currency-locale/
|
| 263 |
+
# 与 41 条 /api/similar-foods/*,实测响应体里根本没有 errors),拿五个键当门槛会把
|
| 264 |
+
# 它们判成裸对象。裸对象没有 success,照样进不来。
|
| 265 |
+
_ENVELOPE_SIGNATURE = frozenset({"data", "success"})
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
def stamp_version(response: Response, payload: Any) -> Response:
|
| 269 |
+
"""信封形状的响应才带版本头。
|
| 270 |
+
|
| 271 |
+
裸 JSON 不能带:``/api/clone/telemetry`` 答的是 ``{}``、tastypie 那批老接口
|
| 272 |
+
答的是对象本身。给它们戴上头,解析器会走进 case 分支去读 ``t.success``,
|
| 273 |
+
读不到就 ``throw new L(undefined)``,反而把好端端的接口打坏。
|
| 274 |
+
"""
|
| 275 |
+
|
| 276 |
+
if isinstance(payload, dict) and _ENVELOPE_SIGNATURE <= payload.keys():
|
| 277 |
+
response.headers["Api-Response-Version"] = API_RESPONSE_VERSION
|
| 278 |
+
return response
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
def envelope(
|
| 282 |
+
data: Any = None,
|
| 283 |
+
*,
|
| 284 |
+
success: bool = True,
|
| 285 |
+
errors: Any = None,
|
| 286 |
+
warnings: dict[str, Any] | None = None,
|
| 287 |
+
meta: dict[str, Any] | None = None,
|
| 288 |
+
status: int = 200,
|
| 289 |
+
) -> JSONResponse:
|
| 290 |
+
"""源站 ``/api/v1/*`` 的响应外壳形状,照它的样子答。"""
|
| 291 |
+
|
| 292 |
+
payload = {
|
| 293 |
+
"data": data,
|
| 294 |
+
"errors": errors,
|
| 295 |
+
"meta": meta if meta is not None else {},
|
| 296 |
+
"success": success,
|
| 297 |
+
"warnings": warnings if warnings is not None else {},
|
| 298 |
+
}
|
| 299 |
+
return stamp_version(JSONResponse(payload, status_code=status), payload)
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
def session_token(request: Request) -> str | None:
|
| 303 |
+
return request.cookies.get(COOKIE_NAME)
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
def current_account(request: Request) -> dict[str, Any] | None:
|
| 307 |
+
"""会话 → 账号;匿名答 None。
|
| 308 |
+
|
| 309 |
+
★ 引擎的 ``resolve_session`` 答的是
|
| 310 |
+
``{'authenticated': True, 'account': {'account_id': …, 'email_normalized': …}, …}``
|
| 311 |
+
——账号信息在 ``account`` 这一层里面,**顶层没有 account_id**。
|
| 312 |
+
之前这里按顶层的 ``account_id`` 判定,取到的永远是 None,于是登录成功之后
|
| 313 |
+
每一条 ``/api/v1/*`` 依旧答 401;SPA 的请求层拿到 401 就直接
|
| 314 |
+
``location.href = /app/login?next=…``(gotDHXHr.js 的 cg,case 401 分支),
|
| 315 |
+
现象是「登录像是没生效」,而登录接口本身其实是成功的。
|
| 316 |
+
"""
|
| 317 |
+
|
| 318 |
+
record = AUTH.resolve_session(session_token(request))
|
| 319 |
+
if not record or not record.get("authenticated"):
|
| 320 |
+
return None
|
| 321 |
+
account = record.get("account")
|
| 322 |
+
if not account:
|
| 323 |
+
return None
|
| 324 |
+
return public_account(account)
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
def public_account(account: dict[str, Any]) -> dict[str, Any]:
|
| 328 |
+
"""引擎给的账号字段名是 email_normalized,页面层要的是 email。"""
|
| 329 |
+
|
| 330 |
+
account = dict(account)
|
| 331 |
+
account.setdefault("email", account.get("email_normalized", ""))
|
| 332 |
+
return account
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
def attach_session(response: Response, token: str, request: Request) -> Response:
|
| 336 |
+
response.set_cookie(
|
| 337 |
+
COOKIE_NAME, token, max_age=30 * 24 * 3600, **_cookie_kwargs(request)
|
| 338 |
+
)
|
| 339 |
+
return response
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
def _cookie_kwargs(request: Request) -> dict[str, Any]:
|
| 343 |
+
options = dict(COOKIE)
|
| 344 |
+
options.pop("name", None)
|
| 345 |
+
# The __Host- prefix requires Secure; never weaken it for local runs.
|
| 346 |
+
options["secure"] = True
|
| 347 |
+
return options
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
def html_response(payload: bytes, status: int = 200) -> HTMLResponse:
|
| 351 |
+
return HTMLResponse(content=payload, status_code=status)
|
| 352 |
+
|
| 353 |
+
|
| 354 |
+
@app.get("/healthz")
|
| 355 |
+
def healthz() -> Response:
|
| 356 |
+
return Response(_HEALTH, media_type="application/json")
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
# ------------------------------------------------------------------ 冻结资源
|
| 360 |
+
|
| 361 |
+
# 源站有**两棵** SvelteKit bundle:站点前台的 /_app/ 和 /app 那个 SPA 的
|
| 362 |
+
# /app/_app/。它们是两次独立构建,哈希互不通用,所以必须分开解析——
|
| 363 |
+
# 合成一棵的话 SPA 的每一个 chunk 都会 404,而 /app 是纯客户端渲染,
|
| 364 |
+
# 结果就是产品主体停在一片空白上(14586 字节的外壳,body 里什么都没有)。
|
| 365 |
+
_IMMUTABLE = re.compile(r"(?:^|/)_app/immutable/(?P<rest>[A-Za-z0-9._/-]+)$")
|
| 366 |
+
_APP_IMMUTABLE = re.compile(r"^/app/(?:[^/]+/)*?_app/immutable/(?P<rest>[A-Za-z0-9._/-]+)$")
|
| 367 |
+
|
| 368 |
+
|
| 369 |
+
# 带查询串抓回来的资产,文件名里编了查询串的哈希(tools/fetch_assets.py:
|
| 370 |
+
# local_path_for):`jquery.min.js?ver=3.7.1` 存成 `jquery__q00eb8052eee1.min.js`。
|
| 371 |
+
# 取的时候要按同一条规则找回去,否则盘上明明有文件却一律 404——
|
| 372 |
+
# 实测受影响的是博客那 7 个 wp-includes/wp-content 脚本样式,加上
|
| 373 |
+
# fonts.googleapis.com 那批字体样式表,共 23 份。
|
| 374 |
+
def _bare_404() -> Response:
|
| 375 |
+
"""没有实体的 404 会被浏览器**挂住**,不是被当成 404。
|
| 376 |
+
|
| 377 |
+
实测:/media/images/thmb/<缺失的图> 原本答 `content-length: 0` 且不带
|
| 378 |
+
content-type,而全站响应头带 `x-content-type-options: nosniff` ——
|
| 379 |
+
Chrome 对这种响应既不完成也不失败,请求就一直吊在那里。一张缺图就能让
|
| 380 |
+
整页永远到不了 networkidle:/diet-plan/1500-calorie/keto 稳定 30s 超时,
|
| 381 |
+
而只差一张图的 /diet-plan/2000-calorie/keto 1.2s 就 idle 了。
|
| 382 |
+
像素契约是在 networkidle 之后取景的,所以这条会直接把契约变成不可测量。
|
| 383 |
+
|
| 384 |
+
给 404 一个最小的 text/plain 实体,浏览器就能正常收下、正常报错——
|
| 385 |
+
行为和源站缺图时一致,只是不再吊死。
|
| 386 |
+
"""
|
| 387 |
+
return Response(b"404", status_code=404, media_type="text/plain; charset=utf-8")
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
def _serve_static(relative: str, query: str = "") -> Response:
|
| 391 |
+
# 带查询串的资产落盘时名字里编了查询串的哈希(见 tools/fetch_assets.py),
|
| 392 |
+
# 但哈希是对**原始字节**做的,而浏览器发请求时会把 `|` 编码成 `%7C`——
|
| 393 |
+
# 运行时重算必然对不上。所以查构建期建好的索引,键两边都做 unquote 归一化。
|
| 394 |
+
# 查不到再回落到裸文件名:运行时才加上的缓存串(?v=123 这种)不该让
|
| 395 |
+
# 一份确实在盘上的资产变成 404。
|
| 396 |
+
candidates = [relative]
|
| 397 |
+
if query:
|
| 398 |
+
hashed = STATIC_QUERIES.get(f"{relative}?{unquote(query)}")
|
| 399 |
+
candidates = [hashed, relative] if hashed else [relative]
|
| 400 |
+
for candidate in candidates:
|
| 401 |
+
target = (STATIC / candidate).resolve()
|
| 402 |
+
try:
|
| 403 |
+
key = target.relative_to(STATIC.resolve()).as_posix()
|
| 404 |
+
except ValueError:
|
| 405 |
+
continue
|
| 406 |
+
# 有一批存档文件没有扩展名(`fonts.googleapis.com/css?family=…` 存成
|
| 407 |
+
# `css__q…`)。按扩展名猜会猜成 application/octet-stream,而 Chrome 对
|
| 408 |
+
# 样式表做严格 MIME 检查,会直接拒掉——现象是 net::ERR_ABORTED。
|
| 409 |
+
# static-types.json 里是抓取时记下的实测 content-type。
|
| 410 |
+
ctype = STATIC_TYPES.get(candidate)
|
| 411 |
+
# 打包过的资产从 blob 里按同一条路径读,字节与响应头都不变。
|
| 412 |
+
entry = STATIC_PACK.entry(key) if STATIC_PACK is not None else None
|
| 413 |
+
if entry is not None:
|
| 414 |
+
return sitepack.packed_response(
|
| 415 |
+
STATIC_PACK, key, entry, media_type=ctype
|
| 416 |
+
)
|
| 417 |
+
if not target.is_file():
|
| 418 |
+
continue
|
| 419 |
+
if ctype:
|
| 420 |
+
return FileResponse(target, media_type=ctype)
|
| 421 |
+
return FileResponse(target)
|
| 422 |
+
return _bare_404()
|
| 423 |
+
|
| 424 |
+
|
| 425 |
+
@app.get("/_app/version.json")
|
| 426 |
+
@app.get("/app/_app/version.json")
|
| 427 |
+
def app_version_json(request: Request) -> Response:
|
| 428 |
+
"""SvelteKit 拿这个文件判断服务端有没有换版本。缺了它每页控制台一条红字。
|
| 429 |
+
|
| 430 |
+
客户端那段(static/_app/immutable/chunks/8gYo_ITa.js)::
|
| 431 |
+
|
| 432 |
+
let t=await fetch(`${Se}/_app/version.json`,…);
|
| 433 |
+
if(!t.ok)return!1;
|
| 434 |
+
let n=(await t.json()).version!==Ee;
|
| 435 |
+
|
| 436 |
+
``!t.ok`` 时只是返回 false,所以 404 的可见代价止于控制台;但内容一旦对不上,
|
| 437 |
+
``version_changed`` 置真,此后**每一次客户端导航都退化成整页重载**。
|
| 438 |
+
所以版本号是从 bundle 自己的常量里取的,不是编的——见
|
| 439 |
+
tools/build_clone.py:install_version_json。
|
| 440 |
+
|
| 441 |
+
两棵树(www 与 /app)是两次独立构建,版本常量不同,各自取各自那份。
|
| 442 |
+
"""
|
| 443 |
+
|
| 444 |
+
rel = "app/_app/version.json" if request.url.path.startswith("/app/") \
|
| 445 |
+
else "_app/version.json"
|
| 446 |
+
return _serve_static(rel)
|
| 447 |
+
|
| 448 |
+
|
| 449 |
+
@app.get("/static/{relative:path}")
|
| 450 |
+
def static_file(relative: str, request: Request) -> Response:
|
| 451 |
+
return _serve_static(relative, request.url.query)
|
| 452 |
+
|
| 453 |
+
|
| 454 |
+
@app.get("/media/{relative:path}")
|
| 455 |
+
def media_file(relative: str, request: Request) -> Response:
|
| 456 |
+
"""``images.eatthismuch.com`` 上的图片本地化到这里。"""
|
| 457 |
+
|
| 458 |
+
return _serve_static(f"media/{relative}", request.url.query)
|
| 459 |
+
|
| 460 |
+
|
| 461 |
+
# ------------------------------------------------------------------ 站外边界
|
| 462 |
+
|
| 463 |
+
@app.get("/external/{destination:path}")
|
| 464 |
+
def external(destination: str, request: Request) -> Response:
|
| 465 |
+
host = destination.strip("/").split("/")[0]
|
| 466 |
+
original = request.query_params.get("u", "")
|
| 467 |
+
title = f"External link — {host}"
|
| 468 |
+
body = f"""<!doctype html><html lang="en"><head><meta charset="utf-8">
|
| 469 |
+
<title>{html.escape(title)}</title>
|
| 470 |
+
<meta name="viewport" content="width=device-width">
|
| 471 |
+
<link rel="stylesheet" href="/static/clone/boundary.css"></head>
|
| 472 |
+
<body class="offline-boundary"><main>
|
| 473 |
+
<h1>This link leaves the archive</h1>
|
| 474 |
+
<p>The page you followed points at <code>{html.escape(host)}</code>.
|
| 475 |
+
This is an offline clone of Eat This Much, so the request stops here instead of
|
| 476 |
+
leaving the machine.</p>
|
| 477 |
+
<p class="target">Original destination: <code>{html.escape(original or ('https://' + destination))}</code></p>
|
| 478 |
+
<p><a href="/">Back to Eat This Much</a></p>
|
| 479 |
+
</main></body></html>"""
|
| 480 |
+
return html_response(body.encode("utf-8"))
|
| 481 |
+
|
| 482 |
+
|
| 483 |
+
# ------------------------------------------------------------------ 接口层
|
| 484 |
+
|
| 485 |
+
@app.get("/api/v1/premadediet/")
|
| 486 |
+
@app.get("/api/v1/premadediet")
|
| 487 |
+
def api_premadediet(request: Request) -> Response:
|
| 488 |
+
"""七天示例餐单。/diet-plan/* 的数据源,匿名可读。
|
| 489 |
+
|
| 490 |
+
键是 calories × (diet_type | macro_preset),取值范围由 bundle 的饮食表决定
|
| 491 |
+
(_app/immutable/chunks/BDJN1_Vg2.js 里的 9 个 slug + anything)。
|
| 492 |
+
"""
|
| 493 |
+
|
| 494 |
+
replay = inline_replay("/api/v1/premadediet/", request.url.query)
|
| 495 |
+
if replay is not None:
|
| 496 |
+
return replay
|
| 497 |
+
return envelope(
|
| 498 |
+
None,
|
| 499 |
+
success=False,
|
| 500 |
+
errors=[{"code": "not_found", "detail": "No premade diet for those parameters."}],
|
| 501 |
+
status=404,
|
| 502 |
+
)
|
| 503 |
+
|
| 504 |
+
|
| 505 |
+
@app.get("/api/get-stripe-currency-locale/")
|
| 506 |
+
@app.get("/api/get-stripe-currency-locale")
|
| 507 |
+
def api_stripe_currency_locale(request: Request) -> Response:
|
| 508 |
+
"""定价页开机就打的一条:告诉前端该用哪种货币和符号。
|
| 509 |
+
|
| 510 |
+
/professionals 和 /professionals/best-meal-planning-software 两页在浏览器里
|
| 511 |
+
真的会发这条请求(run/api-gaps2.json 记的就是它)。缺了它这两页到不了
|
| 512 |
+
networkidle,价格区块也停在占位状态。回放的是匿名 GET 实测回来的那份响应
|
| 513 |
+
(recon/api-fetched/api-get-stripe-currency-locale.*),不是照消费方代码编的。
|
| 514 |
+
|
| 515 |
+
支付一律 local-sandbox:这条只答币种和 locale,不碰任何真实交易。
|
| 516 |
+
"""
|
| 517 |
+
|
| 518 |
+
replay = inline_replay("/api/get-stripe-currency-locale/", request.url.query)
|
| 519 |
+
if replay is not None:
|
| 520 |
+
return replay
|
| 521 |
+
return envelope({"currencies": {"allowed": ["USD"], "selected": "USD",
|
| 522 |
+
"selected_symbol": "$"}, "locale": "en_US"})
|
| 523 |
+
|
| 524 |
+
|
| 525 |
+
@app.get("/api/similar-foods/{ident}/")
|
| 526 |
+
@app.get("/api/similar-foods/{ident}")
|
| 527 |
+
def api_similar_foods(ident: str, request: Request) -> Response:
|
| 528 |
+
replay = inline_replay(f"/api/similar-foods/{ident}/", request.url.query)
|
| 529 |
+
if replay is not None:
|
| 530 |
+
return replay
|
| 531 |
+
return _api_uri_list()
|
| 532 |
+
|
| 533 |
+
|
| 534 |
+
@app.post("/api/save-referrer/")
|
| 535 |
+
@app.post("/api/save-referrer")
|
| 536 |
+
async def api_save_referrer(request: Request) -> Response:
|
| 537 |
+
"""推荐来源上报。**首页 load 里就会打**,所以它掉链子的代价不小。
|
| 538 |
+
|
| 539 |
+
nodes/29.N1tynKij.js(``/`` 这一页的 load)::
|
| 540 |
+
|
| 541 |
+
if(n.searchParams.has(`a`)||n.searchParams.has(`ref`)){
|
| 542 |
+
let t=Object.fromEntries(n.searchParams);
|
| 543 |
+
await _(e,`/api/save-referrer/`,t)}
|
| 544 |
+
|
| 545 |
+
另外 nodes/66、71 是联盟落地页 ``/<username>``:先打这条,再 302 回 ``/``。
|
| 546 |
+
|
| 547 |
+
``_`` 是 chunks/B2hH328b.js 里的 POST 封装,对 ``!res.ok`` **直接 throw
|
| 548 |
+
ServerError**——也就是说,只要有人带着 ``?ref=…`` 打开首页,克隆这边
|
| 549 |
+
405(此前实测)就会让整个首页 load 失败。不是可选项。
|
| 550 |
+
|
| 551 |
+
答 **204**:不是编一份响应,而是走源站自己那个封装里明写着的分支
|
| 552 |
+
(``if(i.status===204)return null``)。离线包不记录任何推荐归因,没有
|
| 553 |
+
可回放的响应体——204 是"这里没有内容"最诚实的说法,也不用我替源站
|
| 554 |
+
编一个信封。源站真实的响应码没有观测:那需要往源站 POST 一次写入型请求,
|
| 555 |
+
这条车道不做。这一点记进 known-differences。
|
| 556 |
+
"""
|
| 557 |
+
|
| 558 |
+
await _json_or_form(request)
|
| 559 |
+
return Response(status_code=204)
|
| 560 |
+
|
| 561 |
+
|
| 562 |
+
@app.post("/api/link-appsflyer/")
|
| 563 |
+
@app.post("/api/link-appsflyer")
|
| 564 |
+
async def api_link_appsflyer(request: Request) -> Response:
|
| 565 |
+
"""AppsFlyer 归因回传。只在 URL 带 ``shortlink``/``af_siteid``/``awc`` 时触发。
|
| 566 |
+
|
| 567 |
+
app.DQztFMcf.js::
|
| 568 |
+
|
| 569 |
+
function P(){let e=new URLSearchParams(location.search);
|
| 570 |
+
(e.has(`shortlink`)||e.has(`af_siteid`)||e.has(`awc`))&&
|
| 571 |
+
fetch(`/api/link-appsflyer/?${e}`,{method:`POST`})}
|
| 572 |
+
|
| 573 |
+
这里是裸 ``fetch``,没人接返回值,404 只在控制台留一条红字。但"控制台没有
|
| 574 |
+
红字"本身是要测的,而且这条路径是广告落地页的入口——真有人从广告链接点
|
| 575 |
+
进离线包时,第一屏就得干净。同 save-referrer,答 204。
|
| 576 |
+
"""
|
| 577 |
+
|
| 578 |
+
return Response(status_code=204)
|
| 579 |
+
|
| 580 |
+
|
| 581 |
+
@app.get("/api/food-used-in-recipes/{ident}/")
|
| 582 |
+
@app.get("/api/food-used-in-recipes/{ident}")
|
| 583 |
+
def api_food_used_in_recipes(ident: str, request: Request) -> Response:
|
| 584 |
+
"""食物详情页在「不是菜谱」那一支上的第三跳。缺了它整页渲染成 500 Error(实测)。
|
| 585 |
+
|
| 586 |
+
nodes/36.3cnGAiU-.js 里,食物详情的 load 走两支——是菜谱就取 similar,
|
| 587 |
+
不是菜谱就**再**取一条::
|
| 588 |
+
|
| 589 |
+
{let t=Ie(e,`/api/food-used-in-recipes/${r}/`);
|
| 590 |
+
return{...,similar:await c,recipes:await t}}
|
| 591 |
+
|
| 592 |
+
两条喂的是同一个组件(``ze({foods,title})``,一个 title 是 "Similar Foods"
|
| 593 |
+
一个是 "Recipes"),所以形状必然相同。
|
| 594 |
+
|
| 595 |
+
实测(run/tmp/probe_basic_food.py,SPA 内导航到 /calories/scrambled-eggs-110——
|
| 596 |
+
克隆这 2150 条食物里唯一一条 ``kind: food``,其余 2149 条都是 recipe,走不到
|
| 597 |
+
这一支):这条端点掉进 catch_all 拿到 HTML 404,取数封装对 ``!res.ok`` 直接
|
| 598 |
+
throw,页面渲染成 **「500 Error / An error has occurred.」**。
|
| 599 |
+
|
| 600 |
+
响应体不是编的。存档渲染 ``/calories/scrambled-eggs-110`` 把这一跳原样内联在
|
| 601 |
+
``data-sveltekit-fetched`` 块里,已经由 tools/build_clone.py:_rendered_pages
|
| 602 |
+
收进回放池。注意它的 ``data`` 是一串**资源 URI 字符串**
|
| 603 |
+
(``"/api/v1/food/45132/"``),不是食物对象——``Ie`` 拿到 URI 之后再逐条去打
|
| 604 |
+
``/api/v1/food/<id>/``,这也是同一页里为什么会内联 13 份食物响应。
|
| 605 |
+
|
| 606 |
+
没观测到的 id 回 ``data: []``。这个空值本身也是实测出来的形状:直接 GET
|
| 607 |
+
``/api/food-used-in-recipes/33494/`` 源站就回 ``{"success":true,"data":[],
|
| 608 |
+
"meta":{}}``——「这条食物没有被任何菜谱用到」,源站自己就这么答。
|
| 609 |
+
"""
|
| 610 |
+
replay = inline_replay(f"/api/food-used-in-recipes/{ident}/", request.url.query)
|
| 611 |
+
if replay is not None:
|
| 612 |
+
return replay
|
| 613 |
+
return _api_uri_list()
|
| 614 |
+
|
| 615 |
+
|
| 616 |
+
def _api_uri_list(uris: list[str] | None = None) -> Response:
|
| 617 |
+
"""``similar-foods`` / ``food-used-in-recipes`` 这一族的空响应。
|
| 618 |
+
|
| 619 |
+
``data`` 必须是**列表**。消费方 ``ze`` 的渲染门是 ``t.foods.length &&``,
|
| 620 |
+
再 ``j(a,21,()=>t.foods,…)`` 逐项渲染;给它一个 ``{"results": []}`` 这样的
|
| 621 |
+
字典,``length`` 是 undefined,整段就静默不渲染——看着像"这条食物没有相关项",
|
| 622 |
+
实际是形状错了。实测的空响应长这样(源站 ``/api/similar-foods/33494/``,
|
| 623 |
+
池子里 40 条同摘要)::
|
| 624 |
+
|
| 625 |
+
{"success": true, "data": [], "meta": {}, "warnings": {}}
|
| 626 |
+
"""
|
| 627 |
+
return _api_json({"success": True, "data": list(uris or []),
|
| 628 |
+
"meta": {}, "warnings": {}})
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
@app.get("/api/v1/food/{food_id}/")
|
| 632 |
+
@app.get("/api/v1/food/{food_id}")
|
| 633 |
+
def api_food(food_id: str) -> Response:
|
| 634 |
+
detail = store.food_detail(food_id)
|
| 635 |
+
if detail is None:
|
| 636 |
+
# 食物库之外的 id:内联块里可能观测到过它的真实响应
|
| 637 |
+
replay = inline_replay(f"/api/v1/food/{food_id}/")
|
| 638 |
+
if replay is not None:
|
| 639 |
+
return replay
|
| 640 |
+
return envelope(
|
| 641 |
+
None,
|
| 642 |
+
success=False,
|
| 643 |
+
errors=[{"code": "not_found", "detail": "No food with that id."}],
|
| 644 |
+
status=404,
|
| 645 |
+
)
|
| 646 |
+
# The observed Tastypie food detail is a bare object, not an API envelope.
|
| 647 |
+
# ``store.food_detail`` preserves archived responses verbatim, and some
|
| 648 |
+
# captures include the modern ``{data, success, ...}`` transport envelope.
|
| 649 |
+
# This legacy route deliberately has no Api-Response-Version header, so the
|
| 650 |
+
# client will not unwrap that envelope for us. Return its data member here
|
| 651 |
+
# to keep ``weights`` and the other food fields at the expected level.
|
| 652 |
+
if isinstance(detail, dict) and _ENVELOPE_SIGNATURE <= detail.keys():
|
| 653 |
+
detail = detail.get("data")
|
| 654 |
+
return JSONResponse(detail)
|
| 655 |
+
|
| 656 |
+
|
| 657 |
+
# ---- /app 这个 SPA 的接口面 ----------------------------------------------
|
| 658 |
+
#
|
| 659 |
+
# 端点清单与字段名全部实测(tools/api_shapes.py,17 个端点)。
|
| 660 |
+
# 匿名访问 /api/v1/* 实测是 **401 且响应体为空**——不是 403、也不是带 JSON 的
|
| 661 |
+
# 401。SPA 就靠这个信号决定「要不要跳登录页」,所以形状必须一模一样。
|
| 662 |
+
|
| 663 |
+
def _unauthenticated() -> Response:
|
| 664 |
+
"""匿名访问 /api/v1/* 的实测响应:401、空体、``text/html; charset=utf-8``。
|
| 665 |
+
|
| 666 |
+
content-type 不能省。本站给所有响应加了 ``X-Content-Type-Options: nosniff``,
|
| 667 |
+
而 Starlette 对无内容的 Response 不会自动带 content-type ——
|
| 668 |
+
浏览器拿到「nosniff + 没有类型」的响应会直接拒收,
|
| 669 |
+
现象是 fetch 报 net::ERR_ABORTED,看起来像接口没实现,其实答得好好的。
|
| 670 |
+
源站这条 401 带的就是 text/html(实测,见 RUN-LOG)。
|
| 671 |
+
"""
|
| 672 |
+
|
| 673 |
+
return Response(status_code=401, media_type="text/html; charset=utf-8")
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
def _require(request: Request):
|
| 677 |
+
account = current_account(request)
|
| 678 |
+
return account if account is not None else None
|
| 679 |
+
|
| 680 |
+
|
| 681 |
+
def _api_json(payload: dict) -> Response:
|
| 682 |
+
return stamp_version(JSONResponse(payload), payload)
|
| 683 |
+
|
| 684 |
+
|
| 685 |
+
async def _json_or_form(request: Request) -> dict[str, Any]:
|
| 686 |
+
"""SPA 发的是 JSON,浏览器直接提交表单发的是 urlencoded;两种都收。"""
|
| 687 |
+
|
| 688 |
+
try:
|
| 689 |
+
payload = await request.json()
|
| 690 |
+
except Exception:
|
| 691 |
+
form = await request.form()
|
| 692 |
+
payload = {k: v for k, v in form.items()}
|
| 693 |
+
return payload if isinstance(payload, dict) else {}
|
| 694 |
+
|
| 695 |
+
|
| 696 |
+
@app.post("/api/login/")
|
| 697 |
+
@app.post("/api/login")
|
| 698 |
+
async def api_login(request: Request) -> Response:
|
| 699 |
+
"""实测:POST /api/login/ → 200。
|
| 700 |
+
|
| 701 |
+
密码错、账号不存在两种情况源站**也答 200**,页面停在 /app/login 并把
|
| 702 |
+
「Please enter a correct username and password.」渲染出来——错误是写在
|
| 703 |
+
响应体里的,不是写在状态码里。克隆照这个来。
|
| 704 |
+
"""
|
| 705 |
+
|
| 706 |
+
payload = await _json_or_form(request)
|
| 707 |
+
identifier = str(payload.get("username") or payload.get("email") or "")
|
| 708 |
+
password = str(payload.get("password") or "")
|
| 709 |
+
|
| 710 |
+
# 引擎的 sign_in 是「拿一个已存在的会话去换登录态」,不是凭空发令牌:
|
| 711 |
+
# 先 ensure_session 拿到匿名会话,登录成功时它被轮换成登录态会话。
|
| 712 |
+
token, _ = AUTH.ensure_session(session_token(request))
|
| 713 |
+
try:
|
| 714 |
+
result = AUTH.sign_in(token, email=identifier, password=password)
|
| 715 |
+
except Exception:
|
| 716 |
+
# 源站对「密码错」和「账号不存在」都答 200,错误写在响应体里。
|
| 717 |
+
# 两个分支答一模一样的话,也是源站的行为——不泄露账号是否存在。
|
| 718 |
+
failure = _api_json(app_api.envelope(
|
| 719 |
+
None, success=False,
|
| 720 |
+
errors={"__all__": ["Please enter a correct username and password. "
|
| 721 |
+
"Note that both fields may be case-sensitive."]},
|
| 722 |
+
))
|
| 723 |
+
return attach_session(failure, token, request)
|
| 724 |
+
account = public_account(result["account"])
|
| 725 |
+
# data 里要包一层 user:helper 是 `let e=r.data.user; tg(e.id)`
|
| 726 |
+
# (gotDHXHr.js 的 hg),登录页也是 `let t=e.data.user`。
|
| 727 |
+
# 直接把 user 对象当 data 交出去,SPA 会去读 undefined.id。
|
| 728 |
+
response = _api_json(app_api.envelope(
|
| 729 |
+
{"user": app_api.user_object(STATE.load(), account)}))
|
| 730 |
+
return attach_session(response, result["session_token"], request)
|
| 731 |
+
|
| 732 |
+
|
| 733 |
+
@app.post("/api/logout/")
|
| 734 |
+
@app.post("/api/logout")
|
| 735 |
+
def api_logout(request: Request) -> Response:
|
| 736 |
+
"""实测:POST /api/logout/ → 200,紧接着标记端点就从 200 变 401。"""
|
| 737 |
+
|
| 738 |
+
token = session_token(request)
|
| 739 |
+
if token:
|
| 740 |
+
AUTH.sign_out(token)
|
| 741 |
+
response = _api_json(app_api.envelope(None))
|
| 742 |
+
response.delete_cookie(COOKIE_NAME, path=COOKIE.get("path", "/"))
|
| 743 |
+
return response
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
def _truthy(value: Any) -> bool:
|
| 747 |
+
return str(value).strip().lower() in {"true", "1", "on", "yes"}
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
@app.post("/api/register/")
|
| 751 |
+
@app.post("/api/register")
|
| 752 |
+
@app.post("/api/auth/registration/start")
|
| 753 |
+
async def api_register(request: Request) -> Response:
|
| 754 |
+
"""注册。契约取自源站自己的节点代码(nodes/23.C0wtlKWw.js,抓回来的):
|
| 755 |
+
|
| 756 |
+
E(`/api/register/`, {email, password1, password2, platform:`svelte`,
|
| 757 |
+
tos, receive_free_plan_emails, username})
|
| 758 |
+
if (errors) throw … ← 失败读 errors
|
| 759 |
+
… ← 成功由 hg 读 r.data.user
|
| 760 |
+
|
| 761 |
+
所以成功信封的 data 也要包一层 user,跟登录同一形状。
|
| 762 |
+
|
| 763 |
+
★ 失败文案是克隆自撰的,不是实测。源站的注册校验文案要真在源站注册一个
|
| 764 |
+
账号才拿得到,那超出边界(LANE.md:不真实注册/不真实交易)。这条差异记进
|
| 765 |
+
known-differences,别把它当成取证结果读。
|
| 766 |
+
"""
|
| 767 |
+
|
| 768 |
+
payload = await _json_or_form(request)
|
| 769 |
+
email = str(payload.get("email") or "").strip()
|
| 770 |
+
username = str(payload.get("username") or "").strip()
|
| 771 |
+
password1 = str(payload.get("password1") or payload.get("password") or "")
|
| 772 |
+
password2 = str(payload.get("password2") or password1)
|
| 773 |
+
|
| 774 |
+
errors: dict[str, list[str]] = {}
|
| 775 |
+
if not _truthy(payload.get("tos")):
|
| 776 |
+
errors["tos"] = ["You must accept the Terms of Service to create an account."]
|
| 777 |
+
if password1 != password2:
|
| 778 |
+
errors["password2"] = ["The two password fields didn't match."]
|
| 779 |
+
if email and AUTH.account_exists(email):
|
| 780 |
+
errors["email"] = ["An account with that email address already exists."]
|
| 781 |
+
if errors:
|
| 782 |
+
return _api_json(app_api.envelope(None, success=False, errors=errors))
|
| 783 |
+
|
| 784 |
+
token, _ = AUTH.ensure_session(session_token(request))
|
| 785 |
+
try:
|
| 786 |
+
result = AUTH.start_registration(
|
| 787 |
+
token,
|
| 788 |
+
email=email,
|
| 789 |
+
display_name=username or email.split("@")[0],
|
| 790 |
+
password=password1,
|
| 791 |
+
restart_invalid_flow=True,
|
| 792 |
+
)
|
| 793 |
+
except AuthError as exc:
|
| 794 |
+
return attach_session(_auth_failure(exc), token, request)
|
| 795 |
+
|
| 796 |
+
if AUTH_MAILER.enabled and not AUTH_MAILER.deliver(
|
| 797 |
+
token, purpose="registration"
|
| 798 |
+
):
|
| 799 |
+
return attach_session(
|
| 800 |
+
_auth_failure(AuthError("Verification email could not be delivered."), 503),
|
| 801 |
+
token,
|
| 802 |
+
request,
|
| 803 |
+
)
|
| 804 |
+
data = {
|
| 805 |
+
"state": "challenge",
|
| 806 |
+
"expires_at": result["expires_at"],
|
| 807 |
+
"mail_status": AUTH.session_mail_status(
|
| 808 |
+
token, purpose="registration"
|
| 809 |
+
),
|
| 810 |
+
"next": "/auth/registration/verify",
|
| 811 |
+
}
|
| 812 |
+
if request.url.path == "/api/auth/registration/start":
|
| 813 |
+
# The captured form uses an auth helper that treats envelope.data as an
|
| 814 |
+
# already authenticated user. A bare bridge response prevents that
|
| 815 |
+
# helper from inventing login state before verification.
|
| 816 |
+
response = JSONResponse(None)
|
| 817 |
+
else:
|
| 818 |
+
response = _api_json(app_api.envelope(data))
|
| 819 |
+
return attach_session(response, token, request)
|
| 820 |
+
|
| 821 |
+
|
| 822 |
+
def _auth_failure(exc: Exception, status: int = 400) -> Response:
|
| 823 |
+
payload = app_api.envelope(
|
| 824 |
+
None,
|
| 825 |
+
success=False,
|
| 826 |
+
errors={"__all__": [str(exc)]},
|
| 827 |
+
)
|
| 828 |
+
return stamp_version(JSONResponse(payload, status_code=status), payload)
|
| 829 |
+
|
| 830 |
+
|
| 831 |
+
@app.get("/api/auth/outbox/{purpose}")
|
| 832 |
+
def auth_local_outbox(purpose: str, request: Request) -> Response:
|
| 833 |
+
"""Session-scoped self-check available only when SMTP is not configured."""
|
| 834 |
+
|
| 835 |
+
if AUTH.mail_mode != "LOCAL_ONLY":
|
| 836 |
+
return Response(status_code=404)
|
| 837 |
+
token = session_token(request)
|
| 838 |
+
if not token or purpose not in {"registration", "password-reset"}:
|
| 839 |
+
return Response(status_code=404)
|
| 840 |
+
mail = AUTH.local_mail_for_session(token, purpose=purpose)
|
| 841 |
+
if mail is None:
|
| 842 |
+
return Response(status_code=404)
|
| 843 |
+
return _api_json(
|
| 844 |
+
app_api.envelope(
|
| 845 |
+
{
|
| 846 |
+
"purpose": mail["purpose"],
|
| 847 |
+
"recipient": mail["recipient"],
|
| 848 |
+
"verification_code": mail["verification_code"],
|
| 849 |
+
}
|
| 850 |
+
)
|
| 851 |
+
)
|
| 852 |
+
|
| 853 |
+
|
| 854 |
+
@app.post("/api/auth/registration/verify")
|
| 855 |
+
async def auth_verify_registration(request: Request) -> Response:
|
| 856 |
+
payload = await _json_or_form(request)
|
| 857 |
+
try:
|
| 858 |
+
AUTH.verify_registration_code(
|
| 859 |
+
session_token(request) or "",
|
| 860 |
+
str(payload.get("code") or ""),
|
| 861 |
+
)
|
| 862 |
+
except AuthError as exc:
|
| 863 |
+
return _auth_failure(exc)
|
| 864 |
+
return _api_json(app_api.envelope({"state": "verified"}))
|
| 865 |
+
|
| 866 |
+
|
| 867 |
+
@app.post("/api/auth/registration/complete")
|
| 868 |
+
async def auth_complete_registration(request: Request) -> Response:
|
| 869 |
+
try:
|
| 870 |
+
result = AUTH.complete_registration(session_token(request) or "")
|
| 871 |
+
except AuthError as exc:
|
| 872 |
+
return _auth_failure(exc)
|
| 873 |
+
account = public_account(result["account"])
|
| 874 |
+
response = _api_json(
|
| 875 |
+
app_api.envelope(
|
| 876 |
+
{"user": app_api.user_object(STATE.load(), account)}
|
| 877 |
+
)
|
| 878 |
+
)
|
| 879 |
+
return attach_session(response, result["session_token"], request)
|
| 880 |
+
|
| 881 |
+
|
| 882 |
+
@app.get("/auth/registration/verify")
|
| 883 |
+
def registration_verification_page() -> Response:
|
| 884 |
+
return FileResponse(
|
| 885 |
+
AUTH_PAGES / "registration-verify.html",
|
| 886 |
+
media_type="text/html; charset=utf-8",
|
| 887 |
+
)
|
| 888 |
+
|
| 889 |
+
|
| 890 |
+
@app.get("/auth/password-reset/verify")
|
| 891 |
+
def password_reset_verification_page() -> Response:
|
| 892 |
+
return FileResponse(
|
| 893 |
+
AUTH_PAGES / "password-reset-verify.html",
|
| 894 |
+
media_type="text/html; charset=utf-8",
|
| 895 |
+
)
|
| 896 |
+
|
| 897 |
+
|
| 898 |
+
@app.get("/api/username-available/")
|
| 899 |
+
@app.get("/api/username-available")
|
| 900 |
+
@app.get("/api/email-available/")
|
| 901 |
+
@app.get("/api/email-available")
|
| 902 |
+
def api_availability(request: Request) -> Response:
|
| 903 |
+
"""注册表单一边打字一边查重。契约取自 chunks/2fVw9NDa2.js(源站自己的代码):
|
| 904 |
+
|
| 905 |
+
let n = new URLSearchParams({[e]: t});
|
| 906 |
+
let {available: r} = await S(null, `/api/${e}-available/?${n}`);
|
| 907 |
+
|
| 908 |
+
——``e`` 只有 ``email`` 和 ``username`` 两种,解析器返回的是信封里的 data,
|
| 909 |
+
所以 data 得是 ``{"available": …}``。之前这两条没实现,SPA 每敲一个字就吃一记
|
| 910 |
+
404,注册页的可用性提示一直是空的。
|
| 911 |
+
|
| 912 |
+
email 查得准(本地账号库就按 email 唯一);username 只挡演示账号那一个名字——
|
| 913 |
+
引擎的账号库不对 display_name 做唯一约束,本地也就无从查起,这条差异记进台账。
|
| 914 |
+
"""
|
| 915 |
+
|
| 916 |
+
email = (request.query_params.get("email") or "").strip()
|
| 917 |
+
username = (request.query_params.get("username") or "").strip()
|
| 918 |
+
if email:
|
| 919 |
+
available = not AUTH.account_exists(email)
|
| 920 |
+
elif username:
|
| 921 |
+
available = username.casefold() != DEMO_DISPLAY_NAME.casefold()
|
| 922 |
+
else:
|
| 923 |
+
available = True
|
| 924 |
+
return _api_json(app_api.envelope({"available": available}))
|
| 925 |
+
|
| 926 |
+
|
| 927 |
+
@app.post("/user/password/reset/")
|
| 928 |
+
@app.post("/user/password/reset")
|
| 929 |
+
async def user_password_reset(request: Request) -> Response:
|
| 930 |
+
"""Start a non-enumerating, session-owned password reset challenge."""
|
| 931 |
+
|
| 932 |
+
payload = await _json_or_form(request)
|
| 933 |
+
email = str(payload.get("email") or "").strip()
|
| 934 |
+
token, _ = AUTH.ensure_session(session_token(request))
|
| 935 |
+
try:
|
| 936 |
+
AUTH.start_password_reset(
|
| 937 |
+
token,
|
| 938 |
+
email=email,
|
| 939 |
+
restart_invalid_flow=True,
|
| 940 |
+
)
|
| 941 |
+
if AUTH_MAILER.enabled:
|
| 942 |
+
# Unknown accounts intentionally have no queued mail; the public
|
| 943 |
+
# response remains identical.
|
| 944 |
+
AUTH_MAILER.deliver(token, purpose="password-reset")
|
| 945 |
+
except AuthError:
|
| 946 |
+
pass
|
| 947 |
+
response = _api_json(
|
| 948 |
+
app_api.envelope({"message": RESET_PUBLIC_MESSAGE})
|
| 949 |
+
)
|
| 950 |
+
return attach_session(response, token, request)
|
| 951 |
+
|
| 952 |
+
|
| 953 |
+
@app.post("/api/auth/password-reset/verify")
|
| 954 |
+
async def auth_verify_password_reset(request: Request) -> Response:
|
| 955 |
+
payload = await _json_or_form(request)
|
| 956 |
+
try:
|
| 957 |
+
AUTH.verify_password_reset_code(
|
| 958 |
+
session_token(request) or "",
|
| 959 |
+
str(payload.get("code") or ""),
|
| 960 |
+
)
|
| 961 |
+
except AuthError as exc:
|
| 962 |
+
return _auth_failure(exc)
|
| 963 |
+
return _api_json(app_api.envelope({"state": "verified"}))
|
| 964 |
+
|
| 965 |
+
|
| 966 |
+
@app.post("/api/auth/password-reset/complete")
|
| 967 |
+
async def auth_complete_password_reset(request: Request) -> Response:
|
| 968 |
+
payload = await _json_or_form(request)
|
| 969 |
+
password = str(
|
| 970 |
+
payload.get("new_password")
|
| 971 |
+
or payload.get("password1")
|
| 972 |
+
or payload.get("password")
|
| 973 |
+
or ""
|
| 974 |
+
)
|
| 975 |
+
try:
|
| 976 |
+
token = AUTH.complete_password_reset(
|
| 977 |
+
session_token(request) or "",
|
| 978 |
+
new_password=password,
|
| 979 |
+
)
|
| 980 |
+
except AuthError as exc:
|
| 981 |
+
return _auth_failure(exc)
|
| 982 |
+
response = _api_json(app_api.envelope({"state": "authenticated"}))
|
| 983 |
+
return attach_session(response, token, request)
|
| 984 |
+
|
| 985 |
+
|
| 986 |
+
@app.post("/api/clone/telemetry")
|
| 987 |
+
@app.get("/api/clone/telemetry")
|
| 988 |
+
def clone_telemetry() -> Response:
|
| 989 |
+
"""bundle 里写死的 bugsnag 端点被装配脚本改写到这里。
|
| 990 |
+
|
| 991 |
+
源站的 SPA 一启动就往 notify/sessions.bugsnag.com 各发一条 XHR。那两条
|
| 992 |
+
既不在标记里也不在页面的子资源清单里——只有真浏览器跑起来才看得见。
|
| 993 |
+
离线契约要求运行时零外发,所以地址在装配时改成同源,请求本身照旧发生:
|
| 994 |
+
库走完它自己的成功分支,SPA 的启动时序一个环节都不少。**内容不落盘**——
|
| 995 |
+
这条路由只回一个空信封,不记录、不存储、不回显。
|
| 996 |
+
|
| 997 |
+
方法改成了 **GET**:评测端在只读用例里拦截页面自己发出的一切非 GET 请求
|
| 998 |
+
(``UNAUTHORIZED_SOURCE_MUTATION``),而 bugsnag 的 session 上报在每一页
|
| 999 |
+
``Bugsnag.start()`` 时就会发出。于是 SDK 里 ``open("POST", …)`` 全部改为
|
| 1000 |
+
``open("GET", …)``(三份 bundle:_app/immutable/entry/app.*.js、
|
| 1001 |
+
app/_app/immutable/chunks/gotDHXHr.js、www/static_files/logged_out_js_libs*.js)。
|
| 1002 |
+
XHR 对 GET 忽略 body,请求仍然发生、仍然同源、仍然落到这条路由;
|
| 1003 |
+
Amplitude 的 fetch/XHR/beacon 传输层同样改为 GET(见下)。
|
| 1004 |
+
"""
|
| 1005 |
+
|
| 1006 |
+
return _api_json({})
|
| 1007 |
+
|
| 1008 |
+
|
| 1009 |
+
# ------------------------------------------------------- Amplitude 的两个落点
|
| 1010 |
+
#
|
| 1011 |
+
# bugsnag / GTM 之外还有第三家运行时外发:Amplitude。它整包编译在
|
| 1012 |
+
# chunks/gotDHXHr.js 里(和 API client 同一个 chunk),装配时没被改写,
|
| 1013 |
+
# 于是每开一个 /app 页面都会试着往站外打两条,实测(停留 15 秒):
|
| 1014 |
+
#
|
| 1015 |
+
# 12x sr-client-cfg.amplitude.com/config/<browser-key>?config_group=browser
|
| 1016 |
+
# 5x api2.amplitude.com/2/httpapi
|
| 1017 |
+
#
|
| 1018 |
+
# 次数大于 1 是因为两边都带重试。这些请求最后是被克隆自己的 CSP 拦下的——
|
| 1019 |
+
# 但"发了被拦"不等于"没发",离线契约要的是后者。所以按 bugsnag 的老办法,
|
| 1020 |
+
# 在装配时把地址改成同源,落到下面这两条路由上。
|
| 1021 |
+
#
|
| 1022 |
+
# 为什么不能都塞给 /api/clone/telemetry:
|
| 1023 |
+
#
|
| 1024 |
+
# · 上报端点的响应会被 SDK 解析。buildStatus(code) 看的是 body 里的 code,
|
| 1025 |
+
# `{}` 得到 0 -> Unknown -> handleOtherResponse() 重新入队重试,
|
| 1026 |
+
# 于是空信封反而制造出一串永不停歇的重试。要让它安静,本地这个水槽
|
| 1027 |
+
# 得按 HTTP API v2 的形状答一句"收到了"。
|
| 1028 |
+
# · 远端配置端点的路径带 key 后缀(`${serverUrl}/${apiKey}?...`),
|
| 1029 |
+
# 固定路径的 telemetry 路由接不住,会掉进 catch_all。
|
| 1030 |
+
#
|
| 1031 |
+
# 两条都不落盘:不记录、不存储、不回显。
|
| 1032 |
+
|
| 1033 |
+
|
| 1034 |
+
@app.post("/api/clone/amplitude")
|
| 1035 |
+
@app.get("/api/clone/amplitude")
|
| 1036 |
+
async def clone_amplitude_ingest(request: Request) -> Response:
|
| 1037 |
+
"""Amplitude 事件上报的本地水槽。
|
| 1038 |
+
|
| 1039 |
+
答的是 HTTP API v2 的成功形状——这不是编造源站内容,而是还原第三方
|
| 1040 |
+
协议的契约形状(抓不到的接口还原形状、不编内容)。``events_ingested``
|
| 1041 |
+
照实数这次真收到几条,没有的话就是 0。
|
| 1042 |
+
"""
|
| 1043 |
+
|
| 1044 |
+
ingested = 0
|
| 1045 |
+
try:
|
| 1046 |
+
payload = await request.json()
|
| 1047 |
+
except Exception:
|
| 1048 |
+
payload = None
|
| 1049 |
+
if isinstance(payload, dict):
|
| 1050 |
+
events = payload.get("events")
|
| 1051 |
+
if isinstance(events, list):
|
| 1052 |
+
ingested = len(events)
|
| 1053 |
+
return _api_json({
|
| 1054 |
+
"code": 200,
|
| 1055 |
+
"events_ingested": ingested,
|
| 1056 |
+
"payload_size_bytes": int(request.headers.get("content-length") or 0),
|
| 1057 |
+
"server_upload_time": 0,
|
| 1058 |
+
})
|
| 1059 |
+
|
| 1060 |
+
|
| 1061 |
+
@app.get("/api/clone/remote-config/{key:path}")
|
| 1062 |
+
def clone_amplitude_remote_config(key: str) -> Response:
|
| 1063 |
+
"""Amplitude 远端配置的本地答复:一个空配置。
|
| 1064 |
+
|
| 1065 |
+
SDK 的 sendCallback 会把订阅键(如
|
| 1066 |
+
``configs.analyticsSDK.browserSDK.autocapture.elementSelector``)
|
| 1067 |
+
沿着响应体一路 reduce 下去,任何一层缺失就得到 ``null``——也就是
|
| 1068 |
+
"没有远端配置",插件回落到自己的默认值。所以 ``{}`` 是这里唯一
|
| 1069 |
+
诚实的答复:离线包确实没有远端配置,而不是有一份被我捏出来的。
|
| 1070 |
+
|
| 1071 |
+
答 200 还有一个作用:4xx 会让 SDK 记下"key 无效"并打 error 日志,
|
| 1072 |
+
5xx / 网络失败会触发带 jitter 的重试。200 + 空体是唯一一条既不撒谎
|
| 1073 |
+
也不制造噪音的路。
|
| 1074 |
+
"""
|
| 1075 |
+
|
| 1076 |
+
return _api_json({})
|
| 1077 |
+
|
| 1078 |
+
|
| 1079 |
+
@app.get("/api/v1/userv2/")
|
| 1080 |
+
@app.get("/api/v1/userv2")
|
| 1081 |
+
def api_userv2(request: Request) -> Response:
|
| 1082 |
+
"""登录标记。SPA 每次进 /app 都先打这一条。"""
|
| 1083 |
+
|
| 1084 |
+
account = _require(request)
|
| 1085 |
+
if account is None:
|
| 1086 |
+
return _unauthenticated()
|
| 1087 |
+
return _api_json(app_api.envelope(
|
| 1088 |
+
app_api.user_object(STATE.load(), account)))
|
| 1089 |
+
|
| 1090 |
+
|
| 1091 |
+
@app.get("/api/v1/userv2/{ident}/")
|
| 1092 |
+
@app.get("/api/v1/userv2/{ident}")
|
| 1093 |
+
def api_userv2_detail(ident: str, request: Request) -> Response:
|
| 1094 |
+
account = _require(request)
|
| 1095 |
+
if account is None:
|
| 1096 |
+
return _unauthenticated()
|
| 1097 |
+
return _api_json(app_api.envelope(
|
| 1098 |
+
app_api.user_object(STATE.load(), account)))
|
| 1099 |
+
|
| 1100 |
+
|
| 1101 |
+
@app.get("/api/v1/userprofilev2/{ident}/")
|
| 1102 |
+
@app.get("/api/v1/userprofilev2/{ident}")
|
| 1103 |
+
def api_userprofile(ident: str, request: Request) -> Response:
|
| 1104 |
+
if _require(request) is None:
|
| 1105 |
+
return _unauthenticated()
|
| 1106 |
+
return _api_json(app_api.envelope(app_api.profile_object(STATE.load())))
|
| 1107 |
+
|
| 1108 |
+
|
| 1109 |
+
@app.get("/api/v1/nutritionprofile/")
|
| 1110 |
+
@app.get("/api/v1/nutritionprofile")
|
| 1111 |
+
def api_nutrition_list(request: Request) -> Response:
|
| 1112 |
+
if _require(request) is None:
|
| 1113 |
+
return _unauthenticated()
|
| 1114 |
+
return _api_json(app_api.envelope(
|
| 1115 |
+
[app_api.nutrition_object(STATE.load())],
|
| 1116 |
+
meta={"limit": app_api.NUTRITION_LIMIT, "next": None,
|
| 1117 |
+
"offset": 0, "previous": None}))
|
| 1118 |
+
|
| 1119 |
+
|
| 1120 |
+
@app.get("/api/v1/nutritionprofile/{ident}/")
|
| 1121 |
+
@app.get("/api/v1/nutritionprofile/{ident}")
|
| 1122 |
+
def api_nutrition_detail(ident: str, request: Request) -> Response:
|
| 1123 |
+
if _require(request) is None:
|
| 1124 |
+
return _unauthenticated()
|
| 1125 |
+
return _api_json(app_api.envelope(app_api.nutrition_object(STATE.load())))
|
| 1126 |
+
|
| 1127 |
+
|
| 1128 |
+
@app.get("/api/v1/mealtype/")
|
| 1129 |
+
@app.get("/api/v1/mealtype")
|
| 1130 |
+
def api_mealtype_list(request: Request) -> Response:
|
| 1131 |
+
if _require(request) is None:
|
| 1132 |
+
return _unauthenticated()
|
| 1133 |
+
rows = [app_api.mealtype_object(i) for i in range(len(app_api.MEAL_TITLES))]
|
| 1134 |
+
return _api_json(app_api.envelope(
|
| 1135 |
+
rows, meta={"limit": app_api.MEALTYPE_LIMIT, "next": None,
|
| 1136 |
+
"offset": 0, "previous": None}))
|
| 1137 |
+
|
| 1138 |
+
|
| 1139 |
+
@app.get("/api/v1/mealtype/{ident}/")
|
| 1140 |
+
@app.get("/api/v1/mealtype/{ident}")
|
| 1141 |
+
def api_mealtype_detail(ident: str, request: Request) -> Response:
|
| 1142 |
+
if _require(request) is None:
|
| 1143 |
+
return _unauthenticated()
|
| 1144 |
+
ids = app_api.mealtype_ids()
|
| 1145 |
+
try:
|
| 1146 |
+
index = ids.index(int(ident))
|
| 1147 |
+
except (ValueError, TypeError):
|
| 1148 |
+
return _api_json_404()
|
| 1149 |
+
return _api_json(app_api.envelope(app_api.mealtype_object(index)))
|
| 1150 |
+
|
| 1151 |
+
|
| 1152 |
+
def _api_json_404() -> Response:
|
| 1153 |
+
return JSONResponse(
|
| 1154 |
+
app_api.envelope(None, success=False,
|
| 1155 |
+
errors={"detail": "Not found."}),
|
| 1156 |
+
status_code=404,
|
| 1157 |
+
)
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
@app.get("/api/v1/calendar/")
|
| 1161 |
+
@app.get("/api/v1/calendar")
|
| 1162 |
+
def api_calendar(request: Request) -> Response:
|
| 1163 |
+
if _require(request) is None:
|
| 1164 |
+
return _unauthenticated()
|
| 1165 |
+
try:
|
| 1166 |
+
limit = int(request.query_params.get("limit") or app_api.CALENDAR_LIMIT)
|
| 1167 |
+
except ValueError:
|
| 1168 |
+
limit = app_api.CALENDAR_LIMIT
|
| 1169 |
+
try:
|
| 1170 |
+
offset = int(request.query_params.get("offset") or 0)
|
| 1171 |
+
except ValueError:
|
| 1172 |
+
offset = 0
|
| 1173 |
+
limit = max(1, min(limit, 400))
|
| 1174 |
+
offset = max(0, offset)
|
| 1175 |
+
rows, meta = app_api.calendar_page(STATE.load(), limit, offset)
|
| 1176 |
+
return _api_json(app_api.envelope(rows, meta=meta))
|
| 1177 |
+
|
| 1178 |
+
|
| 1179 |
+
@app.get("/api/v1/dailytemplate/")
|
| 1180 |
+
@app.get("/api/v1/dailytemplate")
|
| 1181 |
+
def api_dailytemplate(request: Request) -> Response:
|
| 1182 |
+
if _require(request) is None:
|
| 1183 |
+
return _unauthenticated()
|
| 1184 |
+
return _api_json(app_api.envelope(
|
| 1185 |
+
app_api.daily_templates(STATE.load()),
|
| 1186 |
+
meta={"limit": app_api.TEMPLATE_LIMIT, "next": None,
|
| 1187 |
+
"offset": 0, "previous": None}))
|
| 1188 |
+
|
| 1189 |
+
|
| 1190 |
+
@app.get("/api/v1/recurringfood/")
|
| 1191 |
+
@app.get("/api/v1/recurringfood")
|
| 1192 |
+
@app.get("/api/v1/recurringfoodcollection/")
|
| 1193 |
+
@app.get("/api/v1/recurringfoodcollection")
|
| 1194 |
+
def api_recurring(request: Request) -> Response:
|
| 1195 |
+
"""实测两条都是空集合,meta 只有 limit/offset,没有 next/previous。"""
|
| 1196 |
+
|
| 1197 |
+
if _require(request) is None:
|
| 1198 |
+
return _unauthenticated()
|
| 1199 |
+
return _api_json(app_api.envelope([], meta={"limit": 20, "offset": 0}))
|
| 1200 |
+
|
| 1201 |
+
|
| 1202 |
+
@app.get("/api/v1/generatorsettings/{ident}/")
|
| 1203 |
+
@app.get("/api/v1/generatorsettings/{ident}")
|
| 1204 |
+
def api_generator(ident: str, request: Request) -> Response:
|
| 1205 |
+
if _require(request) is None:
|
| 1206 |
+
return _unauthenticated()
|
| 1207 |
+
return _api_json(app_api.envelope(app_api.generator_settings(STATE.load())))
|
| 1208 |
+
|
| 1209 |
+
|
| 1210 |
+
@app.get("/api/v1/subscription/{ident}/")
|
| 1211 |
+
@app.get("/api/v1/subscription/{ident}")
|
| 1212 |
+
def api_subscription(ident: str, request: Request) -> Response:
|
| 1213 |
+
if _require(request) is None:
|
| 1214 |
+
return _unauthenticated()
|
| 1215 |
+
return _api_json(app_api.envelope(app_api.subscription(STATE.load())))
|
| 1216 |
+
|
| 1217 |
+
|
| 1218 |
+
@app.get("/api/v1/friendreferralstats/{ident}/")
|
| 1219 |
+
@app.get("/api/v1/friendreferralstats/{ident}")
|
| 1220 |
+
def api_referral(ident: str, request: Request) -> Response:
|
| 1221 |
+
if _require(request) is None:
|
| 1222 |
+
return _unauthenticated()
|
| 1223 |
+
return _api_json(app_api.envelope(app_api.referral_stats()))
|
| 1224 |
+
|
| 1225 |
+
|
| 1226 |
+
@app.get("/api/current-streak/")
|
| 1227 |
+
@app.get("/api/current-streak")
|
| 1228 |
+
def api_streak(request: Request) -> Response:
|
| 1229 |
+
if _require(request) is None:
|
| 1230 |
+
return _unauthenticated()
|
| 1231 |
+
return _api_json(app_api.envelope(app_api.current_streak()))
|
| 1232 |
+
|
| 1233 |
+
|
| 1234 |
+
@app.get("/api/stripe-free-trial-availability/")
|
| 1235 |
+
@app.get("/api/stripe-free-trial-availability")
|
| 1236 |
+
def api_free_trial() -> Response:
|
| 1237 |
+
"""实测:这一条匿名也答 200。"""
|
| 1238 |
+
|
| 1239 |
+
return _api_json(app_api.envelope(app_api.free_trial_availability()))
|
| 1240 |
+
|
| 1241 |
+
|
| 1242 |
+
@app.get("/api/get-gift-sub-pricing/")
|
| 1243 |
+
@app.get("/api/get-gift-sub-pricing")
|
| 1244 |
+
def api_gift_pricing() -> Response:
|
| 1245 |
+
return _api_json(app_api.envelope(app_api.gift_sub_pricing()))
|
| 1246 |
+
|
| 1247 |
+
|
| 1248 |
+
# ------------------------------------------------------------- /payments/ 付费面
|
| 1249 |
+
#
|
| 1250 |
+
# bundle 走两条 /payments/ 接口,两条都在取证 meta 里留了实测读数
|
| 1251 |
+
# (captures/2026-08-22.eatthismuch-r1/app/meta/,200 application/json):
|
| 1252 |
+
#
|
| 1253 |
+
# app__upgrade get-subscription-pricing + create-setup-intent
|
| 1254 |
+
# app__help__premium-features get-subscription-pricing
|
| 1255 |
+
# app__account__subscription__… create-setup-intent
|
| 1256 |
+
#
|
| 1257 |
+
# 这两条此前都没实现,请求掉进 catch_all 拿到一份 HTML 404——于是
|
| 1258 |
+
# /app/upgrade 永远到不了 networkidle(page.goto 15 秒超时),
|
| 1259 |
+
# 页面停在 "An error has occurred."。
|
| 1260 |
+
#
|
| 1261 |
+
# 两条都用信封:消费方 chunks/BwAVaRnq.js 与 chunks/qBLqlIPz.js 拿的是
|
| 1262 |
+
# gotDHXHr 的同一个解析器 S/c,它取的是信封里的 data。
|
| 1263 |
+
#
|
| 1264 |
+
# 取证 meta 只记 url / status / type,没记方法,所以 GET 和 POST 都答,
|
| 1265 |
+
# 不去猜一个记录里没有的东西。支付一律 local-sandbox,不发生任何真实交易。
|
| 1266 |
+
|
| 1267 |
+
|
| 1268 |
+
# ---------------------------------------------------------------------------
|
| 1269 |
+
# 六个计算器的算子。
|
| 1270 |
+
#
|
| 1271 |
+
# /calculator、/tdee-calculator、/bmr-calculator、/macro-calculator、
|
| 1272 |
+
# /protein-calculator、/calorie-deficit-calculator 提交时都发同一条 POST。
|
| 1273 |
+
# 此前克隆没实现它,请求掉进只收 GET 的 catch_all,浏览器里六个页面
|
| 1274 |
+
# 一律 `ServerError 405: POST /swoleprofile/calculate-macros-from-profile/`,
|
| 1275 |
+
# 屏幕上那几个数字自始至终是页面正文里的算例,换体重也不动。
|
| 1276 |
+
#
|
| 1277 |
+
# 抓取阶段拿不到这条的响应体:clone.yaml 的 capture_policy.safe_methods
|
| 1278 |
+
# 只有 [GET, HEAD]。所以形状照源站自己的 bundle 读,算术照源站自己的
|
| 1279 |
+
# 页面正文读,出处逐条写在 backend/macro_calculator.py 里,
|
| 1280 |
+
# 差异登记在 scope/known-differences.json。
|
| 1281 |
+
#
|
| 1282 |
+
# 客户端(chunks/B2hH328b.js)见到 Api-Response-Version 头就只取 .data,
|
| 1283 |
+
# 所以这里走信封。GET 也答:源站只在表单提交时发 POST,但直接开这个 URL
|
| 1284 |
+
# 不该掉进 HTML 404 去。
|
| 1285 |
+
|
| 1286 |
+
|
| 1287 |
+
@app.post("/swoleprofile/calculate-macros-from-profile/")
|
| 1288 |
+
@app.post("/swoleprofile/calculate-macros-from-profile")
|
| 1289 |
+
@app.get("/swoleprofile/calculate-macros-from-profile/")
|
| 1290 |
+
@app.get("/swoleprofile/calculate-macros-from-profile")
|
| 1291 |
+
async def swoleprofile_calculate_macros(request: Request) -> Response:
|
| 1292 |
+
if request.method == "POST":
|
| 1293 |
+
form = await _json_or_form(request)
|
| 1294 |
+
else:
|
| 1295 |
+
form = {k: v for k, v in request.query_params.items()}
|
| 1296 |
+
form.pop("HTTP_BACKEND_VERSION", None)
|
| 1297 |
+
return _api_json(app_api.envelope(macro_calculator.calculate(form)))
|
| 1298 |
+
|
| 1299 |
+
|
| 1300 |
+
@app.get("/api/get-professional-tiered-pricing/{currency}/{locale}/")
|
| 1301 |
+
@app.get("/api/get-professional-tiered-pricing/{currency}/{locale}")
|
| 1302 |
+
def api_professional_tiered_pricing(currency: str, locale: str) -> Response:
|
| 1303 |
+
"""/professionals 的第二跳。缺了它整页渲染成 500 Error(实测)。
|
| 1304 |
+
|
| 1305 |
+
货币与 locale 进了路径但不改响应:存档渲染里只留下 USD/en_US 这一份,
|
| 1306 |
+
换成别的币种去编一份「换算过的」价格表,就是拿想象覆盖取证。
|
| 1307 |
+
调用方自己会把 currency 拼回去(``{currency: r, ...响应}``),所以页面上
|
| 1308 |
+
显示的币种依旧跟着上一跳走。
|
| 1309 |
+
"""
|
| 1310 |
+
|
| 1311 |
+
return _api_json(app_api.envelope(app_api.professional_tiered_pricing()))
|
| 1312 |
+
|
| 1313 |
+
|
| 1314 |
+
@app.get("/payments/get-subscription-pricing/")
|
| 1315 |
+
@app.get("/payments/get-subscription-pricing")
|
| 1316 |
+
@app.post("/payments/get-subscription-pricing/")
|
| 1317 |
+
@app.post("/payments/get-subscription-pricing")
|
| 1318 |
+
def payments_subscription_pricing() -> Response:
|
| 1319 |
+
return _api_json(app_api.envelope(app_api.subscription_pricing()))
|
| 1320 |
+
|
| 1321 |
+
|
| 1322 |
+
@app.get("/payments/create-setup-intent/")
|
| 1323 |
+
@app.get("/payments/create-setup-intent")
|
| 1324 |
+
@app.post("/payments/create-setup-intent/")
|
| 1325 |
+
@app.post("/payments/create-setup-intent")
|
| 1326 |
+
def payments_create_setup_intent() -> Response:
|
| 1327 |
+
return _api_json(app_api.envelope(app_api.setup_intent()))
|
| 1328 |
+
|
| 1329 |
+
|
| 1330 |
+
# ------------------------------------------------------------------ /g/ 动作层
|
| 1331 |
+
#
|
| 1332 |
+
# bundle 吃两层接口:/api/v1/* 是资源层,/g/* 是动作层(搜索、生成、清单)。
|
| 1333 |
+
# 缺了动作层,/food/browse 的那次 fetch 永远不 settle,页面到不了 networkidle,
|
| 1334 |
+
# 而验收用的正是 page.goto(wait_until="networkidle")。
|
| 1335 |
+
#
|
| 1336 |
+
# 三条实测出来的形状约束:
|
| 1337 |
+
# · 未登录 → 401,响应体是**裸 JSON 字符串** "not logged in",不是空体
|
| 1338 |
+
# · 没路由到的 /g/… → 404 + text/plain "404 page not found"
|
| 1339 |
+
# · /g/check-status/ 不套信封,直接是 {"status":"ok"}
|
| 1340 |
+
|
| 1341 |
+
|
| 1342 |
+
def _g_json(payload: Any, status: int = 200) -> Response:
|
| 1343 |
+
return stamp_version(JSONResponse(payload, status_code=status), payload)
|
| 1344 |
+
|
| 1345 |
+
|
| 1346 |
+
def _g_denied() -> Response:
|
| 1347 |
+
return _g_json(g_api.NOT_LOGGED_IN, 401)
|
| 1348 |
+
|
| 1349 |
+
|
| 1350 |
+
def _g_missing() -> Response:
|
| 1351 |
+
"""源站对未路由的 /g/ 路径答 text/plain 的 404(实测 GET /g/generate/day/)。
|
| 1352 |
+
绝不能让它掉进 catch_all 去拿那份 235KB 的 HTML 404。"""
|
| 1353 |
+
|
| 1354 |
+
return PlainTextResponse("404 page not found\n", status_code=404)
|
| 1355 |
+
|
| 1356 |
+
|
| 1357 |
+
@app.get("/g/check-status/")
|
| 1358 |
+
@app.get("/g/check-status")
|
| 1359 |
+
def g_check_status() -> Response:
|
| 1360 |
+
return _g_json({"status": "ok"})
|
| 1361 |
+
|
| 1362 |
+
|
| 1363 |
+
@app.get("/g/food-search/")
|
| 1364 |
+
@app.get("/g/food-search")
|
| 1365 |
+
def g_food_search(request: Request) -> Response:
|
| 1366 |
+
return _g_json(g_api.food_search(request.query_params))
|
| 1367 |
+
|
| 1368 |
+
|
| 1369 |
+
@app.get("/g/search-with-suggestions/")
|
| 1370 |
+
@app.get("/g/search-with-suggestions")
|
| 1371 |
+
def g_search_suggestions(request: Request) -> Response:
|
| 1372 |
+
return _g_json(g_api.search_with_suggestions(request.query_params))
|
| 1373 |
+
|
| 1374 |
+
|
| 1375 |
+
@app.get("/g/meal-categories/")
|
| 1376 |
+
@app.get("/g/meal-categories")
|
| 1377 |
+
def g_meal_categories(request: Request) -> Response:
|
| 1378 |
+
if _require(request) is None:
|
| 1379 |
+
return _g_denied()
|
| 1380 |
+
return _g_json(g_api.envelope(g_api.meal_categories()))
|
| 1381 |
+
|
| 1382 |
+
|
| 1383 |
+
@app.get("/g/exclusions-stats/")
|
| 1384 |
+
@app.get("/g/exclusions-stats")
|
| 1385 |
+
def g_exclusions_stats(request: Request) -> Response:
|
| 1386 |
+
if _require(request) is None:
|
| 1387 |
+
return _g_denied()
|
| 1388 |
+
# 实测:data 是个裸数字,不是对象
|
| 1389 |
+
return _g_json(g_api.envelope(100))
|
| 1390 |
+
|
| 1391 |
+
|
| 1392 |
+
@app.get("/g/collection-exclusion-stats/")
|
| 1393 |
+
@app.get("/g/collection-exclusion-stats")
|
| 1394 |
+
def g_collection_exclusion_stats(request: Request) -> Response:
|
| 1395 |
+
if _require(request) is None:
|
| 1396 |
+
return _g_denied()
|
| 1397 |
+
if not request.query_params.get("collection_id"):
|
| 1398 |
+
# 实测:不带 id 时答 400 + 裸字符串
|
| 1399 |
+
return _g_json("Please provide a full collection id.", 400)
|
| 1400 |
+
return _g_json(g_api.envelope(0))
|
| 1401 |
+
|
| 1402 |
+
|
| 1403 |
+
@app.get("/g/owned-groceries-suggestions/")
|
| 1404 |
+
@app.get("/g/owned-groceries-suggestions")
|
| 1405 |
+
def g_owned_groceries_suggestions(request: Request) -> Response:
|
| 1406 |
+
if _require(request) is None:
|
| 1407 |
+
return _g_denied()
|
| 1408 |
+
return _g_json(g_api.envelope(g_api.owned_groceries_suggestions()))
|
| 1409 |
+
|
| 1410 |
+
|
| 1411 |
+
@app.get("/g/leftovers-preview/")
|
| 1412 |
+
@app.get("/g/leftovers-preview")
|
| 1413 |
+
def g_leftovers_preview(request: Request) -> Response:
|
| 1414 |
+
if _require(request) is None:
|
| 1415 |
+
return _g_denied()
|
| 1416 |
+
return _g_json(g_api.envelope(g_api.leftovers_preview(STATE.load())))
|
| 1417 |
+
|
| 1418 |
+
|
| 1419 |
+
_G_EMPTY_LIST = (
|
| 1420 |
+
"food-ratings", "customfoods", "customrecipes", "user-images",
|
| 1421 |
+
"groceries", "linked-groceries", "match-ingredients",
|
| 1422 |
+
)
|
| 1423 |
+
|
| 1424 |
+
|
| 1425 |
+
@app.get("/g/{name}/")
|
| 1426 |
+
@app.get("/g/{name}")
|
| 1427 |
+
def g_empty_collection(name: str, request: Request) -> Response:
|
| 1428 |
+
"""一批实测 ``data: []`` 的账号面集合端点。
|
| 1429 |
+
|
| 1430 |
+
``groceries`` 与 ``linked-groceries`` 在源站上对我这个账号答的是 500
|
| 1431 |
+
("An error has occurred. We've been notified…")——那是源站自己的故障,
|
| 1432 |
+
不是契约,克隆不复刻故障,答空集合并写进 known-differences.json。
|
| 1433 |
+
"""
|
| 1434 |
+
|
| 1435 |
+
if name not in _G_EMPTY_LIST:
|
| 1436 |
+
# ``/g/`` 下不只有接口。``/partner-api`` 上那个 "View API docs" 按钮指向
|
| 1437 |
+
# ``/g/docs``(一张 Redoc 壳页),它读同源的 ``/g/openapi.yaml``。两份都在
|
| 1438 |
+
# static/www/g/ 下躺着,但这条 ``/g/{name}`` 兜底比 catch_all 先匹配,
|
| 1439 |
+
# 于是它们一直被当成"未知集合端点"答 404——首页出链闭合看不出来
|
| 1440 |
+
# (没有页面从首页直连过去),点进 /partner-api 才会撞上。
|
| 1441 |
+
served = _serve_static(f"www/g/{name}", request.url.query)
|
| 1442 |
+
if served.status_code == 200:
|
| 1443 |
+
return served
|
| 1444 |
+
return _g_missing()
|
| 1445 |
+
if _require(request) is None:
|
| 1446 |
+
return _g_denied()
|
| 1447 |
+
return _g_json(g_api.envelope([]))
|
| 1448 |
+
|
| 1449 |
+
|
| 1450 |
+
@app.post("/g/generate/{action}/")
|
| 1451 |
+
@app.post("/g/generate/{action}")
|
| 1452 |
+
async def g_generate(action: str, request: Request) -> Response:
|
| 1453 |
+
"""规划器的生成动作。
|
| 1454 |
+
|
| 1455 |
+
bundle 读的是 ``data.results[0].meals[].foods[].food``
|
| 1456 |
+
(source-assets/…/chunks/Cer-cfCG.js),所以 ``results`` 里放的是 diet 对象。
|
| 1457 |
+
"""
|
| 1458 |
+
|
| 1459 |
+
# ``*-json`` 这一族在源站是**匿名可调**的:公开的 /diet-plan/* 页面就是靠它
|
| 1460 |
+
# 拿到示例餐单的,实测证据是那些页面里内联的响应块(匿名抓取取得)。
|
| 1461 |
+
# 其余动作会写账号数据,仍然要登录。
|
| 1462 |
+
if action.endswith("-json"):
|
| 1463 |
+
replay = inline_replay(f"/g/generate/{action}/", str(request.url.query))
|
| 1464 |
+
if replay is not None:
|
| 1465 |
+
return replay
|
| 1466 |
+
form = {}
|
| 1467 |
+
try:
|
| 1468 |
+
raw = await request.form()
|
| 1469 |
+
form = {k: v for k, v in raw.items()}
|
| 1470 |
+
except Exception:
|
| 1471 |
+
form = {}
|
| 1472 |
+
if not form:
|
| 1473 |
+
try:
|
| 1474 |
+
body = await request.json()
|
| 1475 |
+
if isinstance(body, dict):
|
| 1476 |
+
form = body
|
| 1477 |
+
except Exception:
|
| 1478 |
+
form = {}
|
| 1479 |
+
state = STATE.load()
|
| 1480 |
+
# The public homepage posts ``day-json`` without an account. When no
|
| 1481 |
+
# captured replay matches its query, return one deterministic archived-data
|
| 1482 |
+
# plan instead of falling through to the authenticated planner endpoints.
|
| 1483 |
+
if action == "day-json":
|
| 1484 |
+
date = str(form.get("date") or "")
|
| 1485 |
+
diet = g_api.generate_day(state, date, 0)
|
| 1486 |
+
return _g_json(g_api.envelope({"results": [diet]}))
|
| 1487 |
+
if action in ("meal-json", "foodobject-json"):
|
| 1488 |
+
# The public Svelte planner sends the currently displayed plan back to
|
| 1489 |
+
# these controls. A deterministic archived day supplies the same
|
| 1490 |
+
# response shapes: meals cycle through foods collections and food
|
| 1491 |
+
# buttons cycle through individual food objects.
|
| 1492 |
+
diet = g_api.generate_day(state, str(form.get("date") or ""), 0)
|
| 1493 |
+
meals = diet.get("meals") or []
|
| 1494 |
+
foods_by_meal = [
|
| 1495 |
+
[{**food, "units": 0} for food in (meal.get("foods") or [])]
|
| 1496 |
+
for meal in meals
|
| 1497 |
+
]
|
| 1498 |
+
if action == "meal-json":
|
| 1499 |
+
results = [{"foods": foods} for foods in foods_by_meal]
|
| 1500 |
+
else:
|
| 1501 |
+
results = [food for foods in foods_by_meal for food in foods]
|
| 1502 |
+
return _g_json(g_api.envelope({"results": results}))
|
| 1503 |
+
if _require(request) is None:
|
| 1504 |
+
return _g_denied()
|
| 1505 |
+
if action == "day":
|
| 1506 |
+
date = str(form.get("date") or "")
|
| 1507 |
+
diet = g_api.generate_day(state, date, 0)
|
| 1508 |
+
return _g_json(g_api.envelope({"results": [diet]}))
|
| 1509 |
+
if action == "week":
|
| 1510 |
+
results = [
|
| 1511 |
+
g_api.generate_day(state, str(form.get("date") or ""), i)
|
| 1512 |
+
for i in range(7)
|
| 1513 |
+
]
|
| 1514 |
+
return _g_json(g_api.envelope({"results": results}))
|
| 1515 |
+
if action in ("alternate-foods", "alternate-meals", "chosen-meals",
|
| 1516 |
+
"collection-meals", "meal", "foodobject",
|
| 1517 |
+
"week-clear-future-entries"):
|
| 1518 |
+
return _g_json(g_api.envelope([]))
|
| 1519 |
+
return _g_missing()
|
| 1520 |
+
|
| 1521 |
+
|
| 1522 |
+
@app.get("/g/generate/{action}/")
|
| 1523 |
+
@app.get("/g/generate/{action}")
|
| 1524 |
+
def g_generate_get(action: str) -> Response:
|
| 1525 |
+
"""实测:generate 家族只收 POST,GET 一律 404 + text/plain。"""
|
| 1526 |
+
|
| 1527 |
+
return _g_missing()
|
| 1528 |
+
|
| 1529 |
+
|
| 1530 |
+
@app.post("/g/update-groceries/")
|
| 1531 |
+
@app.post("/g/update-groceries")
|
| 1532 |
+
async def g_update_groceries(request: Request) -> Response:
|
| 1533 |
+
if _require(request) is None:
|
| 1534 |
+
return _g_denied()
|
| 1535 |
+
return _g_json(g_api.envelope([]))
|
| 1536 |
+
|
| 1537 |
+
|
| 1538 |
+
@app.get("/g/{name}/{ident}/")
|
| 1539 |
+
@app.get("/g/{name}/{ident}")
|
| 1540 |
+
def g_scoped(name: str, ident: str, request: Request) -> Response:
|
| 1541 |
+
scoped = {
|
| 1542 |
+
"food-usages", "linked-foodobjects", "normalized-ingredient-usages",
|
| 1543 |
+
"food-object-calendar-entry", "food-object-saved-plan-item",
|
| 1544 |
+
"all-images",
|
| 1545 |
+
}
|
| 1546 |
+
if name not in scoped:
|
| 1547 |
+
return _g_missing()
|
| 1548 |
+
if _require(request) is None:
|
| 1549 |
+
return _g_denied()
|
| 1550 |
+
return _g_json(g_api.envelope([]))
|
| 1551 |
+
|
| 1552 |
+
|
| 1553 |
+
# ------------------------------------------------------------------ 食物列表
|
| 1554 |
+
|
| 1555 |
+
_SLUG_ID = re.compile(r"^(?P<slug>.*?)-(?P<id>\d+)$")
|
| 1556 |
+
|
| 1557 |
+
|
| 1558 |
+
def _browse_key(order_by: str | None, page: int) -> str:
|
| 1559 |
+
parts = []
|
| 1560 |
+
if order_by:
|
| 1561 |
+
parts.append(("order_by", order_by))
|
| 1562 |
+
if page > 1:
|
| 1563 |
+
parts.append(("page", str(page)))
|
| 1564 |
+
query = urlencode(parts)
|
| 1565 |
+
return "/food/browse" + (f"?{query}" if query else "")
|
| 1566 |
+
|
| 1567 |
+
|
| 1568 |
+
@app.get("/food/browse")
|
| 1569 |
+
def food_browse(request: Request) -> Response:
|
| 1570 |
+
order_by = request.query_params.get("order_by") or None
|
| 1571 |
+
raw_page = request.query_params.get("page") or "1"
|
| 1572 |
+
try:
|
| 1573 |
+
page = int(raw_page)
|
| 1574 |
+
except ValueError:
|
| 1575 |
+
page = 1
|
| 1576 |
+
if page < 1:
|
| 1577 |
+
page = 1
|
| 1578 |
+
|
| 1579 |
+
# 源站对不认识的 order_by 是**静默丢掉参数**,照常答 200 默认页
|
| 1580 |
+
# (实测 ?order_by=bogus / ?order_by=protein / ?order_by=cysteine 三条,
|
| 1581 |
+
# 都拿到 <title>Browse Foods - Eat This Much</title>,242KB 的默认页)。
|
| 1582 |
+
# 早先这里答 404,比源站更严格——那是错的。
|
| 1583 |
+
if order_by and store.facet_ids() and order_by not in store.facet_ids():
|
| 1584 |
+
order_by = None
|
| 1585 |
+
|
| 1586 |
+
# 源站自己渲染过的那几页,交付的就是它自己的标记
|
| 1587 |
+
record = store.page_record(_browse_key(order_by, page))
|
| 1588 |
+
if record is not None:
|
| 1589 |
+
return html_response(store.page_bytes(record), record.get("status", 200))
|
| 1590 |
+
|
| 1591 |
+
limit = store.index().get("browse", {}).get("archived_page_limit", 2)
|
| 1592 |
+
if page > limit:
|
| 1593 |
+
# 第三页起收边:说清楚边界在哪,并且不留死链
|
| 1594 |
+
return html_response(_fence_document(
|
| 1595 |
+
f"Page {page} is past the edge of this clone",
|
| 1596 |
+
"The source database runs to hundreds of thousands of foods. This "
|
| 1597 |
+
f"offline clone carries the first {limit} pages of every list in full, "
|
| 1598 |
+
"with every item on them reachable. Beyond that the archive stops "
|
| 1599 |
+
"here rather than pretending.",
|
| 1600 |
+
_browse_key(order_by, limit),
|
| 1601 |
+
), 200)
|
| 1602 |
+
|
| 1603 |
+
rows, total = store.browse_slice(order_by or "default", page)
|
| 1604 |
+
if not rows and order_by:
|
| 1605 |
+
# 这个分面在离线子集里一份带值的食物都没有:回落到默认序,
|
| 1606 |
+
# 而不是给一张空页——源站在这里是有内容的。写进 known-differences。
|
| 1607 |
+
rows, total = store.browse_slice("default", page)
|
| 1608 |
+
if not rows:
|
| 1609 |
+
return html_response(_fence_document(
|
| 1610 |
+
"Nothing on this page",
|
| 1611 |
+
"This sort order carries no items in the offline archive.",
|
| 1612 |
+
_browse_key(None, 1),
|
| 1613 |
+
), 200)
|
| 1614 |
+
return html_response(_browse_document(order_by, page, rows, total))
|
| 1615 |
+
|
| 1616 |
+
|
| 1617 |
+
# 每类列表前两页整页存档,第三页起收边(FAST-CLONE §5)。/food/browse 把这个
|
| 1618 |
+
# 数字记在 index.json 的 browse.archived_page_limit 里;博客列表走同一个口径。
|
| 1619 |
+
BLOG_PAGE_LIMIT = 2
|
| 1620 |
+
_BLOG_PAGE = re.compile(r"^/blog/(.+?)/page/(\d+)/?$")
|
| 1621 |
+
|
| 1622 |
+
|
| 1623 |
+
def _fence_document(
|
| 1624 |
+
title: str, body: str, back: str, back_label: str = "Back to the food database"
|
| 1625 |
+
) -> bytes:
|
| 1626 |
+
return f"""<!doctype html><html lang="en"><head><meta charset="utf-8">
|
| 1627 |
+
<title>{html.escape(title)} — Eat This Much</title>
|
| 1628 |
+
<meta name="viewport" content="width=device-width">
|
| 1629 |
+
<link rel="stylesheet" href="/static/clone/boundary.css"></head>
|
| 1630 |
+
<body class="offline-boundary"><main>
|
| 1631 |
+
<h1>{html.escape(title)}</h1>
|
| 1632 |
+
<p>{body}</p>
|
| 1633 |
+
<p><a href="{html.escape(back)}">{html.escape(back_label)}</a> ·
|
| 1634 |
+
<a href="/">Eat This Much home</a></p>
|
| 1635 |
+
</main></body></html>""".encode("utf-8")
|
| 1636 |
+
|
| 1637 |
+
|
| 1638 |
+
def _browse_document(
|
| 1639 |
+
order_by: str | None, page: int, rows: list[dict[str, Any]], total: int
|
| 1640 |
+
) -> bytes:
|
| 1641 |
+
facet_label = order_by or "default"
|
| 1642 |
+
items = "\n".join(
|
| 1643 |
+
'<li><a href="{path}">{name}</a>{cal}</li>'.format(
|
| 1644 |
+
path=html.escape(r["path"]),
|
| 1645 |
+
name=html.escape(str(r.get("name") or r["id"])),
|
| 1646 |
+
cal=(
|
| 1647 |
+
f' <span class="cal">{html.escape(str(r["calories"]))} cal</span>'
|
| 1648 |
+
if r.get("calories") is not None
|
| 1649 |
+
else ""
|
| 1650 |
+
),
|
| 1651 |
+
)
|
| 1652 |
+
for r in rows
|
| 1653 |
+
)
|
| 1654 |
+
prev_link = (
|
| 1655 |
+
f'<a href="{html.escape(_browse_key(order_by, page - 1))}">Previous</a>'
|
| 1656 |
+
if page > 1
|
| 1657 |
+
else ""
|
| 1658 |
+
)
|
| 1659 |
+
next_link = f'<a href="{html.escape(_browse_key(order_by, page + 1))}">Next</a>'
|
| 1660 |
+
return f"""<!doctype html><html lang="en"><head><meta charset="utf-8">
|
| 1661 |
+
<title>Food database — sorted by {html.escape(facet_label)} — Eat This Much</title>
|
| 1662 |
+
<meta name="viewport" content="width=device-width">
|
| 1663 |
+
<link rel="stylesheet" href="/static/clone/boundary.css"></head>
|
| 1664 |
+
<body class="offline-boundary"><main>
|
| 1665 |
+
<h1>Food database</h1>
|
| 1666 |
+
<p class="target">Sorted by <code>{html.escape(facet_label)}</code> ·
|
| 1667 |
+
page {page} · {total} foods in this offline archive</p>
|
| 1668 |
+
<ul class="food-list">
|
| 1669 |
+
{items}
|
| 1670 |
+
</ul>
|
| 1671 |
+
<nav class="pager">{prev_link} {next_link}</nav>
|
| 1672 |
+
<p><a href="/food/browse">Reset sort</a> · <a href="/">Eat This Much home</a></p>
|
| 1673 |
+
</main></body></html>""".encode("utf-8")
|
| 1674 |
+
|
| 1675 |
+
|
| 1676 |
+
# ------------------------------------------------------------------ 页面层
|
| 1677 |
+
|
| 1678 |
+
def _stored_page(path: str) -> Response | None:
|
| 1679 |
+
record = store.page_record(path)
|
| 1680 |
+
if record is None:
|
| 1681 |
+
return None
|
| 1682 |
+
return html_response(store.page_bytes(record), record.get("status", 200))
|
| 1683 |
+
|
| 1684 |
+
|
| 1685 |
+
def _canonical_food_path(path: str) -> str | None:
|
| 1686 |
+
"""按 id 查规范地址;查不到就交回 None,让后面的 404 逻辑接手。"""
|
| 1687 |
+
|
| 1688 |
+
tail = path[len("/calories/"):]
|
| 1689 |
+
match = _SLUG_ID.match(tail)
|
| 1690 |
+
if match:
|
| 1691 |
+
food_id = match.group("id")
|
| 1692 |
+
by_page = store.calories_path_by_id(food_id)
|
| 1693 |
+
if by_page:
|
| 1694 |
+
return by_page
|
| 1695 |
+
summary = store.food_summary(food_id)
|
| 1696 |
+
if summary:
|
| 1697 |
+
return summary["path"]
|
| 1698 |
+
# 地址尾号未必是这条食物自己的 id。源站 API 给的 canonical_url 里
|
| 1699 |
+
# 有 14 条尾号对不上:食物 2094(Red potato,slug `red-potato,2094`)
|
| 1700 |
+
# 的 canonical_url 是 `/calories/russet-potatoes-2092`,2092 这个 id
|
| 1701 |
+
# 在库里根本不存在。同类还有 1301 -> /calories/apples-1300、
|
| 1702 |
+
# 15 -> /calories/cottage-cheese-16 等。源站对这些地址答 200
|
| 1703 |
+
# (那本来就是它自己声明的规范地址),只按尾号查就会全判 404。
|
| 1704 |
+
# 所以按 id 查空之后,再拿整条 tail 当 slug 查一次。
|
| 1705 |
+
summary = store.food_by_slug(tail)
|
| 1706 |
+
return summary["path"] if summary else None
|
| 1707 |
+
if tail.isdigit():
|
| 1708 |
+
return store.calories_path_by_id(tail)
|
| 1709 |
+
summary = store.food_by_slug(tail)
|
| 1710 |
+
return summary["path"] if summary else None
|
| 1711 |
+
|
| 1712 |
+
|
| 1713 |
+
@app.get("/")
|
| 1714 |
+
def home() -> Response:
|
| 1715 |
+
record = store.page_record("/")
|
| 1716 |
+
if record is None:
|
| 1717 |
+
return _bare_404()
|
| 1718 |
+
body = store.page_bytes(record)
|
| 1719 |
+
runtime = b'<script src="/static/clone/home-actions.js?v=2" defer></script>'
|
| 1720 |
+
if runtime not in body:
|
| 1721 |
+
body = body.replace(b"</body>", runtime + b"</body>", 1)
|
| 1722 |
+
return html_response(body, record.get("status", 200))
|
| 1723 |
+
|
| 1724 |
+
|
| 1725 |
+
@app.get("/{full_path:path}")
|
| 1726 |
+
def catch_all(full_path: str, request: Request) -> Response:
|
| 1727 |
+
raw = "/" + full_path
|
| 1728 |
+
path = store.normalize(raw)
|
| 1729 |
+
|
| 1730 |
+
# 先试 /app 那棵。两棵的文件名不会撞(哈希各自独立),所以取不到就回落
|
| 1731 |
+
# 到前台那棵是安全的——回落只可能命中同名文件,而同名文件不存在。
|
| 1732 |
+
app_immutable = _APP_IMMUTABLE.match(path)
|
| 1733 |
+
if app_immutable:
|
| 1734 |
+
response = _serve_static(f"app/_app/immutable/{app_immutable.group('rest')}")
|
| 1735 |
+
if response.status_code == 200:
|
| 1736 |
+
return response
|
| 1737 |
+
immutable = _IMMUTABLE.search(path)
|
| 1738 |
+
if immutable:
|
| 1739 |
+
rest = immutable.group("rest")
|
| 1740 |
+
response = _serve_static(f"_app/immutable/{rest}")
|
| 1741 |
+
if response.status_code == 200:
|
| 1742 |
+
return response
|
| 1743 |
+
return _serve_static(f"app/_app/immutable/{rest}")
|
| 1744 |
+
|
| 1745 |
+
redirect = store.redirect_for(path)
|
| 1746 |
+
if redirect:
|
| 1747 |
+
return RedirectResponse(redirect["to"], status_code=redirect.get("status", 301))
|
| 1748 |
+
|
| 1749 |
+
# 尾斜杠的规范形态是**逐页**的,不是逐站的,所以照着构建期从抓取证据里
|
| 1750 |
+
# 留下来的 record["canonical"] 走,而不是按前缀猜。实测四条:
|
| 1751 |
+
#
|
| 1752 |
+
# /about/ → 308 → /about (去斜杠)
|
| 1753 |
+
# /diet-plan/keto/ → 308 → /diet-plan/keto (去斜杠)
|
| 1754 |
+
# /sample-email → 301 → /sample-email/ (加斜杠)
|
| 1755 |
+
# /diet-plan/atkins-ketogenic → 301 → /diet-plan/atkins-ketogenic/(加斜杠)
|
| 1756 |
+
#
|
| 1757 |
+
# 加斜杠是 301(Django 的 APPEND_SLASH),去斜杠是 308,两个方向的状态码不同。
|
| 1758 |
+
canonical = (store.page_record(path) or {}).get("canonical")
|
| 1759 |
+
if canonical:
|
| 1760 |
+
if raw != canonical:
|
| 1761 |
+
return RedirectResponse(canonical, status_code=301)
|
| 1762 |
+
elif raw != path and raw.endswith("/"):
|
| 1763 |
+
# 只对确实存在的目标发 308,否则一个不存在的路径会被 308 到另一个
|
| 1764 |
+
# 不存在的路径,把 404 藏起来。
|
| 1765 |
+
if store.page_record(path) or store.alias_target(path):
|
| 1766 |
+
return RedirectResponse(path, status_code=308)
|
| 1767 |
+
|
| 1768 |
+
alias = store.alias_target(path)
|
| 1769 |
+
if alias:
|
| 1770 |
+
response = _stored_page(alias)
|
| 1771 |
+
if response is not None:
|
| 1772 |
+
return response
|
| 1773 |
+
|
| 1774 |
+
response = _stored_page(path)
|
| 1775 |
+
if response is not None:
|
| 1776 |
+
return response
|
| 1777 |
+
|
| 1778 |
+
# /calories/<slug>-<id>:数字是权威的,slug 是装饰性的。
|
| 1779 |
+
#
|
| 1780 |
+
# 但实测下来源站**不重定向**:/calories/zzz-banana-oatmeal-33511 直接答 200
|
| 1781 |
+
# (74024B,规范地址是 74018B),/calories/33511 也答 200。
|
| 1782 |
+
# 我原本按 goodreads 的经验假定它会 301 回规范地址——测下来是反的。
|
| 1783 |
+
# 克隆照实测来:按 id 找到那一页,原样交出去,不发重定向。
|
| 1784 |
+
if path.startswith("/calories/"):
|
| 1785 |
+
canonical = _canonical_food_path(path)
|
| 1786 |
+
if canonical:
|
| 1787 |
+
response = _stored_page(canonical)
|
| 1788 |
+
if response is not None:
|
| 1789 |
+
return response
|
| 1790 |
+
# 认得这条食物、但没有存档整页 —— 交客户端渲染的那张壳。
|
| 1791 |
+
#
|
| 1792 |
+
# 这一支覆盖的量比看上去大:食物 2150 条,���档整页的只有 40 条。
|
| 1793 |
+
# 剩下 2110 条在 SPA 里点进去都好好的(客户端路由自己跑 load),
|
| 1794 |
+
# 但**直接 goto 全是 404**——随机抽 30 条直接 GET,30 条全 404,
|
| 1795 |
+
# 交出去的是 "Server error - Eat This Much" 那张 404 壳。
|
| 1796 |
+
# 冷启动、开新标签页、按刷新,这 2110 页全是死的。
|
| 1797 |
+
#
|
| 1798 |
+
# 壳里是源站自己的 bundle 加两参启动(tools/build_clone.py:
|
| 1799 |
+
# install_food_shell 里记了为什么可以去掉水合负载),数据来自这边
|
| 1800 |
+
# 已经实测出形状的 /api/v1/food/<id>/ 那几条。所以这不是拿一张占位
|
| 1801 |
+
# 页糊住 404:渲染出来的就是这条食物本身的页面。
|
| 1802 |
+
#
|
| 1803 |
+
# 状态码 200 而不是 404:源站对这些地址答的就是 200。
|
| 1804 |
+
shell = store.shell("food-shell")
|
| 1805 |
+
if shell is not None:
|
| 1806 |
+
return html_response(shell, 200)
|
| 1807 |
+
|
| 1808 |
+
# 博客是源站自己的第二个第一方源,它的静态资源挂在 /blog/ 前缀下
|
| 1809 |
+
if path.startswith("/blog/"):
|
| 1810 |
+
blog_asset = _serve_static(
|
| 1811 |
+
"blog-assets" + path[len("/blog"):], request.url.query
|
| 1812 |
+
)
|
| 1813 |
+
if blog_asset.status_code == 200:
|
| 1814 |
+
return blog_asset
|
| 1815 |
+
|
| 1816 |
+
# 博客列表的分页收边。
|
| 1817 |
+
#
|
| 1818 |
+
# 源站的分页链接是真的:/blog/category/meal-planning/ 底部直接链到 page/2 3 4,
|
| 1819 |
+
# /blog/latest-articles/ 链到 page/2 3 7。前两页整页存档(范围内),
|
| 1820 |
+
# 第三页起收边——但**收边不等于 404**。答 404 就是在克隆里留死链,
|
| 1821 |
+
# 而这些链接在存档下来的标记里明明白白存在,点下去必须落到某处。
|
| 1822 |
+
# 和 /food/browse 用同一套 _fence_document,边界只有一种表达方式。
|
| 1823 |
+
m = _BLOG_PAGE.match(path)
|
| 1824 |
+
if m:
|
| 1825 |
+
base, page = f"/blog/{m.group(1)}", int(m.group(2))
|
| 1826 |
+
if store.page_record(base) is not None and page > BLOG_PAGE_LIMIT:
|
| 1827 |
+
return html_response(_fence_document(
|
| 1828 |
+
f"Page {page} is past the edge of this clone",
|
| 1829 |
+
"This offline clone carries the first "
|
| 1830 |
+
f"{BLOG_PAGE_LIMIT} pages of every blog list in full, with every "
|
| 1831 |
+
"post on them reachable. Beyond that the archive stops here "
|
| 1832 |
+
"rather than pretending.",
|
| 1833 |
+
base + "/",
|
| 1834 |
+
"Back to this blog list",
|
| 1835 |
+
), 200)
|
| 1836 |
+
|
| 1837 |
+
# 页面里指向源站根路径的散装静态文件(favicon、static_files/… )
|
| 1838 |
+
www_asset = _serve_static(f"www{path}", request.url.query)
|
| 1839 |
+
if www_asset.status_code == 200:
|
| 1840 |
+
return www_asset
|
| 1841 |
+
|
| 1842 |
+
if path == "/app" or path.startswith("/app/"):
|
| 1843 |
+
# /app 是纯客户端渲染:实测 /app/login 与 /app/<不存在的路径> 拿到的
|
| 1844 |
+
# 是**同一份 14586 字节的壳**,路由、登录判断、404 文案全在浏览器里跑。
|
| 1845 |
+
# 所以克隆对 /app 下的每一条路径都交这一份壳、都答 200——
|
| 1846 |
+
# 这不是「兜底」,这就是源站服务端的完整行为。
|
| 1847 |
+
shell = store.shell("app-shell") or store.shell("app-not-found")
|
| 1848 |
+
if shell is not None:
|
| 1849 |
+
return html_response(shell, 200)
|
| 1850 |
+
|
| 1851 |
+
not_found = store.shell("not-found")
|
| 1852 |
+
if not_found is not None:
|
| 1853 |
+
return html_response(not_found, 404)
|
| 1854 |
+
return _bare_404()
|
| 1855 |
+
|
| 1856 |
+
|
| 1857 |
+
# ------------------------------------------------------------------ 进程入口
|
| 1858 |
+
|
| 1859 |
+
def main() -> None:
|
| 1860 |
+
"""引擎起候选站的第一顺位是直接执行本文件,端口从 ``PORT`` 读。"""
|
| 1861 |
+
|
| 1862 |
+
import uvicorn
|
| 1863 |
+
|
| 1864 |
+
uvicorn.run(
|
| 1865 |
+
app,
|
| 1866 |
+
host=os.environ.get("HOST", "127.0.0.1"),
|
| 1867 |
+
port=int(os.environ.get("PORT", "9060")),
|
| 1868 |
+
log_level=os.environ.get("LOG_LEVEL", "warning"),
|
| 1869 |
+
)
|
| 1870 |
+
|
| 1871 |
+
|
| 1872 |
+
if __name__ == "__main__":
|
| 1873 |
+
main()
|
tasks/eatthismuch/environment/reference/clone/backend/app_api.py
ADDED
|
@@ -0,0 +1,655 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""/app 这个 SPA 的后端接口层。
|
| 2 |
+
|
| 3 |
+
/app 下发的是源站自己的 JS bundle,我一个字节都不改。所以这些端点的**形状**
|
| 4 |
+
不能猜——字段名对不上,bundle 就读到 undefined,规划器整片白。
|
| 5 |
+
17 个端点的形状是实测出来的(tools/api_shapes.py,产物在 recon/api-shapes/,
|
| 6 |
+
那个目录不进交付)。这里只搬**字段名**,值全部换成 demo 账号自己的数据。
|
| 7 |
+
|
| 8 |
+
实测下来的几条契约:
|
| 9 |
+
|
| 10 |
+
* 信封统一是 ``{"success", "data", "errors", "meta", "warnings"}``。
|
| 11 |
+
集合端点的 ``data`` 是数组且 ``meta`` 带 ``limit/offset/next/previous``;
|
| 12 |
+
单体端点的 ``data`` 是对象且 ``meta`` 是 ``{}``。
|
| 13 |
+
* 后端是 Django + Tastypie:对象之间用 ``resource_uri``(``/api/v1/<res>/<id>/``)
|
| 14 |
+
互相指,不是嵌套 id。SPA 靠这个串数据,所以 uri 必须拼对。
|
| 15 |
+
* 匿名请求 ``/api/v1/*`` 答 **401 且响应体为空**(实测 0 字节),不是 403、
|
| 16 |
+
也不是带 JSON 的 401。克隆照抄这个形状。
|
| 17 |
+
* 登录是 ``POST /api/login/`` → 200;登出是 ``POST /api/logout/`` → 200,
|
| 18 |
+
之后标记端点 ``/api/v1/userv2/`` 立刻从 200 变 401。
|
| 19 |
+
|
| 20 |
+
``meals[].foods`` 交空数组,这是实测:
|
| 21 |
+
这个账号的 40 天日历里,每一餐的 ``foods`` 都是 ``[]``——因为它从没生成过
|
| 22 |
+
计划。空数组是**观测到的真实状态**。而 ``foods`` 里一个元素长什么样,我一次
|
| 23 |
+
都没观测到。想去源站上生成一次餐单把形状测出来,那一步被沙箱策略拦下了,
|
| 24 |
+
所以这里按规矩交测到的形状,不编没测过的。这条写进 known-differences.json。
|
| 25 |
+
"""
|
| 26 |
+
from __future__ import annotations
|
| 27 |
+
|
| 28 |
+
import datetime as _dt
|
| 29 |
+
import json
|
| 30 |
+
import pathlib
|
| 31 |
+
import threading
|
| 32 |
+
from typing import Any
|
| 33 |
+
|
| 34 |
+
# Snapshot-relative product state must not drift with the machine clock.
|
| 35 |
+
CAPTURE_DATE = _dt.date(2026, 8, 22)
|
| 36 |
+
|
| 37 |
+
# demo 账号的 id 基数。刻意用一段固定的、和源站无关的数字,
|
| 38 |
+
# 这样交付目录里不会出现源站账号的任何标识。
|
| 39 |
+
DEMO_USER_ID = 900001
|
| 40 |
+
NUTRITION_PROFILE_ID = 910001
|
| 41 |
+
MEALTYPE_BASE_ID = 920001
|
| 42 |
+
DIET_BASE_ID = 930001
|
| 43 |
+
MEAL_BASE_ID = 940001
|
| 44 |
+
CALENDAR_BASE_ID = 950001
|
| 45 |
+
TEMPLATE_BASE_ID = 960001
|
| 46 |
+
|
| 47 |
+
CALENDAR_LIMIT = 40 # 实测:不带 limit 时 meta.limit = 40
|
| 48 |
+
MEALTYPE_LIMIT = 100
|
| 49 |
+
NUTRITION_LIMIT = 200
|
| 50 |
+
TEMPLATE_LIMIT = 20
|
| 51 |
+
|
| 52 |
+
MEAL_TITLES = ("Breakfast", "Lunch", "Dinner", "Snack")
|
| 53 |
+
|
| 54 |
+
_LOCK = threading.Lock()
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def envelope(data: Any, *, meta: dict | None = None, success: bool = True,
|
| 58 |
+
errors: Any = None, warnings: dict | None = None) -> dict:
|
| 59 |
+
return {
|
| 60 |
+
"data": data,
|
| 61 |
+
"errors": errors,
|
| 62 |
+
"meta": meta if meta is not None else {},
|
| 63 |
+
"success": success,
|
| 64 |
+
"warnings": warnings if warnings is not None else {},
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
def uri(resource: str, ident: int | str) -> str:
|
| 69 |
+
return f"/api/v1/{resource}/{ident}/"
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
# ------------------------------------------------------------------ 持久状态
|
| 73 |
+
|
| 74 |
+
class AppState:
|
| 75 |
+
"""demo 账号在 /app 里的状态。
|
| 76 |
+
|
| 77 |
+
写在 ``WEBSITEBENCH_DATA_DIR`` 下——clone/ 是只读挂载,运行期的任何写入
|
| 78 |
+
都只能落在那里。第一次访问时按当天日期锚定日历窗口并存下来,
|
| 79 |
+
之后每次启动都读同一个锚点,``cp -r`` 到新路径也不会漂。
|
| 80 |
+
"""
|
| 81 |
+
|
| 82 |
+
def __init__(self, path: pathlib.Path) -> None:
|
| 83 |
+
self.path = path
|
| 84 |
+
self._cache: dict | None = None
|
| 85 |
+
|
| 86 |
+
def load(self) -> dict:
|
| 87 |
+
with _LOCK:
|
| 88 |
+
if self._cache is None:
|
| 89 |
+
if self.path.exists():
|
| 90 |
+
self._cache = json.loads(self.path.read_text(encoding="utf-8"))
|
| 91 |
+
else:
|
| 92 |
+
self._cache = self._seed()
|
| 93 |
+
self._flush()
|
| 94 |
+
return self._cache
|
| 95 |
+
|
| 96 |
+
def save(self, state: dict) -> None:
|
| 97 |
+
with _LOCK:
|
| 98 |
+
self._cache = state
|
| 99 |
+
self._flush()
|
| 100 |
+
|
| 101 |
+
def _flush(self) -> None:
|
| 102 |
+
self.path.parent.mkdir(parents=True, exist_ok=True)
|
| 103 |
+
tmp = self.path.with_suffix(".tmp")
|
| 104 |
+
tmp.write_text(json.dumps(self._cache, ensure_ascii=False, indent=1),
|
| 105 |
+
encoding="utf-8")
|
| 106 |
+
tmp.replace(self.path)
|
| 107 |
+
|
| 108 |
+
@staticmethod
|
| 109 |
+
def _seed() -> dict:
|
| 110 |
+
today = CAPTURE_DATE
|
| 111 |
+
# 源站的日历窗口不以今天为中心,是从计划起点往后铺。
|
| 112 |
+
# demo 账号把起点定在今天往前 20 天,40 天的第一页正好盖住本周。
|
| 113 |
+
start = today - _dt.timedelta(days=20)
|
| 114 |
+
stamp = f"{today.isoformat()}T00:00:00"
|
| 115 |
+
return {
|
| 116 |
+
"calendar_start": start.isoformat(),
|
| 117 |
+
"created": stamp,
|
| 118 |
+
"user": {
|
| 119 |
+
"date_joined": stamp,
|
| 120 |
+
"shopping_day": 0,
|
| 121 |
+
"timezone": 0.0,
|
| 122 |
+
"units": "M",
|
| 123 |
+
"use_kilojoules": False,
|
| 124 |
+
"use_net_carbs": False,
|
| 125 |
+
},
|
| 126 |
+
"profile": {
|
| 127 |
+
"activity_level": 1.2,
|
| 128 |
+
"age": 30,
|
| 129 |
+
"algorithm": 2,
|
| 130 |
+
"bodyfat": 20.0,
|
| 131 |
+
"complexity_level": 1,
|
| 132 |
+
"gender": "F",
|
| 133 |
+
"goal": "M",
|
| 134 |
+
"height": 165.0,
|
| 135 |
+
"weight": 65.0,
|
| 136 |
+
"last_profile_reset": stamp,
|
| 137 |
+
"last_updated_eaten_foods": today.isoformat(),
|
| 138 |
+
"last_updated_weight": today.isoformat(),
|
| 139 |
+
},
|
| 140 |
+
"nutrition": {
|
| 141 |
+
"auto": True,
|
| 142 |
+
"calories": 2000.0,
|
| 143 |
+
"cholesterol": 300.0,
|
| 144 |
+
"fiber": 25.0,
|
| 145 |
+
"macro_scheme": "grams",
|
| 146 |
+
"max_carbs": 250.0,
|
| 147 |
+
"max_fats": 78.0,
|
| 148 |
+
"max_proteins": 175.0,
|
| 149 |
+
"min_carbs": 100.0,
|
| 150 |
+
"min_fats": 44.0,
|
| 151 |
+
"min_proteins": 75.0,
|
| 152 |
+
"percent_carbs": 40.0,
|
| 153 |
+
"percent_fats": 30.0,
|
| 154 |
+
"percent_proteins": 30.0,
|
| 155 |
+
"sodium": 2400.0,
|
| 156 |
+
"title": "My Nutrition Targets",
|
| 157 |
+
"date_made": stamp,
|
| 158 |
+
},
|
| 159 |
+
"generator": {
|
| 160 |
+
"beta_user": False,
|
| 161 |
+
"daily_price_limit": 0.0,
|
| 162 |
+
"enable_weekly_planner": True,
|
| 163 |
+
"generator_focus": 0,
|
| 164 |
+
"preset_diet": "anything",
|
| 165 |
+
"single_template_diet": True,
|
| 166 |
+
"use_leftovers": False,
|
| 167 |
+
"use_partial_servings": True,
|
| 168 |
+
},
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
# ------------------------------------------------------------------ 资源构造
|
| 173 |
+
|
| 174 |
+
def split_name(display_name: str) -> tuple[str, str]:
|
| 175 |
+
"""源站的 user 对象是 first_name / last_name 两个字段,本地账号库只存一个
|
| 176 |
+
display_name。演示账号叫 ``Demo Planner``,切出来正好还是 Demo / Planner,
|
| 177 |
+
页面上一个字都不变;注册出来的账号则用他自己填的名字,不再顶着演示账号的名。"""
|
| 178 |
+
|
| 179 |
+
parts = str(display_name or "").split()
|
| 180 |
+
if not parts:
|
| 181 |
+
return "Demo", "Planner"
|
| 182 |
+
return parts[0], " ".join(parts[1:])
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
def user_object(state: dict, account: dict) -> dict:
|
| 186 |
+
u = state["user"]
|
| 187 |
+
first_name, last_name = split_name(account.get("display_name") or "")
|
| 188 |
+
return {
|
| 189 |
+
"amplitude_user_id": f"demo-{DEMO_USER_ID}",
|
| 190 |
+
"date_joined": u["date_joined"],
|
| 191 |
+
"email": account["email"],
|
| 192 |
+
"first_name": first_name,
|
| 193 |
+
"has_login_access": True,
|
| 194 |
+
"has_set_password": True,
|
| 195 |
+
"id": DEMO_USER_ID,
|
| 196 |
+
"initial_signup_complete": True,
|
| 197 |
+
"inviting_manager": None,
|
| 198 |
+
"is_affiliate": False,
|
| 199 |
+
"is_api_user": False,
|
| 200 |
+
"is_awaiting_manager_approval": False,
|
| 201 |
+
"is_client": False,
|
| 202 |
+
"is_impersonated": False,
|
| 203 |
+
"is_invited_by_manager": False,
|
| 204 |
+
"is_linked": False,
|
| 205 |
+
"is_managed": False,
|
| 206 |
+
"is_manager": False,
|
| 207 |
+
"is_premium": False,
|
| 208 |
+
"is_staff": False,
|
| 209 |
+
"last_name": last_name,
|
| 210 |
+
"last_use_time": None,
|
| 211 |
+
"linked_accounts_enabled": True,
|
| 212 |
+
"linked_group_owner": None,
|
| 213 |
+
"manager": None,
|
| 214 |
+
"needs_account_info_update": False,
|
| 215 |
+
"needs_password_reset": False,
|
| 216 |
+
"permissions": [],
|
| 217 |
+
"profile_pic_url": None,
|
| 218 |
+
"resource_uri": uri("userv2", DEMO_USER_ID),
|
| 219 |
+
"shopping_day": u["shopping_day"],
|
| 220 |
+
"social_auth_display_names": [],
|
| 221 |
+
"social_auth_providers": [],
|
| 222 |
+
"timezone": u["timezone"],
|
| 223 |
+
"units": u["units"],
|
| 224 |
+
"use_kilojoules": u["use_kilojoules"],
|
| 225 |
+
"use_net_carbs": u["use_net_carbs"],
|
| 226 |
+
"username": account.get("display_name") or "demo",
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
def profile_object(state: dict) -> dict:
|
| 231 |
+
p = state["profile"]
|
| 232 |
+
return {
|
| 233 |
+
"activity_level": p["activity_level"],
|
| 234 |
+
"age": p["age"],
|
| 235 |
+
"algorithm": p["algorithm"],
|
| 236 |
+
"bodyfat": p["bodyfat"],
|
| 237 |
+
"complexity_level": p["complexity_level"],
|
| 238 |
+
"copied_selected_diet": False,
|
| 239 |
+
"cuisine_filters": None,
|
| 240 |
+
"currently_generating": False,
|
| 241 |
+
"enable_debug_logging": False,
|
| 242 |
+
"force_password_reset": False,
|
| 243 |
+
"friend_signups": 0,
|
| 244 |
+
"friend_successes": 0,
|
| 245 |
+
"gender": p["gender"],
|
| 246 |
+
"generating_task_id": None,
|
| 247 |
+
"goal": p["goal"],
|
| 248 |
+
"height": p["height"],
|
| 249 |
+
"hide_gender": True,
|
| 250 |
+
"id": DEMO_USER_ID,
|
| 251 |
+
"last_profile_reset": p["last_profile_reset"],
|
| 252 |
+
"last_updated_eaten_foods": p["last_updated_eaten_foods"],
|
| 253 |
+
"last_updated_weight": p["last_updated_weight"],
|
| 254 |
+
"leftovers_destination_meal_type_id": None,
|
| 255 |
+
"leftovers_source_meal_type_id": None,
|
| 256 |
+
"limit_price": True,
|
| 257 |
+
"local_storage_load_complete": True,
|
| 258 |
+
"number_curated_recipes": 0,
|
| 259 |
+
"referrer": None,
|
| 260 |
+
"resource_uri": uri("userprofilev2", DEMO_USER_ID),
|
| 261 |
+
"seen_mobile_walkthrough": False,
|
| 262 |
+
"seen_premium_mobile_walkthrough": False,
|
| 263 |
+
"show_walkthrough_prompt": False,
|
| 264 |
+
"signup_platform": 4,
|
| 265 |
+
"substitution_filters": None,
|
| 266 |
+
"substitution_method": 1,
|
| 267 |
+
"unsubscribe_string": f"demo-{DEMO_USER_ID}",
|
| 268 |
+
"use_weight_goal": False,
|
| 269 |
+
"variety_level": 1,
|
| 270 |
+
"weight": p["weight"],
|
| 271 |
+
"weight_goal": None,
|
| 272 |
+
"weight_goal_date": None,
|
| 273 |
+
"weight_goal_weekly_rate": None,
|
| 274 |
+
"welcome_complete": True,
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
def nutrition_object(state: dict) -> dict:
|
| 279 |
+
n = state["nutrition"]
|
| 280 |
+
return {
|
| 281 |
+
"auto": n["auto"],
|
| 282 |
+
"calories": n["calories"],
|
| 283 |
+
"cholesterol": n["cholesterol"],
|
| 284 |
+
"date_made": n["date_made"],
|
| 285 |
+
"deleted": False,
|
| 286 |
+
"description": None,
|
| 287 |
+
"fiber": n["fiber"],
|
| 288 |
+
"id": NUTRITION_PROFILE_ID,
|
| 289 |
+
"macro_scheme": n["macro_scheme"],
|
| 290 |
+
"max_carbs": n["max_carbs"],
|
| 291 |
+
"max_fats": n["max_fats"],
|
| 292 |
+
"max_proteins": n["max_proteins"],
|
| 293 |
+
"min_carbs": n["min_carbs"],
|
| 294 |
+
"min_fats": n["min_fats"],
|
| 295 |
+
"min_proteins": n["min_proteins"],
|
| 296 |
+
"percent_carbs": n["percent_carbs"],
|
| 297 |
+
"percent_fats": n["percent_fats"],
|
| 298 |
+
"percent_proteins": n["percent_proteins"],
|
| 299 |
+
"resource_uri": uri("nutritionprofile", NUTRITION_PROFILE_ID),
|
| 300 |
+
"sodium": n["sodium"],
|
| 301 |
+
"title": n["title"],
|
| 302 |
+
"user_id": DEMO_USER_ID,
|
| 303 |
+
"watch_cholesterol": False,
|
| 304 |
+
"watch_sodium": False,
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
def mealtype_object(index: int) -> dict:
|
| 309 |
+
ident = MEALTYPE_BASE_ID + index
|
| 310 |
+
return {
|
| 311 |
+
"breakfast": 1 if index == 0 else 0,
|
| 312 |
+
"complexity": 1,
|
| 313 |
+
"deleted": False,
|
| 314 |
+
"family_scale": 1,
|
| 315 |
+
"filter_recurring_collections": True,
|
| 316 |
+
"id": ident,
|
| 317 |
+
"leave_empty": False,
|
| 318 |
+
"macro_focus": "",
|
| 319 |
+
"max_cooktime": 30,
|
| 320 |
+
"max_preptime": 30,
|
| 321 |
+
"max_totaltime": 30,
|
| 322 |
+
"min_cooktime": 0,
|
| 323 |
+
"min_preptime": 0,
|
| 324 |
+
"num_foods_per_meal": 0,
|
| 325 |
+
"only_use_recurring": False,
|
| 326 |
+
"override_complexity": False,
|
| 327 |
+
"preferred_categories": None,
|
| 328 |
+
"preferred_food_types": 1,
|
| 329 |
+
"recurring_collections": [],
|
| 330 |
+
"recurring_foods": [],
|
| 331 |
+
"resource_uri": uri("mealtype", ident),
|
| 332 |
+
"size_slider": 100,
|
| 333 |
+
"takeout": False,
|
| 334 |
+
"title": MEAL_TITLES[index],
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
|
| 338 |
+
def mealtype_ids() -> list[int]:
|
| 339 |
+
return [MEALTYPE_BASE_ID + i for i in range(len(MEAL_TITLES))]
|
| 340 |
+
|
| 341 |
+
|
| 342 |
+
def _diet(day_index: int, state: dict, *, template: bool = False) -> dict:
|
| 343 |
+
ident = (TEMPLATE_BASE_ID if template else DIET_BASE_ID) + day_index
|
| 344 |
+
meal_base = MEAL_BASE_ID + day_index * 10 + (500000 if template else 0)
|
| 345 |
+
meals = []
|
| 346 |
+
for slot, ident_offset in enumerate(range(len(MEAL_TITLES))):
|
| 347 |
+
meal_id = meal_base + ident_offset
|
| 348 |
+
meals.append({
|
| 349 |
+
"diet_plan": uri("diet", ident),
|
| 350 |
+
"eaten": False,
|
| 351 |
+
# 实测:这个账号的每一餐 foods 都是 []。
|
| 352 |
+
# 没观测过非空元素的形状,就不造一个出来。
|
| 353 |
+
"foods": [],
|
| 354 |
+
"id": meal_id,
|
| 355 |
+
"locked": False,
|
| 356 |
+
"meal_number": slot,
|
| 357 |
+
"meal_type": uri("mealtype", MEALTYPE_BASE_ID + slot),
|
| 358 |
+
"note": None,
|
| 359 |
+
"resource_uri": uri("meal", meal_id),
|
| 360 |
+
"user": uri("user", DEMO_USER_ID),
|
| 361 |
+
"user_chosen": False,
|
| 362 |
+
})
|
| 363 |
+
return {
|
| 364 |
+
"date_added": state["created"],
|
| 365 |
+
"diet_key": str(100 + day_index),
|
| 366 |
+
"id": ident,
|
| 367 |
+
"meals": meals,
|
| 368 |
+
"note": None,
|
| 369 |
+
"num_meals": len(MEAL_TITLES),
|
| 370 |
+
"nutrition_profile": uri("nutritionprofile", NUTRITION_PROFILE_ID),
|
| 371 |
+
"resource_uri": uri("diet", ident),
|
| 372 |
+
"sandbox": False,
|
| 373 |
+
"summary": None,
|
| 374 |
+
"title": "My meal plan",
|
| 375 |
+
"user": uri("user", DEMO_USER_ID),
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
def calendar_page(state: dict, limit: int, offset: int) -> tuple[list[dict], dict]:
|
| 380 |
+
start = _dt.date.fromisoformat(state["calendar_start"])
|
| 381 |
+
rows = []
|
| 382 |
+
for i in range(offset, offset + limit):
|
| 383 |
+
ident = CALENDAR_BASE_ID + i
|
| 384 |
+
rows.append({
|
| 385 |
+
"created": state["created"],
|
| 386 |
+
"currently_generating": False,
|
| 387 |
+
"date": (start + _dt.timedelta(days=i)).isoformat(),
|
| 388 |
+
"diet": _diet(i, state),
|
| 389 |
+
"id": ident,
|
| 390 |
+
"resource_uri": uri("calendar", ident),
|
| 391 |
+
"user": uri("user", DEMO_USER_ID),
|
| 392 |
+
})
|
| 393 |
+
nxt = (f"/api/v1/calendar/?HTTP_BACKEND_VERSION=16&limit={limit}"
|
| 394 |
+
f"&offset={offset + limit}")
|
| 395 |
+
prev = (f"/api/v1/calendar/?HTTP_BACKEND_VERSION=16&limit={limit}"
|
| 396 |
+
f"&offset={max(0, offset - limit)}") if offset else None
|
| 397 |
+
return rows, {"limit": limit, "next": nxt, "offset": offset, "previous": prev}
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
def daily_templates(state: dict) -> list[dict]:
|
| 401 |
+
rows = []
|
| 402 |
+
for weekday in range(7):
|
| 403 |
+
ident = TEMPLATE_BASE_ID + weekday
|
| 404 |
+
rows.append({
|
| 405 |
+
"diet": _diet(weekday, state, template=True),
|
| 406 |
+
"id": ident,
|
| 407 |
+
"resource_uri": uri("dailytemplate", ident),
|
| 408 |
+
"user": uri("user", DEMO_USER_ID),
|
| 409 |
+
"weekday": weekday,
|
| 410 |
+
})
|
| 411 |
+
return rows
|
| 412 |
+
|
| 413 |
+
|
| 414 |
+
def generator_settings(state: dict) -> dict:
|
| 415 |
+
g = state["generator"]
|
| 416 |
+
return {
|
| 417 |
+
"beta_user": g["beta_user"],
|
| 418 |
+
"daily_price_limit": g["daily_price_limit"],
|
| 419 |
+
"enable_weekly_planner": g["enable_weekly_planner"],
|
| 420 |
+
"exclusions": [],
|
| 421 |
+
"generator_focus": g["generator_focus"],
|
| 422 |
+
"id": DEMO_USER_ID,
|
| 423 |
+
"preset_diet": g["preset_diet"],
|
| 424 |
+
"resource_uri": uri("generatorsettings", DEMO_USER_ID),
|
| 425 |
+
"single_template_diet": g["single_template_diet"],
|
| 426 |
+
"use_leftovers": g["use_leftovers"],
|
| 427 |
+
"use_partial_servings": g["use_partial_servings"],
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
|
| 431 |
+
def subscription(state: dict) -> dict:
|
| 432 |
+
"""离线克隆里没有真实交易,所以订阅永远停在免费档。
|
| 433 |
+
|
| 434 |
+
这不是「没实现」,是这条车道的硬约束:支付一律 local-sandbox,
|
| 435 |
+
绝不发生真实扣款。付费页面本身照样克隆,只有交易不做。
|
| 436 |
+
"""
|
| 437 |
+
return {
|
| 438 |
+
"android_subscription_end": None,
|
| 439 |
+
"card_last4": None,
|
| 440 |
+
"client_limit_info": None,
|
| 441 |
+
"created": None,
|
| 442 |
+
"currency": None,
|
| 443 |
+
"current_period_end": None,
|
| 444 |
+
"customer_id": None,
|
| 445 |
+
"description": "",
|
| 446 |
+
"id": DEMO_USER_ID,
|
| 447 |
+
"in_web_premium_free_trial": False,
|
| 448 |
+
"in_web_professional_free_trial": False,
|
| 449 |
+
"ios_subscription_end": None,
|
| 450 |
+
"number_unsubscribes": 0,
|
| 451 |
+
"payments_made": 0,
|
| 452 |
+
"period": "monthly",
|
| 453 |
+
"period_in_months": None,
|
| 454 |
+
"platform": "web",
|
| 455 |
+
"price": "web_monthly_multi_currency",
|
| 456 |
+
"product_id": None,
|
| 457 |
+
"resource_uri": uri("subscription", DEMO_USER_ID),
|
| 458 |
+
"tier": None,
|
| 459 |
+
"tier_type": None,
|
| 460 |
+
"type": "free",
|
| 461 |
+
"unsubscribed": False,
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
|
| 465 |
+
def referral_stats() -> dict:
|
| 466 |
+
return {
|
| 467 |
+
"id": DEMO_USER_ID,
|
| 468 |
+
"link_clicks": 0,
|
| 469 |
+
"months_saved_up": 0,
|
| 470 |
+
"resource_uri": uri("friendreferralstats", DEMO_USER_ID),
|
| 471 |
+
"total_months_earned": 0,
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
|
| 475 |
+
def current_streak() -> dict:
|
| 476 |
+
return {
|
| 477 |
+
"today": CAPTURE_DATE.isoformat(),
|
| 478 |
+
"current_streak": 0,
|
| 479 |
+
"status": "lapsed",
|
| 480 |
+
"recoverable_streak": 0,
|
| 481 |
+
"missing_dates": [],
|
| 482 |
+
"days": [],
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
|
| 486 |
+
def free_trial_availability() -> dict:
|
| 487 |
+
return {
|
| 488 |
+
"premium_free_trial_available": True,
|
| 489 |
+
"professional_free_trial_available": True,
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
|
| 493 |
+
# --------------------------------------------------------------- 订阅报价
|
| 494 |
+
#
|
| 495 |
+
# 三处报价是同一批实测读数,来源是取证时**已经水合完的页面正文**,不是照消费方
|
| 496 |
+
# 代码编的(capture 2026-08-22.eatthismuch-r1):
|
| 497 |
+
#
|
| 498 |
+
# app/pages/app__upgrade.html
|
| 499 |
+
# "Monthly $14.99 USD per month" / "$14.99 charged every month"
|
| 500 |
+
# "Yearly $5.00 USD per month" / "Save 66%" / "$59.99 charged every 12 months"
|
| 501 |
+
# app/pages/app__account__subscription__send-gift.html
|
| 502 |
+
# "One Month $14.99 One Year $59.99 Save 66%"
|
| 503 |
+
# app/pages/app__help__premium-features.html
|
| 504 |
+
# "Get Eat This Much Premium for as low as $5.00 per month!"
|
| 505 |
+
#
|
| 506 |
+
# 币种取自匿名实测的 /api/get-stripe-currency-locale/
|
| 507 |
+
# (recon/api-fetched/api-get-stripe-currency-locale.body.json,allowed 五种、
|
| 508 |
+
# selected "USD" 大写)。大小写不是小事:bundle 里
|
| 509 |
+
# `currencies.selected_symbol === "$"` 成立时会把 `currencies.selected` 原样
|
| 510 |
+
# 打进 <span class="currency-code">,写成小写 "usd" 页面上就真的显示小写。
|
| 511 |
+
#
|
| 512 |
+
# 取证当时没有任何促销在跑:三份存档都没有出现 bundle 里那几句促销文案
|
| 513 |
+
# ("We're having a … sale!" / "for the first month, then …"),所以
|
| 514 |
+
# sale.enabled = False、affiliate_coupon_code = None。
|
| 515 |
+
#
|
| 516 |
+
# discount_prices 与 prices 取同一份值。这不是偷懒:礼品页
|
| 517 |
+
# (nodes/50.C3RjktRu.js)在**无促销**分支里读的正是
|
| 518 |
+
# discount_prices.monthly_price / yearly_price / yearly_percent_savings,
|
| 519 |
+
# 而它渲染出来的就是上面那三个数——也就是说源站在没有折扣时,
|
| 520 |
+
# discount_prices 就等于原价。订阅页(chunks/sat-xcJP.js)反过来只在
|
| 521 |
+
# 无促销分支读 prices,两边合起来正好把两个字典都钉死在同一组实测值上。
|
| 522 |
+
#
|
| 523 |
+
# 支付一律 local-sandbox:intent id 是本地占位串,离线包里不发生任何交易。
|
| 524 |
+
|
| 525 |
+
_MONTHLY_PRICE = "$14.99"
|
| 526 |
+
_YEARLY_PRICE = "$59.99"
|
| 527 |
+
_YEARLY_PRICE_PER_MONTH = "$5.00"
|
| 528 |
+
_YEARLY_PERCENT_SAVINGS = 66
|
| 529 |
+
_CURRENCIES = {
|
| 530 |
+
"allowed": ["USD", "CAD", "AUD", "EUR", "GBP"],
|
| 531 |
+
"selected": "USD",
|
| 532 |
+
"selected_symbol": "$",
|
| 533 |
+
}
|
| 534 |
+
_NO_SALE = {"enabled": False, "percent": 0, "end_string": "", "name": ""}
|
| 535 |
+
|
| 536 |
+
|
| 537 |
+
def _price_block(*, with_sub_ids: bool) -> dict:
|
| 538 |
+
block = {
|
| 539 |
+
"monthly_price": _MONTHLY_PRICE,
|
| 540 |
+
"monthly_price_decimal": 14.99,
|
| 541 |
+
"yearly_price": _YEARLY_PRICE,
|
| 542 |
+
"yearly_price_decimal": 59.99,
|
| 543 |
+
"yearly_price_per_month": _YEARLY_PRICE_PER_MONTH,
|
| 544 |
+
"yearly_percent_savings": _YEARLY_PERCENT_SAVINGS,
|
| 545 |
+
"monthly_payment_intent_id": "offline-sandbox-monthly",
|
| 546 |
+
"yearly_payment_intent_id": "offline-sandbox-yearly",
|
| 547 |
+
# 季度档:取证时没有任何被抓页面渲染出三个月的档位
|
| 548 |
+
# (/app 存档里 "every 3 months" / "Quarterly" 零命中),所以这几格
|
| 549 |
+
# 交 null,不编一个从没被观测过的价位出来。
|
| 550 |
+
"quarterly_price": None,
|
| 551 |
+
"quarterly_price_decimal": None,
|
| 552 |
+
"quarterly_price_per_month": None,
|
| 553 |
+
"quarterly_percent_savings": None,
|
| 554 |
+
"quarterly_payment_intent": None,
|
| 555 |
+
}
|
| 556 |
+
if with_sub_ids:
|
| 557 |
+
block["monthly_sub_id"] = "offline-monthly"
|
| 558 |
+
block["yearly_sub_id"] = "offline-yearly"
|
| 559 |
+
block["quarterly_sub_id"] = None
|
| 560 |
+
return block
|
| 561 |
+
|
| 562 |
+
|
| 563 |
+
def subscription_pricing() -> dict:
|
| 564 |
+
"""``/payments/get-subscription-pricing/``。
|
| 565 |
+
|
| 566 |
+
/app/upgrade 与 /app/help/premium-features 开机就打这一条(两页的取证
|
| 567 |
+
meta 里都记着它,200 application/json)。缺了它,chunks/BwAVaRnq.js 那个
|
| 568 |
+
带缓存的取数器永远不 settle,订阅计划整块渲染不出来,页面也到不了
|
| 569 |
+
networkidle——而验收正是用 page.goto(wait_until="networkidle") 走的。
|
| 570 |
+
"""
|
| 571 |
+
|
| 572 |
+
return {
|
| 573 |
+
"affiliate_coupon_code": None,
|
| 574 |
+
"sale": dict(_NO_SALE),
|
| 575 |
+
"currencies": dict(_CURRENCIES),
|
| 576 |
+
"locale": "en_US",
|
| 577 |
+
"prices": _price_block(with_sub_ids=False),
|
| 578 |
+
"discount_prices": _price_block(with_sub_ids=False),
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
|
| 582 |
+
_PROF_TIERED_PRICING: dict | None = None
|
| 583 |
+
|
| 584 |
+
|
| 585 |
+
def professional_tiered_pricing() -> dict:
|
| 586 |
+
"""``/api/get-professional-tiered-pricing/<currency>/<locale>/``。
|
| 587 |
+
|
| 588 |
+
/professionals 的 load 是两跳,第二跳就是这条(nodes/60.C_fCNDHY.js)::
|
| 589 |
+
|
| 590 |
+
let t = await F(e, `/api/get-stripe-currency-locale/`),
|
| 591 |
+
n = t.locale, r = t.currencies.selected,
|
| 592 |
+
i = `/api/get-professional-tiered-pricing/${r}/${n}/`
|
| 593 |
+
return { pricing: { currency: r, ...await F(e, i) } }
|
| 594 |
+
|
| 595 |
+
此前克隆没实现它,请求掉进 catch_all 拿到一份 HTML 404,取数封装
|
| 596 |
+
(chunks/B2hH328b.js) 对 ``!res.ok`` 直接 throw ServerError,load 整个失败。
|
| 597 |
+
实测(run/tmp/probe_spa_nav3.py,SPA 内导航到 /professionals):
|
| 598 |
+
页面渲染成 **「500 Error / An error has occurred.」**。
|
| 599 |
+
|
| 600 |
+
响应体不是编的,是从**存档渲染**里取回来的原件:源站 SSR 时把每一跳的响应
|
| 601 |
+
原样内联进 ``recon/pages/professionals.html`` 的 SvelteKit data 数组,
|
| 602 |
+
16846 字节,四键信封 + ``data.{tiers,client_limits,professional_sale}``。
|
| 603 |
+
与 ``subscription_pricing()`` 是同一条取证路子,同一条已知差异登记方式。
|
| 604 |
+
|
| 605 |
+
页面读的字段(同文件)只有三个:``pricing.tiers``(6 次)、
|
| 606 |
+
``pricing.client_limits``(6 次)、``pricing.currency``(1 次,来自调用方
|
| 607 |
+
自己那一跳,不由本响应提供)。
|
| 608 |
+
|
| 609 |
+
里头的 ``price_…`` / ``prod_…`` 是 Stripe 的**公开目录标识**,源站自己就把
|
| 610 |
+
它们渲染进页面 HTML;不是密钥。离线包不发生任何真实交易,支付只走
|
| 611 |
+
local-sandbox。
|
| 612 |
+
"""
|
| 613 |
+
|
| 614 |
+
global _PROF_TIERED_PRICING
|
| 615 |
+
if _PROF_TIERED_PRICING is None:
|
| 616 |
+
path = pathlib.Path(__file__).resolve().parent / "content" / "professional-tiered-pricing.json"
|
| 617 |
+
_PROF_TIERED_PRICING = json.loads(path.read_text(encoding="utf-8"))
|
| 618 |
+
return _PROF_TIERED_PRICING
|
| 619 |
+
|
| 620 |
+
|
| 621 |
+
def setup_intent() -> dict:
|
| 622 |
+
"""``/payments/create-setup-intent/``。
|
| 623 |
+
|
| 624 |
+
chunks/qBLqlIPz.js 里 ``z()`` 同时要 ``client_secret``(喂给
|
| 625 |
+
``stripe.elements()``)和 ``setup_intent_id``(挂在返回对象上),两个字段
|
| 626 |
+
缺一个都会在浏览器里炸。/app/upgrade 与 /app/account/subscription/send-gift
|
| 627 |
+
两页的取证 meta 都记了这条请求 200 application/json。
|
| 628 |
+
|
| 629 |
+
这是 local-sandbox 的占位值:串本身写明了 offline-sandbox,既不是真实密钥,
|
| 630 |
+
也不对应任何真实的 SetupIntent,离线包里不会发生任何交易。
|
| 631 |
+
"""
|
| 632 |
+
|
| 633 |
+
return {
|
| 634 |
+
"client_secret": "seti_offline_sandbox_secret_no_transaction",
|
| 635 |
+
"setup_intent_id": "seti_offline_sandbox",
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
|
| 639 |
+
def gift_sub_pricing() -> dict:
|
| 640 |
+
"""``/api/get-gift-sub-pricing/``——礼品订阅报价。
|
| 641 |
+
|
| 642 |
+
与订阅报价同一批实测读数(送礼页存档渲染出来的就是
|
| 643 |
+
"One Month $14.99 / One Year $59.99 / Save 66%")。价格是源站的公开报价,
|
| 644 |
+
不是账号数据;交易在离线包里不发生。
|
| 645 |
+
"""
|
| 646 |
+
|
| 647 |
+
prices = _price_block(with_sub_ids=True)
|
| 648 |
+
return {
|
| 649 |
+
"affiliate_coupon_code": None,
|
| 650 |
+
"discount_prices": dict(prices),
|
| 651 |
+
"prices": dict(prices),
|
| 652 |
+
"currencies": dict(_CURRENCIES),
|
| 653 |
+
"locale": "en_US",
|
| 654 |
+
"sale": dict(_NO_SALE),
|
| 655 |
+
}
|
tasks/eatthismuch/environment/reference/clone/backend/auth_mailer.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Direct loopback SMTP delivery for local authentication challenges."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import os
|
| 6 |
+
import secrets
|
| 7 |
+
import smtplib
|
| 8 |
+
from dataclasses import dataclass
|
| 9 |
+
from email.message import EmailMessage
|
| 10 |
+
|
| 11 |
+
from websitebench.local_clone_auth import LocalAuthStore
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@dataclass(frozen=True)
|
| 15 |
+
class SMTPSettings:
|
| 16 |
+
host: str
|
| 17 |
+
port: int
|
| 18 |
+
sender: str
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class AuthMailer:
|
| 22 |
+
"""Deliver one session-owned authentication challenge to Mailpit."""
|
| 23 |
+
|
| 24 |
+
def __init__(
|
| 25 |
+
self,
|
| 26 |
+
auth: LocalAuthStore,
|
| 27 |
+
*,
|
| 28 |
+
settings: SMTPSettings | None,
|
| 29 |
+
worker_token: str | None,
|
| 30 |
+
) -> None:
|
| 31 |
+
self.auth = auth
|
| 32 |
+
self.settings = settings
|
| 33 |
+
self._worker_token = worker_token
|
| 34 |
+
|
| 35 |
+
@property
|
| 36 |
+
def enabled(self) -> bool:
|
| 37 |
+
return self.settings is not None
|
| 38 |
+
|
| 39 |
+
def deliver(self, session_token: str, *, purpose: str) -> bool:
|
| 40 |
+
if self.settings is None or self._worker_token is None:
|
| 41 |
+
return False
|
| 42 |
+
claim = self.auth.claim_pending_mail_for_session(
|
| 43 |
+
session_token,
|
| 44 |
+
purpose=purpose,
|
| 45 |
+
worker_token=self._worker_token,
|
| 46 |
+
)
|
| 47 |
+
if claim is None:
|
| 48 |
+
return False
|
| 49 |
+
|
| 50 |
+
code = str(claim["verification_code"])
|
| 51 |
+
subject = (
|
| 52 |
+
"Verify your Eat This Much account"
|
| 53 |
+
if purpose == "registration"
|
| 54 |
+
else "Reset your Eat This Much password"
|
| 55 |
+
)
|
| 56 |
+
lead = (
|
| 57 |
+
"Finish creating your Eat This Much account."
|
| 58 |
+
if purpose == "registration"
|
| 59 |
+
else "A password reset was requested for Eat This Much."
|
| 60 |
+
)
|
| 61 |
+
message = EmailMessage()
|
| 62 |
+
message["From"] = self.settings.sender
|
| 63 |
+
message["To"] = str(claim["recipient"])
|
| 64 |
+
message["Subject"] = subject
|
| 65 |
+
message.set_content(
|
| 66 |
+
f"{lead}\n\nYour verification code is {code}.\n"
|
| 67 |
+
"This code expires in 10 minutes.\n\n"
|
| 68 |
+
"If you did not request this message, you can ignore it."
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
mail_id = int(claim["mail_id"])
|
| 72 |
+
claim_token = str(claim["claim_token"])
|
| 73 |
+
self.auth.reserve_mail_target_request(
|
| 74 |
+
mail_id,
|
| 75 |
+
claim_token,
|
| 76 |
+
worker_token=self._worker_token,
|
| 77 |
+
)
|
| 78 |
+
try:
|
| 79 |
+
with smtplib.SMTP(
|
| 80 |
+
self.settings.host,
|
| 81 |
+
self.settings.port,
|
| 82 |
+
timeout=10,
|
| 83 |
+
) as smtp:
|
| 84 |
+
refused = smtp.send_message(message)
|
| 85 |
+
if refused:
|
| 86 |
+
raise smtplib.SMTPRecipientsRefused(refused)
|
| 87 |
+
except Exception:
|
| 88 |
+
self.auth.finish_mail_claim(
|
| 89 |
+
mail_id,
|
| 90 |
+
claim_token,
|
| 91 |
+
sent=False,
|
| 92 |
+
target_request_count=1,
|
| 93 |
+
accepted_request_count=0,
|
| 94 |
+
error="network",
|
| 95 |
+
worker_token=self._worker_token,
|
| 96 |
+
)
|
| 97 |
+
return False
|
| 98 |
+
|
| 99 |
+
self.auth.finish_mail_claim(
|
| 100 |
+
mail_id,
|
| 101 |
+
claim_token,
|
| 102 |
+
sent=True,
|
| 103 |
+
target_request_count=1,
|
| 104 |
+
accepted_request_count=1,
|
| 105 |
+
worker_token=self._worker_token,
|
| 106 |
+
)
|
| 107 |
+
return True
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def smtp_configuration() -> tuple[SMTPSettings | None, str | None]:
|
| 111 |
+
host = os.environ.get("WEBSITEBENCH_SMTP_HOST")
|
| 112 |
+
port = os.environ.get("WEBSITEBENCH_SMTP_PORT")
|
| 113 |
+
sender = os.environ.get("WEBSITEBENCH_SMTP_FROM")
|
| 114 |
+
if not (host and port and sender):
|
| 115 |
+
return None, None
|
| 116 |
+
try:
|
| 117 |
+
parsed_port = int(port)
|
| 118 |
+
except ValueError as exc:
|
| 119 |
+
raise ValueError("WEBSITEBENCH_SMTP_PORT must be an integer") from exc
|
| 120 |
+
if not 1 <= parsed_port <= 65535:
|
| 121 |
+
raise ValueError("WEBSITEBENCH_SMTP_PORT must be between 1 and 65535")
|
| 122 |
+
return SMTPSettings(host=host, port=parsed_port, sender=sender), secrets.token_urlsafe(32)
|
tasks/eatthismuch/environment/reference/clone/backend/content_store.py
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""交付目录里的内容索引:路由 → 存档文档、食物记录、浏览分面。
|
| 2 |
+
|
| 3 |
+
索引由 ``tools/build_clone.py`` 从取证物生成,运行时只读。所有大块内容(食物
|
| 4 |
+
JSON、页面文档)都留在磁盘上按需读,进程常驻的只有索引本身。
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import json
|
| 10 |
+
import re
|
| 11 |
+
import pathlib
|
| 12 |
+
import sys
|
| 13 |
+
import threading
|
| 14 |
+
from typing import Any, Iterable
|
| 15 |
+
|
| 16 |
+
CLONE_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
| 17 |
+
if str(CLONE_ROOT) not in sys.path:
|
| 18 |
+
sys.path.insert(0, str(CLONE_ROOT))
|
| 19 |
+
|
| 20 |
+
import sitepack # noqa: E402
|
| 21 |
+
|
| 22 |
+
CONTENT = CLONE_ROOT / "backend" / "content"
|
| 23 |
+
PAGES = CLONE_ROOT / "frontend" / "pages"
|
| 24 |
+
INDEX_PATH = CONTENT / "index.json"
|
| 25 |
+
# 打包过的食物档案从 blob 里按同名读;没打包就还是读盘。见 sitepack.py。
|
| 26 |
+
FOOD_PACK = sitepack.SitePack.load(CLONE_ROOT / "_sitepack" / "food.packindex.json")
|
| 27 |
+
|
| 28 |
+
_lock = threading.Lock()
|
| 29 |
+
_index: dict[str, Any] | None = None
|
| 30 |
+
_food_cache: dict[str, dict[str, Any]] = {}
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def _empty_index() -> dict[str, Any]:
|
| 34 |
+
return {
|
| 35 |
+
"capture_id": None,
|
| 36 |
+
"page_size": 20,
|
| 37 |
+
"pages": {},
|
| 38 |
+
"aliases": {},
|
| 39 |
+
"redirects": {},
|
| 40 |
+
"external_hosts": [],
|
| 41 |
+
"foods": {},
|
| 42 |
+
"browse": {"facets": [], "order": {}},
|
| 43 |
+
"blog": {"pages": {}, "categories": {}},
|
| 44 |
+
"shells": {},
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
def index() -> dict[str, Any]:
|
| 49 |
+
global _index
|
| 50 |
+
if _index is None:
|
| 51 |
+
with _lock:
|
| 52 |
+
if _index is None:
|
| 53 |
+
if INDEX_PATH.exists():
|
| 54 |
+
data = json.loads(INDEX_PATH.read_text(encoding="utf-8"))
|
| 55 |
+
base = _empty_index()
|
| 56 |
+
base.update(data)
|
| 57 |
+
_index = base
|
| 58 |
+
else:
|
| 59 |
+
_index = _empty_index()
|
| 60 |
+
return _index
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def normalize(path: str) -> str:
|
| 64 |
+
"""源站把 ``/about/`` 和 ``/about`` 当同一个页面,克隆照做(根路径除外)。"""
|
| 65 |
+
|
| 66 |
+
if not path.startswith("/"):
|
| 67 |
+
path = "/" + path
|
| 68 |
+
if len(path) > 1 and path.endswith("/"):
|
| 69 |
+
path = path.rstrip("/") or "/"
|
| 70 |
+
return path
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
def page_record(path: str) -> dict[str, Any] | None:
|
| 74 |
+
return index()["pages"].get(normalize(path))
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def page_bytes(record: dict[str, Any]) -> bytes:
|
| 78 |
+
return (PAGES / record["file"]).read_bytes()
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
def alias_target(path: str) -> str | None:
|
| 82 |
+
return index()["aliases"].get(normalize(path))
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
def redirect_for(path: str) -> dict[str, Any] | None:
|
| 86 |
+
return index()["redirects"].get(normalize(path))
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
def shell(name: str) -> bytes | None:
|
| 90 |
+
fname = index()["shells"].get(name)
|
| 91 |
+
if not fname:
|
| 92 |
+
return None
|
| 93 |
+
candidate = PAGES / fname
|
| 94 |
+
return candidate.read_bytes() if candidate.exists() else None
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def external_hosts() -> list[str]:
|
| 98 |
+
return list(index()["external_hosts"])
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
# ---------------------------------------------------------------- foods
|
| 102 |
+
|
| 103 |
+
_calories_by_id: dict[str, str] | None = None
|
| 104 |
+
_CALORIES_ID = re.compile(r"^/calories/(?:.*-)?(?P<id>\d+)$")
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
def calories_path_by_id(food_id: str | int) -> str | None:
|
| 108 |
+
"""按食物 id 找到已存档的 ``/calories/…`` 页面地址。
|
| 109 |
+
|
| 110 |
+
存在的理由:数字是权威的、slug 是装饰性的,而 ``/calories/33511``
|
| 111 |
+
这种只给 id 的写法源站也答 200。用页面索引来解析,比依赖
|
| 112 |
+
``/api/v1/food/`` 那份数据更早可用、也更直接——页面本来就在手上。
|
| 113 |
+
"""
|
| 114 |
+
|
| 115 |
+
global _calories_by_id
|
| 116 |
+
if _calories_by_id is None:
|
| 117 |
+
table: dict[str, str] = {}
|
| 118 |
+
for route in index()["pages"]:
|
| 119 |
+
match = _CALORIES_ID.match(route)
|
| 120 |
+
if match:
|
| 121 |
+
table.setdefault(match.group("id"), route)
|
| 122 |
+
_calories_by_id = table
|
| 123 |
+
return _calories_by_id.get(str(food_id))
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
def food_summary(food_id: str | int) -> dict[str, Any] | None:
|
| 127 |
+
return index()["foods"].get(str(food_id))
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
def food_detail(food_id: str | int) -> dict[str, Any] | None:
|
| 131 |
+
"""完整的 ``/api/v1/food/<id>/`` 响应体,来自源站实测,不是编的。"""
|
| 132 |
+
|
| 133 |
+
key = str(food_id)
|
| 134 |
+
cached = _food_cache.get(key)
|
| 135 |
+
if cached is not None:
|
| 136 |
+
return cached
|
| 137 |
+
name = f"{key}.json"
|
| 138 |
+
raw = sitepack.packed_bytes(FOOD_PACK, name)
|
| 139 |
+
if raw is None:
|
| 140 |
+
path = CONTENT / "food" / name
|
| 141 |
+
if not path.exists():
|
| 142 |
+
return None
|
| 143 |
+
raw = path.read_bytes()
|
| 144 |
+
data = json.loads(raw.decode("utf-8"))
|
| 145 |
+
with _lock:
|
| 146 |
+
if len(_food_cache) > 512:
|
| 147 |
+
_food_cache.clear()
|
| 148 |
+
_food_cache[key] = data
|
| 149 |
+
return data
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
def food_by_slug(slug: str) -> dict[str, Any] | None:
|
| 153 |
+
return index().get("food_slugs", {}).get(slug)
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
# ---------------------------------------------------------------- browse
|
| 157 |
+
|
| 158 |
+
def page_size() -> int:
|
| 159 |
+
return int(index()["page_size"])
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
def facets() -> list[dict[str, Any]]:
|
| 163 |
+
return list(index()["browse"]["facets"])
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def facet_ids() -> set[str]:
|
| 167 |
+
return {f["id"] for f in index()["browse"]["facets"]}
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
def browse_order(facet_id: str) -> list[str]:
|
| 171 |
+
order = index()["browse"]["order"]
|
| 172 |
+
return order.get(facet_id) or order.get("default", [])
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def browse_slice(facet_id: str, page: int) -> tuple[list[dict[str, Any]], int]:
|
| 176 |
+
ids = browse_order(facet_id)
|
| 177 |
+
size = page_size()
|
| 178 |
+
total = len(ids)
|
| 179 |
+
start = max(page - 1, 0) * size
|
| 180 |
+
window = ids[start : start + size]
|
| 181 |
+
rows = [index()["foods"].get(str(i)) for i in window]
|
| 182 |
+
return [r for r in rows if r], total
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
def iter_food_ids() -> Iterable[str]:
|
| 186 |
+
return index()["foods"].keys()
|
tasks/eatthismuch/environment/reference/clone/backend/g_api.py
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""``/g/*`` —— /app 那个 SPA 真正吃的那一层接口。
|
| 2 |
+
|
| 3 |
+
为什么单独一层:``/api/v1/*`` 是 Django-Tastypie 的资源层(对象按 id 取),
|
| 4 |
+
``/g/*`` 是站点自己写的动作层(搜索、生成、清单)。bundle 里两层都用,
|
| 5 |
+
少哪一层规划器都跑不起来——``/food/browse`` 就是死在缺 ``/g/food-search/``
|
| 6 |
+
上:那次 fetch 永远不 settle,页面到不了 networkidle,而验收用的正是
|
| 7 |
+
``page.goto(wait_until="networkidle")``。
|
| 8 |
+
|
| 9 |
+
形状全部实测,来源三处,都留了证物:
|
| 10 |
+
|
| 11 |
+
1. **匿名 GET**(recon/g-api/probe.json)——``/g/check-status/`` 答裸对象
|
| 12 |
+
``{"status":"ok"}``;``/g/food-search/`` 答统一信封;账号面的端点答
|
| 13 |
+
**401 且响应体是一个裸 JSON 字符串** ``"not logged in"``,不是空体、
|
| 14 |
+
也不是带 errors 的信封。
|
| 15 |
+
2. **带会话 GET**(recon/g-api/auth/probe.json)——``/g/meal-categories/``
|
| 16 |
+
82 条全局分类(核过,不含账号标识)、``/g/exclusions-stats/`` 的 ``data``
|
| 17 |
+
是个裸数字 100、``/g/customfoods/`` 等一律 ``data: []``。
|
| 18 |
+
3. **bundle 自己的调用点**(source-assets/…/nodes/52.D_p2WSUh.js、chunks/Cer-cfCG.js)
|
| 19 |
+
——参数名是 ``exclude_user_foods / filters / limit / order_by / page / q``,
|
| 20 |
+
``order_by`` 要写成 ``serving_<营养素>``;返回值它只读
|
| 21 |
+
``data.object_resource_uris`` 再逐个去取 ``/api/v1/food/<id>/``。
|
| 22 |
+
``/g/generate/day/`` 它读的是 ``data.results[0].meals[].foods[].food``。
|
| 23 |
+
|
| 24 |
+
未路由的 ``/g/…`` 源站答的是 **404 + text/plain** ``404 page not found``
|
| 25 |
+
(实测 ``/g/generate/day/`` 的 GET)。克隆照抄——不能让它掉进 catch_all 拿一份
|
| 26 |
+
235KB 的 HTML 404,那玩意儿在 fetch 里既慢又会把 JSON 解析打挂。
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
from __future__ import annotations
|
| 30 |
+
|
| 31 |
+
import json
|
| 32 |
+
import math
|
| 33 |
+
from typing import Any
|
| 34 |
+
|
| 35 |
+
from . import app_api
|
| 36 |
+
from . import content_store as store
|
| 37 |
+
|
| 38 |
+
# 未登录时的响应体:裸 JSON 字符串,不是信封。实测值。
|
| 39 |
+
NOT_LOGGED_IN = "not logged in"
|
| 40 |
+
|
| 41 |
+
# bundle 把 order_by 写成 serving_<营养素>;索引里的分面 id 是不带前缀的
|
| 42 |
+
_SERVING = "serving_"
|
| 43 |
+
|
| 44 |
+
# filters 取值 → 克隆索引里的 kind。源站分四类,克隆抓到的 2129 份里
|
| 45 |
+
# 2128 份是 recipe,所以别的类目在离线档里必然是空的(写进台账)。
|
| 46 |
+
FILTER_KINDS = {
|
| 47 |
+
"recipes": "recipe",
|
| 48 |
+
"basic_foods": "food",
|
| 49 |
+
"branded_foods": "branded",
|
| 50 |
+
"restaurant_foods": "restaurant",
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def envelope(data: Any, *, meta: dict | None = None, success: bool = True,
|
| 55 |
+
errors: Any = None) -> dict:
|
| 56 |
+
"""``/g/*`` 的信封和 ``/api/v1/*`` 同形,但 ``errors`` 实测是 ``{}`` 不是 null。"""
|
| 57 |
+
|
| 58 |
+
return {
|
| 59 |
+
"data": data,
|
| 60 |
+
"warnings": {},
|
| 61 |
+
"meta": meta if meta is not None else {},
|
| 62 |
+
"success": success,
|
| 63 |
+
"errors": errors if errors is not None else {},
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
def food_object(food_id: str, *, meal_id: int = 0, user_id: int = 0,
|
| 68 |
+
amount: float = 1, scaled_amount: float = 1.0) -> dict:
|
| 69 |
+
"""一条「餐里的食物」。字段名来自 ``/g/search-with-suggestions/`` 的实测行。"""
|
| 70 |
+
|
| 71 |
+
return {
|
| 72 |
+
"user_id": user_id,
|
| 73 |
+
"meal_id": meal_id,
|
| 74 |
+
"food_id": int(food_id),
|
| 75 |
+
"amount": amount,
|
| 76 |
+
"units": 1,
|
| 77 |
+
"locked": False,
|
| 78 |
+
"is_leftovers": False,
|
| 79 |
+
"has_leftovers": False,
|
| 80 |
+
"user_chosen": False,
|
| 81 |
+
"eaten": False,
|
| 82 |
+
"removed_from_pantry": False,
|
| 83 |
+
"scaled_amount": scaled_amount,
|
| 84 |
+
"date_added": None,
|
| 85 |
+
"makes_leftovers_for": [],
|
| 86 |
+
"leftovers_from": None,
|
| 87 |
+
"uses_leftovers_from": None,
|
| 88 |
+
"food": f"/api/v1/food/{food_id}/",
|
| 89 |
+
"missing_resource_uris": [],
|
| 90 |
+
"total_ingredients": 1,
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
# ---------------------------------------------------------------- 搜索
|
| 95 |
+
|
| 96 |
+
def _order_ids(order_by: str | None) -> tuple[list[str], str]:
|
| 97 |
+
"""把 bundle 的 ``order_by`` 翻回索引里的分面 id,并取出该分面的顺序。"""
|
| 98 |
+
|
| 99 |
+
if not order_by:
|
| 100 |
+
return store.browse_order("default"), "default"
|
| 101 |
+
raw = order_by.strip()
|
| 102 |
+
sign = ""
|
| 103 |
+
if raw.startswith("-"):
|
| 104 |
+
sign, raw = "-", raw[1:]
|
| 105 |
+
if raw.startswith(_SERVING):
|
| 106 |
+
raw = raw[len(_SERVING):]
|
| 107 |
+
facet = f"{sign}{raw}"
|
| 108 |
+
ids = store.browse_order(facet)
|
| 109 |
+
if ids:
|
| 110 |
+
return ids, facet
|
| 111 |
+
return store.browse_order("default"), "default"
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
def _matches(summary: dict, needle: str, kinds: set[str]) -> bool:
|
| 115 |
+
if kinds and summary.get("kind") not in kinds:
|
| 116 |
+
return False
|
| 117 |
+
if not needle:
|
| 118 |
+
return True
|
| 119 |
+
name = (summary.get("name") or "").lower()
|
| 120 |
+
return needle in name
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
def food_search(params) -> dict:
|
| 124 |
+
"""``GET /g/food-search/``。
|
| 125 |
+
|
| 126 |
+
``q`` 是真的会过滤的(实测:``q=banana`` 与 ``q=chicken soup`` 返回两组
|
| 127 |
+
完全不同的 id)。早先用 ``search=`` 试过一轮没反应——那是参数名不对,
|
| 128 |
+
不是端点不认;bundle 里写的就是 ``q``。
|
| 129 |
+
"""
|
| 130 |
+
|
| 131 |
+
try:
|
| 132 |
+
limit = int(params.get("limit") or 20)
|
| 133 |
+
except ValueError:
|
| 134 |
+
limit = 20
|
| 135 |
+
limit = max(1, min(limit, 50))
|
| 136 |
+
try:
|
| 137 |
+
page = int(params.get("page") or 1)
|
| 138 |
+
except ValueError:
|
| 139 |
+
page = 1
|
| 140 |
+
page = max(1, page)
|
| 141 |
+
|
| 142 |
+
needle = (params.get("q") or "").strip().lower()
|
| 143 |
+
kinds: set[str] = set()
|
| 144 |
+
raw_filters = params.get("filters")
|
| 145 |
+
if raw_filters:
|
| 146 |
+
try:
|
| 147 |
+
wanted = json.loads(raw_filters)
|
| 148 |
+
except (ValueError, TypeError):
|
| 149 |
+
wanted = []
|
| 150 |
+
if isinstance(wanted, str):
|
| 151 |
+
wanted = [wanted]
|
| 152 |
+
for item in wanted or []:
|
| 153 |
+
kind = FILTER_KINDS.get(str(item))
|
| 154 |
+
if kind:
|
| 155 |
+
kinds.add(kind)
|
| 156 |
+
|
| 157 |
+
ids, _facet = _order_ids(params.get("order_by"))
|
| 158 |
+
foods = store.index()["foods"]
|
| 159 |
+
if needle or kinds:
|
| 160 |
+
# 过滤时要在**全量**上过,不能只在分面那前两页上过,
|
| 161 |
+
# 否则一搜就只剩两三条。分面顺序在前,其余按默认序补。
|
| 162 |
+
seen = set(ids)
|
| 163 |
+
pool = ids + [f for f in store.browse_order("default") if f not in seen]
|
| 164 |
+
rows = [f for f in pool if f in foods and _matches(foods[f], needle, kinds)]
|
| 165 |
+
else:
|
| 166 |
+
rows = [f for f in ids if f in foods]
|
| 167 |
+
|
| 168 |
+
total = len(rows)
|
| 169 |
+
offset = (page - 1) * limit
|
| 170 |
+
window = rows[offset:offset + limit]
|
| 171 |
+
return envelope(
|
| 172 |
+
{
|
| 173 |
+
"objects": [],
|
| 174 |
+
"object_resource_uris": [f"/api/v1/food/{f}/" for f in window],
|
| 175 |
+
"pantry_info_map": None,
|
| 176 |
+
},
|
| 177 |
+
meta={
|
| 178 |
+
"limit": limit,
|
| 179 |
+
"offset": offset,
|
| 180 |
+
"total_count": total,
|
| 181 |
+
"total_pages": max(1, math.ceil(total / limit)) if total else 0,
|
| 182 |
+
},
|
| 183 |
+
)
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
def search_with_suggestions(params) -> dict:
|
| 187 |
+
"""``GET /g/search-with-suggestions/``。实测:``data.objects`` 是一个分组数组,
|
| 188 |
+
每组 ``{title, total_count, results:[食物对象]}``。"""
|
| 189 |
+
|
| 190 |
+
body = food_search(params)
|
| 191 |
+
uris = body["data"]["object_resource_uris"]
|
| 192 |
+
meta = body["meta"]
|
| 193 |
+
results = [food_object(u.strip("/").rsplit("/", 1)[-1]) for u in uris]
|
| 194 |
+
return envelope(
|
| 195 |
+
{
|
| 196 |
+
"objects": [
|
| 197 |
+
{
|
| 198 |
+
"title": "results",
|
| 199 |
+
"total_count": meta["total_count"],
|
| 200 |
+
"results": results,
|
| 201 |
+
}
|
| 202 |
+
]
|
| 203 |
+
},
|
| 204 |
+
meta={"limit": meta["limit"], "offset": meta["offset"],
|
| 205 |
+
"total_count": 1 if results else 0, "total_pages": 1 if results else 0},
|
| 206 |
+
)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
# ---------------------------------------------------------------- 账号面
|
| 210 |
+
|
| 211 |
+
def meal_categories() -> Any:
|
| 212 |
+
"""82 条全局分类,取自实测响应体(recon/g-api/auth/meal-categories.body)。
|
| 213 |
+
核过:不含账号邮箱、user_id、mealtype id,任何 7 位以上数字都没有。"""
|
| 214 |
+
|
| 215 |
+
path = store.CONTENT / "g" / "meal-categories.json"
|
| 216 |
+
if not path.exists():
|
| 217 |
+
return []
|
| 218 |
+
body = json.loads(path.read_text(encoding="utf-8"))
|
| 219 |
+
return body.get("data", body) if isinstance(body, dict) else body
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
def owned_groceries_suggestions() -> list[str]:
|
| 223 |
+
ids = store.browse_order("default")[:10]
|
| 224 |
+
return [f"/api/v1/food/{f}/" for f in ids]
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
def leftovers_preview(state: dict) -> list[dict]:
|
| 228 |
+
"""七天 × 每天四餐的剩菜预览。餐型 id 用 demo 账号那套合成 id。"""
|
| 229 |
+
|
| 230 |
+
names = ("Monday", "Tuesday", "Wednesday", "Thursday",
|
| 231 |
+
"Friday", "Saturday", "Sunday")
|
| 232 |
+
rows = []
|
| 233 |
+
for index, name in enumerate(names):
|
| 234 |
+
meals = []
|
| 235 |
+
for meal_id in app_api.mealtype_ids():
|
| 236 |
+
meals.append({
|
| 237 |
+
"meal_type": app_api.uri("mealtype", meal_id),
|
| 238 |
+
"meal_type_id": meal_id,
|
| 239 |
+
"is_parent_leftovers": False,
|
| 240 |
+
"is_child_leftovers": False,
|
| 241 |
+
"leftovers_chain": None,
|
| 242 |
+
"leftovers_chain_instance_index": None,
|
| 243 |
+
"leftovers_chain_instance_uuid": None,
|
| 244 |
+
"is_end_of_leftovers_chain_instance": False,
|
| 245 |
+
})
|
| 246 |
+
rows.append({"weekday_int": index, "weekday": name, "meals": meals})
|
| 247 |
+
return rows
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
# ---------------------------------------------------------------- 生成
|
| 251 |
+
|
| 252 |
+
def _plan_ids(seed: int, count: int) -> list[str]:
|
| 253 |
+
"""从离线档里挑食物。确定性:同一个 seed 永远挑出同一组,
|
| 254 |
+
这样截图和测试都可复现。"""
|
| 255 |
+
|
| 256 |
+
pool = [f for f in store.browse_order("default") if f in store.index()["foods"]]
|
| 257 |
+
if not pool:
|
| 258 |
+
return []
|
| 259 |
+
step = max(1, len(pool) // max(count, 1))
|
| 260 |
+
return [pool[(seed * 7 + i * step) % len(pool)] for i in range(count)]
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
def generate_day(state: dict, date: str, day_index: int) -> dict:
|
| 264 |
+
"""``POST /g/generate/day/``。
|
| 265 |
+
|
| 266 |
+
bundle 只读 ``data.results[0].meals[].foods[].food``(chunks/Cer-cfCG.js)——
|
| 267 |
+
所以返回的是**一份 diet 对象**,和 ``/api/v1/calendar/`` 里那个 ``diet``
|
| 268 |
+
同形,区别只在 ``foods`` 这次不是空的。
|
| 269 |
+
|
| 270 |
+
值得��清楚:``foods`` 的元素形状不是编的,是
|
| 271 |
+
``/g/search-with-suggestions/`` 实测行的 19 个字段原样。源站上跑一次真实
|
| 272 |
+
生成去看它自己的填充结果,那一步被沙箱拦下了,所以这里填的是**离线档里
|
| 273 |
+
的食物 × 实测的字段形状**——形状可信,选品是克隆自己的。写进台账。
|
| 274 |
+
"""
|
| 275 |
+
|
| 276 |
+
diet = app_api._diet(day_index, state)
|
| 277 |
+
for position, meal in enumerate(diet.get("meals", [])):
|
| 278 |
+
picks = _plan_ids(day_index * 4 + position, 2)
|
| 279 |
+
meal["foods"] = [
|
| 280 |
+
food_object(fid, meal_id=meal["id"], user_id=app_api.DEMO_USER_ID,
|
| 281 |
+
scaled_amount=1.0)
|
| 282 |
+
for fid in picks
|
| 283 |
+
]
|
| 284 |
+
diet["date"] = date
|
| 285 |
+
return diet
|
tasks/eatthismuch/environment/reference/clone/backend/macro_calculator.py
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""``/swoleprofile/calculate-macros-from-profile/`` 的离线重建。
|
| 2 |
+
|
| 3 |
+
源站这个接口是 POST,而 ``clone.yaml`` 的 ``capture_policy.safe_methods``
|
| 4 |
+
只有 ``[GET, HEAD]``——抓取阶段从来没、也不允许向它发过请求,所以没有任何
|
| 5 |
+
一条抓下来的响应体可以照抄。重建的每一个常数都必须能指回源站自己发布的
|
| 6 |
+
东西,下面每条规则后面都标了出处。
|
| 7 |
+
|
| 8 |
+
请求形状(源站自己的 bundle,逐字)::
|
| 9 |
+
|
| 10 |
+
chunks/DiPJ6F0p.js
|
| 11 |
+
await G(fetch, `/swoleprofile/calculate-macros-from-profile/`,
|
| 12 |
+
{...y(l), use_weight_goal: y(l).goal !== B[`Maintain weight`]})
|
| 13 |
+
|
| 14 |
+
响应形状(源站自己的渲染器读的字段)::
|
| 15 |
+
|
| 16 |
+
chunks/DT-49r4b.js <li><b>{results.calories}</b> Calories per day</li>
|
| 17 |
+
chunks/Dp7xYmGp.js nutrition[`min_${carbs|fats|proteins}`] -> "At least Xg"
|
| 18 |
+
nutrition[`max_carbs`] -> "At most Xg"(仅 keto)
|
| 19 |
+
chunks/DB26Q5bQ.js days[0].nutrition_profile = {...nutrition_profile, ...results}
|
| 20 |
+
|
| 21 |
+
所以 data 必须正好覆盖 ``chunks/CDYe_Bkv.js`` 里那张每日营养档的键集:
|
| 22 |
+
``calories / min_carbs / max_carbs / min_fats / max_fats / min_proteins / max_proteins``。
|
| 23 |
+
|
| 24 |
+
传输层(``chunks/B2hH328b.js``):带 ``Api-Response-Version`` 头时客户端只取
|
| 25 |
+
``.data``,所以这里走 :func:`app_api.envelope` 的信封形状。
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
from __future__ import annotations
|
| 29 |
+
|
| 30 |
+
from typing import Any
|
| 31 |
+
|
| 32 |
+
# ---- 源站自己的枚举(chunks/CDYe_Bkv.js 逐字) ------------------------------
|
| 33 |
+
UNIT_IMPERIAL = "I"
|
| 34 |
+
UNIT_METRIC = "M"
|
| 35 |
+
|
| 36 |
+
SEX_MALE = "M"
|
| 37 |
+
SEX_FEMALE = "F"
|
| 38 |
+
SEX_NON_BINARY = "O"
|
| 39 |
+
|
| 40 |
+
GOAL_LOSE = "L"
|
| 41 |
+
GOAL_MAINTAIN = "M"
|
| 42 |
+
GOAL_GAIN = "G"
|
| 43 |
+
|
| 44 |
+
# 五档活动系数,/tdee-calculator 页面正文与枚举一致
|
| 45 |
+
ACTIVITY_LEVELS = (1.2, 1.375, 1.55, 1.725, 1.9)
|
| 46 |
+
ACTIVITY_MIN, ACTIVITY_MAX = 1.2, 1.9
|
| 47 |
+
|
| 48 |
+
# bodyfat 三档:Low=10 / Medium=20 / High=30
|
| 49 |
+
BODYFAT_DEFAULT = 20
|
| 50 |
+
|
| 51 |
+
# 每日营养档模板,chunks/CDYe_Bkv.js 里那张表逐字,基准 1800 卡
|
| 52 |
+
DIET_PROFILES: dict[str, dict[str, float]] = {
|
| 53 |
+
"anything": {"calories": 1800, "min_carbs": 90, "max_carbs": 225,
|
| 54 |
+
"min_fats": 40, "max_fats": 100,
|
| 55 |
+
"min_proteins": 90, "max_proteins": 225},
|
| 56 |
+
"atkins / ketogenic": {"calories": 1800, "min_carbs": 0, "max_carbs": 40.5,
|
| 57 |
+
"min_fats": 120, "max_fats": 170,
|
| 58 |
+
"min_proteins": 67.5, "max_proteins": 135},
|
| 59 |
+
"paleo": {"calories": 1800, "min_carbs": 45, "max_carbs": 135,
|
| 60 |
+
"min_fats": 40, "max_fats": 140,
|
| 61 |
+
"min_proteins": 45, "max_proteins": 157.5},
|
| 62 |
+
"mediterranean": {"calories": 1800, "min_carbs": 45, "max_carbs": 180,
|
| 63 |
+
"min_fats": 40, "max_fats": 140,
|
| 64 |
+
"min_proteins": 45, "max_proteins": 180},
|
| 65 |
+
"vegetarian": {"calories": 1800, "min_carbs": 45, "max_carbs": 180,
|
| 66 |
+
"min_fats": 40, "max_fats": 200,
|
| 67 |
+
"min_proteins": 45, "max_proteins": 450},
|
| 68 |
+
"vegan": {"calories": 1800, "min_carbs": 45, "max_carbs": 450,
|
| 69 |
+
"min_fats": 40, "max_fats": 200,
|
| 70 |
+
"min_proteins": 45, "max_proteins": 450},
|
| 71 |
+
}
|
| 72 |
+
TEMPLATE_CALORIES = 1800.0
|
| 73 |
+
|
| 74 |
+
# ---- /tdee-calculator 与 /calculator 页面正文里公布的克数锚点 ----------------
|
| 75 |
+
# "The RDA is 0.36 g/lb (0.8 g/kg)"
|
| 76 |
+
PROTEIN_RDA_PER_KG = 0.8
|
| 77 |
+
# "up to ~0.82 g/lb (1.8 g/kg) is the approximate ceiling for benefits"
|
| 78 |
+
PROTEIN_CEILING_PER_KG = 1.8
|
| 79 |
+
# "During a cut, higher protein intakes (up to ~1.1 g/lb or 2.4 g/kg)"
|
| 80 |
+
PROTEIN_CUT_CEILING_PER_KG = 2.4
|
| 81 |
+
# "We set a somewhat higher floor ...: 0.3 g/lb during a cut, and 0.5 g/lb
|
| 82 |
+
# for maintenance or gaining phases."
|
| 83 |
+
FAT_FLOOR_CUT_PER_LB = 0.3
|
| 84 |
+
FAT_FLOOR_OTHER_PER_LB = 0.5
|
| 85 |
+
|
| 86 |
+
# "A one-pound-per-week setting, for example, starts with an adjustment of
|
| 87 |
+
# about 500 Calories per day."(/calculator 页面正文)
|
| 88 |
+
CALORIES_PER_POUND_PER_WEEK = 500.0
|
| 89 |
+
# 同页把幅度封在 "10–25% below your TDEE" / "10–20% above your TDEE"
|
| 90 |
+
MAX_DEFICIT_FRACTION = 0.25
|
| 91 |
+
MAX_SURPLUS_FRACTION = 0.20
|
| 92 |
+
|
| 93 |
+
# 源站自己的换算常数(chunks/BECdTLx-.js 逐字):
|
| 94 |
+
# var w = .453592; function T(e){return e/w} // kg -> lb
|
| 95 |
+
# let h = 2.54; g(a(_)/h) // cm 输入框存的是英寸
|
| 96 |
+
KG_PER_LB = 0.453592
|
| 97 |
+
CM_PER_INCH = 2.54
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
def _round(value: float, digits: int = 0) -> float:
|
| 101 |
+
"""四舍五入取半进位。
|
| 102 |
+
|
| 103 |
+
源站页面把 1,416.5 写成 "about 1,417 Calories per day at rest",而 Python
|
| 104 |
+
内建 ``round`` 是银行家舍入,会给出 1416,跟页面自己印出来的数字对不上。
|
| 105 |
+
"""
|
| 106 |
+
|
| 107 |
+
from decimal import Decimal, ROUND_HALF_UP
|
| 108 |
+
|
| 109 |
+
quantum = Decimal(1).scaleb(-digits)
|
| 110 |
+
out = Decimal(repr(value)).quantize(quantum, rounding=ROUND_HALF_UP)
|
| 111 |
+
return int(out) if digits == 0 else float(out)
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
def _number(value: Any, default: float) -> float:
|
| 115 |
+
try:
|
| 116 |
+
if value is None or value == "":
|
| 117 |
+
return default
|
| 118 |
+
return float(value)
|
| 119 |
+
except (TypeError, ValueError):
|
| 120 |
+
return default
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
def _to_metric(form: dict) -> tuple[float, float]:
|
| 124 |
+
"""把表单里的体重/身高换成 kg 与 cm。
|
| 125 |
+
|
| 126 |
+
``units`` **不**决定数值的单位,只决定页面上摆哪个输入控件。实测一次
|
| 127 |
+
提交(公制界面下输入 180 cm / 70 kg)发出去的是::
|
| 128 |
+
|
| 129 |
+
{"units": "M", "height": 70.86614173228347, "weight": 154.32370941286442}
|
| 130 |
+
|
| 131 |
+
即 180/2.54 英寸与 70/0.453592 磅。源站的输入控件自己就是这么存的
|
| 132 |
+
(chunks/BECdTLx-.js:cm 输入框 ``g(a(_)/h)``,kg 输入框 ``T(e)=e/w``),
|
| 133 |
+
展示组件再反着换回去(``Math.round(form.height*2.54)`` 显示 cm)。
|
| 134 |
+
所以这里一律按英寸 + 磅解。
|
| 135 |
+
"""
|
| 136 |
+
|
| 137 |
+
weight_lb = _number(form.get("weight"), 0.0)
|
| 138 |
+
height_in = _number(form.get("height"), 0.0)
|
| 139 |
+
return weight_lb * KG_PER_LB, height_in * CM_PER_INCH
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
def basal_metabolic_rate(weight_kg: float, height_cm: float, age: float,
|
| 143 |
+
sex: str) -> float:
|
| 144 |
+
"""Mifflin-St Jeor,/calculator 页面自己写出来的那两行式子。
|
| 145 |
+
|
| 146 |
+
``Male setting: BMR = 10W + 6.25H - 5A + 5``
|
| 147 |
+
``Female setting: BMR = 10W + 6.25H - 5A - 161``
|
| 148 |
+
"For the Non-Binary setting, we average the male and female results."
|
| 149 |
+
"""
|
| 150 |
+
|
| 151 |
+
base = 10.0 * weight_kg + 6.25 * height_cm - 5.0 * age
|
| 152 |
+
sex = (sex or SEX_FEMALE).upper()
|
| 153 |
+
if sex == SEX_MALE:
|
| 154 |
+
return base + 5.0
|
| 155 |
+
if sex == SEX_NON_BINARY:
|
| 156 |
+
return base + (5.0 + -161.0) / 2.0
|
| 157 |
+
return base - 161.0
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
def _activity_fraction(activity_level: float) -> float:
|
| 161 |
+
span = ACTIVITY_MAX - ACTIVITY_MIN
|
| 162 |
+
return min(1.0, max(0.0, (activity_level - ACTIVITY_MIN) / span))
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
def calculate(form: dict) -> dict[str, float]:
|
| 166 |
+
"""按源站自己公布的口径算一份营养档。"""
|
| 167 |
+
|
| 168 |
+
weight_kg, height_cm = _to_metric(form)
|
| 169 |
+
age = _number(form.get("age"), 0.0)
|
| 170 |
+
sex = str(form.get("gender") or SEX_FEMALE).upper()
|
| 171 |
+
activity = _number(form.get("activity_level"), ACTIVITY_MIN)
|
| 172 |
+
goal = str(form.get("goal") or GOAL_MAINTAIN).upper()
|
| 173 |
+
bodyfat = _number(form.get("bodyfat"), BODYFAT_DEFAULT)
|
| 174 |
+
rate = _number(form.get("weight_goal_weekly_rate"), 1.0)
|
| 175 |
+
diet = str(form.get("preset_diet") or "anything").lower()
|
| 176 |
+
|
| 177 |
+
bmr = basal_metabolic_rate(weight_kg, height_cm, age, sex)
|
| 178 |
+
# /bmr-calculator 传 activity_level: 1,就是要拿未乘系数的 BMR 回去
|
| 179 |
+
tdee = bmr * activity
|
| 180 |
+
|
| 181 |
+
use_weight_goal = form.get("use_weight_goal")
|
| 182 |
+
if use_weight_goal is None:
|
| 183 |
+
use_weight_goal = goal != GOAL_MAINTAIN
|
| 184 |
+
|
| 185 |
+
calories = tdee
|
| 186 |
+
if use_weight_goal and goal == GOAL_LOSE:
|
| 187 |
+
adjust = min(CALORIES_PER_POUND_PER_WEEK * abs(rate),
|
| 188 |
+
tdee * MAX_DEFICIT_FRACTION)
|
| 189 |
+
calories = tdee - adjust
|
| 190 |
+
elif use_weight_goal and goal == GOAL_GAIN:
|
| 191 |
+
adjust = min(CALORIES_PER_POUND_PER_WEEK * abs(rate),
|
| 192 |
+
tdee * MAX_SURPLUS_FRACTION)
|
| 193 |
+
calories = tdee + adjust
|
| 194 |
+
|
| 195 |
+
# 蛋白按瘦体重算——"protein scales with your lean mass and goal
|
| 196 |
+
# (that's what the body-fat estimate is for)"
|
| 197 |
+
lean_kg = weight_kg * (1.0 - min(max(bodyfat, 0.0), 90.0) / 100.0)
|
| 198 |
+
fraction = _activity_fraction(activity)
|
| 199 |
+
if goal == GOAL_LOSE:
|
| 200 |
+
per_kg = PROTEIN_CEILING_PER_KG + (
|
| 201 |
+
PROTEIN_CUT_CEILING_PER_KG - PROTEIN_CEILING_PER_KG) * fraction
|
| 202 |
+
else:
|
| 203 |
+
per_kg = PROTEIN_RDA_PER_KG + (
|
| 204 |
+
PROTEIN_CEILING_PER_KG - PROTEIN_RDA_PER_KG) * fraction
|
| 205 |
+
min_proteins = lean_kg * per_kg
|
| 206 |
+
|
| 207 |
+
# 脂肪按体重算,下限是页面写的 0.3 / 0.5 g/lb
|
| 208 |
+
per_lb = FAT_FLOOR_CUT_PER_LB if goal == GOAL_LOSE else FAT_FLOOR_OTHER_PER_LB
|
| 209 |
+
min_fats = _number(form.get("weight"), 0.0) * per_lb
|
| 210 |
+
|
| 211 |
+
template = DIET_PROFILES.get(diet, DIET_PROFILES["anything"])
|
| 212 |
+
scale = calories / TEMPLATE_CALORIES if TEMPLATE_CALORIES else 1.0
|
| 213 |
+
|
| 214 |
+
profile = {
|
| 215 |
+
"calories": _round(calories),
|
| 216 |
+
"min_carbs": _round(template["min_carbs"] * scale, 1),
|
| 217 |
+
"max_carbs": _round(template["max_carbs"] * scale, 1),
|
| 218 |
+
"min_fats": _round(max(min_fats, template["min_fats"] * scale), 1),
|
| 219 |
+
"max_fats": _round(template["max_fats"] * scale, 1),
|
| 220 |
+
"min_proteins": _round(max(min_proteins, template["min_proteins"] * scale), 1),
|
| 221 |
+
"max_proteins": _round(template["max_proteins"] * scale, 1),
|
| 222 |
+
}
|
| 223 |
+
# 上限不能低于下限:keto 的碳水上限是 40.5g,缩放后仍可能压到 min 之下
|
| 224 |
+
for macro in ("carbs", "fats", "proteins"):
|
| 225 |
+
lo, hi = profile[f"min_{macro}"], profile[f"max_{macro}"]
|
| 226 |
+
if hi < lo:
|
| 227 |
+
profile[f"max_{macro}"] = lo
|
| 228 |
+
return profile
|
tasks/eatthismuch/environment/reference/clone/backend/runtime.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"database": {
|
| 3 |
+
"data_dir": "data",
|
| 4 |
+
"engine": "sqlite",
|
| 5 |
+
"filename": "eatthismuch.sqlite3",
|
| 6 |
+
"legacy_unbound_migration": false,
|
| 7 |
+
"migration_hook": null,
|
| 8 |
+
"seed_hook": null
|
| 9 |
+
},
|
| 10 |
+
"deployment": {
|
| 11 |
+
"profiles": {
|
| 12 |
+
"cloudflare-review": {
|
| 13 |
+
"mail_adapter": "redis-resend",
|
| 14 |
+
"payment_adapter": "local-sandbox",
|
| 15 |
+
"persistence": "ephemeral-reset"
|
| 16 |
+
},
|
| 17 |
+
"docker-volume": {
|
| 18 |
+
"mail_adapter": "effects-gateway",
|
| 19 |
+
"payment_adapter": "local-sandbox",
|
| 20 |
+
"persistence": "persistent-volume"
|
| 21 |
+
},
|
| 22 |
+
"offline-harbor": {
|
| 23 |
+
"mail_adapter": "local-outbox",
|
| 24 |
+
"payment_adapter": "local-sandbox",
|
| 25 |
+
"persistence": "persistent"
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"mail": {
|
| 30 |
+
"purposes": {
|
| 31 |
+
"password-reset": {
|
| 32 |
+
"body": "Your password reset code is ${code}.",
|
| 33 |
+
"expiry": "This code expires in ${minutes} minutes.",
|
| 34 |
+
"footer": "Ignore this message if you did not contact Eat This Much.",
|
| 35 |
+
"lead": "A password reset was requested for Eat This Much.",
|
| 36 |
+
"required_variables": [
|
| 37 |
+
"code",
|
| 38 |
+
"minutes"
|
| 39 |
+
],
|
| 40 |
+
"secret_variables": [
|
| 41 |
+
"code"
|
| 42 |
+
],
|
| 43 |
+
"subject": "Reset your Eat This Much password",
|
| 44 |
+
"template_id": "eatthismuch.password-reset.v1"
|
| 45 |
+
},
|
| 46 |
+
"registration": {
|
| 47 |
+
"body": "Your verification code is ${code}.",
|
| 48 |
+
"expiry": "This code expires in ${minutes} minutes.",
|
| 49 |
+
"footer": "This code is only for Eat This Much.",
|
| 50 |
+
"lead": "Finish creating your Eat This Much account.",
|
| 51 |
+
"required_variables": [
|
| 52 |
+
"code",
|
| 53 |
+
"minutes"
|
| 54 |
+
],
|
| 55 |
+
"secret_variables": [
|
| 56 |
+
"code"
|
| 57 |
+
],
|
| 58 |
+
"subject": "Verify your Eat This Much account",
|
| 59 |
+
"template_id": "eatthismuch.registration.v1"
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
"sender": {
|
| 63 |
+
"address_env": "RESEND_FROM_EMAIL",
|
| 64 |
+
"display_name": "Eat This Much"
|
| 65 |
+
}
|
| 66 |
+
},
|
| 67 |
+
"payments": {
|
| 68 |
+
"currency": "USD",
|
| 69 |
+
"default_adapter": "local-sandbox",
|
| 70 |
+
"local_sandbox": {
|
| 71 |
+
"scenarios": [
|
| 72 |
+
{
|
| 73 |
+
"display_label": "Simulated approval",
|
| 74 |
+
"id": "sandbox-approved",
|
| 75 |
+
"outcome": "approved"
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"display_label": "Simulated decline",
|
| 79 |
+
"id": "sandbox-declined",
|
| 80 |
+
"outcome": "declined"
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"display_label": "Simulated retry",
|
| 84 |
+
"id": "sandbox-retry",
|
| 85 |
+
"outcome": "retryable"
|
| 86 |
+
}
|
| 87 |
+
]
|
| 88 |
+
},
|
| 89 |
+
"stripe_test": null
|
| 90 |
+
},
|
| 91 |
+
"schema_version": "websitebench.site-backend-runtime.v1",
|
| 92 |
+
"session": {
|
| 93 |
+
"host_only": true,
|
| 94 |
+
"http_only": true,
|
| 95 |
+
"same_site": "Lax",
|
| 96 |
+
"secure": true
|
| 97 |
+
},
|
| 98 |
+
"site": {
|
| 99 |
+
"id": "eatthismuch",
|
| 100 |
+
"label": "Eat This Much",
|
| 101 |
+
"public_origin": "https://eatthismuch.offline.invalid"
|
| 102 |
+
}
|
| 103 |
+
}
|
tasks/eatthismuch/environment/reference/clone/backend/site_backend_integration.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Generated, site-bound backend integration seam."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import importlib
|
| 6 |
+
import json
|
| 7 |
+
import os
|
| 8 |
+
import sqlite3
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
from typing import Any, Callable
|
| 11 |
+
|
| 12 |
+
from websitebench.local_clone_auth import LocalAuthStore
|
| 13 |
+
from websitebench.site_backend import (
|
| 14 |
+
SiteBackend,
|
| 15 |
+
load_runtime,
|
| 16 |
+
serve_jsonl,
|
| 17 |
+
validate_allowlist,
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
DEFAULT_RUNTIME_PATH = (
|
| 22 |
+
Path(__file__).resolve().parents[2] / "backend" / "runtime.json"
|
| 23 |
+
)
|
| 24 |
+
BRIDGE_DESCRIPTOR_PATH = (
|
| 25 |
+
Path(__file__).resolve().parents[2] / "backend" / "node-bridge.json"
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def _declared_hook(
|
| 30 |
+
declaration: str | None,
|
| 31 |
+
) -> Callable[[sqlite3.Connection], None] | None:
|
| 32 |
+
if declaration is None:
|
| 33 |
+
return None
|
| 34 |
+
module_name, function_name = declaration.split(":", 1)
|
| 35 |
+
module = importlib.import_module(module_name)
|
| 36 |
+
hook: Any = getattr(module, function_name, None)
|
| 37 |
+
if not callable(hook):
|
| 38 |
+
raise RuntimeError(f"declared backend hook is not callable: {declaration}")
|
| 39 |
+
actual = f"{hook.__module__}:{hook.__name__}"
|
| 40 |
+
if actual != declaration:
|
| 41 |
+
raise RuntimeError(
|
| 42 |
+
f"declared backend hook resolved as {actual!r}, expected {declaration!r}"
|
| 43 |
+
)
|
| 44 |
+
return hook
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def open_site_services() -> tuple[SiteBackend, LocalAuthStore]:
|
| 48 |
+
"""Open one bound database; never omit the site id for permanent auth."""
|
| 49 |
+
|
| 50 |
+
runtime_path = Path(
|
| 51 |
+
os.environ.get(
|
| 52 |
+
"WEBSITEBENCH_SITE_BACKEND_RUNTIME",
|
| 53 |
+
str(DEFAULT_RUNTIME_PATH),
|
| 54 |
+
)
|
| 55 |
+
).resolve()
|
| 56 |
+
runtime = load_runtime(runtime_path)
|
| 57 |
+
migration_hook = _declared_hook(runtime.migration_hook)
|
| 58 |
+
seed_hook = _declared_hook(runtime.seed_hook)
|
| 59 |
+
deployed_database = os.environ.get(
|
| 60 |
+
"WEBSITEBENCH_SITE_BACKEND_DATABASE",
|
| 61 |
+
)
|
| 62 |
+
if deployed_database is None:
|
| 63 |
+
backend = SiteBackend.open(
|
| 64 |
+
runtime_path,
|
| 65 |
+
migration_hook=migration_hook,
|
| 66 |
+
seed_hook=seed_hook,
|
| 67 |
+
)
|
| 68 |
+
else:
|
| 69 |
+
database_path = Path(deployed_database).resolve()
|
| 70 |
+
if database_path.name != runtime.database_filename:
|
| 71 |
+
raise RuntimeError(
|
| 72 |
+
"deployed database filename does not match runtime contract"
|
| 73 |
+
)
|
| 74 |
+
backend = SiteBackend.open(
|
| 75 |
+
json.loads(runtime_path.read_text(encoding="utf-8")),
|
| 76 |
+
data_root=database_path.parent,
|
| 77 |
+
migration_hook=migration_hook,
|
| 78 |
+
seed_hook=seed_hook,
|
| 79 |
+
)
|
| 80 |
+
if backend.lifecycle.database_path != database_path:
|
| 81 |
+
raise RuntimeError(
|
| 82 |
+
"deployed database path does not match backend preflight"
|
| 83 |
+
)
|
| 84 |
+
backend.lifecycle.initialize()
|
| 85 |
+
auth = LocalAuthStore(
|
| 86 |
+
backend.lifecycle.database_path,
|
| 87 |
+
site_id=backend.config.site_id,
|
| 88 |
+
)
|
| 89 |
+
auth.ensure_schema()
|
| 90 |
+
return backend, auth
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def run_stdio_bridge() -> None:
|
| 94 |
+
"""Run only operations frozen in this site's descriptor."""
|
| 95 |
+
|
| 96 |
+
backend, auth = open_site_services()
|
| 97 |
+
descriptor = json.loads(BRIDGE_DESCRIPTOR_PATH.read_text(encoding="utf-8"))
|
| 98 |
+
allowed = validate_allowlist(
|
| 99 |
+
descriptor,
|
| 100 |
+
expected_site_id=backend.config.site_id,
|
| 101 |
+
)
|
| 102 |
+
serve_jsonl(backend, auth, allowed, sys.stdin, sys.stdout)
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
if __name__ == "__main__":
|
| 106 |
+
import argparse
|
| 107 |
+
import sys
|
| 108 |
+
|
| 109 |
+
parser = argparse.ArgumentParser(prog="websitebench-node-backend-bridge")
|
| 110 |
+
parser.add_argument("--stdio", action="store_true", required=True)
|
| 111 |
+
parser.parse_args()
|
| 112 |
+
run_stdio_bridge()
|
tasks/eatthismuch/environment/reference/clone/backend/site_services.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""把引擎自带的站点后端与本地账号库接到这个克隆上。
|
| 2 |
+
|
| 3 |
+
为什么不直接用生成的 ``site_backend_integration.open_site_services()``:
|
| 4 |
+
那条缝按 ``WEBSITEBENCH_SITE_BACKEND_DATABASE`` 环境变量决定数据库位置,而
|
| 5 |
+
verify 起候选站时用的是白名单环境(``runtime_isolation.clean_candidate_environment``),
|
| 6 |
+
那个变量不在白名单里,且 ``clone/`` 是只读挂载——按文件路径加载 runtime 会把
|
| 7 |
+
数据库绑到 ``<site.root>/data``,越出 harness 给的可写目录。
|
| 8 |
+
|
| 9 |
+
所以这里走 ``SiteBackend.open`` 支持的 Mapping 分支:契约还是同一份
|
| 10 |
+
``backend/runtime.json``,数据根改成 harness 用 ``WEBSITEBENCH_DATA_DIR`` 指定的
|
| 11 |
+
可写目录。契约内容一个字段都没改,改的只是它落在哪块盘上。
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
from __future__ import annotations
|
| 15 |
+
|
| 16 |
+
import json
|
| 17 |
+
import os
|
| 18 |
+
import pathlib
|
| 19 |
+
import tempfile
|
| 20 |
+
|
| 21 |
+
from websitebench.local_clone_auth import (
|
| 22 |
+
MAIL_LOCAL_ONLY,
|
| 23 |
+
MAIL_SMTP_PENDING,
|
| 24 |
+
LocalAuthStore,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
from .auth_mailer import AuthMailer, smtp_configuration
|
| 28 |
+
from websitebench.site_backend import SiteBackend
|
| 29 |
+
|
| 30 |
+
CLONE_ROOT = pathlib.Path(__file__).resolve().parents[1]
|
| 31 |
+
# 交付目录自带一份 runtime.json,所以把 clone/ 单独 cp -r 出去也能起站;
|
| 32 |
+
# 它与 <site.root>/backend/runtime.json 逐字节相同,有测试盯着。
|
| 33 |
+
RUNTIME_PATH = CLONE_ROOT / "backend" / "runtime.json"
|
| 34 |
+
|
| 35 |
+
# 合成演示账号。源站账号绝不进交付目录——这一对是克隆自己造的。
|
| 36 |
+
DEMO_EMAIL = "demo@eatthismuch.offline.invalid"
|
| 37 |
+
DEMO_DISPLAY_NAME = "Demo Planner"
|
| 38 |
+
DEMO_PASSWORD = "offline-demo-passphrase-9060"
|
| 39 |
+
DEMO_SUBJECT_ID = "demo-planner"
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def data_dir() -> pathlib.Path:
|
| 43 |
+
"""harness 指哪写哪;没人指就用临时目录,绝不写进只读的 clone/。"""
|
| 44 |
+
|
| 45 |
+
for name in ("WEBSITEBENCH_DATA_DIR", "CLAWBENCH_DATA_DIR"):
|
| 46 |
+
value = os.environ.get(name)
|
| 47 |
+
if value:
|
| 48 |
+
root = pathlib.Path(value).absolute()
|
| 49 |
+
break
|
| 50 |
+
else:
|
| 51 |
+
root = pathlib.Path(tempfile.gettempdir()) / "websitebench-eatthismuch"
|
| 52 |
+
root.mkdir(parents=True, exist_ok=True)
|
| 53 |
+
return root
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def open_services() -> tuple[SiteBackend, LocalAuthStore, AuthMailer]:
|
| 57 |
+
runtime = json.loads(RUNTIME_PATH.read_text(encoding="utf-8"))
|
| 58 |
+
backend = SiteBackend.open(runtime, data_root=data_dir())
|
| 59 |
+
backend.lifecycle.initialize()
|
| 60 |
+
smtp, worker_token = smtp_configuration()
|
| 61 |
+
auth = LocalAuthStore(
|
| 62 |
+
backend.lifecycle.database_path,
|
| 63 |
+
site_id=backend.config.site_id,
|
| 64 |
+
mail_mode=MAIL_SMTP_PENDING if smtp else MAIL_LOCAL_ONLY,
|
| 65 |
+
mail_worker_token=worker_token,
|
| 66 |
+
)
|
| 67 |
+
auth.ensure_schema()
|
| 68 |
+
auth.seed_account(
|
| 69 |
+
subject_id=DEMO_SUBJECT_ID,
|
| 70 |
+
email=DEMO_EMAIL,
|
| 71 |
+
display_name=DEMO_DISPLAY_NAME,
|
| 72 |
+
password=DEMO_PASSWORD,
|
| 73 |
+
email_verified=True,
|
| 74 |
+
)
|
| 75 |
+
return backend, auth, AuthMailer(
|
| 76 |
+
auth, settings=smtp, worker_token=worker_token
|
| 77 |
+
)
|
tasks/eatthismuch/environment/reference/clone/pytest.ini
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[pytest]
|
| 2 |
+
testpaths = tests
|
| 3 |
+
addopts = -q --strict-markers
|
| 4 |
+
markers =
|
| 5 |
+
browser: 需要真浏览器跑(Playwright),静态 grep 看不见的东西只有它能看见
|
tasks/eatthismuch/environment/reference/clone/requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastapi==0.115.6
|
| 2 |
+
uvicorn==0.34.0
|
| 3 |
+
httpx==0.28.1
|
| 4 |
+
pytest==8.3.4
|
| 5 |
+
python-multipart==0.0.20
|
tasks/eatthismuch/environment/reference/clone/sitepack.py
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Frozen assets and archived responses, read out of blobs instead of ~12k files.
|
| 2 |
+
|
| 3 |
+
Why this exists
|
| 4 |
+
---------------
|
| 5 |
+
The verifier re-hashes the *entire* compiled build tree on every runtime start
|
| 6 |
+
(``ExecutableRuntime.start()`` calls ``tree_digest`` before every ``Popen``),
|
| 7 |
+
including the start that the ``restart`` action performs in the middle of a
|
| 8 |
+
case. That walk is pure Python, so the four case shards that share one
|
| 9 |
+
verifier process serialise on the GIL: this tree hashes in 2.0 s alone and in
|
| 10 |
+
7.2 s when four shards hash it at once, while four *processes* hash it in ~2 s
|
| 11 |
+
each. The Browser Use adapter gives the restart controller a hard 15 s HTTP
|
| 12 |
+
budget (``urllib.request.urlopen(..., timeout=15)``) where the Playwright
|
| 13 |
+
executor calls the same restart in-process with no cap, so an oversized tree
|
| 14 |
+
surfaces as ``formal executor disagreement: playwright=True browser-use=False``
|
| 15 |
+
on exactly the cases that restart, at random, and more often the larger the
|
| 16 |
+
tree is.
|
| 17 |
+
|
| 18 |
+
This site froze 15,001 files, twenty times the corpus median of 700.
|
| 19 |
+
``compile.sh`` packs the binary assets - images, fonts, icons; never HTML, CSS,
|
| 20 |
+
JS, SVG or video - together with the two archived-response directories the
|
| 21 |
+
backend reads by name, which leaves ~2.8k files in the compiled tree. Nothing
|
| 22 |
+
else changes: the same bytes are served at the same URL with the same content
|
| 23 |
+
type, read out of the blob with ``os.pread``.
|
| 24 |
+
|
| 25 |
+
When the pack is absent - the tree is being run straight from the repository,
|
| 26 |
+
which is what the reference capture does - every lookup falls through to the
|
| 27 |
+
files themselves, so both layouts serve identical responses.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
from __future__ import annotations
|
| 31 |
+
|
| 32 |
+
import json
|
| 33 |
+
import os
|
| 34 |
+
import threading
|
| 35 |
+
from pathlib import Path
|
| 36 |
+
|
| 37 |
+
SCHEMA = "websitebench.sitepack.v1"
|
| 38 |
+
|
| 39 |
+
#: Where the blobs and their index land, relative to the reference root. It is
|
| 40 |
+
#: deliberately outside every served directory: no route can reach a blob.
|
| 41 |
+
OUTPUT = "clone/_sitepack"
|
| 42 |
+
|
| 43 |
+
#: Only opaque binary payloads are packed. Text assets stay on disk so the
|
| 44 |
+
#: repository policy scans over ``clone/**/*.html|.jinja|.jinja2|.js`` keep
|
| 45 |
+
#: seeing exactly the files they see today, and video stays on disk so range
|
| 46 |
+
#: requests keep streaming straight off a real file.
|
| 47 |
+
BINARY_SUFFIXES = frozenset(
|
| 48 |
+
{
|
| 49 |
+
".apng",
|
| 50 |
+
".avif",
|
| 51 |
+
".bmp",
|
| 52 |
+
".eot",
|
| 53 |
+
".gif",
|
| 54 |
+
".ico",
|
| 55 |
+
".jpeg",
|
| 56 |
+
".jpg",
|
| 57 |
+
".otf",
|
| 58 |
+
".pdf",
|
| 59 |
+
".png",
|
| 60 |
+
".tif",
|
| 61 |
+
".tiff",
|
| 62 |
+
".ttf",
|
| 63 |
+
".webp",
|
| 64 |
+
".woff",
|
| 65 |
+
".woff2",
|
| 66 |
+
}
|
| 67 |
+
)
|
| 68 |
+
|
| 69 |
+
#: ``(name, directory relative to the reference root, packed suffixes)``.
|
| 70 |
+
GROUPS: tuple[tuple[str, str, frozenset], ...] = (
|
| 71 |
+
("static", "clone/static", BINARY_SUFFIXES),
|
| 72 |
+
("food", "clone/backend/content/food", frozenset({".json"})),
|
| 73 |
+
("inline-api", "clone/backend/content/inline-api", frozenset({".json"})),
|
| 74 |
+
)
|
| 75 |
+
|
| 76 |
+
#: ``compile.sh`` runs under ``RLIMIT_FSIZE = 256 MiB`` (compiler.MAX_LOG_BYTES),
|
| 77 |
+
#: so the pack is sharded well below that ceiling.
|
| 78 |
+
SHARD_BYTES = 96 * 1024 * 1024
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
class SitePack:
|
| 82 |
+
"""Read-only view over one packed directory."""
|
| 83 |
+
|
| 84 |
+
def __init__(
|
| 85 |
+
self,
|
| 86 |
+
directory: Path,
|
| 87 |
+
shards: tuple[str, ...],
|
| 88 |
+
entries: dict[str, tuple[int, int, int, float]],
|
| 89 |
+
) -> None:
|
| 90 |
+
self._directory = directory
|
| 91 |
+
self._shards = shards
|
| 92 |
+
self._entries = entries
|
| 93 |
+
self._handles: dict[int, int] = {}
|
| 94 |
+
self._lock = threading.Lock()
|
| 95 |
+
|
| 96 |
+
@classmethod
|
| 97 |
+
def load(cls, index_path: Path | str) -> "SitePack | None":
|
| 98 |
+
index_path = Path(index_path)
|
| 99 |
+
if not index_path.is_file():
|
| 100 |
+
return None
|
| 101 |
+
document = json.loads(index_path.read_text(encoding="utf-8"))
|
| 102 |
+
if document.get("schema") != SCHEMA:
|
| 103 |
+
raise RuntimeError(f"unknown site pack schema: {index_path}")
|
| 104 |
+
entries = {
|
| 105 |
+
str(key): (int(value[0]), int(value[1]), int(value[2]), float(value[3]))
|
| 106 |
+
for key, value in document["entries"].items()
|
| 107 |
+
}
|
| 108 |
+
return cls(index_path.parent, tuple(document["shards"]), entries)
|
| 109 |
+
|
| 110 |
+
def entry(self, relative: str) -> tuple[int, int, int, float] | None:
|
| 111 |
+
return self._entries.get(str(relative).replace(os.sep, "/"))
|
| 112 |
+
|
| 113 |
+
def blob_path(self, entry: tuple[int, int, int, float]) -> Path:
|
| 114 |
+
"""The shard file an entry lives in; only used as a diagnostic path."""
|
| 115 |
+
|
| 116 |
+
return self._directory / self._shards[entry[0]]
|
| 117 |
+
|
| 118 |
+
def read(self, entry: tuple[int, int, int, float]) -> bytes:
|
| 119 |
+
shard, offset, size, _mtime = entry
|
| 120 |
+
handle = self._handles.get(shard)
|
| 121 |
+
if handle is None:
|
| 122 |
+
with self._lock:
|
| 123 |
+
handle = self._handles.get(shard)
|
| 124 |
+
if handle is None:
|
| 125 |
+
handle = os.open(
|
| 126 |
+
str(self._directory / self._shards[shard]), os.O_RDONLY
|
| 127 |
+
)
|
| 128 |
+
self._handles[shard] = handle
|
| 129 |
+
chunks: list[bytes] = []
|
| 130 |
+
read = 0
|
| 131 |
+
while read < size:
|
| 132 |
+
chunk = os.pread(handle, size - read, offset + read)
|
| 133 |
+
if not chunk:
|
| 134 |
+
raise OSError(f"site pack blob is truncated: {self._shards[shard]}")
|
| 135 |
+
chunks.append(chunk)
|
| 136 |
+
read += len(chunk)
|
| 137 |
+
return b"".join(chunks)
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
#: Built on first use: ``starlette`` is only importable once the vendored tree
|
| 141 |
+
#: is on the path, which is not the case while ``--pack`` runs from compile.sh.
|
| 142 |
+
_PACKED_RESPONSE: type | None = None
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
def _packed_response_class() -> type:
|
| 146 |
+
global _PACKED_RESPONSE
|
| 147 |
+
if _PACKED_RESPONSE is not None:
|
| 148 |
+
return _PACKED_RESPONSE
|
| 149 |
+
|
| 150 |
+
from secrets import token_hex
|
| 151 |
+
|
| 152 |
+
from starlette.datastructures import MutableHeaders
|
| 153 |
+
from starlette.responses import FileResponse
|
| 154 |
+
|
| 155 |
+
# The subclass below replaces exactly these three send paths. If a future
|
| 156 |
+
# starlette renamed one, the base class would silently stream the blob from
|
| 157 |
+
# offset zero and serve the wrong bytes, so refuse to build instead.
|
| 158 |
+
missing = [
|
| 159 |
+
name
|
| 160 |
+
for name in ("_handle_simple", "_handle_single_range", "_handle_multiple_ranges")
|
| 161 |
+
if not callable(getattr(FileResponse, name, None))
|
| 162 |
+
]
|
| 163 |
+
if missing:
|
| 164 |
+
raise RuntimeError(f"vendored starlette FileResponse lacks {missing}")
|
| 165 |
+
|
| 166 |
+
class _PackedResponse(FileResponse):
|
| 167 |
+
"""``FileResponse`` whose bytes come out of a blob instead of a path.
|
| 168 |
+
|
| 169 |
+
Only the three byte-sending paths are replaced. Everything that decides
|
| 170 |
+
*what* to send - HEAD, ``If-Range``, a malformed range (400), an
|
| 171 |
+
unsatisfiable one (416), one range (206), several (206 multipart), and
|
| 172 |
+
the stat-derived ``content-length``/``last-modified``/``etag`` - is
|
| 173 |
+
starlette's own code running against the size and mtime the file had, so
|
| 174 |
+
a packed entry answers exactly as the file did.
|
| 175 |
+
"""
|
| 176 |
+
|
| 177 |
+
def __init__(self, payload: bytes, **kwargs) -> None:
|
| 178 |
+
self._payload = payload
|
| 179 |
+
super().__init__(**kwargs)
|
| 180 |
+
|
| 181 |
+
async def _handle_simple(self, send, send_header_only, send_pathsend) -> None:
|
| 182 |
+
await send(
|
| 183 |
+
{
|
| 184 |
+
"type": "http.response.start",
|
| 185 |
+
"status": self.status_code,
|
| 186 |
+
"headers": self.raw_headers,
|
| 187 |
+
}
|
| 188 |
+
)
|
| 189 |
+
await send(
|
| 190 |
+
{
|
| 191 |
+
"type": "http.response.body",
|
| 192 |
+
"body": b"" if send_header_only else self._payload,
|
| 193 |
+
"more_body": False,
|
| 194 |
+
}
|
| 195 |
+
)
|
| 196 |
+
|
| 197 |
+
async def _handle_single_range(
|
| 198 |
+
self, send, start: int, end: int, file_size: int, send_header_only: bool
|
| 199 |
+
) -> None:
|
| 200 |
+
headers = MutableHeaders(raw=list(self.raw_headers))
|
| 201 |
+
headers["content-range"] = f"bytes {start}-{end - 1}/{file_size}"
|
| 202 |
+
headers["content-length"] = str(end - start)
|
| 203 |
+
await send(
|
| 204 |
+
{"type": "http.response.start", "status": 206, "headers": headers.raw}
|
| 205 |
+
)
|
| 206 |
+
await send(
|
| 207 |
+
{
|
| 208 |
+
"type": "http.response.body",
|
| 209 |
+
"body": b"" if send_header_only else self._payload[start:end],
|
| 210 |
+
"more_body": False,
|
| 211 |
+
}
|
| 212 |
+
)
|
| 213 |
+
|
| 214 |
+
async def _handle_multiple_ranges(
|
| 215 |
+
self, send, ranges, file_size: int, send_header_only: bool
|
| 216 |
+
) -> None:
|
| 217 |
+
boundary = token_hex(13)
|
| 218 |
+
content_length, header_generator = self.generate_multipart(
|
| 219 |
+
ranges, boundary, file_size, self.headers["content-type"]
|
| 220 |
+
)
|
| 221 |
+
headers = MutableHeaders(raw=list(self.raw_headers))
|
| 222 |
+
headers["content-type"] = f"multipart/byteranges; boundary={boundary}"
|
| 223 |
+
headers["content-length"] = str(content_length)
|
| 224 |
+
await send(
|
| 225 |
+
{"type": "http.response.start", "status": 206, "headers": headers.raw}
|
| 226 |
+
)
|
| 227 |
+
if send_header_only:
|
| 228 |
+
await send(
|
| 229 |
+
{"type": "http.response.body", "body": b"", "more_body": False}
|
| 230 |
+
)
|
| 231 |
+
return
|
| 232 |
+
for start, end in ranges:
|
| 233 |
+
await send(
|
| 234 |
+
{
|
| 235 |
+
"type": "http.response.body",
|
| 236 |
+
"body": header_generator(start, end),
|
| 237 |
+
"more_body": True,
|
| 238 |
+
}
|
| 239 |
+
)
|
| 240 |
+
await send(
|
| 241 |
+
{
|
| 242 |
+
"type": "http.response.body",
|
| 243 |
+
"body": self._payload[start:end],
|
| 244 |
+
"more_body": True,
|
| 245 |
+
}
|
| 246 |
+
)
|
| 247 |
+
await send(
|
| 248 |
+
{"type": "http.response.body", "body": b"\r\n", "more_body": True}
|
| 249 |
+
)
|
| 250 |
+
await send(
|
| 251 |
+
{
|
| 252 |
+
"type": "http.response.body",
|
| 253 |
+
"body": f"--{boundary}--".encode("latin-1"),
|
| 254 |
+
"more_body": False,
|
| 255 |
+
}
|
| 256 |
+
)
|
| 257 |
+
|
| 258 |
+
_PACKED_RESPONSE = _PackedResponse
|
| 259 |
+
return _PACKED_RESPONSE
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
def _packed_stat(size: int, mtime: float):
|
| 263 |
+
"""An ``os.stat_result`` carrying exactly the size and mtime of the file.
|
| 264 |
+
|
| 265 |
+
``FileResponse`` derives ``content-length``, ``last-modified`` and the
|
| 266 |
+
``etag`` from these two numbers, so handing it the recorded pair reproduces
|
| 267 |
+
the headers the file itself produced, to the sub-second digit.
|
| 268 |
+
"""
|
| 269 |
+
|
| 270 |
+
return os.stat_result(
|
| 271 |
+
(0o100644, 0, 0, 1, 0, 0, size, int(mtime), int(mtime), int(mtime)),
|
| 272 |
+
{"st_atime": mtime, "st_mtime": mtime, "st_ctime": mtime},
|
| 273 |
+
)
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
def packed_response(
|
| 277 |
+
pack: "SitePack",
|
| 278 |
+
relative: str,
|
| 279 |
+
entry: tuple[int, int, int, float],
|
| 280 |
+
*,
|
| 281 |
+
media_type: str | None = None,
|
| 282 |
+
):
|
| 283 |
+
"""Serve one packed entry the way ``FileResponse`` serves the same file."""
|
| 284 |
+
|
| 285 |
+
from mimetypes import guess_type
|
| 286 |
+
|
| 287 |
+
_shard, _offset, size, mtime = entry
|
| 288 |
+
if media_type is None:
|
| 289 |
+
media_type = guess_type(relative)[0] or "application/octet-stream"
|
| 290 |
+
body = pack.read(entry)
|
| 291 |
+
if len(body) != size: # pragma: no cover - defensive
|
| 292 |
+
raise OSError(f"site pack entry has the wrong length: {relative}")
|
| 293 |
+
return _packed_response_class()(
|
| 294 |
+
body,
|
| 295 |
+
path=str(pack.blob_path(entry)),
|
| 296 |
+
media_type=media_type,
|
| 297 |
+
stat_result=_packed_stat(size, mtime),
|
| 298 |
+
)
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
def packed_bytes(pack: "SitePack | None", relative: str) -> bytes | None:
|
| 302 |
+
"""Return one packed entry's bytes, or ``None`` when it is not packed."""
|
| 303 |
+
|
| 304 |
+
if pack is None:
|
| 305 |
+
return None
|
| 306 |
+
entry = pack.entry(relative)
|
| 307 |
+
return None if entry is None else pack.read(entry)
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
def packed_static_files(*, directory, pack: "SitePack | None", **kwargs):
|
| 311 |
+
"""``StaticFiles`` that answers packed entries before it touches the disk.
|
| 312 |
+
|
| 313 |
+
The class is built here rather than at module import so that ``--pack`` can
|
| 314 |
+
run from ``compile.sh``, before the vendored tree is importable.
|
| 315 |
+
"""
|
| 316 |
+
|
| 317 |
+
from starlette.datastructures import Headers
|
| 318 |
+
from starlette.staticfiles import NotModifiedResponse, StaticFiles
|
| 319 |
+
|
| 320 |
+
class _PackedStaticFiles(StaticFiles):
|
| 321 |
+
def __init__(self, *, pack: "SitePack | None", **inner):
|
| 322 |
+
super().__init__(**inner)
|
| 323 |
+
self._pack = pack
|
| 324 |
+
|
| 325 |
+
async def get_response(self, path, scope):
|
| 326 |
+
if self._pack is not None and scope["method"] in ("GET", "HEAD"):
|
| 327 |
+
relative = str(path).replace(os.sep, "/")
|
| 328 |
+
entry = self._pack.entry(relative)
|
| 329 |
+
if entry is not None:
|
| 330 |
+
request_headers = Headers(scope=scope)
|
| 331 |
+
response = packed_response(self._pack, relative, entry)
|
| 332 |
+
if self.is_not_modified(response.headers, request_headers):
|
| 333 |
+
return NotModifiedResponse(response.headers)
|
| 334 |
+
return response
|
| 335 |
+
return await super().get_response(path, scope)
|
| 336 |
+
|
| 337 |
+
return _PackedStaticFiles(directory=directory, pack=pack, **kwargs)
|
| 338 |
+
|
| 339 |
+
|
| 340 |
+
# --------------------------------------------------------------------------
|
| 341 |
+
# Packing. Runs once from ``compile.sh``, never from ``run.sh``.
|
| 342 |
+
# --------------------------------------------------------------------------
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
#: The three byte-identical runtime copies a Harbor bundle checks in. Packing
|
| 346 |
+
#: deletes the files it absorbs, so it must only ever run against a build copy:
|
| 347 |
+
#: the quarantined tree ``compile_candidate`` makes, the reference Docker image,
|
| 348 |
+
#: or a scratch copy. None of those sits under a ``task.toml``.
|
| 349 |
+
BUNDLE_COPIES = (
|
| 350 |
+
"environment/reference",
|
| 351 |
+
"tests/oracle-runtime",
|
| 352 |
+
"solution/site/implementation",
|
| 353 |
+
)
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
def _inside_bundle(root: Path) -> bool:
|
| 357 |
+
"""True when ``root`` is one of the bundle's three checked-in copies."""
|
| 358 |
+
|
| 359 |
+
for parent in list(root.parents)[:4]:
|
| 360 |
+
if not (parent / "task.toml").is_file():
|
| 361 |
+
continue
|
| 362 |
+
return root.relative_to(parent).as_posix() in BUNDLE_COPIES
|
| 363 |
+
return False
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
def pack(root: Path) -> int:
|
| 367 |
+
root = Path(root).resolve()
|
| 368 |
+
if _inside_bundle(root):
|
| 369 |
+
print(f"sitepack: {root} is a bundle checkout; not packing")
|
| 370 |
+
return 0
|
| 371 |
+
output = root / OUTPUT
|
| 372 |
+
output.mkdir(parents=True, exist_ok=True)
|
| 373 |
+
for name, relative, suffixes in GROUPS:
|
| 374 |
+
index_path = output / f"{name}.packindex.json"
|
| 375 |
+
if index_path.is_file():
|
| 376 |
+
print(f"sitepack: {name} is already packed")
|
| 377 |
+
continue
|
| 378 |
+
source = root / relative
|
| 379 |
+
if not source.is_dir():
|
| 380 |
+
print(f"sitepack: {relative} is missing; nothing to pack")
|
| 381 |
+
continue
|
| 382 |
+
files = sorted(
|
| 383 |
+
path
|
| 384 |
+
for path in source.rglob("*")
|
| 385 |
+
if path.is_file() and path.suffix.lower() in suffixes
|
| 386 |
+
)
|
| 387 |
+
shards: list[str] = []
|
| 388 |
+
entries: dict[str, list[object]] = {}
|
| 389 |
+
handle = None
|
| 390 |
+
written = 0
|
| 391 |
+
try:
|
| 392 |
+
for path in files:
|
| 393 |
+
size = path.stat().st_size
|
| 394 |
+
if handle is None or (written and written + size > SHARD_BYTES):
|
| 395 |
+
if handle is not None:
|
| 396 |
+
handle.close()
|
| 397 |
+
shards.append(f"{name}.pack.{len(shards):02d}")
|
| 398 |
+
handle = (output / shards[-1]).open("wb")
|
| 399 |
+
written = 0
|
| 400 |
+
entries[path.relative_to(source).as_posix()] = [
|
| 401 |
+
len(shards) - 1,
|
| 402 |
+
written,
|
| 403 |
+
size,
|
| 404 |
+
path.stat().st_mtime,
|
| 405 |
+
]
|
| 406 |
+
with path.open("rb") as source_handle:
|
| 407 |
+
while chunk := source_handle.read(1024 * 1024):
|
| 408 |
+
handle.write(chunk)
|
| 409 |
+
written += size
|
| 410 |
+
finally:
|
| 411 |
+
if handle is not None:
|
| 412 |
+
handle.close()
|
| 413 |
+
index_path.write_text(
|
| 414 |
+
json.dumps(
|
| 415 |
+
{
|
| 416 |
+
"schema": SCHEMA,
|
| 417 |
+
"root": relative,
|
| 418 |
+
"shards": shards,
|
| 419 |
+
"entries": entries,
|
| 420 |
+
},
|
| 421 |
+
separators=(",", ":"),
|
| 422 |
+
sort_keys=True,
|
| 423 |
+
),
|
| 424 |
+
encoding="utf-8",
|
| 425 |
+
)
|
| 426 |
+
for path in files:
|
| 427 |
+
path.unlink()
|
| 428 |
+
for directory in sorted(
|
| 429 |
+
(path for path in source.rglob("*") if path.is_dir()),
|
| 430 |
+
key=lambda item: len(item.parts),
|
| 431 |
+
reverse=True,
|
| 432 |
+
):
|
| 433 |
+
try:
|
| 434 |
+
directory.rmdir()
|
| 435 |
+
except OSError:
|
| 436 |
+
pass
|
| 437 |
+
print(f"sitepack: packed {len(files)} files into {len(shards)} shard(s)")
|
| 438 |
+
return 0
|
| 439 |
+
|
| 440 |
+
|
| 441 |
+
def main(argv: list[str]) -> int:
|
| 442 |
+
if len(argv) == 2 and argv[0] == "--pack":
|
| 443 |
+
return pack(Path(argv[1]))
|
| 444 |
+
print("usage: sitepack.py --pack <reference-root>")
|
| 445 |
+
return 2
|
| 446 |
+
|
| 447 |
+
|
| 448 |
+
if __name__ == "__main__":
|
| 449 |
+
import sys
|
| 450 |
+
|
| 451 |
+
raise SystemExit(main(sys.argv[1:]))
|
tasks/eatthismuch/environment/reference/clone/static/_app/version.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version": "1786563749985"}
|
tasks/eatthismuch/environment/reference/clone/static/clone/adsbygoogle.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* offline-clone: AdSense 的本地替身。
|
| 2 |
+
不能用 noop.js 顶替:bundle 里的调用点是
|
| 3 |
+
let n=mt(),r=ht(e,async()=>{await n,t||window.adsbygoogle.push({})})
|
| 4 |
+
——`window.adsbygoogle` 没有 `|| []` 兜底,真脚本负责把它定义出来。
|
| 5 |
+
换成空脚本后 t.onload 照常回调,push 却打在 undefined 上,实测每张
|
| 6 |
+
客户端渲染的页面抛两条 "Cannot read properties of undefined (reading 'push')"。
|
| 7 |
+
真脚本加载前 window.adsbygoogle 本来就是个数组(页面先 push 配置、脚本
|
| 8 |
+
加载后再把它换成带渲染逻辑的对象),所以这里保留数组语义即可:
|
| 9 |
+
push 收下参数、不渲染、不外发。 */
|
| 10 |
+
window.adsbygoogle = window.adsbygoogle || [];
|
tasks/eatthismuch/environment/reference/clone/static/clone/auth-flow.css
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:root {
|
| 2 |
+
color: #263238;
|
| 3 |
+
background: #f4f7f2;
|
| 4 |
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 5 |
+
}
|
| 6 |
+
* { box-sizing: border-box; }
|
| 7 |
+
body { margin: 0; min-height: 100vh; }
|
| 8 |
+
.site-header {
|
| 9 |
+
min-height: 68px;
|
| 10 |
+
display: flex;
|
| 11 |
+
align-items: center;
|
| 12 |
+
justify-content: space-between;
|
| 13 |
+
padding: 0 7vw;
|
| 14 |
+
background: #fff;
|
| 15 |
+
border-bottom: 1px solid #e3e9df;
|
| 16 |
+
}
|
| 17 |
+
.brand {
|
| 18 |
+
color: #349845;
|
| 19 |
+
font-size: 1.45rem;
|
| 20 |
+
font-weight: 800;
|
| 21 |
+
text-decoration: none;
|
| 22 |
+
letter-spacing: -.04em;
|
| 23 |
+
}
|
| 24 |
+
.quiet-link, .back-link { color: #347f40; font-weight: 650; }
|
| 25 |
+
main {
|
| 26 |
+
min-height: calc(100vh - 68px);
|
| 27 |
+
display: grid;
|
| 28 |
+
place-items: center;
|
| 29 |
+
padding: 48px 20px;
|
| 30 |
+
}
|
| 31 |
+
.auth-card {
|
| 32 |
+
width: min(100%, 480px);
|
| 33 |
+
padding: 38px;
|
| 34 |
+
background: #fff;
|
| 35 |
+
border: 1px solid #e0e7dc;
|
| 36 |
+
border-radius: 14px;
|
| 37 |
+
box-shadow: 0 18px 50px rgba(42, 70, 39, .10);
|
| 38 |
+
}
|
| 39 |
+
.eyebrow {
|
| 40 |
+
margin: 0 0 8px;
|
| 41 |
+
color: #349845;
|
| 42 |
+
font-size: .78rem;
|
| 43 |
+
font-weight: 800;
|
| 44 |
+
letter-spacing: .1em;
|
| 45 |
+
text-transform: uppercase;
|
| 46 |
+
}
|
| 47 |
+
h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.45rem); letter-spacing: -.035em; }
|
| 48 |
+
.intro { margin: 14px 0 26px; color: #627064; line-height: 1.55; }
|
| 49 |
+
form { display: grid; gap: 10px; }
|
| 50 |
+
form + form { margin-top: 18px; }
|
| 51 |
+
label { font-size: .92rem; font-weight: 700; }
|
| 52 |
+
input {
|
| 53 |
+
width: 100%;
|
| 54 |
+
min-height: 48px;
|
| 55 |
+
padding: 10px 13px;
|
| 56 |
+
border: 1px solid #bdc9ba;
|
| 57 |
+
border-radius: 6px;
|
| 58 |
+
font: inherit;
|
| 59 |
+
}
|
| 60 |
+
input:focus { outline: 3px solid rgba(52, 152, 69, .18); border-color: #349845; }
|
| 61 |
+
button {
|
| 62 |
+
min-height: 49px;
|
| 63 |
+
margin-top: 8px;
|
| 64 |
+
border: 0;
|
| 65 |
+
border-radius: 6px;
|
| 66 |
+
color: #fff;
|
| 67 |
+
background: #349845;
|
| 68 |
+
font: inherit;
|
| 69 |
+
font-weight: 800;
|
| 70 |
+
cursor: pointer;
|
| 71 |
+
}
|
| 72 |
+
button:hover { background: #287c37; }
|
| 73 |
+
button:disabled { opacity: .58; cursor: wait; }
|
| 74 |
+
.error { min-height: 1.3em; margin: 2px 0 0; color: #b3261e; }
|
| 75 |
+
.back-link { display: inline-block; margin-top: 22px; }
|
| 76 |
+
[hidden] { display: none !important; }
|
| 77 |
+
@media (max-width: 560px) {
|
| 78 |
+
.site-header { padding: 0 20px; }
|
| 79 |
+
.auth-card { padding: 28px 22px; }
|
| 80 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/clone/auth-flow.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(() => {
|
| 2 |
+
"use strict";
|
| 3 |
+
|
| 4 |
+
const errorNode = document.querySelector("#auth-error");
|
| 5 |
+
|
| 6 |
+
function showError(message) {
|
| 7 |
+
if (errorNode) errorNode.textContent = message || "Something went wrong. Please try again.";
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
async function post(path, body) {
|
| 11 |
+
const response = await fetch(path, {
|
| 12 |
+
method: "POST",
|
| 13 |
+
credentials: "same-origin",
|
| 14 |
+
headers: {"Content-Type": "application/json"},
|
| 15 |
+
body: JSON.stringify(body)
|
| 16 |
+
});
|
| 17 |
+
let payload = {};
|
| 18 |
+
try {
|
| 19 |
+
payload = await response.json();
|
| 20 |
+
} catch (_) {
|
| 21 |
+
throw new Error("The authentication service returned an invalid response.");
|
| 22 |
+
}
|
| 23 |
+
if (!response.ok || payload.success !== true) {
|
| 24 |
+
const errors = payload.errors || {};
|
| 25 |
+
const messages = errors.__all__ || Object.values(errors).flat();
|
| 26 |
+
throw new Error(messages[0] || "The code could not be verified.");
|
| 27 |
+
}
|
| 28 |
+
return payload.data;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
function busy(form, value) {
|
| 32 |
+
const button = form.querySelector("button[type=submit]");
|
| 33 |
+
if (button) button.disabled = value;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
const registration = document.querySelector("#registration-verification-form");
|
| 37 |
+
if (registration) {
|
| 38 |
+
registration.addEventListener("submit", async (event) => {
|
| 39 |
+
event.preventDefault();
|
| 40 |
+
showError("");
|
| 41 |
+
busy(registration, true);
|
| 42 |
+
try {
|
| 43 |
+
const code = new FormData(registration).get("code");
|
| 44 |
+
await post("/api/auth/registration/verify", {code});
|
| 45 |
+
await post("/api/auth/registration/complete", {});
|
| 46 |
+
location.assign("/app/account-setup");
|
| 47 |
+
} catch (error) {
|
| 48 |
+
showError(error.message);
|
| 49 |
+
busy(registration, false);
|
| 50 |
+
}
|
| 51 |
+
});
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
const resetCode = document.querySelector("#password-reset-code-form");
|
| 55 |
+
const resetComplete = document.querySelector("#password-reset-complete-form");
|
| 56 |
+
if (resetCode && resetComplete) {
|
| 57 |
+
resetCode.addEventListener("submit", async (event) => {
|
| 58 |
+
event.preventDefault();
|
| 59 |
+
showError("");
|
| 60 |
+
busy(resetCode, true);
|
| 61 |
+
try {
|
| 62 |
+
const code = new FormData(resetCode).get("code");
|
| 63 |
+
await post("/api/auth/password-reset/verify", {code});
|
| 64 |
+
resetCode.hidden = true;
|
| 65 |
+
resetComplete.hidden = false;
|
| 66 |
+
resetComplete.querySelector("input").focus();
|
| 67 |
+
} catch (error) {
|
| 68 |
+
showError(error.message);
|
| 69 |
+
busy(resetCode, false);
|
| 70 |
+
}
|
| 71 |
+
});
|
| 72 |
+
|
| 73 |
+
resetComplete.addEventListener("submit", async (event) => {
|
| 74 |
+
event.preventDefault();
|
| 75 |
+
showError("");
|
| 76 |
+
const values = new FormData(resetComplete);
|
| 77 |
+
const password = String(values.get("new_password") || "");
|
| 78 |
+
const confirmation = String(values.get("confirm_password") || "");
|
| 79 |
+
if (password !== confirmation) {
|
| 80 |
+
showError("The two password fields did not match.");
|
| 81 |
+
return;
|
| 82 |
+
}
|
| 83 |
+
busy(resetComplete, true);
|
| 84 |
+
try {
|
| 85 |
+
await post("/api/auth/password-reset/complete", {new_password: password});
|
| 86 |
+
location.assign("/app/login?password-reset=complete");
|
| 87 |
+
} catch (error) {
|
| 88 |
+
showError(error.message);
|
| 89 |
+
busy(resetComplete, false);
|
| 90 |
+
}
|
| 91 |
+
});
|
| 92 |
+
}
|
| 93 |
+
})();
|
tasks/eatthismuch/environment/reference/clone/static/clone/boundary.css
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
:root { color-scheme: light; }
|
| 2 |
+
body.offline-boundary {
|
| 3 |
+
margin: 0; padding: 3rem 1.5rem; font: 16px/1.6 -apple-system, "Segoe UI",
|
| 4 |
+
Roboto, "Helvetica Neue", Arial, sans-serif; color: #23282d; background: #f7f8f9;
|
| 5 |
+
}
|
| 6 |
+
body.offline-boundary main { max-width: 40rem; margin: 0 auto; background: #fff;
|
| 7 |
+
padding: 2rem; border: 1px solid #e2e5e8; border-radius: 8px; }
|
| 8 |
+
body.offline-boundary h1 { margin-top: 0; font-size: 1.5rem; }
|
| 9 |
+
body.offline-boundary code { background: #f2f4f6; padding: .1em .35em;
|
| 10 |
+
border-radius: 3px; word-break: break-all; }
|
| 11 |
+
body.offline-boundary .target { color: #5b6670; font-size: .9rem; }
|
| 12 |
+
body.offline-boundary a { color: #1a7f5a; }
|
tasks/eatthismuch/environment/reference/clone/static/clone/home-actions.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function () {
|
| 2 |
+
"use strict";
|
| 3 |
+
|
| 4 |
+
function localize(anchor) {
|
| 5 |
+
var raw = anchor.getAttribute("href") || "";
|
| 6 |
+
if (/^\/external\//.test(raw)) {
|
| 7 |
+
anchor.removeAttribute("target");
|
| 8 |
+
return;
|
| 9 |
+
}
|
| 10 |
+
if (!/^https?:\/\//i.test(raw)) return;
|
| 11 |
+
var target;
|
| 12 |
+
try {
|
| 13 |
+
target = new URL(raw, window.location.href);
|
| 14 |
+
} catch (_) {
|
| 15 |
+
return;
|
| 16 |
+
}
|
| 17 |
+
anchor.dataset.originalHref = target.href;
|
| 18 |
+
anchor.href = "/external/" + encodeURIComponent(target.hostname || "invalid-host") +
|
| 19 |
+
"?u=" + encodeURIComponent(target.href);
|
| 20 |
+
anchor.removeAttribute("target");
|
| 21 |
+
var label = (anchor.textContent || anchor.querySelector("img")?.alt || target.hostname).trim();
|
| 22 |
+
anchor.setAttribute("aria-label", label + " — local external-link boundary");
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
function repair(root) {
|
| 26 |
+
if (root.nodeType === Node.ELEMENT_NODE && root.matches("a[href]")) localize(root);
|
| 27 |
+
(root.querySelectorAll ? root.querySelectorAll("a[href]") : []).forEach(localize);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
repair(document);
|
| 31 |
+
new MutationObserver(function (records) {
|
| 32 |
+
records.forEach(function (record) {
|
| 33 |
+
if (record.type === "attributes") localize(record.target);
|
| 34 |
+
record.addedNodes.forEach(repair);
|
| 35 |
+
});
|
| 36 |
+
}).observe(document.documentElement, {
|
| 37 |
+
subtree: true,
|
| 38 |
+
childList: true,
|
| 39 |
+
attributes: true,
|
| 40 |
+
attributeFilter: ["href"]
|
| 41 |
+
});
|
| 42 |
+
})();
|
tasks/eatthismuch/environment/reference/clone/static/clone/noop.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* offline-clone: 第三方脚本(分析/广告/社交像素)在这里被替换成空实现。
|
| 2 |
+
源站标记里那条 <script> 依然存在,只是它加载到的是这个文件,不产生外发请求。 */
|
tasks/eatthismuch/environment/reference/clone/static/clone/pixel.png
ADDED
|
|
Git LFS Details
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css2__q80af5b3067f6
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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SLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t4R-tCKQ.woff2) format('woff2');
|
| 9 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 10 |
+
}
|
| 11 |
+
/* cyrillic */
|
| 12 |
+
@font-face {
|
| 13 |
+
font-family: 'Nunito Sans';
|
| 14 |
+
font-style: normal;
|
| 15 |
+
font-weight: 300;
|
| 16 |
+
font-stretch: 100%;
|
| 17 |
+
font-display: swap;
|
| 18 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7txR-tCKQ.woff2) format('woff2');
|
| 19 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 20 |
+
}
|
| 21 |
+
/* vietnamese */
|
| 22 |
+
@font-face {
|
| 23 |
+
font-family: 'Nunito Sans';
|
| 24 |
+
font-style: normal;
|
| 25 |
+
font-weight: 300;
|
| 26 |
+
font-stretch: 100%;
|
| 27 |
+
font-display: swap;
|
| 28 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t6R-tCKQ.woff2) format('woff2');
|
| 29 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 30 |
+
}
|
| 31 |
+
/* latin-ext */
|
| 32 |
+
@font-face {
|
| 33 |
+
font-family: 'Nunito Sans';
|
| 34 |
+
font-style: normal;
|
| 35 |
+
font-weight: 300;
|
| 36 |
+
font-stretch: 100%;
|
| 37 |
+
font-display: swap;
|
| 38 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t7R-tCKQ.woff2) format('woff2');
|
| 39 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 40 |
+
}
|
| 41 |
+
/* latin */
|
| 42 |
+
@font-face {
|
| 43 |
+
font-family: 'Nunito Sans';
|
| 44 |
+
font-style: normal;
|
| 45 |
+
font-weight: 300;
|
| 46 |
+
font-stretch: 100%;
|
| 47 |
+
font-display: swap;
|
| 48 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2) format('woff2');
|
| 49 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 50 |
+
}
|
| 51 |
+
/* cyrillic-ext */
|
| 52 |
+
@font-face {
|
| 53 |
+
font-family: 'Nunito Sans';
|
| 54 |
+
font-style: normal;
|
| 55 |
+
font-weight: 400;
|
| 56 |
+
font-stretch: 100%;
|
| 57 |
+
font-display: swap;
|
| 58 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t4R-tCKQ.woff2) format('woff2');
|
| 59 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 60 |
+
}
|
| 61 |
+
/* cyrillic */
|
| 62 |
+
@font-face {
|
| 63 |
+
font-family: 'Nunito Sans';
|
| 64 |
+
font-style: normal;
|
| 65 |
+
font-weight: 400;
|
| 66 |
+
font-stretch: 100%;
|
| 67 |
+
font-display: swap;
|
| 68 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7txR-tCKQ.woff2) format('woff2');
|
| 69 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 70 |
+
}
|
| 71 |
+
/* vietnamese */
|
| 72 |
+
@font-face {
|
| 73 |
+
font-family: 'Nunito Sans';
|
| 74 |
+
font-style: normal;
|
| 75 |
+
font-weight: 400;
|
| 76 |
+
font-stretch: 100%;
|
| 77 |
+
font-display: swap;
|
| 78 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t6R-tCKQ.woff2) format('woff2');
|
| 79 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 80 |
+
}
|
| 81 |
+
/* latin-ext */
|
| 82 |
+
@font-face {
|
| 83 |
+
font-family: 'Nunito Sans';
|
| 84 |
+
font-style: normal;
|
| 85 |
+
font-weight: 400;
|
| 86 |
+
font-stretch: 100%;
|
| 87 |
+
font-display: swap;
|
| 88 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t7R-tCKQ.woff2) format('woff2');
|
| 89 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 90 |
+
}
|
| 91 |
+
/* latin */
|
| 92 |
+
@font-face {
|
| 93 |
+
font-family: 'Nunito Sans';
|
| 94 |
+
font-style: normal;
|
| 95 |
+
font-weight: 400;
|
| 96 |
+
font-stretch: 100%;
|
| 97 |
+
font-display: swap;
|
| 98 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2) format('woff2');
|
| 99 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 100 |
+
}
|
| 101 |
+
/* cyrillic-ext */
|
| 102 |
+
@font-face {
|
| 103 |
+
font-family: 'Nunito Sans';
|
| 104 |
+
font-style: normal;
|
| 105 |
+
font-weight: 700;
|
| 106 |
+
font-stretch: 100%;
|
| 107 |
+
font-display: swap;
|
| 108 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t4R-tCKQ.woff2) format('woff2');
|
| 109 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 110 |
+
}
|
| 111 |
+
/* cyrillic */
|
| 112 |
+
@font-face {
|
| 113 |
+
font-family: 'Nunito Sans';
|
| 114 |
+
font-style: normal;
|
| 115 |
+
font-weight: 700;
|
| 116 |
+
font-stretch: 100%;
|
| 117 |
+
font-display: swap;
|
| 118 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7txR-tCKQ.woff2) format('woff2');
|
| 119 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 120 |
+
}
|
| 121 |
+
/* vietnamese */
|
| 122 |
+
@font-face {
|
| 123 |
+
font-family: 'Nunito Sans';
|
| 124 |
+
font-style: normal;
|
| 125 |
+
font-weight: 700;
|
| 126 |
+
font-stretch: 100%;
|
| 127 |
+
font-display: swap;
|
| 128 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t6R-tCKQ.woff2) format('woff2');
|
| 129 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 130 |
+
}
|
| 131 |
+
/* latin-ext */
|
| 132 |
+
@font-face {
|
| 133 |
+
font-family: 'Nunito Sans';
|
| 134 |
+
font-style: normal;
|
| 135 |
+
font-weight: 700;
|
| 136 |
+
font-stretch: 100%;
|
| 137 |
+
font-display: swap;
|
| 138 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t7R-tCKQ.woff2) format('woff2');
|
| 139 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 140 |
+
}
|
| 141 |
+
/* latin */
|
| 142 |
+
@font-face {
|
| 143 |
+
font-family: 'Nunito Sans';
|
| 144 |
+
font-style: normal;
|
| 145 |
+
font-weight: 700;
|
| 146 |
+
font-stretch: 100%;
|
| 147 |
+
font-display: swap;
|
| 148 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2) format('woff2');
|
| 149 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 150 |
+
}
|
| 151 |
+
/* cyrillic-ext */
|
| 152 |
+
@font-face {
|
| 153 |
+
font-family: 'Nunito Sans';
|
| 154 |
+
font-style: normal;
|
| 155 |
+
font-weight: 800;
|
| 156 |
+
font-stretch: 100%;
|
| 157 |
+
font-display: swap;
|
| 158 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t4R-tCKQ.woff2) format('woff2');
|
| 159 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 160 |
+
}
|
| 161 |
+
/* cyrillic */
|
| 162 |
+
@font-face {
|
| 163 |
+
font-family: 'Nunito Sans';
|
| 164 |
+
font-style: normal;
|
| 165 |
+
font-weight: 800;
|
| 166 |
+
font-stretch: 100%;
|
| 167 |
+
font-display: swap;
|
| 168 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7txR-tCKQ.woff2) format('woff2');
|
| 169 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 170 |
+
}
|
| 171 |
+
/* vietnamese */
|
| 172 |
+
@font-face {
|
| 173 |
+
font-family: 'Nunito Sans';
|
| 174 |
+
font-style: normal;
|
| 175 |
+
font-weight: 800;
|
| 176 |
+
font-stretch: 100%;
|
| 177 |
+
font-display: swap;
|
| 178 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t6R-tCKQ.woff2) format('woff2');
|
| 179 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 180 |
+
}
|
| 181 |
+
/* latin-ext */
|
| 182 |
+
@font-face {
|
| 183 |
+
font-family: 'Nunito Sans';
|
| 184 |
+
font-style: normal;
|
| 185 |
+
font-weight: 800;
|
| 186 |
+
font-stretch: 100%;
|
| 187 |
+
font-display: swap;
|
| 188 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t7R-tCKQ.woff2) format('woff2');
|
| 189 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 190 |
+
}
|
| 191 |
+
/* latin */
|
| 192 |
+
@font-face {
|
| 193 |
+
font-family: 'Nunito Sans';
|
| 194 |
+
font-style: normal;
|
| 195 |
+
font-weight: 800;
|
| 196 |
+
font-stretch: 100%;
|
| 197 |
+
font-display: swap;
|
| 198 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2) format('woff2');
|
| 199 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 200 |
+
}
|
| 201 |
+
/* cyrillic-ext */
|
| 202 |
+
@font-face {
|
| 203 |
+
font-family: 'Source Sans Pro';
|
| 204 |
+
font-style: normal;
|
| 205 |
+
font-weight: 300;
|
| 206 |
+
font-display: swap;
|
| 207 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmhduz8A.woff2) format('woff2');
|
| 208 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 209 |
+
}
|
| 210 |
+
/* cyrillic */
|
| 211 |
+
@font-face {
|
| 212 |
+
font-family: 'Source Sans Pro';
|
| 213 |
+
font-style: normal;
|
| 214 |
+
font-weight: 300;
|
| 215 |
+
font-display: swap;
|
| 216 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwkxduz8A.woff2) format('woff2');
|
| 217 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 218 |
+
}
|
| 219 |
+
/* greek-ext */
|
| 220 |
+
@font-face {
|
| 221 |
+
font-family: 'Source Sans Pro';
|
| 222 |
+
font-style: normal;
|
| 223 |
+
font-weight: 300;
|
| 224 |
+
font-display: swap;
|
| 225 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmxduz8A.woff2) format('woff2');
|
| 226 |
+
unicode-range: U+1F00-1FFF;
|
| 227 |
+
}
|
| 228 |
+
/* greek */
|
| 229 |
+
@font-face {
|
| 230 |
+
font-family: 'Source Sans Pro';
|
| 231 |
+
font-style: normal;
|
| 232 |
+
font-weight: 300;
|
| 233 |
+
font-display: swap;
|
| 234 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlBduz8A.woff2) format('woff2');
|
| 235 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 236 |
+
}
|
| 237 |
+
/* vietnamese */
|
| 238 |
+
@font-face {
|
| 239 |
+
font-family: 'Source Sans Pro';
|
| 240 |
+
font-style: normal;
|
| 241 |
+
font-weight: 300;
|
| 242 |
+
font-display: swap;
|
| 243 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmBduz8A.woff2) format('woff2');
|
| 244 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 245 |
+
}
|
| 246 |
+
/* latin-ext */
|
| 247 |
+
@font-face {
|
| 248 |
+
font-family: 'Source Sans Pro';
|
| 249 |
+
font-style: normal;
|
| 250 |
+
font-weight: 300;
|
| 251 |
+
font-display: swap;
|
| 252 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmRduz8A.woff2) format('woff2');
|
| 253 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 254 |
+
}
|
| 255 |
+
/* latin */
|
| 256 |
+
@font-face {
|
| 257 |
+
font-family: 'Source Sans Pro';
|
| 258 |
+
font-style: normal;
|
| 259 |
+
font-weight: 300;
|
| 260 |
+
font-display: swap;
|
| 261 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2) format('woff2');
|
| 262 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 263 |
+
}
|
| 264 |
+
/* cyrillic-ext */
|
| 265 |
+
@font-face {
|
| 266 |
+
font-family: 'Source Sans Pro';
|
| 267 |
+
font-style: normal;
|
| 268 |
+
font-weight: 400;
|
| 269 |
+
font-display: swap;
|
| 270 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lqDY.woff2) format('woff2');
|
| 271 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 272 |
+
}
|
| 273 |
+
/* cyrillic */
|
| 274 |
+
@font-face {
|
| 275 |
+
font-family: 'Source Sans Pro';
|
| 276 |
+
font-style: normal;
|
| 277 |
+
font-weight: 400;
|
| 278 |
+
font-display: swap;
|
| 279 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lqDY.woff2) format('woff2');
|
| 280 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 281 |
+
}
|
| 282 |
+
/* greek-ext */
|
| 283 |
+
@font-face {
|
| 284 |
+
font-family: 'Source Sans Pro';
|
| 285 |
+
font-style: normal;
|
| 286 |
+
font-weight: 400;
|
| 287 |
+
font-display: swap;
|
| 288 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lqDY.woff2) format('woff2');
|
| 289 |
+
unicode-range: U+1F00-1FFF;
|
| 290 |
+
}
|
| 291 |
+
/* greek */
|
| 292 |
+
@font-face {
|
| 293 |
+
font-family: 'Source Sans Pro';
|
| 294 |
+
font-style: normal;
|
| 295 |
+
font-weight: 400;
|
| 296 |
+
font-display: swap;
|
| 297 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lqDY.woff2) format('woff2');
|
| 298 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 299 |
+
}
|
| 300 |
+
/* vietnamese */
|
| 301 |
+
@font-face {
|
| 302 |
+
font-family: 'Source Sans Pro';
|
| 303 |
+
font-style: normal;
|
| 304 |
+
font-weight: 400;
|
| 305 |
+
font-display: swap;
|
| 306 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lqDY.woff2) format('woff2');
|
| 307 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 308 |
+
}
|
| 309 |
+
/* latin-ext */
|
| 310 |
+
@font-face {
|
| 311 |
+
font-family: 'Source Sans Pro';
|
| 312 |
+
font-style: normal;
|
| 313 |
+
font-weight: 400;
|
| 314 |
+
font-display: swap;
|
| 315 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');
|
| 316 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 317 |
+
}
|
| 318 |
+
/* latin */
|
| 319 |
+
@font-face {
|
| 320 |
+
font-family: 'Source Sans Pro';
|
| 321 |
+
font-style: normal;
|
| 322 |
+
font-weight: 400;
|
| 323 |
+
font-display: swap;
|
| 324 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');
|
| 325 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 326 |
+
}
|
| 327 |
+
/* cyrillic-ext */
|
| 328 |
+
@font-face {
|
| 329 |
+
font-family: 'Source Sans Pro';
|
| 330 |
+
font-style: normal;
|
| 331 |
+
font-weight: 700;
|
| 332 |
+
font-display: swap;
|
| 333 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmhduz8A.woff2) format('woff2');
|
| 334 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 335 |
+
}
|
| 336 |
+
/* cyrillic */
|
| 337 |
+
@font-face {
|
| 338 |
+
font-family: 'Source Sans Pro';
|
| 339 |
+
font-style: normal;
|
| 340 |
+
font-weight: 700;
|
| 341 |
+
font-display: swap;
|
| 342 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwkxduz8A.woff2) format('woff2');
|
| 343 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 344 |
+
}
|
| 345 |
+
/* greek-ext */
|
| 346 |
+
@font-face {
|
| 347 |
+
font-family: 'Source Sans Pro';
|
| 348 |
+
font-style: normal;
|
| 349 |
+
font-weight: 700;
|
| 350 |
+
font-display: swap;
|
| 351 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmxduz8A.woff2) format('woff2');
|
| 352 |
+
unicode-range: U+1F00-1FFF;
|
| 353 |
+
}
|
| 354 |
+
/* greek */
|
| 355 |
+
@font-face {
|
| 356 |
+
font-family: 'Source Sans Pro';
|
| 357 |
+
font-style: normal;
|
| 358 |
+
font-weight: 700;
|
| 359 |
+
font-display: swap;
|
| 360 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2) format('woff2');
|
| 361 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 362 |
+
}
|
| 363 |
+
/* vietnamese */
|
| 364 |
+
@font-face {
|
| 365 |
+
font-family: 'Source Sans Pro';
|
| 366 |
+
font-style: normal;
|
| 367 |
+
font-weight: 700;
|
| 368 |
+
font-display: swap;
|
| 369 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2) format('woff2');
|
| 370 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 371 |
+
}
|
| 372 |
+
/* latin-ext */
|
| 373 |
+
@font-face {
|
| 374 |
+
font-family: 'Source Sans Pro';
|
| 375 |
+
font-style: normal;
|
| 376 |
+
font-weight: 700;
|
| 377 |
+
font-display: swap;
|
| 378 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2) format('woff2');
|
| 379 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 380 |
+
}
|
| 381 |
+
/* latin */
|
| 382 |
+
@font-face {
|
| 383 |
+
font-family: 'Source Sans Pro';
|
| 384 |
+
font-style: normal;
|
| 385 |
+
font-weight: 700;
|
| 386 |
+
font-display: swap;
|
| 387 |
+
src: url(/static/fonts/fonts.gstatic.com/s/sourcesanspro/v23/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2) format('woff2');
|
| 388 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 389 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css2__qe4dfecdd8323
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* cyrillic-ext */
|
| 2 |
+
@font-face {
|
| 3 |
+
font-family: 'Nunito Sans';
|
| 4 |
+
font-style: normal;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
font-stretch: 100%;
|
| 7 |
+
font-display: swap;
|
| 8 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t4R-tCKQ.woff2) format('woff2');
|
| 9 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 10 |
+
}
|
| 11 |
+
/* cyrillic */
|
| 12 |
+
@font-face {
|
| 13 |
+
font-family: 'Nunito Sans';
|
| 14 |
+
font-style: normal;
|
| 15 |
+
font-weight: 400;
|
| 16 |
+
font-stretch: 100%;
|
| 17 |
+
font-display: swap;
|
| 18 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7txR-tCKQ.woff2) format('woff2');
|
| 19 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 20 |
+
}
|
| 21 |
+
/* vietnamese */
|
| 22 |
+
@font-face {
|
| 23 |
+
font-family: 'Nunito Sans';
|
| 24 |
+
font-style: normal;
|
| 25 |
+
font-weight: 400;
|
| 26 |
+
font-stretch: 100%;
|
| 27 |
+
font-display: swap;
|
| 28 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t6R-tCKQ.woff2) format('woff2');
|
| 29 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 30 |
+
}
|
| 31 |
+
/* latin-ext */
|
| 32 |
+
@font-face {
|
| 33 |
+
font-family: 'Nunito Sans';
|
| 34 |
+
font-style: normal;
|
| 35 |
+
font-weight: 400;
|
| 36 |
+
font-stretch: 100%;
|
| 37 |
+
font-display: swap;
|
| 38 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t7R-tCKQ.woff2) format('woff2');
|
| 39 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 40 |
+
}
|
| 41 |
+
/* latin */
|
| 42 |
+
@font-face {
|
| 43 |
+
font-family: 'Nunito Sans';
|
| 44 |
+
font-style: normal;
|
| 45 |
+
font-weight: 400;
|
| 46 |
+
font-stretch: 100%;
|
| 47 |
+
font-display: swap;
|
| 48 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2) format('woff2');
|
| 49 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 50 |
+
}
|
| 51 |
+
/* cyrillic-ext */
|
| 52 |
+
@font-face {
|
| 53 |
+
font-family: 'Nunito Sans';
|
| 54 |
+
font-style: normal;
|
| 55 |
+
font-weight: 800;
|
| 56 |
+
font-stretch: 100%;
|
| 57 |
+
font-display: swap;
|
| 58 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t4R-tCKQ.woff2) format('woff2');
|
| 59 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 60 |
+
}
|
| 61 |
+
/* cyrillic */
|
| 62 |
+
@font-face {
|
| 63 |
+
font-family: 'Nunito Sans';
|
| 64 |
+
font-style: normal;
|
| 65 |
+
font-weight: 800;
|
| 66 |
+
font-stretch: 100%;
|
| 67 |
+
font-display: swap;
|
| 68 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7txR-tCKQ.woff2) format('woff2');
|
| 69 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 70 |
+
}
|
| 71 |
+
/* vietnamese */
|
| 72 |
+
@font-face {
|
| 73 |
+
font-family: 'Nunito Sans';
|
| 74 |
+
font-style: normal;
|
| 75 |
+
font-weight: 800;
|
| 76 |
+
font-stretch: 100%;
|
| 77 |
+
font-display: swap;
|
| 78 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t6R-tCKQ.woff2) format('woff2');
|
| 79 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 80 |
+
}
|
| 81 |
+
/* latin-ext */
|
| 82 |
+
@font-face {
|
| 83 |
+
font-family: 'Nunito Sans';
|
| 84 |
+
font-style: normal;
|
| 85 |
+
font-weight: 800;
|
| 86 |
+
font-stretch: 100%;
|
| 87 |
+
font-display: swap;
|
| 88 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t7R-tCKQ.woff2) format('woff2');
|
| 89 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 90 |
+
}
|
| 91 |
+
/* latin */
|
| 92 |
+
@font-face {
|
| 93 |
+
font-family: 'Nunito Sans';
|
| 94 |
+
font-style: normal;
|
| 95 |
+
font-weight: 800;
|
| 96 |
+
font-stretch: 100%;
|
| 97 |
+
font-display: swap;
|
| 98 |
+
src: url(/static/fonts/fonts.gstatic.com/s/nunitosans/v19/pe0TMImSLYBIv1o4X1M8ce2xCx3yop4tQpF_MeTm0lfGWVpNn64CL7U8upHZIbMV51Q42ptCp7t1R-s.woff2) format('woff2');
|
| 99 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 100 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css2__qffa3829fad18
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* See: https://fonts.google.com/license/googlerestricted
|
| 3 |
+
*/
|
| 4 |
+
/* fallback */
|
| 5 |
+
@font-face {
|
| 6 |
+
font-family: 'Google Symbols';
|
| 7 |
+
font-style: normal;
|
| 8 |
+
font-weight: 100 700;
|
| 9 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesymbols/v454/HhyAU5Ak9u-oMExPeInvcuEmPosC9zSpYaEEU68cdvrHJg.woff2) format('woff2');
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
.google-symbols {
|
| 13 |
+
font-family: 'Google Symbols';
|
| 14 |
+
font-weight: normal;
|
| 15 |
+
font-style: normal;
|
| 16 |
+
font-size: 24px;
|
| 17 |
+
line-height: 1;
|
| 18 |
+
letter-spacing: normal;
|
| 19 |
+
text-transform: none;
|
| 20 |
+
display: inline-block;
|
| 21 |
+
white-space: nowrap;
|
| 22 |
+
word-wrap: normal;
|
| 23 |
+
direction: ltr;
|
| 24 |
+
-webkit-font-feature-settings: 'liga';
|
| 25 |
+
-webkit-font-smoothing: antialiased;
|
| 26 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__q21b767d8bb7f
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* latin-ext */
|
| 2 |
+
@font-face {
|
| 3 |
+
font-family: 'Lato';
|
| 4 |
+
font-style: normal;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
src: url(/static/fonts/fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjxAwXjeu.woff2) format('woff2');
|
| 7 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 8 |
+
}
|
| 9 |
+
/* latin */
|
| 10 |
+
@font-face {
|
| 11 |
+
font-family: 'Lato';
|
| 12 |
+
font-style: normal;
|
| 13 |
+
font-weight: 400;
|
| 14 |
+
src: url(/static/fonts/fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjx4wXg.woff2) format('woff2');
|
| 15 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 16 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__q5d7a4806e74a
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* See: https://fonts.google.com/license/googlerestricted
|
| 3 |
+
*/
|
| 4 |
+
/* fallback */
|
| 5 |
+
@font-face {
|
| 6 |
+
font-family: 'Google Symbols';
|
| 7 |
+
font-style: normal;
|
| 8 |
+
font-weight: 100;
|
| 9 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesymbols/v454/HhzZU5Ak9u-oMExPeInvcuEmPosC9zyteYEFU68cPrjdKM1XLPTxlGmzczpgWvF1d8Yp7AudBnt3CPar1JFWjoLAUv3G-tSXmA.woff2) format('woff2');
|
| 10 |
+
}
|
| 11 |
+
/* fallback */
|
| 12 |
+
@font-face {
|
| 13 |
+
font-family: 'Google Symbols';
|
| 14 |
+
font-style: normal;
|
| 15 |
+
font-weight: 400;
|
| 16 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesymbols/v454/HhzZU5Ak9u-oMExPeInvcuEmPosC9zyteYEFU68cPrjdKM1XLPTxlGmzczpgWvF1d8Yp7AudBnt3CPar1JFWjoLAUv3G-tSXmA.woff2) format('woff2');
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.google-symbols {
|
| 20 |
+
font-family: 'Google Symbols';
|
| 21 |
+
font-weight: normal;
|
| 22 |
+
font-style: normal;
|
| 23 |
+
font-size: 24px;
|
| 24 |
+
line-height: 1;
|
| 25 |
+
letter-spacing: normal;
|
| 26 |
+
text-transform: none;
|
| 27 |
+
display: inline-block;
|
| 28 |
+
white-space: nowrap;
|
| 29 |
+
word-wrap: normal;
|
| 30 |
+
direction: ltr;
|
| 31 |
+
-webkit-font-feature-settings: 'liga';
|
| 32 |
+
-webkit-font-smoothing: antialiased;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.google-symbols {
|
| 36 |
+
font-family: 'Google Symbols';
|
| 37 |
+
font-weight: normal;
|
| 38 |
+
font-style: normal;
|
| 39 |
+
font-size: 24px;
|
| 40 |
+
line-height: 1;
|
| 41 |
+
letter-spacing: normal;
|
| 42 |
+
text-transform: none;
|
| 43 |
+
display: inline-block;
|
| 44 |
+
white-space: nowrap;
|
| 45 |
+
word-wrap: normal;
|
| 46 |
+
direction: ltr;
|
| 47 |
+
-webkit-font-feature-settings: 'liga';
|
| 48 |
+
-webkit-font-smoothing: antialiased;
|
| 49 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__q86a49a307346
ADDED
|
@@ -0,0 +1,624 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* armenian */
|
| 2 |
+
@font-face {
|
| 3 |
+
font-family: 'Google Sans Text';
|
| 4 |
+
font-style: normal;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFp2i1dC.woff2) format('woff2');
|
| 7 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 8 |
+
}
|
| 9 |
+
/* bengali */
|
| 10 |
+
@font-face {
|
| 11 |
+
font-family: 'Google Sans Text';
|
| 12 |
+
font-style: normal;
|
| 13 |
+
font-weight: 400;
|
| 14 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFh2i1dC.woff2) format('woff2');
|
| 15 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 16 |
+
}
|
| 17 |
+
/* canadian-aboriginal */
|
| 18 |
+
@font-face {
|
| 19 |
+
font-family: 'Google Sans Text';
|
| 20 |
+
font-style: normal;
|
| 21 |
+
font-weight: 400;
|
| 22 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGV2i1dC.woff2) format('woff2');
|
| 23 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 24 |
+
}
|
| 25 |
+
/* cyrillic-ext */
|
| 26 |
+
@font-face {
|
| 27 |
+
font-family: 'Google Sans Text';
|
| 28 |
+
font-style: normal;
|
| 29 |
+
font-weight: 400;
|
| 30 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEd2i1dC.woff2) format('woff2');
|
| 31 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 32 |
+
}
|
| 33 |
+
/* cyrillic */
|
| 34 |
+
@font-face {
|
| 35 |
+
font-family: 'Google Sans Text';
|
| 36 |
+
font-style: normal;
|
| 37 |
+
font-weight: 400;
|
| 38 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qE52i1dC.woff2) format('woff2');
|
| 39 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 40 |
+
}
|
| 41 |
+
/* devanagari */
|
| 42 |
+
@font-face {
|
| 43 |
+
font-family: 'Google Sans Text';
|
| 44 |
+
font-style: normal;
|
| 45 |
+
font-weight: 400;
|
| 46 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEt2i1dC.woff2) format('woff2');
|
| 47 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 48 |
+
}
|
| 49 |
+
/* ethiopic */
|
| 50 |
+
@font-face {
|
| 51 |
+
font-family: 'Google Sans Text';
|
| 52 |
+
font-style: normal;
|
| 53 |
+
font-weight: 400;
|
| 54 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFt2i1dC.woff2) format('woff2');
|
| 55 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 56 |
+
}
|
| 57 |
+
/* georgian */
|
| 58 |
+
@font-face {
|
| 59 |
+
font-family: 'Google Sans Text';
|
| 60 |
+
font-style: normal;
|
| 61 |
+
font-weight: 400;
|
| 62 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFV2i1dC.woff2) format('woff2');
|
| 63 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 64 |
+
}
|
| 65 |
+
/* greek-ext */
|
| 66 |
+
@font-face {
|
| 67 |
+
font-family: 'Google Sans Text';
|
| 68 |
+
font-style: normal;
|
| 69 |
+
font-weight: 400;
|
| 70 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEZ2i1dC.woff2) format('woff2');
|
| 71 |
+
unicode-range: U+1F00-1FFF;
|
| 72 |
+
}
|
| 73 |
+
/* greek */
|
| 74 |
+
@font-face {
|
| 75 |
+
font-family: 'Google Sans Text';
|
| 76 |
+
font-style: normal;
|
| 77 |
+
font-weight: 400;
|
| 78 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEl2i1dC.woff2) format('woff2');
|
| 79 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 80 |
+
}
|
| 81 |
+
/* gujarati */
|
| 82 |
+
@font-face {
|
| 83 |
+
font-family: 'Google Sans Text';
|
| 84 |
+
font-style: normal;
|
| 85 |
+
font-weight: 400;
|
| 86 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFF2i1dC.woff2) format('woff2');
|
| 87 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 88 |
+
}
|
| 89 |
+
/* gurmukhi */
|
| 90 |
+
@font-face {
|
| 91 |
+
font-family: 'Google Sans Text';
|
| 92 |
+
font-style: normal;
|
| 93 |
+
font-weight: 400;
|
| 94 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGl2i1dC.woff2) format('woff2');
|
| 95 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 96 |
+
}
|
| 97 |
+
/* hebrew */
|
| 98 |
+
@font-face {
|
| 99 |
+
font-family: 'Google Sans Text';
|
| 100 |
+
font-style: normal;
|
| 101 |
+
font-weight: 400;
|
| 102 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEh2i1dC.woff2) format('woff2');
|
| 103 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 104 |
+
}
|
| 105 |
+
/* kannada */
|
| 106 |
+
@font-face {
|
| 107 |
+
font-family: 'Google Sans Text';
|
| 108 |
+
font-style: normal;
|
| 109 |
+
font-weight: 400;
|
| 110 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFB2i1dC.woff2) format('woff2');
|
| 111 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 112 |
+
}
|
| 113 |
+
/* khmer */
|
| 114 |
+
@font-face {
|
| 115 |
+
font-family: 'Google Sans Text';
|
| 116 |
+
font-style: normal;
|
| 117 |
+
font-weight: 400;
|
| 118 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEF2i1dC.woff2) format('woff2');
|
| 119 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 120 |
+
}
|
| 121 |
+
/* lao */
|
| 122 |
+
@font-face {
|
| 123 |
+
font-family: 'Google Sans Text';
|
| 124 |
+
font-style: normal;
|
| 125 |
+
font-weight: 400;
|
| 126 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEN2i1dC.woff2) format('woff2');
|
| 127 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 128 |
+
}
|
| 129 |
+
/* malayalam */
|
| 130 |
+
@font-face {
|
| 131 |
+
font-family: 'Google Sans Text';
|
| 132 |
+
font-style: normal;
|
| 133 |
+
font-weight: 400;
|
| 134 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFJ2i1dC.woff2) format('woff2');
|
| 135 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 136 |
+
}
|
| 137 |
+
/* oriya */
|
| 138 |
+
@font-face {
|
| 139 |
+
font-family: 'Google Sans Text';
|
| 140 |
+
font-style: normal;
|
| 141 |
+
font-weight: 400;
|
| 142 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFN2i1dC.woff2) format('woff2');
|
| 143 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 144 |
+
}
|
| 145 |
+
/* sinhala */
|
| 146 |
+
@font-face {
|
| 147 |
+
font-family: 'Google Sans Text';
|
| 148 |
+
font-style: normal;
|
| 149 |
+
font-weight: 400;
|
| 150 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFd2i1dC.woff2) format('woff2');
|
| 151 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 152 |
+
}
|
| 153 |
+
/* symbols */
|
| 154 |
+
@font-face {
|
| 155 |
+
font-family: 'Google Sans Text';
|
| 156 |
+
font-style: normal;
|
| 157 |
+
font-weight: 400;
|
| 158 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qCR2i1dC.woff2) format('woff2');
|
| 159 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 160 |
+
}
|
| 161 |
+
/* tamil */
|
| 162 |
+
@font-face {
|
| 163 |
+
font-family: 'Google Sans Text';
|
| 164 |
+
font-style: normal;
|
| 165 |
+
font-weight: 400;
|
| 166 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFx2i1dC.woff2) format('woff2');
|
| 167 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 168 |
+
}
|
| 169 |
+
/* telugu */
|
| 170 |
+
@font-face {
|
| 171 |
+
font-family: 'Google Sans Text';
|
| 172 |
+
font-style: normal;
|
| 173 |
+
font-weight: 400;
|
| 174 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFZ2i1dC.woff2) format('woff2');
|
| 175 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 176 |
+
}
|
| 177 |
+
/* thai */
|
| 178 |
+
@font-face {
|
| 179 |
+
font-family: 'Google Sans Text';
|
| 180 |
+
font-style: normal;
|
| 181 |
+
font-weight: 400;
|
| 182 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qF52i1dC.woff2) format('woff2');
|
| 183 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 184 |
+
}
|
| 185 |
+
/* vietnamese */
|
| 186 |
+
@font-face {
|
| 187 |
+
font-family: 'Google Sans Text';
|
| 188 |
+
font-style: normal;
|
| 189 |
+
font-weight: 400;
|
| 190 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEV2i1dC.woff2) format('woff2');
|
| 191 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 192 |
+
}
|
| 193 |
+
/* latin-ext */
|
| 194 |
+
@font-face {
|
| 195 |
+
font-family: 'Google Sans Text';
|
| 196 |
+
font-style: normal;
|
| 197 |
+
font-weight: 400;
|
| 198 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qER2i1dC.woff2) format('woff2');
|
| 199 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 200 |
+
}
|
| 201 |
+
/* latin */
|
| 202 |
+
@font-face {
|
| 203 |
+
font-family: 'Google Sans Text';
|
| 204 |
+
font-style: normal;
|
| 205 |
+
font-weight: 400;
|
| 206 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEp2iw.woff2) format('woff2');
|
| 207 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 208 |
+
}
|
| 209 |
+
/* armenian */
|
| 210 |
+
@font-face {
|
| 211 |
+
font-family: 'Google Sans Text';
|
| 212 |
+
font-style: normal;
|
| 213 |
+
font-weight: 500;
|
| 214 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnhjtiu7.woff2) format('woff2');
|
| 215 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 216 |
+
}
|
| 217 |
+
/* bengali */
|
| 218 |
+
@font-face {
|
| 219 |
+
font-family: 'Google Sans Text';
|
| 220 |
+
font-style: normal;
|
| 221 |
+
font-weight: 500;
|
| 222 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnpjtiu7.woff2) format('woff2');
|
| 223 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 224 |
+
}
|
| 225 |
+
/* canadian-aboriginal */
|
| 226 |
+
@font-face {
|
| 227 |
+
font-family: 'Google Sans Text';
|
| 228 |
+
font-style: normal;
|
| 229 |
+
font-weight: 500;
|
| 230 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnkdjtiu7.woff2) format('woff2');
|
| 231 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 232 |
+
}
|
| 233 |
+
/* cyrillic-ext */
|
| 234 |
+
@font-face {
|
| 235 |
+
font-family: 'Google Sans Text';
|
| 236 |
+
font-style: normal;
|
| 237 |
+
font-weight: 500;
|
| 238 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmVjtiu7.woff2) format('woff2');
|
| 239 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 240 |
+
}
|
| 241 |
+
/* cyrillic */
|
| 242 |
+
@font-face {
|
| 243 |
+
font-family: 'Google Sans Text';
|
| 244 |
+
font-style: normal;
|
| 245 |
+
font-weight: 500;
|
| 246 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmxjtiu7.woff2) format('woff2');
|
| 247 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 248 |
+
}
|
| 249 |
+
/* devanagari */
|
| 250 |
+
@font-face {
|
| 251 |
+
font-family: 'Google Sans Text';
|
| 252 |
+
font-style: normal;
|
| 253 |
+
font-weight: 500;
|
| 254 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmljtiu7.woff2) format('woff2');
|
| 255 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 256 |
+
}
|
| 257 |
+
/* ethiopic */
|
| 258 |
+
@font-face {
|
| 259 |
+
font-family: 'Google Sans Text';
|
| 260 |
+
font-style: normal;
|
| 261 |
+
font-weight: 500;
|
| 262 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnljtiu7.woff2) format('woff2');
|
| 263 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 264 |
+
}
|
| 265 |
+
/* georgian */
|
| 266 |
+
@font-face {
|
| 267 |
+
font-family: 'Google Sans Text';
|
| 268 |
+
font-style: normal;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnndjtiu7.woff2) format('woff2');
|
| 271 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 272 |
+
}
|
| 273 |
+
/* greek-ext */
|
| 274 |
+
@font-face {
|
| 275 |
+
font-family: 'Google Sans Text';
|
| 276 |
+
font-style: normal;
|
| 277 |
+
font-weight: 500;
|
| 278 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmRjtiu7.woff2) format('woff2');
|
| 279 |
+
unicode-range: U+1F00-1FFF;
|
| 280 |
+
}
|
| 281 |
+
/* greek */
|
| 282 |
+
@font-face {
|
| 283 |
+
font-family: 'Google Sans Text';
|
| 284 |
+
font-style: normal;
|
| 285 |
+
font-weight: 500;
|
| 286 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmtjtiu7.woff2) format('woff2');
|
| 287 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 288 |
+
}
|
| 289 |
+
/* gujarati */
|
| 290 |
+
@font-face {
|
| 291 |
+
font-family: 'Google Sans Text';
|
| 292 |
+
font-style: normal;
|
| 293 |
+
font-weight: 500;
|
| 294 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnNjtiu7.woff2) format('woff2');
|
| 295 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 296 |
+
}
|
| 297 |
+
/* gurmukhi */
|
| 298 |
+
@font-face {
|
| 299 |
+
font-family: 'Google Sans Text';
|
| 300 |
+
font-style: normal;
|
| 301 |
+
font-weight: 500;
|
| 302 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnktjtiu7.woff2) format('woff2');
|
| 303 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 304 |
+
}
|
| 305 |
+
/* hebrew */
|
| 306 |
+
@font-face {
|
| 307 |
+
font-family: 'Google Sans Text';
|
| 308 |
+
font-style: normal;
|
| 309 |
+
font-weight: 500;
|
| 310 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmpjtiu7.woff2) format('woff2');
|
| 311 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 312 |
+
}
|
| 313 |
+
/* kannada */
|
| 314 |
+
@font-face {
|
| 315 |
+
font-family: 'Google Sans Text';
|
| 316 |
+
font-style: normal;
|
| 317 |
+
font-weight: 500;
|
| 318 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnJjtiu7.woff2) format('woff2');
|
| 319 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 320 |
+
}
|
| 321 |
+
/* khmer */
|
| 322 |
+
@font-face {
|
| 323 |
+
font-family: 'Google Sans Text';
|
| 324 |
+
font-style: normal;
|
| 325 |
+
font-weight: 500;
|
| 326 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmNjtiu7.woff2) format('woff2');
|
| 327 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 328 |
+
}
|
| 329 |
+
/* lao */
|
| 330 |
+
@font-face {
|
| 331 |
+
font-family: 'Google Sans Text';
|
| 332 |
+
font-style: normal;
|
| 333 |
+
font-weight: 500;
|
| 334 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmFjtiu7.woff2) format('woff2');
|
| 335 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 336 |
+
}
|
| 337 |
+
/* malayalam */
|
| 338 |
+
@font-face {
|
| 339 |
+
font-family: 'Google Sans Text';
|
| 340 |
+
font-style: normal;
|
| 341 |
+
font-weight: 500;
|
| 342 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnBjtiu7.woff2) format('woff2');
|
| 343 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 344 |
+
}
|
| 345 |
+
/* oriya */
|
| 346 |
+
@font-face {
|
| 347 |
+
font-family: 'Google Sans Text';
|
| 348 |
+
font-style: normal;
|
| 349 |
+
font-weight: 500;
|
| 350 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnFjtiu7.woff2) format('woff2');
|
| 351 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 352 |
+
}
|
| 353 |
+
/* sinhala */
|
| 354 |
+
@font-face {
|
| 355 |
+
font-family: 'Google Sans Text';
|
| 356 |
+
font-style: normal;
|
| 357 |
+
font-weight: 500;
|
| 358 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnVjtiu7.woff2) format('woff2');
|
| 359 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 360 |
+
}
|
| 361 |
+
/* symbols */
|
| 362 |
+
@font-face {
|
| 363 |
+
font-family: 'Google Sans Text';
|
| 364 |
+
font-style: normal;
|
| 365 |
+
font-weight: 500;
|
| 366 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVngZjtiu7.woff2) format('woff2');
|
| 367 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 368 |
+
}
|
| 369 |
+
/* tamil */
|
| 370 |
+
@font-face {
|
| 371 |
+
font-family: 'Google Sans Text';
|
| 372 |
+
font-style: normal;
|
| 373 |
+
font-weight: 500;
|
| 374 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnn5jtiu7.woff2) format('woff2');
|
| 375 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 376 |
+
}
|
| 377 |
+
/* telugu */
|
| 378 |
+
@font-face {
|
| 379 |
+
font-family: 'Google Sans Text';
|
| 380 |
+
font-style: normal;
|
| 381 |
+
font-weight: 500;
|
| 382 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnRjtiu7.woff2) format('woff2');
|
| 383 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 384 |
+
}
|
| 385 |
+
/* thai */
|
| 386 |
+
@font-face {
|
| 387 |
+
font-family: 'Google Sans Text';
|
| 388 |
+
font-style: normal;
|
| 389 |
+
font-weight: 500;
|
| 390 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnxjtiu7.woff2) format('woff2');
|
| 391 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 392 |
+
}
|
| 393 |
+
/* vietnamese */
|
| 394 |
+
@font-face {
|
| 395 |
+
font-family: 'Google Sans Text';
|
| 396 |
+
font-style: normal;
|
| 397 |
+
font-weight: 500;
|
| 398 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmdjtiu7.woff2) format('woff2');
|
| 399 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 400 |
+
}
|
| 401 |
+
/* latin-ext */
|
| 402 |
+
@font-face {
|
| 403 |
+
font-family: 'Google Sans Text';
|
| 404 |
+
font-style: normal;
|
| 405 |
+
font-weight: 500;
|
| 406 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmZjtiu7.woff2) format('woff2');
|
| 407 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 408 |
+
}
|
| 409 |
+
/* latin */
|
| 410 |
+
@font-face {
|
| 411 |
+
font-family: 'Google Sans Text';
|
| 412 |
+
font-style: normal;
|
| 413 |
+
font-weight: 500;
|
| 414 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmhjtg.woff2) format('woff2');
|
| 415 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 416 |
+
}
|
| 417 |
+
/* armenian */
|
| 418 |
+
@font-face {
|
| 419 |
+
font-family: 'Google Sans Text';
|
| 420 |
+
font-style: normal;
|
| 421 |
+
font-weight: 700;
|
| 422 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnhjtiu7.woff2) format('woff2');
|
| 423 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 424 |
+
}
|
| 425 |
+
/* bengali */
|
| 426 |
+
@font-face {
|
| 427 |
+
font-family: 'Google Sans Text';
|
| 428 |
+
font-style: normal;
|
| 429 |
+
font-weight: 700;
|
| 430 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnpjtiu7.woff2) format('woff2');
|
| 431 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 432 |
+
}
|
| 433 |
+
/* canadian-aboriginal */
|
| 434 |
+
@font-face {
|
| 435 |
+
font-family: 'Google Sans Text';
|
| 436 |
+
font-style: normal;
|
| 437 |
+
font-weight: 700;
|
| 438 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnkdjtiu7.woff2) format('woff2');
|
| 439 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 440 |
+
}
|
| 441 |
+
/* cyrillic-ext */
|
| 442 |
+
@font-face {
|
| 443 |
+
font-family: 'Google Sans Text';
|
| 444 |
+
font-style: normal;
|
| 445 |
+
font-weight: 700;
|
| 446 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmVjtiu7.woff2) format('woff2');
|
| 447 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 448 |
+
}
|
| 449 |
+
/* cyrillic */
|
| 450 |
+
@font-face {
|
| 451 |
+
font-family: 'Google Sans Text';
|
| 452 |
+
font-style: normal;
|
| 453 |
+
font-weight: 700;
|
| 454 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmxjtiu7.woff2) format('woff2');
|
| 455 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 456 |
+
}
|
| 457 |
+
/* devanagari */
|
| 458 |
+
@font-face {
|
| 459 |
+
font-family: 'Google Sans Text';
|
| 460 |
+
font-style: normal;
|
| 461 |
+
font-weight: 700;
|
| 462 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmljtiu7.woff2) format('woff2');
|
| 463 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 464 |
+
}
|
| 465 |
+
/* ethiopic */
|
| 466 |
+
@font-face {
|
| 467 |
+
font-family: 'Google Sans Text';
|
| 468 |
+
font-style: normal;
|
| 469 |
+
font-weight: 700;
|
| 470 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnljtiu7.woff2) format('woff2');
|
| 471 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 472 |
+
}
|
| 473 |
+
/* georgian */
|
| 474 |
+
@font-face {
|
| 475 |
+
font-family: 'Google Sans Text';
|
| 476 |
+
font-style: normal;
|
| 477 |
+
font-weight: 700;
|
| 478 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnndjtiu7.woff2) format('woff2');
|
| 479 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 480 |
+
}
|
| 481 |
+
/* greek-ext */
|
| 482 |
+
@font-face {
|
| 483 |
+
font-family: 'Google Sans Text';
|
| 484 |
+
font-style: normal;
|
| 485 |
+
font-weight: 700;
|
| 486 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmRjtiu7.woff2) format('woff2');
|
| 487 |
+
unicode-range: U+1F00-1FFF;
|
| 488 |
+
}
|
| 489 |
+
/* greek */
|
| 490 |
+
@font-face {
|
| 491 |
+
font-family: 'Google Sans Text';
|
| 492 |
+
font-style: normal;
|
| 493 |
+
font-weight: 700;
|
| 494 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmtjtiu7.woff2) format('woff2');
|
| 495 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 496 |
+
}
|
| 497 |
+
/* gujarati */
|
| 498 |
+
@font-face {
|
| 499 |
+
font-family: 'Google Sans Text';
|
| 500 |
+
font-style: normal;
|
| 501 |
+
font-weight: 700;
|
| 502 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnNjtiu7.woff2) format('woff2');
|
| 503 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 504 |
+
}
|
| 505 |
+
/* gurmukhi */
|
| 506 |
+
@font-face {
|
| 507 |
+
font-family: 'Google Sans Text';
|
| 508 |
+
font-style: normal;
|
| 509 |
+
font-weight: 700;
|
| 510 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnktjtiu7.woff2) format('woff2');
|
| 511 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 512 |
+
}
|
| 513 |
+
/* hebrew */
|
| 514 |
+
@font-face {
|
| 515 |
+
font-family: 'Google Sans Text';
|
| 516 |
+
font-style: normal;
|
| 517 |
+
font-weight: 700;
|
| 518 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmpjtiu7.woff2) format('woff2');
|
| 519 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 520 |
+
}
|
| 521 |
+
/* kannada */
|
| 522 |
+
@font-face {
|
| 523 |
+
font-family: 'Google Sans Text';
|
| 524 |
+
font-style: normal;
|
| 525 |
+
font-weight: 700;
|
| 526 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnJjtiu7.woff2) format('woff2');
|
| 527 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 528 |
+
}
|
| 529 |
+
/* khmer */
|
| 530 |
+
@font-face {
|
| 531 |
+
font-family: 'Google Sans Text';
|
| 532 |
+
font-style: normal;
|
| 533 |
+
font-weight: 700;
|
| 534 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmNjtiu7.woff2) format('woff2');
|
| 535 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 536 |
+
}
|
| 537 |
+
/* lao */
|
| 538 |
+
@font-face {
|
| 539 |
+
font-family: 'Google Sans Text';
|
| 540 |
+
font-style: normal;
|
| 541 |
+
font-weight: 700;
|
| 542 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmFjtiu7.woff2) format('woff2');
|
| 543 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 544 |
+
}
|
| 545 |
+
/* malayalam */
|
| 546 |
+
@font-face {
|
| 547 |
+
font-family: 'Google Sans Text';
|
| 548 |
+
font-style: normal;
|
| 549 |
+
font-weight: 700;
|
| 550 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnBjtiu7.woff2) format('woff2');
|
| 551 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 552 |
+
}
|
| 553 |
+
/* oriya */
|
| 554 |
+
@font-face {
|
| 555 |
+
font-family: 'Google Sans Text';
|
| 556 |
+
font-style: normal;
|
| 557 |
+
font-weight: 700;
|
| 558 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnFjtiu7.woff2) format('woff2');
|
| 559 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 560 |
+
}
|
| 561 |
+
/* sinhala */
|
| 562 |
+
@font-face {
|
| 563 |
+
font-family: 'Google Sans Text';
|
| 564 |
+
font-style: normal;
|
| 565 |
+
font-weight: 700;
|
| 566 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnVjtiu7.woff2) format('woff2');
|
| 567 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 568 |
+
}
|
| 569 |
+
/* symbols */
|
| 570 |
+
@font-face {
|
| 571 |
+
font-family: 'Google Sans Text';
|
| 572 |
+
font-style: normal;
|
| 573 |
+
font-weight: 700;
|
| 574 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTngZjtiu7.woff2) format('woff2');
|
| 575 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 576 |
+
}
|
| 577 |
+
/* tamil */
|
| 578 |
+
@font-face {
|
| 579 |
+
font-family: 'Google Sans Text';
|
| 580 |
+
font-style: normal;
|
| 581 |
+
font-weight: 700;
|
| 582 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnn5jtiu7.woff2) format('woff2');
|
| 583 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 584 |
+
}
|
| 585 |
+
/* telugu */
|
| 586 |
+
@font-face {
|
| 587 |
+
font-family: 'Google Sans Text';
|
| 588 |
+
font-style: normal;
|
| 589 |
+
font-weight: 700;
|
| 590 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnRjtiu7.woff2) format('woff2');
|
| 591 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 592 |
+
}
|
| 593 |
+
/* thai */
|
| 594 |
+
@font-face {
|
| 595 |
+
font-family: 'Google Sans Text';
|
| 596 |
+
font-style: normal;
|
| 597 |
+
font-weight: 700;
|
| 598 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnxjtiu7.woff2) format('woff2');
|
| 599 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 600 |
+
}
|
| 601 |
+
/* vietnamese */
|
| 602 |
+
@font-face {
|
| 603 |
+
font-family: 'Google Sans Text';
|
| 604 |
+
font-style: normal;
|
| 605 |
+
font-weight: 700;
|
| 606 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmdjtiu7.woff2) format('woff2');
|
| 607 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 608 |
+
}
|
| 609 |
+
/* latin-ext */
|
| 610 |
+
@font-face {
|
| 611 |
+
font-family: 'Google Sans Text';
|
| 612 |
+
font-style: normal;
|
| 613 |
+
font-weight: 700;
|
| 614 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmZjtiu7.woff2) format('woff2');
|
| 615 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 616 |
+
}
|
| 617 |
+
/* latin */
|
| 618 |
+
@font-face {
|
| 619 |
+
font-family: 'Google Sans Text';
|
| 620 |
+
font-style: normal;
|
| 621 |
+
font-weight: 700;
|
| 622 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmhjtg.woff2) format('woff2');
|
| 623 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 624 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qab3d58ea25ae
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qac9cb8a8b4c3
ADDED
|
@@ -0,0 +1,624 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* armenian */
|
| 2 |
+
@font-face {
|
| 3 |
+
font-family: 'Google Sans Text';
|
| 4 |
+
font-style: normal;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFp2i1dC.woff2) format('woff2');
|
| 7 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 8 |
+
}
|
| 9 |
+
/* bengali */
|
| 10 |
+
@font-face {
|
| 11 |
+
font-family: 'Google Sans Text';
|
| 12 |
+
font-style: normal;
|
| 13 |
+
font-weight: 400;
|
| 14 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFh2i1dC.woff2) format('woff2');
|
| 15 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 16 |
+
}
|
| 17 |
+
/* canadian-aboriginal */
|
| 18 |
+
@font-face {
|
| 19 |
+
font-family: 'Google Sans Text';
|
| 20 |
+
font-style: normal;
|
| 21 |
+
font-weight: 400;
|
| 22 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGV2i1dC.woff2) format('woff2');
|
| 23 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 24 |
+
}
|
| 25 |
+
/* cyrillic-ext */
|
| 26 |
+
@font-face {
|
| 27 |
+
font-family: 'Google Sans Text';
|
| 28 |
+
font-style: normal;
|
| 29 |
+
font-weight: 400;
|
| 30 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEd2i1dC.woff2) format('woff2');
|
| 31 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 32 |
+
}
|
| 33 |
+
/* cyrillic */
|
| 34 |
+
@font-face {
|
| 35 |
+
font-family: 'Google Sans Text';
|
| 36 |
+
font-style: normal;
|
| 37 |
+
font-weight: 400;
|
| 38 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qE52i1dC.woff2) format('woff2');
|
| 39 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 40 |
+
}
|
| 41 |
+
/* devanagari */
|
| 42 |
+
@font-face {
|
| 43 |
+
font-family: 'Google Sans Text';
|
| 44 |
+
font-style: normal;
|
| 45 |
+
font-weight: 400;
|
| 46 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEt2i1dC.woff2) format('woff2');
|
| 47 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 48 |
+
}
|
| 49 |
+
/* ethiopic */
|
| 50 |
+
@font-face {
|
| 51 |
+
font-family: 'Google Sans Text';
|
| 52 |
+
font-style: normal;
|
| 53 |
+
font-weight: 400;
|
| 54 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFt2i1dC.woff2) format('woff2');
|
| 55 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 56 |
+
}
|
| 57 |
+
/* georgian */
|
| 58 |
+
@font-face {
|
| 59 |
+
font-family: 'Google Sans Text';
|
| 60 |
+
font-style: normal;
|
| 61 |
+
font-weight: 400;
|
| 62 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFV2i1dC.woff2) format('woff2');
|
| 63 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 64 |
+
}
|
| 65 |
+
/* greek-ext */
|
| 66 |
+
@font-face {
|
| 67 |
+
font-family: 'Google Sans Text';
|
| 68 |
+
font-style: normal;
|
| 69 |
+
font-weight: 400;
|
| 70 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEZ2i1dC.woff2) format('woff2');
|
| 71 |
+
unicode-range: U+1F00-1FFF;
|
| 72 |
+
}
|
| 73 |
+
/* greek */
|
| 74 |
+
@font-face {
|
| 75 |
+
font-family: 'Google Sans Text';
|
| 76 |
+
font-style: normal;
|
| 77 |
+
font-weight: 400;
|
| 78 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEl2i1dC.woff2) format('woff2');
|
| 79 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 80 |
+
}
|
| 81 |
+
/* gujarati */
|
| 82 |
+
@font-face {
|
| 83 |
+
font-family: 'Google Sans Text';
|
| 84 |
+
font-style: normal;
|
| 85 |
+
font-weight: 400;
|
| 86 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFF2i1dC.woff2) format('woff2');
|
| 87 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 88 |
+
}
|
| 89 |
+
/* gurmukhi */
|
| 90 |
+
@font-face {
|
| 91 |
+
font-family: 'Google Sans Text';
|
| 92 |
+
font-style: normal;
|
| 93 |
+
font-weight: 400;
|
| 94 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGl2i1dC.woff2) format('woff2');
|
| 95 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 96 |
+
}
|
| 97 |
+
/* hebrew */
|
| 98 |
+
@font-face {
|
| 99 |
+
font-family: 'Google Sans Text';
|
| 100 |
+
font-style: normal;
|
| 101 |
+
font-weight: 400;
|
| 102 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEh2i1dC.woff2) format('woff2');
|
| 103 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 104 |
+
}
|
| 105 |
+
/* kannada */
|
| 106 |
+
@font-face {
|
| 107 |
+
font-family: 'Google Sans Text';
|
| 108 |
+
font-style: normal;
|
| 109 |
+
font-weight: 400;
|
| 110 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFB2i1dC.woff2) format('woff2');
|
| 111 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 112 |
+
}
|
| 113 |
+
/* khmer */
|
| 114 |
+
@font-face {
|
| 115 |
+
font-family: 'Google Sans Text';
|
| 116 |
+
font-style: normal;
|
| 117 |
+
font-weight: 400;
|
| 118 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEF2i1dC.woff2) format('woff2');
|
| 119 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 120 |
+
}
|
| 121 |
+
/* lao */
|
| 122 |
+
@font-face {
|
| 123 |
+
font-family: 'Google Sans Text';
|
| 124 |
+
font-style: normal;
|
| 125 |
+
font-weight: 400;
|
| 126 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEN2i1dC.woff2) format('woff2');
|
| 127 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 128 |
+
}
|
| 129 |
+
/* malayalam */
|
| 130 |
+
@font-face {
|
| 131 |
+
font-family: 'Google Sans Text';
|
| 132 |
+
font-style: normal;
|
| 133 |
+
font-weight: 400;
|
| 134 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFJ2i1dC.woff2) format('woff2');
|
| 135 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 136 |
+
}
|
| 137 |
+
/* oriya */
|
| 138 |
+
@font-face {
|
| 139 |
+
font-family: 'Google Sans Text';
|
| 140 |
+
font-style: normal;
|
| 141 |
+
font-weight: 400;
|
| 142 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFN2i1dC.woff2) format('woff2');
|
| 143 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 144 |
+
}
|
| 145 |
+
/* sinhala */
|
| 146 |
+
@font-face {
|
| 147 |
+
font-family: 'Google Sans Text';
|
| 148 |
+
font-style: normal;
|
| 149 |
+
font-weight: 400;
|
| 150 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFd2i1dC.woff2) format('woff2');
|
| 151 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 152 |
+
}
|
| 153 |
+
/* symbols */
|
| 154 |
+
@font-face {
|
| 155 |
+
font-family: 'Google Sans Text';
|
| 156 |
+
font-style: normal;
|
| 157 |
+
font-weight: 400;
|
| 158 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qCR2i1dC.woff2) format('woff2');
|
| 159 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 160 |
+
}
|
| 161 |
+
/* tamil */
|
| 162 |
+
@font-face {
|
| 163 |
+
font-family: 'Google Sans Text';
|
| 164 |
+
font-style: normal;
|
| 165 |
+
font-weight: 400;
|
| 166 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFx2i1dC.woff2) format('woff2');
|
| 167 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 168 |
+
}
|
| 169 |
+
/* telugu */
|
| 170 |
+
@font-face {
|
| 171 |
+
font-family: 'Google Sans Text';
|
| 172 |
+
font-style: normal;
|
| 173 |
+
font-weight: 400;
|
| 174 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFZ2i1dC.woff2) format('woff2');
|
| 175 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 176 |
+
}
|
| 177 |
+
/* thai */
|
| 178 |
+
@font-face {
|
| 179 |
+
font-family: 'Google Sans Text';
|
| 180 |
+
font-style: normal;
|
| 181 |
+
font-weight: 400;
|
| 182 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qF52i1dC.woff2) format('woff2');
|
| 183 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 184 |
+
}
|
| 185 |
+
/* vietnamese */
|
| 186 |
+
@font-face {
|
| 187 |
+
font-family: 'Google Sans Text';
|
| 188 |
+
font-style: normal;
|
| 189 |
+
font-weight: 400;
|
| 190 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEV2i1dC.woff2) format('woff2');
|
| 191 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 192 |
+
}
|
| 193 |
+
/* latin-ext */
|
| 194 |
+
@font-face {
|
| 195 |
+
font-family: 'Google Sans Text';
|
| 196 |
+
font-style: normal;
|
| 197 |
+
font-weight: 400;
|
| 198 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qER2i1dC.woff2) format('woff2');
|
| 199 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 200 |
+
}
|
| 201 |
+
/* latin */
|
| 202 |
+
@font-face {
|
| 203 |
+
font-family: 'Google Sans Text';
|
| 204 |
+
font-style: normal;
|
| 205 |
+
font-weight: 400;
|
| 206 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEp2iw.woff2) format('woff2');
|
| 207 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 208 |
+
}
|
| 209 |
+
/* armenian */
|
| 210 |
+
@font-face {
|
| 211 |
+
font-family: 'Google Sans Text';
|
| 212 |
+
font-style: normal;
|
| 213 |
+
font-weight: 500;
|
| 214 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnhjtiu7.woff2) format('woff2');
|
| 215 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 216 |
+
}
|
| 217 |
+
/* bengali */
|
| 218 |
+
@font-face {
|
| 219 |
+
font-family: 'Google Sans Text';
|
| 220 |
+
font-style: normal;
|
| 221 |
+
font-weight: 500;
|
| 222 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnpjtiu7.woff2) format('woff2');
|
| 223 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 224 |
+
}
|
| 225 |
+
/* canadian-aboriginal */
|
| 226 |
+
@font-face {
|
| 227 |
+
font-family: 'Google Sans Text';
|
| 228 |
+
font-style: normal;
|
| 229 |
+
font-weight: 500;
|
| 230 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnkdjtiu7.woff2) format('woff2');
|
| 231 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 232 |
+
}
|
| 233 |
+
/* cyrillic-ext */
|
| 234 |
+
@font-face {
|
| 235 |
+
font-family: 'Google Sans Text';
|
| 236 |
+
font-style: normal;
|
| 237 |
+
font-weight: 500;
|
| 238 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmVjtiu7.woff2) format('woff2');
|
| 239 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 240 |
+
}
|
| 241 |
+
/* cyrillic */
|
| 242 |
+
@font-face {
|
| 243 |
+
font-family: 'Google Sans Text';
|
| 244 |
+
font-style: normal;
|
| 245 |
+
font-weight: 500;
|
| 246 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmxjtiu7.woff2) format('woff2');
|
| 247 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 248 |
+
}
|
| 249 |
+
/* devanagari */
|
| 250 |
+
@font-face {
|
| 251 |
+
font-family: 'Google Sans Text';
|
| 252 |
+
font-style: normal;
|
| 253 |
+
font-weight: 500;
|
| 254 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmljtiu7.woff2) format('woff2');
|
| 255 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 256 |
+
}
|
| 257 |
+
/* ethiopic */
|
| 258 |
+
@font-face {
|
| 259 |
+
font-family: 'Google Sans Text';
|
| 260 |
+
font-style: normal;
|
| 261 |
+
font-weight: 500;
|
| 262 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnljtiu7.woff2) format('woff2');
|
| 263 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 264 |
+
}
|
| 265 |
+
/* georgian */
|
| 266 |
+
@font-face {
|
| 267 |
+
font-family: 'Google Sans Text';
|
| 268 |
+
font-style: normal;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnndjtiu7.woff2) format('woff2');
|
| 271 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 272 |
+
}
|
| 273 |
+
/* greek-ext */
|
| 274 |
+
@font-face {
|
| 275 |
+
font-family: 'Google Sans Text';
|
| 276 |
+
font-style: normal;
|
| 277 |
+
font-weight: 500;
|
| 278 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmRjtiu7.woff2) format('woff2');
|
| 279 |
+
unicode-range: U+1F00-1FFF;
|
| 280 |
+
}
|
| 281 |
+
/* greek */
|
| 282 |
+
@font-face {
|
| 283 |
+
font-family: 'Google Sans Text';
|
| 284 |
+
font-style: normal;
|
| 285 |
+
font-weight: 500;
|
| 286 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmtjtiu7.woff2) format('woff2');
|
| 287 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 288 |
+
}
|
| 289 |
+
/* gujarati */
|
| 290 |
+
@font-face {
|
| 291 |
+
font-family: 'Google Sans Text';
|
| 292 |
+
font-style: normal;
|
| 293 |
+
font-weight: 500;
|
| 294 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnNjtiu7.woff2) format('woff2');
|
| 295 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 296 |
+
}
|
| 297 |
+
/* gurmukhi */
|
| 298 |
+
@font-face {
|
| 299 |
+
font-family: 'Google Sans Text';
|
| 300 |
+
font-style: normal;
|
| 301 |
+
font-weight: 500;
|
| 302 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnktjtiu7.woff2) format('woff2');
|
| 303 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 304 |
+
}
|
| 305 |
+
/* hebrew */
|
| 306 |
+
@font-face {
|
| 307 |
+
font-family: 'Google Sans Text';
|
| 308 |
+
font-style: normal;
|
| 309 |
+
font-weight: 500;
|
| 310 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmpjtiu7.woff2) format('woff2');
|
| 311 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 312 |
+
}
|
| 313 |
+
/* kannada */
|
| 314 |
+
@font-face {
|
| 315 |
+
font-family: 'Google Sans Text';
|
| 316 |
+
font-style: normal;
|
| 317 |
+
font-weight: 500;
|
| 318 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnJjtiu7.woff2) format('woff2');
|
| 319 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 320 |
+
}
|
| 321 |
+
/* khmer */
|
| 322 |
+
@font-face {
|
| 323 |
+
font-family: 'Google Sans Text';
|
| 324 |
+
font-style: normal;
|
| 325 |
+
font-weight: 500;
|
| 326 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmNjtiu7.woff2) format('woff2');
|
| 327 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 328 |
+
}
|
| 329 |
+
/* lao */
|
| 330 |
+
@font-face {
|
| 331 |
+
font-family: 'Google Sans Text';
|
| 332 |
+
font-style: normal;
|
| 333 |
+
font-weight: 500;
|
| 334 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmFjtiu7.woff2) format('woff2');
|
| 335 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 336 |
+
}
|
| 337 |
+
/* malayalam */
|
| 338 |
+
@font-face {
|
| 339 |
+
font-family: 'Google Sans Text';
|
| 340 |
+
font-style: normal;
|
| 341 |
+
font-weight: 500;
|
| 342 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnBjtiu7.woff2) format('woff2');
|
| 343 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 344 |
+
}
|
| 345 |
+
/* oriya */
|
| 346 |
+
@font-face {
|
| 347 |
+
font-family: 'Google Sans Text';
|
| 348 |
+
font-style: normal;
|
| 349 |
+
font-weight: 500;
|
| 350 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnFjtiu7.woff2) format('woff2');
|
| 351 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 352 |
+
}
|
| 353 |
+
/* sinhala */
|
| 354 |
+
@font-face {
|
| 355 |
+
font-family: 'Google Sans Text';
|
| 356 |
+
font-style: normal;
|
| 357 |
+
font-weight: 500;
|
| 358 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnVjtiu7.woff2) format('woff2');
|
| 359 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 360 |
+
}
|
| 361 |
+
/* symbols */
|
| 362 |
+
@font-face {
|
| 363 |
+
font-family: 'Google Sans Text';
|
| 364 |
+
font-style: normal;
|
| 365 |
+
font-weight: 500;
|
| 366 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVngZjtiu7.woff2) format('woff2');
|
| 367 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 368 |
+
}
|
| 369 |
+
/* tamil */
|
| 370 |
+
@font-face {
|
| 371 |
+
font-family: 'Google Sans Text';
|
| 372 |
+
font-style: normal;
|
| 373 |
+
font-weight: 500;
|
| 374 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnn5jtiu7.woff2) format('woff2');
|
| 375 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 376 |
+
}
|
| 377 |
+
/* telugu */
|
| 378 |
+
@font-face {
|
| 379 |
+
font-family: 'Google Sans Text';
|
| 380 |
+
font-style: normal;
|
| 381 |
+
font-weight: 500;
|
| 382 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnRjtiu7.woff2) format('woff2');
|
| 383 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 384 |
+
}
|
| 385 |
+
/* thai */
|
| 386 |
+
@font-face {
|
| 387 |
+
font-family: 'Google Sans Text';
|
| 388 |
+
font-style: normal;
|
| 389 |
+
font-weight: 500;
|
| 390 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnxjtiu7.woff2) format('woff2');
|
| 391 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 392 |
+
}
|
| 393 |
+
/* vietnamese */
|
| 394 |
+
@font-face {
|
| 395 |
+
font-family: 'Google Sans Text';
|
| 396 |
+
font-style: normal;
|
| 397 |
+
font-weight: 500;
|
| 398 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmdjtiu7.woff2) format('woff2');
|
| 399 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 400 |
+
}
|
| 401 |
+
/* latin-ext */
|
| 402 |
+
@font-face {
|
| 403 |
+
font-family: 'Google Sans Text';
|
| 404 |
+
font-style: normal;
|
| 405 |
+
font-weight: 500;
|
| 406 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmZjtiu7.woff2) format('woff2');
|
| 407 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 408 |
+
}
|
| 409 |
+
/* latin */
|
| 410 |
+
@font-face {
|
| 411 |
+
font-family: 'Google Sans Text';
|
| 412 |
+
font-style: normal;
|
| 413 |
+
font-weight: 500;
|
| 414 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmhjtg.woff2) format('woff2');
|
| 415 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 416 |
+
}
|
| 417 |
+
/* armenian */
|
| 418 |
+
@font-face {
|
| 419 |
+
font-family: 'Google Sans Text';
|
| 420 |
+
font-style: normal;
|
| 421 |
+
font-weight: 700;
|
| 422 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnhjtiu7.woff2) format('woff2');
|
| 423 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 424 |
+
}
|
| 425 |
+
/* bengali */
|
| 426 |
+
@font-face {
|
| 427 |
+
font-family: 'Google Sans Text';
|
| 428 |
+
font-style: normal;
|
| 429 |
+
font-weight: 700;
|
| 430 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnpjtiu7.woff2) format('woff2');
|
| 431 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 432 |
+
}
|
| 433 |
+
/* canadian-aboriginal */
|
| 434 |
+
@font-face {
|
| 435 |
+
font-family: 'Google Sans Text';
|
| 436 |
+
font-style: normal;
|
| 437 |
+
font-weight: 700;
|
| 438 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnkdjtiu7.woff2) format('woff2');
|
| 439 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 440 |
+
}
|
| 441 |
+
/* cyrillic-ext */
|
| 442 |
+
@font-face {
|
| 443 |
+
font-family: 'Google Sans Text';
|
| 444 |
+
font-style: normal;
|
| 445 |
+
font-weight: 700;
|
| 446 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmVjtiu7.woff2) format('woff2');
|
| 447 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 448 |
+
}
|
| 449 |
+
/* cyrillic */
|
| 450 |
+
@font-face {
|
| 451 |
+
font-family: 'Google Sans Text';
|
| 452 |
+
font-style: normal;
|
| 453 |
+
font-weight: 700;
|
| 454 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmxjtiu7.woff2) format('woff2');
|
| 455 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 456 |
+
}
|
| 457 |
+
/* devanagari */
|
| 458 |
+
@font-face {
|
| 459 |
+
font-family: 'Google Sans Text';
|
| 460 |
+
font-style: normal;
|
| 461 |
+
font-weight: 700;
|
| 462 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmljtiu7.woff2) format('woff2');
|
| 463 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 464 |
+
}
|
| 465 |
+
/* ethiopic */
|
| 466 |
+
@font-face {
|
| 467 |
+
font-family: 'Google Sans Text';
|
| 468 |
+
font-style: normal;
|
| 469 |
+
font-weight: 700;
|
| 470 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnljtiu7.woff2) format('woff2');
|
| 471 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 472 |
+
}
|
| 473 |
+
/* georgian */
|
| 474 |
+
@font-face {
|
| 475 |
+
font-family: 'Google Sans Text';
|
| 476 |
+
font-style: normal;
|
| 477 |
+
font-weight: 700;
|
| 478 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnndjtiu7.woff2) format('woff2');
|
| 479 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 480 |
+
}
|
| 481 |
+
/* greek-ext */
|
| 482 |
+
@font-face {
|
| 483 |
+
font-family: 'Google Sans Text';
|
| 484 |
+
font-style: normal;
|
| 485 |
+
font-weight: 700;
|
| 486 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmRjtiu7.woff2) format('woff2');
|
| 487 |
+
unicode-range: U+1F00-1FFF;
|
| 488 |
+
}
|
| 489 |
+
/* greek */
|
| 490 |
+
@font-face {
|
| 491 |
+
font-family: 'Google Sans Text';
|
| 492 |
+
font-style: normal;
|
| 493 |
+
font-weight: 700;
|
| 494 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmtjtiu7.woff2) format('woff2');
|
| 495 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 496 |
+
}
|
| 497 |
+
/* gujarati */
|
| 498 |
+
@font-face {
|
| 499 |
+
font-family: 'Google Sans Text';
|
| 500 |
+
font-style: normal;
|
| 501 |
+
font-weight: 700;
|
| 502 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnNjtiu7.woff2) format('woff2');
|
| 503 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 504 |
+
}
|
| 505 |
+
/* gurmukhi */
|
| 506 |
+
@font-face {
|
| 507 |
+
font-family: 'Google Sans Text';
|
| 508 |
+
font-style: normal;
|
| 509 |
+
font-weight: 700;
|
| 510 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnktjtiu7.woff2) format('woff2');
|
| 511 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 512 |
+
}
|
| 513 |
+
/* hebrew */
|
| 514 |
+
@font-face {
|
| 515 |
+
font-family: 'Google Sans Text';
|
| 516 |
+
font-style: normal;
|
| 517 |
+
font-weight: 700;
|
| 518 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmpjtiu7.woff2) format('woff2');
|
| 519 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 520 |
+
}
|
| 521 |
+
/* kannada */
|
| 522 |
+
@font-face {
|
| 523 |
+
font-family: 'Google Sans Text';
|
| 524 |
+
font-style: normal;
|
| 525 |
+
font-weight: 700;
|
| 526 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnJjtiu7.woff2) format('woff2');
|
| 527 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 528 |
+
}
|
| 529 |
+
/* khmer */
|
| 530 |
+
@font-face {
|
| 531 |
+
font-family: 'Google Sans Text';
|
| 532 |
+
font-style: normal;
|
| 533 |
+
font-weight: 700;
|
| 534 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmNjtiu7.woff2) format('woff2');
|
| 535 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 536 |
+
}
|
| 537 |
+
/* lao */
|
| 538 |
+
@font-face {
|
| 539 |
+
font-family: 'Google Sans Text';
|
| 540 |
+
font-style: normal;
|
| 541 |
+
font-weight: 700;
|
| 542 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmFjtiu7.woff2) format('woff2');
|
| 543 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 544 |
+
}
|
| 545 |
+
/* malayalam */
|
| 546 |
+
@font-face {
|
| 547 |
+
font-family: 'Google Sans Text';
|
| 548 |
+
font-style: normal;
|
| 549 |
+
font-weight: 700;
|
| 550 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnBjtiu7.woff2) format('woff2');
|
| 551 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 552 |
+
}
|
| 553 |
+
/* oriya */
|
| 554 |
+
@font-face {
|
| 555 |
+
font-family: 'Google Sans Text';
|
| 556 |
+
font-style: normal;
|
| 557 |
+
font-weight: 700;
|
| 558 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnFjtiu7.woff2) format('woff2');
|
| 559 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 560 |
+
}
|
| 561 |
+
/* sinhala */
|
| 562 |
+
@font-face {
|
| 563 |
+
font-family: 'Google Sans Text';
|
| 564 |
+
font-style: normal;
|
| 565 |
+
font-weight: 700;
|
| 566 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnVjtiu7.woff2) format('woff2');
|
| 567 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 568 |
+
}
|
| 569 |
+
/* symbols */
|
| 570 |
+
@font-face {
|
| 571 |
+
font-family: 'Google Sans Text';
|
| 572 |
+
font-style: normal;
|
| 573 |
+
font-weight: 700;
|
| 574 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTngZjtiu7.woff2) format('woff2');
|
| 575 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 576 |
+
}
|
| 577 |
+
/* tamil */
|
| 578 |
+
@font-face {
|
| 579 |
+
font-family: 'Google Sans Text';
|
| 580 |
+
font-style: normal;
|
| 581 |
+
font-weight: 700;
|
| 582 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnn5jtiu7.woff2) format('woff2');
|
| 583 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 584 |
+
}
|
| 585 |
+
/* telugu */
|
| 586 |
+
@font-face {
|
| 587 |
+
font-family: 'Google Sans Text';
|
| 588 |
+
font-style: normal;
|
| 589 |
+
font-weight: 700;
|
| 590 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnRjtiu7.woff2) format('woff2');
|
| 591 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 592 |
+
}
|
| 593 |
+
/* thai */
|
| 594 |
+
@font-face {
|
| 595 |
+
font-family: 'Google Sans Text';
|
| 596 |
+
font-style: normal;
|
| 597 |
+
font-weight: 700;
|
| 598 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnnxjtiu7.woff2) format('woff2');
|
| 599 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 600 |
+
}
|
| 601 |
+
/* vietnamese */
|
| 602 |
+
@font-face {
|
| 603 |
+
font-family: 'Google Sans Text';
|
| 604 |
+
font-style: normal;
|
| 605 |
+
font-weight: 700;
|
| 606 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmdjtiu7.woff2) format('woff2');
|
| 607 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 608 |
+
}
|
| 609 |
+
/* latin-ext */
|
| 610 |
+
@font-face {
|
| 611 |
+
font-family: 'Google Sans Text';
|
| 612 |
+
font-style: normal;
|
| 613 |
+
font-weight: 700;
|
| 614 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmZjtiu7.woff2) format('woff2');
|
| 615 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 616 |
+
}
|
| 617 |
+
/* latin */
|
| 618 |
+
@font-face {
|
| 619 |
+
font-family: 'Google Sans Text';
|
| 620 |
+
font-style: normal;
|
| 621 |
+
font-weight: 700;
|
| 622 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmhjtg.woff2) format('woff2');
|
| 623 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 624 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qf78552406adb
ADDED
|
@@ -0,0 +1,1147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
font-weight: 300;
|
| 6 |
+
font-stretch: 100%;
|
| 7 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtE6F15M.woff2) format('woff2');
|
| 8 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 9 |
+
}
|
| 10 |
+
/* cyrillic */
|
| 11 |
+
@font-face {
|
| 12 |
+
font-family: 'Open Sans';
|
| 13 |
+
font-style: italic;
|
| 14 |
+
font-weight: 300;
|
| 15 |
+
font-stretch: 100%;
|
| 16 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWvU6F15M.woff2) format('woff2');
|
| 17 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 18 |
+
}
|
| 19 |
+
/* greek-ext */
|
| 20 |
+
@font-face {
|
| 21 |
+
font-family: 'Open Sans';
|
| 22 |
+
font-style: italic;
|
| 23 |
+
font-weight: 300;
|
| 24 |
+
font-stretch: 100%;
|
| 25 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtU6F15M.woff2) format('woff2');
|
| 26 |
+
unicode-range: U+1F00-1FFF;
|
| 27 |
+
}
|
| 28 |
+
/* greek */
|
| 29 |
+
@font-face {
|
| 30 |
+
font-family: 'Open Sans';
|
| 31 |
+
font-style: italic;
|
| 32 |
+
font-weight: 300;
|
| 33 |
+
font-stretch: 100%;
|
| 34 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuk6F15M.woff2) format('woff2');
|
| 35 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 36 |
+
}
|
| 37 |
+
/* hebrew */
|
| 38 |
+
@font-face {
|
| 39 |
+
font-family: 'Open Sans';
|
| 40 |
+
font-style: italic;
|
| 41 |
+
font-weight: 300;
|
| 42 |
+
font-stretch: 100%;
|
| 43 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWu06F15M.woff2) format('woff2');
|
| 44 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 45 |
+
}
|
| 46 |
+
/* math */
|
| 47 |
+
@font-face {
|
| 48 |
+
font-family: 'Open Sans';
|
| 49 |
+
font-style: italic;
|
| 50 |
+
font-weight: 300;
|
| 51 |
+
font-stretch: 100%;
|
| 52 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWxU6F15M.woff2) format('woff2');
|
| 53 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 54 |
+
}
|
| 55 |
+
/* symbols */
|
| 56 |
+
@font-face {
|
| 57 |
+
font-family: 'Open Sans';
|
| 58 |
+
font-style: italic;
|
| 59 |
+
font-weight: 300;
|
| 60 |
+
font-stretch: 100%;
|
| 61 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqW106F15M.woff2) format('woff2');
|
| 62 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 63 |
+
}
|
| 64 |
+
/* vietnamese */
|
| 65 |
+
@font-face {
|
| 66 |
+
font-family: 'Open Sans';
|
| 67 |
+
font-style: italic;
|
| 68 |
+
font-weight: 300;
|
| 69 |
+
font-stretch: 100%;
|
| 70 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtk6F15M.woff2) format('woff2');
|
| 71 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 72 |
+
}
|
| 73 |
+
/* latin-ext */
|
| 74 |
+
@font-face {
|
| 75 |
+
font-family: 'Open Sans';
|
| 76 |
+
font-style: italic;
|
| 77 |
+
font-weight: 300;
|
| 78 |
+
font-stretch: 100%;
|
| 79 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWt06F15M.woff2) format('woff2');
|
| 80 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 81 |
+
}
|
| 82 |
+
/* latin */
|
| 83 |
+
@font-face {
|
| 84 |
+
font-family: 'Open Sans';
|
| 85 |
+
font-style: italic;
|
| 86 |
+
font-weight: 300;
|
| 87 |
+
font-stretch: 100%;
|
| 88 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuU6F.woff2) format('woff2');
|
| 89 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 90 |
+
}
|
| 91 |
+
/* cyrillic-ext */
|
| 92 |
+
@font-face {
|
| 93 |
+
font-family: 'Open Sans';
|
| 94 |
+
font-style: italic;
|
| 95 |
+
font-weight: 400;
|
| 96 |
+
font-stretch: 100%;
|
| 97 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtE6F15M.woff2) format('woff2');
|
| 98 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 99 |
+
}
|
| 100 |
+
/* cyrillic */
|
| 101 |
+
@font-face {
|
| 102 |
+
font-family: 'Open Sans';
|
| 103 |
+
font-style: italic;
|
| 104 |
+
font-weight: 400;
|
| 105 |
+
font-stretch: 100%;
|
| 106 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWvU6F15M.woff2) format('woff2');
|
| 107 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 108 |
+
}
|
| 109 |
+
/* greek-ext */
|
| 110 |
+
@font-face {
|
| 111 |
+
font-family: 'Open Sans';
|
| 112 |
+
font-style: italic;
|
| 113 |
+
font-weight: 400;
|
| 114 |
+
font-stretch: 100%;
|
| 115 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtU6F15M.woff2) format('woff2');
|
| 116 |
+
unicode-range: U+1F00-1FFF;
|
| 117 |
+
}
|
| 118 |
+
/* greek */
|
| 119 |
+
@font-face {
|
| 120 |
+
font-family: 'Open Sans';
|
| 121 |
+
font-style: italic;
|
| 122 |
+
font-weight: 400;
|
| 123 |
+
font-stretch: 100%;
|
| 124 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuk6F15M.woff2) format('woff2');
|
| 125 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 126 |
+
}
|
| 127 |
+
/* hebrew */
|
| 128 |
+
@font-face {
|
| 129 |
+
font-family: 'Open Sans';
|
| 130 |
+
font-style: italic;
|
| 131 |
+
font-weight: 400;
|
| 132 |
+
font-stretch: 100%;
|
| 133 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWu06F15M.woff2) format('woff2');
|
| 134 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 135 |
+
}
|
| 136 |
+
/* math */
|
| 137 |
+
@font-face {
|
| 138 |
+
font-family: 'Open Sans';
|
| 139 |
+
font-style: italic;
|
| 140 |
+
font-weight: 400;
|
| 141 |
+
font-stretch: 100%;
|
| 142 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWxU6F15M.woff2) format('woff2');
|
| 143 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 144 |
+
}
|
| 145 |
+
/* symbols */
|
| 146 |
+
@font-face {
|
| 147 |
+
font-family: 'Open Sans';
|
| 148 |
+
font-style: italic;
|
| 149 |
+
font-weight: 400;
|
| 150 |
+
font-stretch: 100%;
|
| 151 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqW106F15M.woff2) format('woff2');
|
| 152 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 153 |
+
}
|
| 154 |
+
/* vietnamese */
|
| 155 |
+
@font-face {
|
| 156 |
+
font-family: 'Open Sans';
|
| 157 |
+
font-style: italic;
|
| 158 |
+
font-weight: 400;
|
| 159 |
+
font-stretch: 100%;
|
| 160 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtk6F15M.woff2) format('woff2');
|
| 161 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 162 |
+
}
|
| 163 |
+
/* latin-ext */
|
| 164 |
+
@font-face {
|
| 165 |
+
font-family: 'Open Sans';
|
| 166 |
+
font-style: italic;
|
| 167 |
+
font-weight: 400;
|
| 168 |
+
font-stretch: 100%;
|
| 169 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWt06F15M.woff2) format('woff2');
|
| 170 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 171 |
+
}
|
| 172 |
+
/* latin */
|
| 173 |
+
@font-face {
|
| 174 |
+
font-family: 'Open Sans';
|
| 175 |
+
font-style: italic;
|
| 176 |
+
font-weight: 400;
|
| 177 |
+
font-stretch: 100%;
|
| 178 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuU6F.woff2) format('woff2');
|
| 179 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 180 |
+
}
|
| 181 |
+
/* cyrillic-ext */
|
| 182 |
+
@font-face {
|
| 183 |
+
font-family: 'Open Sans';
|
| 184 |
+
font-style: italic;
|
| 185 |
+
font-weight: 600;
|
| 186 |
+
font-stretch: 100%;
|
| 187 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtE6F15M.woff2) format('woff2');
|
| 188 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 189 |
+
}
|
| 190 |
+
/* cyrillic */
|
| 191 |
+
@font-face {
|
| 192 |
+
font-family: 'Open Sans';
|
| 193 |
+
font-style: italic;
|
| 194 |
+
font-weight: 600;
|
| 195 |
+
font-stretch: 100%;
|
| 196 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWvU6F15M.woff2) format('woff2');
|
| 197 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 198 |
+
}
|
| 199 |
+
/* greek-ext */
|
| 200 |
+
@font-face {
|
| 201 |
+
font-family: 'Open Sans';
|
| 202 |
+
font-style: italic;
|
| 203 |
+
font-weight: 600;
|
| 204 |
+
font-stretch: 100%;
|
| 205 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtU6F15M.woff2) format('woff2');
|
| 206 |
+
unicode-range: U+1F00-1FFF;
|
| 207 |
+
}
|
| 208 |
+
/* greek */
|
| 209 |
+
@font-face {
|
| 210 |
+
font-family: 'Open Sans';
|
| 211 |
+
font-style: italic;
|
| 212 |
+
font-weight: 600;
|
| 213 |
+
font-stretch: 100%;
|
| 214 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuk6F15M.woff2) format('woff2');
|
| 215 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 216 |
+
}
|
| 217 |
+
/* hebrew */
|
| 218 |
+
@font-face {
|
| 219 |
+
font-family: 'Open Sans';
|
| 220 |
+
font-style: italic;
|
| 221 |
+
font-weight: 600;
|
| 222 |
+
font-stretch: 100%;
|
| 223 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWu06F15M.woff2) format('woff2');
|
| 224 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 225 |
+
}
|
| 226 |
+
/* math */
|
| 227 |
+
@font-face {
|
| 228 |
+
font-family: 'Open Sans';
|
| 229 |
+
font-style: italic;
|
| 230 |
+
font-weight: 600;
|
| 231 |
+
font-stretch: 100%;
|
| 232 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWxU6F15M.woff2) format('woff2');
|
| 233 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 234 |
+
}
|
| 235 |
+
/* symbols */
|
| 236 |
+
@font-face {
|
| 237 |
+
font-family: 'Open Sans';
|
| 238 |
+
font-style: italic;
|
| 239 |
+
font-weight: 600;
|
| 240 |
+
font-stretch: 100%;
|
| 241 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqW106F15M.woff2) format('woff2');
|
| 242 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 243 |
+
}
|
| 244 |
+
/* vietnamese */
|
| 245 |
+
@font-face {
|
| 246 |
+
font-family: 'Open Sans';
|
| 247 |
+
font-style: italic;
|
| 248 |
+
font-weight: 600;
|
| 249 |
+
font-stretch: 100%;
|
| 250 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtk6F15M.woff2) format('woff2');
|
| 251 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 252 |
+
}
|
| 253 |
+
/* latin-ext */
|
| 254 |
+
@font-face {
|
| 255 |
+
font-family: 'Open Sans';
|
| 256 |
+
font-style: italic;
|
| 257 |
+
font-weight: 600;
|
| 258 |
+
font-stretch: 100%;
|
| 259 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWt06F15M.woff2) format('woff2');
|
| 260 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 261 |
+
}
|
| 262 |
+
/* latin */
|
| 263 |
+
@font-face {
|
| 264 |
+
font-family: 'Open Sans';
|
| 265 |
+
font-style: italic;
|
| 266 |
+
font-weight: 600;
|
| 267 |
+
font-stretch: 100%;
|
| 268 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuU6F.woff2) format('woff2');
|
| 269 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 270 |
+
}
|
| 271 |
+
/* cyrillic-ext */
|
| 272 |
+
@font-face {
|
| 273 |
+
font-family: 'Open Sans';
|
| 274 |
+
font-style: normal;
|
| 275 |
+
font-weight: 400;
|
| 276 |
+
font-stretch: 100%;
|
| 277 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');
|
| 278 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 279 |
+
}
|
| 280 |
+
/* cyrillic */
|
| 281 |
+
@font-face {
|
| 282 |
+
font-family: 'Open Sans';
|
| 283 |
+
font-style: normal;
|
| 284 |
+
font-weight: 400;
|
| 285 |
+
font-stretch: 100%;
|
| 286 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');
|
| 287 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 288 |
+
}
|
| 289 |
+
/* greek-ext */
|
| 290 |
+
@font-face {
|
| 291 |
+
font-family: 'Open Sans';
|
| 292 |
+
font-style: normal;
|
| 293 |
+
font-weight: 400;
|
| 294 |
+
font-stretch: 100%;
|
| 295 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');
|
| 296 |
+
unicode-range: U+1F00-1FFF;
|
| 297 |
+
}
|
| 298 |
+
/* greek */
|
| 299 |
+
@font-face {
|
| 300 |
+
font-family: 'Open Sans';
|
| 301 |
+
font-style: normal;
|
| 302 |
+
font-weight: 400;
|
| 303 |
+
font-stretch: 100%;
|
| 304 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');
|
| 305 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 306 |
+
}
|
| 307 |
+
/* hebrew */
|
| 308 |
+
@font-face {
|
| 309 |
+
font-family: 'Open Sans';
|
| 310 |
+
font-style: normal;
|
| 311 |
+
font-weight: 400;
|
| 312 |
+
font-stretch: 100%;
|
| 313 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');
|
| 314 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 315 |
+
}
|
| 316 |
+
/* math */
|
| 317 |
+
@font-face {
|
| 318 |
+
font-family: 'Open Sans';
|
| 319 |
+
font-style: normal;
|
| 320 |
+
font-weight: 400;
|
| 321 |
+
font-stretch: 100%;
|
| 322 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');
|
| 323 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 324 |
+
}
|
| 325 |
+
/* symbols */
|
| 326 |
+
@font-face {
|
| 327 |
+
font-family: 'Open Sans';
|
| 328 |
+
font-style: normal;
|
| 329 |
+
font-weight: 400;
|
| 330 |
+
font-stretch: 100%;
|
| 331 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');
|
| 332 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 333 |
+
}
|
| 334 |
+
/* vietnamese */
|
| 335 |
+
@font-face {
|
| 336 |
+
font-family: 'Open Sans';
|
| 337 |
+
font-style: normal;
|
| 338 |
+
font-weight: 400;
|
| 339 |
+
font-stretch: 100%;
|
| 340 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');
|
| 341 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 342 |
+
}
|
| 343 |
+
/* latin-ext */
|
| 344 |
+
@font-face {
|
| 345 |
+
font-family: 'Open Sans';
|
| 346 |
+
font-style: normal;
|
| 347 |
+
font-weight: 400;
|
| 348 |
+
font-stretch: 100%;
|
| 349 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');
|
| 350 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 351 |
+
}
|
| 352 |
+
/* latin */
|
| 353 |
+
@font-face {
|
| 354 |
+
font-family: 'Open Sans';
|
| 355 |
+
font-style: normal;
|
| 356 |
+
font-weight: 400;
|
| 357 |
+
font-stretch: 100%;
|
| 358 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');
|
| 359 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 360 |
+
}
|
| 361 |
+
/* cyrillic-ext */
|
| 362 |
+
@font-face {
|
| 363 |
+
font-family: 'Open Sans';
|
| 364 |
+
font-style: normal;
|
| 365 |
+
font-weight: 600;
|
| 366 |
+
font-stretch: 100%;
|
| 367 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');
|
| 368 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 369 |
+
}
|
| 370 |
+
/* cyrillic */
|
| 371 |
+
@font-face {
|
| 372 |
+
font-family: 'Open Sans';
|
| 373 |
+
font-style: normal;
|
| 374 |
+
font-weight: 600;
|
| 375 |
+
font-stretch: 100%;
|
| 376 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');
|
| 377 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 378 |
+
}
|
| 379 |
+
/* greek-ext */
|
| 380 |
+
@font-face {
|
| 381 |
+
font-family: 'Open Sans';
|
| 382 |
+
font-style: normal;
|
| 383 |
+
font-weight: 600;
|
| 384 |
+
font-stretch: 100%;
|
| 385 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');
|
| 386 |
+
unicode-range: U+1F00-1FFF;
|
| 387 |
+
}
|
| 388 |
+
/* greek */
|
| 389 |
+
@font-face {
|
| 390 |
+
font-family: 'Open Sans';
|
| 391 |
+
font-style: normal;
|
| 392 |
+
font-weight: 600;
|
| 393 |
+
font-stretch: 100%;
|
| 394 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');
|
| 395 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 396 |
+
}
|
| 397 |
+
/* hebrew */
|
| 398 |
+
@font-face {
|
| 399 |
+
font-family: 'Open Sans';
|
| 400 |
+
font-style: normal;
|
| 401 |
+
font-weight: 600;
|
| 402 |
+
font-stretch: 100%;
|
| 403 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');
|
| 404 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 405 |
+
}
|
| 406 |
+
/* math */
|
| 407 |
+
@font-face {
|
| 408 |
+
font-family: 'Open Sans';
|
| 409 |
+
font-style: normal;
|
| 410 |
+
font-weight: 600;
|
| 411 |
+
font-stretch: 100%;
|
| 412 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');
|
| 413 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 414 |
+
}
|
| 415 |
+
/* symbols */
|
| 416 |
+
@font-face {
|
| 417 |
+
font-family: 'Open Sans';
|
| 418 |
+
font-style: normal;
|
| 419 |
+
font-weight: 600;
|
| 420 |
+
font-stretch: 100%;
|
| 421 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');
|
| 422 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 423 |
+
}
|
| 424 |
+
/* vietnamese */
|
| 425 |
+
@font-face {
|
| 426 |
+
font-family: 'Open Sans';
|
| 427 |
+
font-style: normal;
|
| 428 |
+
font-weight: 600;
|
| 429 |
+
font-stretch: 100%;
|
| 430 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');
|
| 431 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 432 |
+
}
|
| 433 |
+
/* latin-ext */
|
| 434 |
+
@font-face {
|
| 435 |
+
font-family: 'Open Sans';
|
| 436 |
+
font-style: normal;
|
| 437 |
+
font-weight: 600;
|
| 438 |
+
font-stretch: 100%;
|
| 439 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');
|
| 440 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 441 |
+
}
|
| 442 |
+
/* latin */
|
| 443 |
+
@font-face {
|
| 444 |
+
font-family: 'Open Sans';
|
| 445 |
+
font-style: normal;
|
| 446 |
+
font-weight: 600;
|
| 447 |
+
font-stretch: 100%;
|
| 448 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');
|
| 449 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 450 |
+
}
|
| 451 |
+
/* cyrillic-ext */
|
| 452 |
+
@font-face {
|
| 453 |
+
font-family: 'Open Sans';
|
| 454 |
+
font-style: normal;
|
| 455 |
+
font-weight: 700;
|
| 456 |
+
font-stretch: 100%;
|
| 457 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');
|
| 458 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 459 |
+
}
|
| 460 |
+
/* cyrillic */
|
| 461 |
+
@font-face {
|
| 462 |
+
font-family: 'Open Sans';
|
| 463 |
+
font-style: normal;
|
| 464 |
+
font-weight: 700;
|
| 465 |
+
font-stretch: 100%;
|
| 466 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');
|
| 467 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 468 |
+
}
|
| 469 |
+
/* greek-ext */
|
| 470 |
+
@font-face {
|
| 471 |
+
font-family: 'Open Sans';
|
| 472 |
+
font-style: normal;
|
| 473 |
+
font-weight: 700;
|
| 474 |
+
font-stretch: 100%;
|
| 475 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');
|
| 476 |
+
unicode-range: U+1F00-1FFF;
|
| 477 |
+
}
|
| 478 |
+
/* greek */
|
| 479 |
+
@font-face {
|
| 480 |
+
font-family: 'Open Sans';
|
| 481 |
+
font-style: normal;
|
| 482 |
+
font-weight: 700;
|
| 483 |
+
font-stretch: 100%;
|
| 484 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');
|
| 485 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 486 |
+
}
|
| 487 |
+
/* hebrew */
|
| 488 |
+
@font-face {
|
| 489 |
+
font-family: 'Open Sans';
|
| 490 |
+
font-style: normal;
|
| 491 |
+
font-weight: 700;
|
| 492 |
+
font-stretch: 100%;
|
| 493 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');
|
| 494 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 495 |
+
}
|
| 496 |
+
/* math */
|
| 497 |
+
@font-face {
|
| 498 |
+
font-family: 'Open Sans';
|
| 499 |
+
font-style: normal;
|
| 500 |
+
font-weight: 700;
|
| 501 |
+
font-stretch: 100%;
|
| 502 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');
|
| 503 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 504 |
+
}
|
| 505 |
+
/* symbols */
|
| 506 |
+
@font-face {
|
| 507 |
+
font-family: 'Open Sans';
|
| 508 |
+
font-style: normal;
|
| 509 |
+
font-weight: 700;
|
| 510 |
+
font-stretch: 100%;
|
| 511 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');
|
| 512 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 513 |
+
}
|
| 514 |
+
/* vietnamese */
|
| 515 |
+
@font-face {
|
| 516 |
+
font-family: 'Open Sans';
|
| 517 |
+
font-style: normal;
|
| 518 |
+
font-weight: 700;
|
| 519 |
+
font-stretch: 100%;
|
| 520 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');
|
| 521 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 522 |
+
}
|
| 523 |
+
/* latin-ext */
|
| 524 |
+
@font-face {
|
| 525 |
+
font-family: 'Open Sans';
|
| 526 |
+
font-style: normal;
|
| 527 |
+
font-weight: 700;
|
| 528 |
+
font-stretch: 100%;
|
| 529 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');
|
| 530 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 531 |
+
}
|
| 532 |
+
/* latin */
|
| 533 |
+
@font-face {
|
| 534 |
+
font-family: 'Open Sans';
|
| 535 |
+
font-style: normal;
|
| 536 |
+
font-weight: 700;
|
| 537 |
+
font-stretch: 100%;
|
| 538 |
+
src: url(/static/fonts/fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');
|
| 539 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 540 |
+
}
|
| 541 |
+
/* cyrillic-ext */
|
| 542 |
+
@font-face {
|
| 543 |
+
font-family: 'Raleway';
|
| 544 |
+
font-style: normal;
|
| 545 |
+
font-weight: 400;
|
| 546 |
+
src: url(/static/fonts/fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCFPrEHJA.woff2) format('woff2');
|
| 547 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 548 |
+
}
|
| 549 |
+
/* cyrillic */
|
| 550 |
+
@font-face {
|
| 551 |
+
font-family: 'Raleway';
|
| 552 |
+
font-style: normal;
|
| 553 |
+
font-weight: 400;
|
| 554 |
+
src: url(/static/fonts/fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCMPrEHJA.woff2) format('woff2');
|
| 555 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 556 |
+
}
|
| 557 |
+
/* vietnamese */
|
| 558 |
+
@font-face {
|
| 559 |
+
font-family: 'Raleway';
|
| 560 |
+
font-style: normal;
|
| 561 |
+
font-weight: 400;
|
| 562 |
+
src: url(/static/fonts/fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCHPrEHJA.woff2) format('woff2');
|
| 563 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 564 |
+
}
|
| 565 |
+
/* latin-ext */
|
| 566 |
+
@font-face {
|
| 567 |
+
font-family: 'Raleway';
|
| 568 |
+
font-style: normal;
|
| 569 |
+
font-weight: 400;
|
| 570 |
+
src: url(/static/fonts/fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format('woff2');
|
| 571 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 572 |
+
}
|
| 573 |
+
/* latin */
|
| 574 |
+
@font-face {
|
| 575 |
+
font-family: 'Raleway';
|
| 576 |
+
font-style: normal;
|
| 577 |
+
font-weight: 400;
|
| 578 |
+
src: url(/static/fonts/fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format('woff2');
|
| 579 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 580 |
+
}
|
| 581 |
+
/* cyrillic-ext */
|
| 582 |
+
@font-face {
|
| 583 |
+
font-family: 'Roboto';
|
| 584 |
+
font-style: italic;
|
| 585 |
+
font-weight: 400;
|
| 586 |
+
font-stretch: 100%;
|
| 587 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkC3kaWzU.woff2) format('woff2');
|
| 588 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 589 |
+
}
|
| 590 |
+
/* cyrillic */
|
| 591 |
+
@font-face {
|
| 592 |
+
font-family: 'Roboto';
|
| 593 |
+
font-style: italic;
|
| 594 |
+
font-weight: 400;
|
| 595 |
+
font-stretch: 100%;
|
| 596 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkAnkaWzU.woff2) format('woff2');
|
| 597 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 598 |
+
}
|
| 599 |
+
/* greek-ext */
|
| 600 |
+
@font-face {
|
| 601 |
+
font-family: 'Roboto';
|
| 602 |
+
font-style: italic;
|
| 603 |
+
font-weight: 400;
|
| 604 |
+
font-stretch: 100%;
|
| 605 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkCnkaWzU.woff2) format('woff2');
|
| 606 |
+
unicode-range: U+1F00-1FFF;
|
| 607 |
+
}
|
| 608 |
+
/* greek */
|
| 609 |
+
@font-face {
|
| 610 |
+
font-family: 'Roboto';
|
| 611 |
+
font-style: italic;
|
| 612 |
+
font-weight: 400;
|
| 613 |
+
font-stretch: 100%;
|
| 614 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkBXkaWzU.woff2) format('woff2');
|
| 615 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 616 |
+
}
|
| 617 |
+
/* math */
|
| 618 |
+
@font-face {
|
| 619 |
+
font-family: 'Roboto';
|
| 620 |
+
font-style: italic;
|
| 621 |
+
font-weight: 400;
|
| 622 |
+
font-stretch: 100%;
|
| 623 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkenkaWzU.woff2) format('woff2');
|
| 624 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 625 |
+
}
|
| 626 |
+
/* symbols */
|
| 627 |
+
@font-face {
|
| 628 |
+
font-family: 'Roboto';
|
| 629 |
+
font-style: italic;
|
| 630 |
+
font-weight: 400;
|
| 631 |
+
font-stretch: 100%;
|
| 632 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkaHkaWzU.woff2) format('woff2');
|
| 633 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 634 |
+
}
|
| 635 |
+
/* vietnamese */
|
| 636 |
+
@font-face {
|
| 637 |
+
font-family: 'Roboto';
|
| 638 |
+
font-style: italic;
|
| 639 |
+
font-weight: 400;
|
| 640 |
+
font-stretch: 100%;
|
| 641 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkCXkaWzU.woff2) format('woff2');
|
| 642 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 643 |
+
}
|
| 644 |
+
/* latin-ext */
|
| 645 |
+
@font-face {
|
| 646 |
+
font-family: 'Roboto';
|
| 647 |
+
font-style: italic;
|
| 648 |
+
font-weight: 400;
|
| 649 |
+
font-stretch: 100%;
|
| 650 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkCHkaWzU.woff2) format('woff2');
|
| 651 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 652 |
+
}
|
| 653 |
+
/* latin */
|
| 654 |
+
@font-face {
|
| 655 |
+
font-family: 'Roboto';
|
| 656 |
+
font-style: italic;
|
| 657 |
+
font-weight: 400;
|
| 658 |
+
font-stretch: 100%;
|
| 659 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkBnka.woff2) format('woff2');
|
| 660 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 661 |
+
}
|
| 662 |
+
/* cyrillic-ext */
|
| 663 |
+
@font-face {
|
| 664 |
+
font-family: 'Roboto';
|
| 665 |
+
font-style: italic;
|
| 666 |
+
font-weight: 500;
|
| 667 |
+
font-stretch: 100%;
|
| 668 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkC3kaWzU.woff2) format('woff2');
|
| 669 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 670 |
+
}
|
| 671 |
+
/* cyrillic */
|
| 672 |
+
@font-face {
|
| 673 |
+
font-family: 'Roboto';
|
| 674 |
+
font-style: italic;
|
| 675 |
+
font-weight: 500;
|
| 676 |
+
font-stretch: 100%;
|
| 677 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkAnkaWzU.woff2) format('woff2');
|
| 678 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 679 |
+
}
|
| 680 |
+
/* greek-ext */
|
| 681 |
+
@font-face {
|
| 682 |
+
font-family: 'Roboto';
|
| 683 |
+
font-style: italic;
|
| 684 |
+
font-weight: 500;
|
| 685 |
+
font-stretch: 100%;
|
| 686 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkCnkaWzU.woff2) format('woff2');
|
| 687 |
+
unicode-range: U+1F00-1FFF;
|
| 688 |
+
}
|
| 689 |
+
/* greek */
|
| 690 |
+
@font-face {
|
| 691 |
+
font-family: 'Roboto';
|
| 692 |
+
font-style: italic;
|
| 693 |
+
font-weight: 500;
|
| 694 |
+
font-stretch: 100%;
|
| 695 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkBXkaWzU.woff2) format('woff2');
|
| 696 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 697 |
+
}
|
| 698 |
+
/* math */
|
| 699 |
+
@font-face {
|
| 700 |
+
font-family: 'Roboto';
|
| 701 |
+
font-style: italic;
|
| 702 |
+
font-weight: 500;
|
| 703 |
+
font-stretch: 100%;
|
| 704 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkenkaWzU.woff2) format('woff2');
|
| 705 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 706 |
+
}
|
| 707 |
+
/* symbols */
|
| 708 |
+
@font-face {
|
| 709 |
+
font-family: 'Roboto';
|
| 710 |
+
font-style: italic;
|
| 711 |
+
font-weight: 500;
|
| 712 |
+
font-stretch: 100%;
|
| 713 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkaHkaWzU.woff2) format('woff2');
|
| 714 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 715 |
+
}
|
| 716 |
+
/* vietnamese */
|
| 717 |
+
@font-face {
|
| 718 |
+
font-family: 'Roboto';
|
| 719 |
+
font-style: italic;
|
| 720 |
+
font-weight: 500;
|
| 721 |
+
font-stretch: 100%;
|
| 722 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkCXkaWzU.woff2) format('woff2');
|
| 723 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 724 |
+
}
|
| 725 |
+
/* latin-ext */
|
| 726 |
+
@font-face {
|
| 727 |
+
font-family: 'Roboto';
|
| 728 |
+
font-style: italic;
|
| 729 |
+
font-weight: 500;
|
| 730 |
+
font-stretch: 100%;
|
| 731 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkCHkaWzU.woff2) format('woff2');
|
| 732 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 733 |
+
}
|
| 734 |
+
/* latin */
|
| 735 |
+
@font-face {
|
| 736 |
+
font-family: 'Roboto';
|
| 737 |
+
font-style: italic;
|
| 738 |
+
font-weight: 500;
|
| 739 |
+
font-stretch: 100%;
|
| 740 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO5CnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmkBnka.woff2) format('woff2');
|
| 741 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 742 |
+
}
|
| 743 |
+
/* cyrillic-ext */
|
| 744 |
+
@font-face {
|
| 745 |
+
font-family: 'Roboto';
|
| 746 |
+
font-style: normal;
|
| 747 |
+
font-weight: 300;
|
| 748 |
+
font-stretch: 100%;
|
| 749 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
|
| 750 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 751 |
+
}
|
| 752 |
+
/* cyrillic */
|
| 753 |
+
@font-face {
|
| 754 |
+
font-family: 'Roboto';
|
| 755 |
+
font-style: normal;
|
| 756 |
+
font-weight: 300;
|
| 757 |
+
font-stretch: 100%;
|
| 758 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
|
| 759 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 760 |
+
}
|
| 761 |
+
/* greek-ext */
|
| 762 |
+
@font-face {
|
| 763 |
+
font-family: 'Roboto';
|
| 764 |
+
font-style: normal;
|
| 765 |
+
font-weight: 300;
|
| 766 |
+
font-stretch: 100%;
|
| 767 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
|
| 768 |
+
unicode-range: U+1F00-1FFF;
|
| 769 |
+
}
|
| 770 |
+
/* greek */
|
| 771 |
+
@font-face {
|
| 772 |
+
font-family: 'Roboto';
|
| 773 |
+
font-style: normal;
|
| 774 |
+
font-weight: 300;
|
| 775 |
+
font-stretch: 100%;
|
| 776 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
|
| 777 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 778 |
+
}
|
| 779 |
+
/* math */
|
| 780 |
+
@font-face {
|
| 781 |
+
font-family: 'Roboto';
|
| 782 |
+
font-style: normal;
|
| 783 |
+
font-weight: 300;
|
| 784 |
+
font-stretch: 100%;
|
| 785 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
|
| 786 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 787 |
+
}
|
| 788 |
+
/* symbols */
|
| 789 |
+
@font-face {
|
| 790 |
+
font-family: 'Roboto';
|
| 791 |
+
font-style: normal;
|
| 792 |
+
font-weight: 300;
|
| 793 |
+
font-stretch: 100%;
|
| 794 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
|
| 795 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 796 |
+
}
|
| 797 |
+
/* vietnamese */
|
| 798 |
+
@font-face {
|
| 799 |
+
font-family: 'Roboto';
|
| 800 |
+
font-style: normal;
|
| 801 |
+
font-weight: 300;
|
| 802 |
+
font-stretch: 100%;
|
| 803 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
|
| 804 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 805 |
+
}
|
| 806 |
+
/* latin-ext */
|
| 807 |
+
@font-face {
|
| 808 |
+
font-family: 'Roboto';
|
| 809 |
+
font-style: normal;
|
| 810 |
+
font-weight: 300;
|
| 811 |
+
font-stretch: 100%;
|
| 812 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
|
| 813 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 814 |
+
}
|
| 815 |
+
/* latin */
|
| 816 |
+
@font-face {
|
| 817 |
+
font-family: 'Roboto';
|
| 818 |
+
font-style: normal;
|
| 819 |
+
font-weight: 300;
|
| 820 |
+
font-stretch: 100%;
|
| 821 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
|
| 822 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 823 |
+
}
|
| 824 |
+
/* cyrillic-ext */
|
| 825 |
+
@font-face {
|
| 826 |
+
font-family: 'Roboto';
|
| 827 |
+
font-style: normal;
|
| 828 |
+
font-weight: 400;
|
| 829 |
+
font-stretch: 100%;
|
| 830 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
|
| 831 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 832 |
+
}
|
| 833 |
+
/* cyrillic */
|
| 834 |
+
@font-face {
|
| 835 |
+
font-family: 'Roboto';
|
| 836 |
+
font-style: normal;
|
| 837 |
+
font-weight: 400;
|
| 838 |
+
font-stretch: 100%;
|
| 839 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
|
| 840 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 841 |
+
}
|
| 842 |
+
/* greek-ext */
|
| 843 |
+
@font-face {
|
| 844 |
+
font-family: 'Roboto';
|
| 845 |
+
font-style: normal;
|
| 846 |
+
font-weight: 400;
|
| 847 |
+
font-stretch: 100%;
|
| 848 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
|
| 849 |
+
unicode-range: U+1F00-1FFF;
|
| 850 |
+
}
|
| 851 |
+
/* greek */
|
| 852 |
+
@font-face {
|
| 853 |
+
font-family: 'Roboto';
|
| 854 |
+
font-style: normal;
|
| 855 |
+
font-weight: 400;
|
| 856 |
+
font-stretch: 100%;
|
| 857 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
|
| 858 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 859 |
+
}
|
| 860 |
+
/* math */
|
| 861 |
+
@font-face {
|
| 862 |
+
font-family: 'Roboto';
|
| 863 |
+
font-style: normal;
|
| 864 |
+
font-weight: 400;
|
| 865 |
+
font-stretch: 100%;
|
| 866 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
|
| 867 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 868 |
+
}
|
| 869 |
+
/* symbols */
|
| 870 |
+
@font-face {
|
| 871 |
+
font-family: 'Roboto';
|
| 872 |
+
font-style: normal;
|
| 873 |
+
font-weight: 400;
|
| 874 |
+
font-stretch: 100%;
|
| 875 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
|
| 876 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 877 |
+
}
|
| 878 |
+
/* vietnamese */
|
| 879 |
+
@font-face {
|
| 880 |
+
font-family: 'Roboto';
|
| 881 |
+
font-style: normal;
|
| 882 |
+
font-weight: 400;
|
| 883 |
+
font-stretch: 100%;
|
| 884 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
|
| 885 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 886 |
+
}
|
| 887 |
+
/* latin-ext */
|
| 888 |
+
@font-face {
|
| 889 |
+
font-family: 'Roboto';
|
| 890 |
+
font-style: normal;
|
| 891 |
+
font-weight: 400;
|
| 892 |
+
font-stretch: 100%;
|
| 893 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
|
| 894 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 895 |
+
}
|
| 896 |
+
/* latin */
|
| 897 |
+
@font-face {
|
| 898 |
+
font-family: 'Roboto';
|
| 899 |
+
font-style: normal;
|
| 900 |
+
font-weight: 400;
|
| 901 |
+
font-stretch: 100%;
|
| 902 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
|
| 903 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 904 |
+
}
|
| 905 |
+
/* cyrillic-ext */
|
| 906 |
+
@font-face {
|
| 907 |
+
font-family: 'Roboto';
|
| 908 |
+
font-style: normal;
|
| 909 |
+
font-weight: 500;
|
| 910 |
+
font-stretch: 100%;
|
| 911 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
|
| 912 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 913 |
+
}
|
| 914 |
+
/* cyrillic */
|
| 915 |
+
@font-face {
|
| 916 |
+
font-family: 'Roboto';
|
| 917 |
+
font-style: normal;
|
| 918 |
+
font-weight: 500;
|
| 919 |
+
font-stretch: 100%;
|
| 920 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
|
| 921 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 922 |
+
}
|
| 923 |
+
/* greek-ext */
|
| 924 |
+
@font-face {
|
| 925 |
+
font-family: 'Roboto';
|
| 926 |
+
font-style: normal;
|
| 927 |
+
font-weight: 500;
|
| 928 |
+
font-stretch: 100%;
|
| 929 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
|
| 930 |
+
unicode-range: U+1F00-1FFF;
|
| 931 |
+
}
|
| 932 |
+
/* greek */
|
| 933 |
+
@font-face {
|
| 934 |
+
font-family: 'Roboto';
|
| 935 |
+
font-style: normal;
|
| 936 |
+
font-weight: 500;
|
| 937 |
+
font-stretch: 100%;
|
| 938 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
|
| 939 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 940 |
+
}
|
| 941 |
+
/* math */
|
| 942 |
+
@font-face {
|
| 943 |
+
font-family: 'Roboto';
|
| 944 |
+
font-style: normal;
|
| 945 |
+
font-weight: 500;
|
| 946 |
+
font-stretch: 100%;
|
| 947 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
|
| 948 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 949 |
+
}
|
| 950 |
+
/* symbols */
|
| 951 |
+
@font-face {
|
| 952 |
+
font-family: 'Roboto';
|
| 953 |
+
font-style: normal;
|
| 954 |
+
font-weight: 500;
|
| 955 |
+
font-stretch: 100%;
|
| 956 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
|
| 957 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 958 |
+
}
|
| 959 |
+
/* vietnamese */
|
| 960 |
+
@font-face {
|
| 961 |
+
font-family: 'Roboto';
|
| 962 |
+
font-style: normal;
|
| 963 |
+
font-weight: 500;
|
| 964 |
+
font-stretch: 100%;
|
| 965 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
|
| 966 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 967 |
+
}
|
| 968 |
+
/* latin-ext */
|
| 969 |
+
@font-face {
|
| 970 |
+
font-family: 'Roboto';
|
| 971 |
+
font-style: normal;
|
| 972 |
+
font-weight: 500;
|
| 973 |
+
font-stretch: 100%;
|
| 974 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
|
| 975 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 976 |
+
}
|
| 977 |
+
/* latin */
|
| 978 |
+
@font-face {
|
| 979 |
+
font-family: 'Roboto';
|
| 980 |
+
font-style: normal;
|
| 981 |
+
font-weight: 500;
|
| 982 |
+
font-stretch: 100%;
|
| 983 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
|
| 984 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 985 |
+
}
|
| 986 |
+
/* cyrillic-ext */
|
| 987 |
+
@font-face {
|
| 988 |
+
font-family: 'Roboto';
|
| 989 |
+
font-style: normal;
|
| 990 |
+
font-weight: 700;
|
| 991 |
+
font-stretch: 100%;
|
| 992 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
|
| 993 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 994 |
+
}
|
| 995 |
+
/* cyrillic */
|
| 996 |
+
@font-face {
|
| 997 |
+
font-family: 'Roboto';
|
| 998 |
+
font-style: normal;
|
| 999 |
+
font-weight: 700;
|
| 1000 |
+
font-stretch: 100%;
|
| 1001 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
|
| 1002 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 1003 |
+
}
|
| 1004 |
+
/* greek-ext */
|
| 1005 |
+
@font-face {
|
| 1006 |
+
font-family: 'Roboto';
|
| 1007 |
+
font-style: normal;
|
| 1008 |
+
font-weight: 700;
|
| 1009 |
+
font-stretch: 100%;
|
| 1010 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
|
| 1011 |
+
unicode-range: U+1F00-1FFF;
|
| 1012 |
+
}
|
| 1013 |
+
/* greek */
|
| 1014 |
+
@font-face {
|
| 1015 |
+
font-family: 'Roboto';
|
| 1016 |
+
font-style: normal;
|
| 1017 |
+
font-weight: 700;
|
| 1018 |
+
font-stretch: 100%;
|
| 1019 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
|
| 1020 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 1021 |
+
}
|
| 1022 |
+
/* math */
|
| 1023 |
+
@font-face {
|
| 1024 |
+
font-family: 'Roboto';
|
| 1025 |
+
font-style: normal;
|
| 1026 |
+
font-weight: 700;
|
| 1027 |
+
font-stretch: 100%;
|
| 1028 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
|
| 1029 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 1030 |
+
}
|
| 1031 |
+
/* symbols */
|
| 1032 |
+
@font-face {
|
| 1033 |
+
font-family: 'Roboto';
|
| 1034 |
+
font-style: normal;
|
| 1035 |
+
font-weight: 700;
|
| 1036 |
+
font-stretch: 100%;
|
| 1037 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
|
| 1038 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 1039 |
+
}
|
| 1040 |
+
/* vietnamese */
|
| 1041 |
+
@font-face {
|
| 1042 |
+
font-family: 'Roboto';
|
| 1043 |
+
font-style: normal;
|
| 1044 |
+
font-weight: 700;
|
| 1045 |
+
font-stretch: 100%;
|
| 1046 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
|
| 1047 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 1048 |
+
}
|
| 1049 |
+
/* latin-ext */
|
| 1050 |
+
@font-face {
|
| 1051 |
+
font-family: 'Roboto';
|
| 1052 |
+
font-style: normal;
|
| 1053 |
+
font-weight: 700;
|
| 1054 |
+
font-stretch: 100%;
|
| 1055 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
|
| 1056 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 1057 |
+
}
|
| 1058 |
+
/* latin */
|
| 1059 |
+
@font-face {
|
| 1060 |
+
font-family: 'Roboto';
|
| 1061 |
+
font-style: normal;
|
| 1062 |
+
font-weight: 700;
|
| 1063 |
+
font-stretch: 100%;
|
| 1064 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
|
| 1065 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 1066 |
+
}
|
| 1067 |
+
/* cyrillic-ext */
|
| 1068 |
+
@font-face {
|
| 1069 |
+
font-family: 'Roboto';
|
| 1070 |
+
font-style: normal;
|
| 1071 |
+
font-weight: 900;
|
| 1072 |
+
font-stretch: 100%;
|
| 1073 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3GUBGEe.woff2) format('woff2');
|
| 1074 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 1075 |
+
}
|
| 1076 |
+
/* cyrillic */
|
| 1077 |
+
@font-face {
|
| 1078 |
+
font-family: 'Roboto';
|
| 1079 |
+
font-style: normal;
|
| 1080 |
+
font-weight: 900;
|
| 1081 |
+
font-stretch: 100%;
|
| 1082 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3iUBGEe.woff2) format('woff2');
|
| 1083 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 1084 |
+
}
|
| 1085 |
+
/* greek-ext */
|
| 1086 |
+
@font-face {
|
| 1087 |
+
font-family: 'Roboto';
|
| 1088 |
+
font-style: normal;
|
| 1089 |
+
font-weight: 900;
|
| 1090 |
+
font-stretch: 100%;
|
| 1091 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3CUBGEe.woff2) format('woff2');
|
| 1092 |
+
unicode-range: U+1F00-1FFF;
|
| 1093 |
+
}
|
| 1094 |
+
/* greek */
|
| 1095 |
+
@font-face {
|
| 1096 |
+
font-family: 'Roboto';
|
| 1097 |
+
font-style: normal;
|
| 1098 |
+
font-weight: 900;
|
| 1099 |
+
font-stretch: 100%;
|
| 1100 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3-UBGEe.woff2) format('woff2');
|
| 1101 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 1102 |
+
}
|
| 1103 |
+
/* math */
|
| 1104 |
+
@font-face {
|
| 1105 |
+
font-family: 'Roboto';
|
| 1106 |
+
font-style: normal;
|
| 1107 |
+
font-weight: 900;
|
| 1108 |
+
font-stretch: 100%;
|
| 1109 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMawCUBGEe.woff2) format('woff2');
|
| 1110 |
+
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
|
| 1111 |
+
}
|
| 1112 |
+
/* symbols */
|
| 1113 |
+
@font-face {
|
| 1114 |
+
font-family: 'Roboto';
|
| 1115 |
+
font-style: normal;
|
| 1116 |
+
font-weight: 900;
|
| 1117 |
+
font-stretch: 100%;
|
| 1118 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMaxKUBGEe.woff2) format('woff2');
|
| 1119 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 1120 |
+
}
|
| 1121 |
+
/* vietnamese */
|
| 1122 |
+
@font-face {
|
| 1123 |
+
font-family: 'Roboto';
|
| 1124 |
+
font-style: normal;
|
| 1125 |
+
font-weight: 900;
|
| 1126 |
+
font-stretch: 100%;
|
| 1127 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3OUBGEe.woff2) format('woff2');
|
| 1128 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 1129 |
+
}
|
| 1130 |
+
/* latin-ext */
|
| 1131 |
+
@font-face {
|
| 1132 |
+
font-family: 'Roboto';
|
| 1133 |
+
font-style: normal;
|
| 1134 |
+
font-weight: 900;
|
| 1135 |
+
font-stretch: 100%;
|
| 1136 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3KUBGEe.woff2) format('woff2');
|
| 1137 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 1138 |
+
}
|
| 1139 |
+
/* latin */
|
| 1140 |
+
@font-face {
|
| 1141 |
+
font-family: 'Roboto';
|
| 1142 |
+
font-style: normal;
|
| 1143 |
+
font-weight: 900;
|
| 1144 |
+
font-stretch: 100%;
|
| 1145 |
+
src: url(/static/fonts/fonts.gstatic.com/s/roboto/v51/KFO7CnqEu92Fr1ME7kSn66aGLdTylUAMa3yUBA.woff2) format('woff2');
|
| 1146 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 1147 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.googleapis.com/css__qf88de823c099
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* armenian */
|
| 2 |
+
@font-face {
|
| 3 |
+
font-family: 'Google Sans Text';
|
| 4 |
+
font-style: normal;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFp2i1dC.woff2) format('woff2');
|
| 7 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 8 |
+
}
|
| 9 |
+
/* bengali */
|
| 10 |
+
@font-face {
|
| 11 |
+
font-family: 'Google Sans Text';
|
| 12 |
+
font-style: normal;
|
| 13 |
+
font-weight: 400;
|
| 14 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFh2i1dC.woff2) format('woff2');
|
| 15 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 16 |
+
}
|
| 17 |
+
/* canadian-aboriginal */
|
| 18 |
+
@font-face {
|
| 19 |
+
font-family: 'Google Sans Text';
|
| 20 |
+
font-style: normal;
|
| 21 |
+
font-weight: 400;
|
| 22 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGV2i1dC.woff2) format('woff2');
|
| 23 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 24 |
+
}
|
| 25 |
+
/* cyrillic-ext */
|
| 26 |
+
@font-face {
|
| 27 |
+
font-family: 'Google Sans Text';
|
| 28 |
+
font-style: normal;
|
| 29 |
+
font-weight: 400;
|
| 30 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEd2i1dC.woff2) format('woff2');
|
| 31 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 32 |
+
}
|
| 33 |
+
/* cyrillic */
|
| 34 |
+
@font-face {
|
| 35 |
+
font-family: 'Google Sans Text';
|
| 36 |
+
font-style: normal;
|
| 37 |
+
font-weight: 400;
|
| 38 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qE52i1dC.woff2) format('woff2');
|
| 39 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 40 |
+
}
|
| 41 |
+
/* devanagari */
|
| 42 |
+
@font-face {
|
| 43 |
+
font-family: 'Google Sans Text';
|
| 44 |
+
font-style: normal;
|
| 45 |
+
font-weight: 400;
|
| 46 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEt2i1dC.woff2) format('woff2');
|
| 47 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 48 |
+
}
|
| 49 |
+
/* ethiopic */
|
| 50 |
+
@font-face {
|
| 51 |
+
font-family: 'Google Sans Text';
|
| 52 |
+
font-style: normal;
|
| 53 |
+
font-weight: 400;
|
| 54 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFt2i1dC.woff2) format('woff2');
|
| 55 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 56 |
+
}
|
| 57 |
+
/* georgian */
|
| 58 |
+
@font-face {
|
| 59 |
+
font-family: 'Google Sans Text';
|
| 60 |
+
font-style: normal;
|
| 61 |
+
font-weight: 400;
|
| 62 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFV2i1dC.woff2) format('woff2');
|
| 63 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 64 |
+
}
|
| 65 |
+
/* greek-ext */
|
| 66 |
+
@font-face {
|
| 67 |
+
font-family: 'Google Sans Text';
|
| 68 |
+
font-style: normal;
|
| 69 |
+
font-weight: 400;
|
| 70 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEZ2i1dC.woff2) format('woff2');
|
| 71 |
+
unicode-range: U+1F00-1FFF;
|
| 72 |
+
}
|
| 73 |
+
/* greek */
|
| 74 |
+
@font-face {
|
| 75 |
+
font-family: 'Google Sans Text';
|
| 76 |
+
font-style: normal;
|
| 77 |
+
font-weight: 400;
|
| 78 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEl2i1dC.woff2) format('woff2');
|
| 79 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 80 |
+
}
|
| 81 |
+
/* gujarati */
|
| 82 |
+
@font-face {
|
| 83 |
+
font-family: 'Google Sans Text';
|
| 84 |
+
font-style: normal;
|
| 85 |
+
font-weight: 400;
|
| 86 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFF2i1dC.woff2) format('woff2');
|
| 87 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 88 |
+
}
|
| 89 |
+
/* gurmukhi */
|
| 90 |
+
@font-face {
|
| 91 |
+
font-family: 'Google Sans Text';
|
| 92 |
+
font-style: normal;
|
| 93 |
+
font-weight: 400;
|
| 94 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGl2i1dC.woff2) format('woff2');
|
| 95 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 96 |
+
}
|
| 97 |
+
/* hebrew */
|
| 98 |
+
@font-face {
|
| 99 |
+
font-family: 'Google Sans Text';
|
| 100 |
+
font-style: normal;
|
| 101 |
+
font-weight: 400;
|
| 102 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEh2i1dC.woff2) format('woff2');
|
| 103 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 104 |
+
}
|
| 105 |
+
/* kannada */
|
| 106 |
+
@font-face {
|
| 107 |
+
font-family: 'Google Sans Text';
|
| 108 |
+
font-style: normal;
|
| 109 |
+
font-weight: 400;
|
| 110 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFB2i1dC.woff2) format('woff2');
|
| 111 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 112 |
+
}
|
| 113 |
+
/* khmer */
|
| 114 |
+
@font-face {
|
| 115 |
+
font-family: 'Google Sans Text';
|
| 116 |
+
font-style: normal;
|
| 117 |
+
font-weight: 400;
|
| 118 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEF2i1dC.woff2) format('woff2');
|
| 119 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 120 |
+
}
|
| 121 |
+
/* lao */
|
| 122 |
+
@font-face {
|
| 123 |
+
font-family: 'Google Sans Text';
|
| 124 |
+
font-style: normal;
|
| 125 |
+
font-weight: 400;
|
| 126 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEN2i1dC.woff2) format('woff2');
|
| 127 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 128 |
+
}
|
| 129 |
+
/* malayalam */
|
| 130 |
+
@font-face {
|
| 131 |
+
font-family: 'Google Sans Text';
|
| 132 |
+
font-style: normal;
|
| 133 |
+
font-weight: 400;
|
| 134 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFJ2i1dC.woff2) format('woff2');
|
| 135 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 136 |
+
}
|
| 137 |
+
/* oriya */
|
| 138 |
+
@font-face {
|
| 139 |
+
font-family: 'Google Sans Text';
|
| 140 |
+
font-style: normal;
|
| 141 |
+
font-weight: 400;
|
| 142 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFN2i1dC.woff2) format('woff2');
|
| 143 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 144 |
+
}
|
| 145 |
+
/* sinhala */
|
| 146 |
+
@font-face {
|
| 147 |
+
font-family: 'Google Sans Text';
|
| 148 |
+
font-style: normal;
|
| 149 |
+
font-weight: 400;
|
| 150 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFd2i1dC.woff2) format('woff2');
|
| 151 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 152 |
+
}
|
| 153 |
+
/* symbols */
|
| 154 |
+
@font-face {
|
| 155 |
+
font-family: 'Google Sans Text';
|
| 156 |
+
font-style: normal;
|
| 157 |
+
font-weight: 400;
|
| 158 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qCR2i1dC.woff2) format('woff2');
|
| 159 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 160 |
+
}
|
| 161 |
+
/* tamil */
|
| 162 |
+
@font-face {
|
| 163 |
+
font-family: 'Google Sans Text';
|
| 164 |
+
font-style: normal;
|
| 165 |
+
font-weight: 400;
|
| 166 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFx2i1dC.woff2) format('woff2');
|
| 167 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 168 |
+
}
|
| 169 |
+
/* telugu */
|
| 170 |
+
@font-face {
|
| 171 |
+
font-family: 'Google Sans Text';
|
| 172 |
+
font-style: normal;
|
| 173 |
+
font-weight: 400;
|
| 174 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFZ2i1dC.woff2) format('woff2');
|
| 175 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 176 |
+
}
|
| 177 |
+
/* thai */
|
| 178 |
+
@font-face {
|
| 179 |
+
font-family: 'Google Sans Text';
|
| 180 |
+
font-style: normal;
|
| 181 |
+
font-weight: 400;
|
| 182 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qF52i1dC.woff2) format('woff2');
|
| 183 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 184 |
+
}
|
| 185 |
+
/* vietnamese */
|
| 186 |
+
@font-face {
|
| 187 |
+
font-family: 'Google Sans Text';
|
| 188 |
+
font-style: normal;
|
| 189 |
+
font-weight: 400;
|
| 190 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEV2i1dC.woff2) format('woff2');
|
| 191 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 192 |
+
}
|
| 193 |
+
/* latin-ext */
|
| 194 |
+
@font-face {
|
| 195 |
+
font-family: 'Google Sans Text';
|
| 196 |
+
font-style: normal;
|
| 197 |
+
font-weight: 400;
|
| 198 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qER2i1dC.woff2) format('woff2');
|
| 199 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 200 |
+
}
|
| 201 |
+
/* latin */
|
| 202 |
+
@font-face {
|
| 203 |
+
font-family: 'Google Sans Text';
|
| 204 |
+
font-style: normal;
|
| 205 |
+
font-weight: 400;
|
| 206 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEp2iw.woff2) format('woff2');
|
| 207 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 208 |
+
}
|
| 209 |
+
/* armenian */
|
| 210 |
+
@font-face {
|
| 211 |
+
font-family: 'Google Sans Text';
|
| 212 |
+
font-style: normal;
|
| 213 |
+
font-weight: 500;
|
| 214 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnhjtiu7.woff2) format('woff2');
|
| 215 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 216 |
+
}
|
| 217 |
+
/* bengali */
|
| 218 |
+
@font-face {
|
| 219 |
+
font-family: 'Google Sans Text';
|
| 220 |
+
font-style: normal;
|
| 221 |
+
font-weight: 500;
|
| 222 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnpjtiu7.woff2) format('woff2');
|
| 223 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 224 |
+
}
|
| 225 |
+
/* canadian-aboriginal */
|
| 226 |
+
@font-face {
|
| 227 |
+
font-family: 'Google Sans Text';
|
| 228 |
+
font-style: normal;
|
| 229 |
+
font-weight: 500;
|
| 230 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnkdjtiu7.woff2) format('woff2');
|
| 231 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 232 |
+
}
|
| 233 |
+
/* cyrillic-ext */
|
| 234 |
+
@font-face {
|
| 235 |
+
font-family: 'Google Sans Text';
|
| 236 |
+
font-style: normal;
|
| 237 |
+
font-weight: 500;
|
| 238 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmVjtiu7.woff2) format('woff2');
|
| 239 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 240 |
+
}
|
| 241 |
+
/* cyrillic */
|
| 242 |
+
@font-face {
|
| 243 |
+
font-family: 'Google Sans Text';
|
| 244 |
+
font-style: normal;
|
| 245 |
+
font-weight: 500;
|
| 246 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmxjtiu7.woff2) format('woff2');
|
| 247 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 248 |
+
}
|
| 249 |
+
/* devanagari */
|
| 250 |
+
@font-face {
|
| 251 |
+
font-family: 'Google Sans Text';
|
| 252 |
+
font-style: normal;
|
| 253 |
+
font-weight: 500;
|
| 254 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmljtiu7.woff2) format('woff2');
|
| 255 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 256 |
+
}
|
| 257 |
+
/* ethiopic */
|
| 258 |
+
@font-face {
|
| 259 |
+
font-family: 'Google Sans Text';
|
| 260 |
+
font-style: normal;
|
| 261 |
+
font-weight: 500;
|
| 262 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnljtiu7.woff2) format('woff2');
|
| 263 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 264 |
+
}
|
| 265 |
+
/* georgian */
|
| 266 |
+
@font-face {
|
| 267 |
+
font-family: 'Google Sans Text';
|
| 268 |
+
font-style: normal;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnndjtiu7.woff2) format('woff2');
|
| 271 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 272 |
+
}
|
| 273 |
+
/* greek-ext */
|
| 274 |
+
@font-face {
|
| 275 |
+
font-family: 'Google Sans Text';
|
| 276 |
+
font-style: normal;
|
| 277 |
+
font-weight: 500;
|
| 278 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmRjtiu7.woff2) format('woff2');
|
| 279 |
+
unicode-range: U+1F00-1FFF;
|
| 280 |
+
}
|
| 281 |
+
/* greek */
|
| 282 |
+
@font-face {
|
| 283 |
+
font-family: 'Google Sans Text';
|
| 284 |
+
font-style: normal;
|
| 285 |
+
font-weight: 500;
|
| 286 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmtjtiu7.woff2) format('woff2');
|
| 287 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 288 |
+
}
|
| 289 |
+
/* gujarati */
|
| 290 |
+
@font-face {
|
| 291 |
+
font-family: 'Google Sans Text';
|
| 292 |
+
font-style: normal;
|
| 293 |
+
font-weight: 500;
|
| 294 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnNjtiu7.woff2) format('woff2');
|
| 295 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 296 |
+
}
|
| 297 |
+
/* gurmukhi */
|
| 298 |
+
@font-face {
|
| 299 |
+
font-family: 'Google Sans Text';
|
| 300 |
+
font-style: normal;
|
| 301 |
+
font-weight: 500;
|
| 302 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnktjtiu7.woff2) format('woff2');
|
| 303 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 304 |
+
}
|
| 305 |
+
/* hebrew */
|
| 306 |
+
@font-face {
|
| 307 |
+
font-family: 'Google Sans Text';
|
| 308 |
+
font-style: normal;
|
| 309 |
+
font-weight: 500;
|
| 310 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmpjtiu7.woff2) format('woff2');
|
| 311 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 312 |
+
}
|
| 313 |
+
/* kannada */
|
| 314 |
+
@font-face {
|
| 315 |
+
font-family: 'Google Sans Text';
|
| 316 |
+
font-style: normal;
|
| 317 |
+
font-weight: 500;
|
| 318 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnJjtiu7.woff2) format('woff2');
|
| 319 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 320 |
+
}
|
| 321 |
+
/* khmer */
|
| 322 |
+
@font-face {
|
| 323 |
+
font-family: 'Google Sans Text';
|
| 324 |
+
font-style: normal;
|
| 325 |
+
font-weight: 500;
|
| 326 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmNjtiu7.woff2) format('woff2');
|
| 327 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 328 |
+
}
|
| 329 |
+
/* lao */
|
| 330 |
+
@font-face {
|
| 331 |
+
font-family: 'Google Sans Text';
|
| 332 |
+
font-style: normal;
|
| 333 |
+
font-weight: 500;
|
| 334 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmFjtiu7.woff2) format('woff2');
|
| 335 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 336 |
+
}
|
| 337 |
+
/* malayalam */
|
| 338 |
+
@font-face {
|
| 339 |
+
font-family: 'Google Sans Text';
|
| 340 |
+
font-style: normal;
|
| 341 |
+
font-weight: 500;
|
| 342 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnBjtiu7.woff2) format('woff2');
|
| 343 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 344 |
+
}
|
| 345 |
+
/* oriya */
|
| 346 |
+
@font-face {
|
| 347 |
+
font-family: 'Google Sans Text';
|
| 348 |
+
font-style: normal;
|
| 349 |
+
font-weight: 500;
|
| 350 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnFjtiu7.woff2) format('woff2');
|
| 351 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 352 |
+
}
|
| 353 |
+
/* sinhala */
|
| 354 |
+
@font-face {
|
| 355 |
+
font-family: 'Google Sans Text';
|
| 356 |
+
font-style: normal;
|
| 357 |
+
font-weight: 500;
|
| 358 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnVjtiu7.woff2) format('woff2');
|
| 359 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 360 |
+
}
|
| 361 |
+
/* symbols */
|
| 362 |
+
@font-face {
|
| 363 |
+
font-family: 'Google Sans Text';
|
| 364 |
+
font-style: normal;
|
| 365 |
+
font-weight: 500;
|
| 366 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVngZjtiu7.woff2) format('woff2');
|
| 367 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 368 |
+
}
|
| 369 |
+
/* tamil */
|
| 370 |
+
@font-face {
|
| 371 |
+
font-family: 'Google Sans Text';
|
| 372 |
+
font-style: normal;
|
| 373 |
+
font-weight: 500;
|
| 374 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnn5jtiu7.woff2) format('woff2');
|
| 375 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 376 |
+
}
|
| 377 |
+
/* telugu */
|
| 378 |
+
@font-face {
|
| 379 |
+
font-family: 'Google Sans Text';
|
| 380 |
+
font-style: normal;
|
| 381 |
+
font-weight: 500;
|
| 382 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnRjtiu7.woff2) format('woff2');
|
| 383 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 384 |
+
}
|
| 385 |
+
/* thai */
|
| 386 |
+
@font-face {
|
| 387 |
+
font-family: 'Google Sans Text';
|
| 388 |
+
font-style: normal;
|
| 389 |
+
font-weight: 500;
|
| 390 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnxjtiu7.woff2) format('woff2');
|
| 391 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 392 |
+
}
|
| 393 |
+
/* vietnamese */
|
| 394 |
+
@font-face {
|
| 395 |
+
font-family: 'Google Sans Text';
|
| 396 |
+
font-style: normal;
|
| 397 |
+
font-weight: 500;
|
| 398 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmdjtiu7.woff2) format('woff2');
|
| 399 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 400 |
+
}
|
| 401 |
+
/* latin-ext */
|
| 402 |
+
@font-face {
|
| 403 |
+
font-family: 'Google Sans Text';
|
| 404 |
+
font-style: normal;
|
| 405 |
+
font-weight: 500;
|
| 406 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmZjtiu7.woff2) format('woff2');
|
| 407 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 408 |
+
}
|
| 409 |
+
/* latin */
|
| 410 |
+
@font-face {
|
| 411 |
+
font-family: 'Google Sans Text';
|
| 412 |
+
font-style: normal;
|
| 413 |
+
font-weight: 500;
|
| 414 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmhjtg.woff2) format('woff2');
|
| 415 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 416 |
+
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* armenian */
|
| 2 |
+
@font-face {
|
| 3 |
+
font-family: 'Google Sans Text';
|
| 4 |
+
font-style: normal;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFp2i1dC.woff2) format('woff2');
|
| 7 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 8 |
+
}
|
| 9 |
+
/* bengali */
|
| 10 |
+
@font-face {
|
| 11 |
+
font-family: 'Google Sans Text';
|
| 12 |
+
font-style: normal;
|
| 13 |
+
font-weight: 400;
|
| 14 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFh2i1dC.woff2) format('woff2');
|
| 15 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 16 |
+
}
|
| 17 |
+
/* canadian-aboriginal */
|
| 18 |
+
@font-face {
|
| 19 |
+
font-family: 'Google Sans Text';
|
| 20 |
+
font-style: normal;
|
| 21 |
+
font-weight: 400;
|
| 22 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGV2i1dC.woff2) format('woff2');
|
| 23 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 24 |
+
}
|
| 25 |
+
/* cyrillic-ext */
|
| 26 |
+
@font-face {
|
| 27 |
+
font-family: 'Google Sans Text';
|
| 28 |
+
font-style: normal;
|
| 29 |
+
font-weight: 400;
|
| 30 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEd2i1dC.woff2) format('woff2');
|
| 31 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 32 |
+
}
|
| 33 |
+
/* cyrillic */
|
| 34 |
+
@font-face {
|
| 35 |
+
font-family: 'Google Sans Text';
|
| 36 |
+
font-style: normal;
|
| 37 |
+
font-weight: 400;
|
| 38 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qE52i1dC.woff2) format('woff2');
|
| 39 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 40 |
+
}
|
| 41 |
+
/* devanagari */
|
| 42 |
+
@font-face {
|
| 43 |
+
font-family: 'Google Sans Text';
|
| 44 |
+
font-style: normal;
|
| 45 |
+
font-weight: 400;
|
| 46 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEt2i1dC.woff2) format('woff2');
|
| 47 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 48 |
+
}
|
| 49 |
+
/* ethiopic */
|
| 50 |
+
@font-face {
|
| 51 |
+
font-family: 'Google Sans Text';
|
| 52 |
+
font-style: normal;
|
| 53 |
+
font-weight: 400;
|
| 54 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFt2i1dC.woff2) format('woff2');
|
| 55 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 56 |
+
}
|
| 57 |
+
/* georgian */
|
| 58 |
+
@font-face {
|
| 59 |
+
font-family: 'Google Sans Text';
|
| 60 |
+
font-style: normal;
|
| 61 |
+
font-weight: 400;
|
| 62 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFV2i1dC.woff2) format('woff2');
|
| 63 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 64 |
+
}
|
| 65 |
+
/* greek-ext */
|
| 66 |
+
@font-face {
|
| 67 |
+
font-family: 'Google Sans Text';
|
| 68 |
+
font-style: normal;
|
| 69 |
+
font-weight: 400;
|
| 70 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEZ2i1dC.woff2) format('woff2');
|
| 71 |
+
unicode-range: U+1F00-1FFF;
|
| 72 |
+
}
|
| 73 |
+
/* greek */
|
| 74 |
+
@font-face {
|
| 75 |
+
font-family: 'Google Sans Text';
|
| 76 |
+
font-style: normal;
|
| 77 |
+
font-weight: 400;
|
| 78 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEl2i1dC.woff2) format('woff2');
|
| 79 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 80 |
+
}
|
| 81 |
+
/* gujarati */
|
| 82 |
+
@font-face {
|
| 83 |
+
font-family: 'Google Sans Text';
|
| 84 |
+
font-style: normal;
|
| 85 |
+
font-weight: 400;
|
| 86 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFF2i1dC.woff2) format('woff2');
|
| 87 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 88 |
+
}
|
| 89 |
+
/* gurmukhi */
|
| 90 |
+
@font-face {
|
| 91 |
+
font-family: 'Google Sans Text';
|
| 92 |
+
font-style: normal;
|
| 93 |
+
font-weight: 400;
|
| 94 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qGl2i1dC.woff2) format('woff2');
|
| 95 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 96 |
+
}
|
| 97 |
+
/* hebrew */
|
| 98 |
+
@font-face {
|
| 99 |
+
font-family: 'Google Sans Text';
|
| 100 |
+
font-style: normal;
|
| 101 |
+
font-weight: 400;
|
| 102 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEh2i1dC.woff2) format('woff2');
|
| 103 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 104 |
+
}
|
| 105 |
+
/* kannada */
|
| 106 |
+
@font-face {
|
| 107 |
+
font-family: 'Google Sans Text';
|
| 108 |
+
font-style: normal;
|
| 109 |
+
font-weight: 400;
|
| 110 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFB2i1dC.woff2) format('woff2');
|
| 111 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 112 |
+
}
|
| 113 |
+
/* khmer */
|
| 114 |
+
@font-face {
|
| 115 |
+
font-family: 'Google Sans Text';
|
| 116 |
+
font-style: normal;
|
| 117 |
+
font-weight: 400;
|
| 118 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEF2i1dC.woff2) format('woff2');
|
| 119 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 120 |
+
}
|
| 121 |
+
/* lao */
|
| 122 |
+
@font-face {
|
| 123 |
+
font-family: 'Google Sans Text';
|
| 124 |
+
font-style: normal;
|
| 125 |
+
font-weight: 400;
|
| 126 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEN2i1dC.woff2) format('woff2');
|
| 127 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 128 |
+
}
|
| 129 |
+
/* malayalam */
|
| 130 |
+
@font-face {
|
| 131 |
+
font-family: 'Google Sans Text';
|
| 132 |
+
font-style: normal;
|
| 133 |
+
font-weight: 400;
|
| 134 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFJ2i1dC.woff2) format('woff2');
|
| 135 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 136 |
+
}
|
| 137 |
+
/* oriya */
|
| 138 |
+
@font-face {
|
| 139 |
+
font-family: 'Google Sans Text';
|
| 140 |
+
font-style: normal;
|
| 141 |
+
font-weight: 400;
|
| 142 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFN2i1dC.woff2) format('woff2');
|
| 143 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 144 |
+
}
|
| 145 |
+
/* sinhala */
|
| 146 |
+
@font-face {
|
| 147 |
+
font-family: 'Google Sans Text';
|
| 148 |
+
font-style: normal;
|
| 149 |
+
font-weight: 400;
|
| 150 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFd2i1dC.woff2) format('woff2');
|
| 151 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 152 |
+
}
|
| 153 |
+
/* symbols */
|
| 154 |
+
@font-face {
|
| 155 |
+
font-family: 'Google Sans Text';
|
| 156 |
+
font-style: normal;
|
| 157 |
+
font-weight: 400;
|
| 158 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qCR2i1dC.woff2) format('woff2');
|
| 159 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 160 |
+
}
|
| 161 |
+
/* tamil */
|
| 162 |
+
@font-face {
|
| 163 |
+
font-family: 'Google Sans Text';
|
| 164 |
+
font-style: normal;
|
| 165 |
+
font-weight: 400;
|
| 166 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFx2i1dC.woff2) format('woff2');
|
| 167 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 168 |
+
}
|
| 169 |
+
/* telugu */
|
| 170 |
+
@font-face {
|
| 171 |
+
font-family: 'Google Sans Text';
|
| 172 |
+
font-style: normal;
|
| 173 |
+
font-weight: 400;
|
| 174 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qFZ2i1dC.woff2) format('woff2');
|
| 175 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 176 |
+
}
|
| 177 |
+
/* thai */
|
| 178 |
+
@font-face {
|
| 179 |
+
font-family: 'Google Sans Text';
|
| 180 |
+
font-style: normal;
|
| 181 |
+
font-weight: 400;
|
| 182 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qF52i1dC.woff2) format('woff2');
|
| 183 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 184 |
+
}
|
| 185 |
+
/* vietnamese */
|
| 186 |
+
@font-face {
|
| 187 |
+
font-family: 'Google Sans Text';
|
| 188 |
+
font-style: normal;
|
| 189 |
+
font-weight: 400;
|
| 190 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEV2i1dC.woff2) format('woff2');
|
| 191 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 192 |
+
}
|
| 193 |
+
/* latin-ext */
|
| 194 |
+
@font-face {
|
| 195 |
+
font-family: 'Google Sans Text';
|
| 196 |
+
font-style: normal;
|
| 197 |
+
font-weight: 400;
|
| 198 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qER2i1dC.woff2) format('woff2');
|
| 199 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 200 |
+
}
|
| 201 |
+
/* latin */
|
| 202 |
+
@font-face {
|
| 203 |
+
font-family: 'Google Sans Text';
|
| 204 |
+
font-style: normal;
|
| 205 |
+
font-weight: 400;
|
| 206 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEp2iw.woff2) format('woff2');
|
| 207 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 208 |
+
}
|
| 209 |
+
/* armenian */
|
| 210 |
+
@font-face {
|
| 211 |
+
font-family: 'Google Sans Text';
|
| 212 |
+
font-style: normal;
|
| 213 |
+
font-weight: 500;
|
| 214 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnhjtiu7.woff2) format('woff2');
|
| 215 |
+
unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
|
| 216 |
+
}
|
| 217 |
+
/* bengali */
|
| 218 |
+
@font-face {
|
| 219 |
+
font-family: 'Google Sans Text';
|
| 220 |
+
font-style: normal;
|
| 221 |
+
font-weight: 500;
|
| 222 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnpjtiu7.woff2) format('woff2');
|
| 223 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
|
| 224 |
+
}
|
| 225 |
+
/* canadian-aboriginal */
|
| 226 |
+
@font-face {
|
| 227 |
+
font-family: 'Google Sans Text';
|
| 228 |
+
font-style: normal;
|
| 229 |
+
font-weight: 500;
|
| 230 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnkdjtiu7.woff2) format('woff2');
|
| 231 |
+
unicode-range: U+02C7, U+02D8-02D9, U+02DB, U+0307, U+1400-167F, U+18B0-18F5, U+25CC, U+11AB0-11ABF;
|
| 232 |
+
}
|
| 233 |
+
/* cyrillic-ext */
|
| 234 |
+
@font-face {
|
| 235 |
+
font-family: 'Google Sans Text';
|
| 236 |
+
font-style: normal;
|
| 237 |
+
font-weight: 500;
|
| 238 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmVjtiu7.woff2) format('woff2');
|
| 239 |
+
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
| 240 |
+
}
|
| 241 |
+
/* cyrillic */
|
| 242 |
+
@font-face {
|
| 243 |
+
font-family: 'Google Sans Text';
|
| 244 |
+
font-style: normal;
|
| 245 |
+
font-weight: 500;
|
| 246 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmxjtiu7.woff2) format('woff2');
|
| 247 |
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
| 248 |
+
}
|
| 249 |
+
/* devanagari */
|
| 250 |
+
@font-face {
|
| 251 |
+
font-family: 'Google Sans Text';
|
| 252 |
+
font-style: normal;
|
| 253 |
+
font-weight: 500;
|
| 254 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmljtiu7.woff2) format('woff2');
|
| 255 |
+
unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
|
| 256 |
+
}
|
| 257 |
+
/* ethiopic */
|
| 258 |
+
@font-face {
|
| 259 |
+
font-family: 'Google Sans Text';
|
| 260 |
+
font-style: normal;
|
| 261 |
+
font-weight: 500;
|
| 262 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnljtiu7.woff2) format('woff2');
|
| 263 |
+
unicode-range: U+030E, U+1200-1399, U+2D80-2DDE, U+AB01-AB2E, U+1E7E0-1E7E6, U+1E7E8-1E7EB, U+1E7ED-1E7EE, U+1E7F0-1E7FE;
|
| 264 |
+
}
|
| 265 |
+
/* georgian */
|
| 266 |
+
@font-face {
|
| 267 |
+
font-family: 'Google Sans Text';
|
| 268 |
+
font-style: normal;
|
| 269 |
+
font-weight: 500;
|
| 270 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnndjtiu7.woff2) format('woff2');
|
| 271 |
+
unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
|
| 272 |
+
}
|
| 273 |
+
/* greek-ext */
|
| 274 |
+
@font-face {
|
| 275 |
+
font-family: 'Google Sans Text';
|
| 276 |
+
font-style: normal;
|
| 277 |
+
font-weight: 500;
|
| 278 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmRjtiu7.woff2) format('woff2');
|
| 279 |
+
unicode-range: U+1F00-1FFF;
|
| 280 |
+
}
|
| 281 |
+
/* greek */
|
| 282 |
+
@font-face {
|
| 283 |
+
font-family: 'Google Sans Text';
|
| 284 |
+
font-style: normal;
|
| 285 |
+
font-weight: 500;
|
| 286 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmtjtiu7.woff2) format('woff2');
|
| 287 |
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
| 288 |
+
}
|
| 289 |
+
/* gujarati */
|
| 290 |
+
@font-face {
|
| 291 |
+
font-family: 'Google Sans Text';
|
| 292 |
+
font-style: normal;
|
| 293 |
+
font-weight: 500;
|
| 294 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnNjtiu7.woff2) format('woff2');
|
| 295 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839;
|
| 296 |
+
}
|
| 297 |
+
/* gurmukhi */
|
| 298 |
+
@font-face {
|
| 299 |
+
font-family: 'Google Sans Text';
|
| 300 |
+
font-style: normal;
|
| 301 |
+
font-weight: 500;
|
| 302 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnktjtiu7.woff2) format('woff2');
|
| 303 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0A01-0A76, U+200C-200D, U+20B9, U+25CC, U+262C, U+A830-A839;
|
| 304 |
+
}
|
| 305 |
+
/* hebrew */
|
| 306 |
+
@font-face {
|
| 307 |
+
font-family: 'Google Sans Text';
|
| 308 |
+
font-style: normal;
|
| 309 |
+
font-weight: 500;
|
| 310 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmpjtiu7.woff2) format('woff2');
|
| 311 |
+
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
|
| 312 |
+
}
|
| 313 |
+
/* kannada */
|
| 314 |
+
@font-face {
|
| 315 |
+
font-family: 'Google Sans Text';
|
| 316 |
+
font-style: normal;
|
| 317 |
+
font-weight: 500;
|
| 318 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnJjtiu7.woff2) format('woff2');
|
| 319 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C80-0CF3, U+1CD0, U+1CD2-1CD3, U+1CDA, U+1CF2, U+1CF4, U+200C-200D, U+20B9, U+25CC, U+A830-A835;
|
| 320 |
+
}
|
| 321 |
+
/* khmer */
|
| 322 |
+
@font-face {
|
| 323 |
+
font-family: 'Google Sans Text';
|
| 324 |
+
font-style: normal;
|
| 325 |
+
font-weight: 500;
|
| 326 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmNjtiu7.woff2) format('woff2');
|
| 327 |
+
unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
|
| 328 |
+
}
|
| 329 |
+
/* lao */
|
| 330 |
+
@font-face {
|
| 331 |
+
font-family: 'Google Sans Text';
|
| 332 |
+
font-style: normal;
|
| 333 |
+
font-weight: 500;
|
| 334 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmFjtiu7.woff2) format('woff2');
|
| 335 |
+
unicode-range: U+0E81-0EDF, U+200C-200D, U+25CC;
|
| 336 |
+
}
|
| 337 |
+
/* malayalam */
|
| 338 |
+
@font-face {
|
| 339 |
+
font-family: 'Google Sans Text';
|
| 340 |
+
font-style: normal;
|
| 341 |
+
font-weight: 500;
|
| 342 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnBjtiu7.woff2) format('woff2');
|
| 343 |
+
unicode-range: U+0307, U+0323, U+0951-0952, U+0964-0965, U+0D00-0D7F, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC, U+A830-A832;
|
| 344 |
+
}
|
| 345 |
+
/* oriya */
|
| 346 |
+
@font-face {
|
| 347 |
+
font-family: 'Google Sans Text';
|
| 348 |
+
font-style: normal;
|
| 349 |
+
font-weight: 500;
|
| 350 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnFjtiu7.woff2) format('woff2');
|
| 351 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0B01-0B77, U+1CDA, U+1CF2, U+200C-200D, U+20B9, U+25CC;
|
| 352 |
+
}
|
| 353 |
+
/* sinhala */
|
| 354 |
+
@font-face {
|
| 355 |
+
font-family: 'Google Sans Text';
|
| 356 |
+
font-style: normal;
|
| 357 |
+
font-weight: 500;
|
| 358 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnVjtiu7.woff2) format('woff2');
|
| 359 |
+
unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
|
| 360 |
+
}
|
| 361 |
+
/* symbols */
|
| 362 |
+
@font-face {
|
| 363 |
+
font-family: 'Google Sans Text';
|
| 364 |
+
font-style: normal;
|
| 365 |
+
font-weight: 500;
|
| 366 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVngZjtiu7.woff2) format('woff2');
|
| 367 |
+
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
|
| 368 |
+
}
|
| 369 |
+
/* tamil */
|
| 370 |
+
@font-face {
|
| 371 |
+
font-family: 'Google Sans Text';
|
| 372 |
+
font-style: normal;
|
| 373 |
+
font-weight: 500;
|
| 374 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnn5jtiu7.woff2) format('woff2');
|
| 375 |
+
unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
|
| 376 |
+
}
|
| 377 |
+
/* telugu */
|
| 378 |
+
@font-face {
|
| 379 |
+
font-family: 'Google Sans Text';
|
| 380 |
+
font-style: normal;
|
| 381 |
+
font-weight: 500;
|
| 382 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnRjtiu7.woff2) format('woff2');
|
| 383 |
+
unicode-range: U+0951-0952, U+0964-0965, U+0C00-0C7F, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
|
| 384 |
+
}
|
| 385 |
+
/* thai */
|
| 386 |
+
@font-face {
|
| 387 |
+
font-family: 'Google Sans Text';
|
| 388 |
+
font-style: normal;
|
| 389 |
+
font-weight: 500;
|
| 390 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnnxjtiu7.woff2) format('woff2');
|
| 391 |
+
unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
|
| 392 |
+
}
|
| 393 |
+
/* vietnamese */
|
| 394 |
+
@font-face {
|
| 395 |
+
font-family: 'Google Sans Text';
|
| 396 |
+
font-style: normal;
|
| 397 |
+
font-weight: 500;
|
| 398 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmdjtiu7.woff2) format('woff2');
|
| 399 |
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
| 400 |
+
}
|
| 401 |
+
/* latin-ext */
|
| 402 |
+
@font-face {
|
| 403 |
+
font-family: 'Google Sans Text';
|
| 404 |
+
font-style: normal;
|
| 405 |
+
font-weight: 500;
|
| 406 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmZjtiu7.woff2) format('woff2');
|
| 407 |
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
| 408 |
+
}
|
| 409 |
+
/* latin */
|
| 410 |
+
@font-face {
|
| 411 |
+
font-family: 'Google Sans Text';
|
| 412 |
+
font-style: normal;
|
| 413 |
+
font-weight: 500;
|
| 414 |
+
src: url(/static/fonts/fonts.gstatic.com/s/googlesanstext/v25/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmhjtg.woff2) format('woff2');
|
| 415 |
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
| 416 |
+
}
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR1SDk.woff2
ADDED
|
Binary file (44.3 kB). View file
|
|
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR2SDktYw.woff2
ADDED
|
Binary file (19.9 kB). View file
|
|
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR4SDktYw.woff2
ADDED
|
Binary file (33.9 kB). View file
|
|
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR5SDktYw.woff2
ADDED
|
Binary file (11.5 kB). View file
|
|
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR6SDktYw.woff2
ADDED
|
Binary file (11 kB). View file
|
|
|
tasks/eatthismuch/environment/reference/clone/static/fonts/fonts.gstatic.com/s/ebgaramond/v33/SlGUmQSNjdsmc35JDF1K5GR7SDktYw.woff2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8d3fa06e20989a938972165406a1b731cdc7fe33ff2b0b6798c75aa63709901
|
| 3 |
+
size 113928
|