diff --git a/index.html b/index.html
index a7ed384..3b266fe 100644
--- a/index.html
+++ b/index.html
@@ -1839,7 +1839,7 @@
typeHtmlCalmly(txt,"THE CARNEGIE FOUNDATION COMMISSIONED THE FLEXNER REPORT. IT EVALUATED EVERY MEDICAL SCHOOL IN AMERICA. HALF WERE SHUT DOWN — PARTICULARLY THOSE TRAINING WOMEN, BLACK DOCTORS, AND RURAL PRACTITIONERS.",()=>{
const t2=setTimeout(()=>{
txt.innerHTML+="\n\n";
- typeHtmlCalmly(txt,"THE AMA TOOK CONTROL OF MEDICAL LICENSING. MEDICINE BECAME A GATEKEPT PROFESSION.",()=>{
+ typeHtmlCalmly(txt,"THE AMERICAN MEDICAL ASSOCIATION TOOK CONTROL OF MEDICAL LICENSING. MEDICINE BECAME A GATEKEPT PROFESSION.",()=>{
showNextBtn('next10a');showNextBtn('sources10a');
},undefined,undefined,h10c);
},800);
@@ -2028,7 +2028,7 @@
txt.innerHTML+="\n\n";
vis.classList.add('visible');
let html='
| TRADITIONAL | DECENTRALIZED |
';
- html+='| GATEKEEPERS | ✅ YES — AMA, FDA, INSURANCE | ❌ NONE |
';
+ html+='| GATEKEEPERS | ✅ YES — AMERICAN MEDICAL ASSOCIATION, FDA, INSURANCE | ❌ NONE |
';
html+='| YOUR DATA | OWNED BY THE SYSTEM | YOU CONTROL |
';
html+='| INNOVATION | APPROVAL-BASED | PRACTICE-BASED |
';
html+='| COST | $4.1T AND RISING | MARKET-BASED |
';
@@ -2651,7 +2651,50 @@
.filter(n => n.id !== node.id && n.online)
.map(n => ({ node: n, dist: Math.hypot(n.x - node.x, n.y - node.y) }))
.sort((a, b) => a.dist - b.dist);
- node.connections = distances.slice(0, 3).map(d => d.node.id);
+ node.connections = distances.slice(0, 4).map(d => d.node.id);
+ }
+ ensureConnectivity();
+ }
+
+ function ensureConnectivity() {
+ const online = meshState.nodes.filter(n => n.online);
+ if (online.length < 2) return;
+ const adj = {};
+ for (const node of online) {
+ adj[node.id] = node.connections.filter(cid => {
+ const cn = meshState.nodes.find(n => n.id === cid);
+ return cn && cn.online;
+ });
+ }
+ const visited = new Set();
+ const queue = [online[0].id];
+ visited.add(online[0].id);
+ while (queue.length) {
+ const cur = queue.shift();
+ for (const nb of (adj[cur] || [])) {
+ if (!visited.has(nb)) {
+ visited.add(nb);
+ queue.push(nb);
+ }
+ }
+ }
+ const unreachable = online.filter(n => !visited.has(n.id));
+ for (const orphan of unreachable) {
+ let best = null;
+ let bestDist = Infinity;
+ for (const node of meshState.nodes) {
+ if (!node.online || !visited.has(node.id)) continue;
+ const d = Math.hypot(orphan.x - node.x, orphan.y - node.y);
+ if (d < bestDist) {
+ bestDist = d;
+ best = node;
+ }
+ }
+ if (best) {
+ orphan.connections.push(best.id);
+ best.connections.push(orphan.id);
+ visited.add(orphan.id);
+ }
}
}