// Canonical manifest — GENERATED by redeploy-website.sh from
// timeline/timeline.manifest.json. Do not edit by hand; re-run the deploy
// script to regenerate.

const MANIFEST = [
  { v: "0.1.2_01", c: "a1.0.16_01", d: "2010-08-12" },
  { v: "0.1.3", c: "a1.0.16_02", d: "2010-08-17" },
  { v: "0.1.4", c: "a1.0.17", d: "2010-08-20" },
  { v: "0.2.0", c: "a1.1.0", d: "2010-09-10" },
  { v: "0.2.0_01", c: "a1.1.0", d: "2010-09-10" },
  { v: "0.2.1", c: "a1.1.0", d: "2010-09-19" },
  { v: "0.2.2", c: "a1.2.0", d: "2010-10-30" },
  { v: "0.2.2_01", c: "a1.2.0", d: "2010-10-30" },
  { v: "0.2.3", c: "a1.2.1", d: "2010-11-05" },
  { v: "0.2.4", c: "a1.2.2", d: "2010-11-10" },
  { v: "0.2.5", c: "a1.2.3", d: "2010-11-24" },
  { v: "0.2.5_01", c: "a1.2.3_02", d: "2010-11-25" },
  { v: "0.2.5_02", c: "a1.2.3_04", d: "2010-11-26" },
  { v: "0.2.6", c: "a1.2.3_05", d: "2010-11-30" },
  { v: "0.2.6_01", c: "a1.2.3_05", d: "2010-11-30" },
  { v: "0.2.6_02", c: "a1.2.4_01", d: "2010-11-30" },
  { v: "0.2.7", c: "a1.2.5", d: "2010-12-01" },
  { v: "0.2.8", c: "a1.2.6", d: "2010-12-03" },
  { v: "b1.0", c: "b1.0", d: "2010-12-20" },
  { v: "b1.0_01", c: "b1.0_01", d: "2010-12-21" },
  { v: "b1.1", c: "b1.1", d: "2010-12-22" },
  { v: "b1.1_01", c: "b1.1_01", d: "2010-12-22" },
  { v: "b1.1_02", c: "b1.1_02", d: "2010-12-22" },
  { v: "b1.2", c: "b1.2", d: "2011-01-13" },
  { v: "b1.2_01", c: "b1.2_01", d: "2011-01-14" },
  { v: "b1.3", c: "b1.3", d: "2011-02-22" },
  { v: "b1.4", c: "b1.4", d: "2011-03-31" },
  { v: "b1.4_01", c: "b1.4_01", d: "2011-04-05" },
  { v: "b1.5", c: "b1.5", d: "2011-04-19" },
  { v: "b1.5_01", c: "b1.5_01", d: "2011-04-20" },
  { v: "b1.5_02", c: "b1.5_01", d: "2011-04-20" },
  { v: "b1.6", c: "b1.6", d: "2011-05-26" },
  { v: "b1.6.1", c: "b1.6.1", d: "2011-05-26" },
  { v: "b1.6.2", c: "b1.6.2", d: "2011-05-26" },
  { v: "b1.6.3", c: "b1.6.3", d: "2011-05-26" },
  { v: "b1.6.4", c: "b1.6.4", d: "2011-05-26" },
  { v: "b1.6.5", c: "b1.6.5", d: "2011-05-28" },
  { v: "b1.6.6", c: "b1.6.6", d: "2011-05-31" },
  { v: "b1.7_01", c: "b1.7.2", d: "2011-06-30" },
  { v: "b1.7.2", c: "b1.7.2", d: "2011-07-01" },
  { v: "b1.7.3", c: "b1.7.3", d: "2011-07-08" },
];

// Helpers
function parseDate(s) { return new Date(s + 'T00:00:00Z'); }
function daysBetween(a, b) { return Math.round((b - a) / 86400000); }
function fmtDate(s) {
  const d = parseDate(s);
  const months = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'];
  return `${months[d.getUTCMonth()]} ${d.getUTCDate()}, ${d.getUTCFullYear()}`;
}
function fmtDateShort(s) {
  const d = parseDate(s);
  const months = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'];
  return `${months[d.getUTCMonth()]} ${d.getUTCDate()}`;
}

function eraOf(v) {
  if (v.startsWith('b1.0') || v.startsWith('b1.1')) return 'early-beta';
  if (v.startsWith('b1.2') || v.startsWith('b1.3') || v.startsWith('b1.4') || v.startsWith('b1.5')) return 'mid-beta';
  if (v.startsWith('b1.6') || v.startsWith('b1.7')) return 'late-beta';
  return 'alpha';
}

Object.assign(window, { MANIFEST, parseDate, daysBetween, fmtDate, fmtDateShort, eraOf });
