map = {
const map = new d3.InternMap([], String);
let n = {};
for (const [y, line] of input.trim().split("\n").entries())
for (const [x, c] of [...line].entries())
if (c === ".") {
n = {};
} else if (isNaN(Number(c))) {
n = {};
map.set([x, y], c);
} else {
n.s = (n.s ?? "") + c;
map.set([x, y], { n, digit: c });
}
return map;
}