A-B and C-D each start as a fresh Bell pair |Φ+⟩ — A never meets C or D, D never meets A or B. The full 4-qubit state factors as |Φ+⟩AB⊗|Φ+⟩CD.
Re-expressing that state in the Bell basis of the middle qubits B,C shows it equals an equal mix of all four A-D Bell states, each paired with the matching B-C outcome. A real joint (CNOT+H) measurement on B and C therefore collapses A and D onto one Bell state too — even though A and D were never physically brought together. That's entanglement swapping, the core primitive of a quantum repeater.
This sim runs the actual 16-amplitude 4-qubit statevector (not a canned animation): state prep, the Bell-measurement circuit, projective collapse and the final A/D measurement are all computed from the linear algebra live.