<script>
window.__gcLoaded = false;
function ensureGoogleCharts(cb){
  if (window.__gcLoaded) { cb(); return; }
  const s = document.createElement('script');
  s.src = 'https://www.gstatic.com/charts/loader.js';
  s.onload = function(){
    google.charts.load('current', {'packages':['corechart','geochart']});
    google.charts.setOnLoadCallback(function(){ window.__gcLoaded = true; cb(); });
  };
  document.head.appendChild(s);
}
</script>
