const __BX = (typeof window !== "undefined" && window.__BX_CONTENT) || {};
const __homeMd     = __BX.home          || {};
const __servicesMd = __BX.services      || {};
const __workMd     = __BX.work          || {};
const __ossMd      = __BX["open-source"] || {};
const __storiesMd  = __BX.blog          || {};

const CONTENT = {
  services: __servicesMd.services || [],
  industries: __workMd.industries
    ? __workMd.industries.map((i) => ({ name: i.name, note: i.summary || i.body }))
    : [],
  oss: __ossMd.oss
    ? __ossMd.oss.slice(0, 3).map((o) => ({ name: o.name, desc: o.desc, ctaLabel: o.ctaLabel || o.linkText, ctaUrl: o.ctaUrl || o.linkUrl, linkText: o.ctaLabel || o.linkText, linkUrl: o.ctaUrl || o.linkUrl }))
    : [],
  posts: __storiesMd.posts
    ? __storiesMd.posts.slice(0, 4).map((p) => ({ date: p.date, kind: p.kind, title: p.title, read: p.read, image: p.image || "", excerpt: p.excerpt || "", slug: p.slug || "" }))
    : [],
  proof: __homeMd.proof || [],
  nav: __homeMd.nav || [],
  quotes: __homeMd.quotes || [],
  pillars: __homeMd.pillars || [],
  techTitle: __homeMd.techTitle || "",
  servicesTitle: __homeMd.servicesTitle || "",
};

Object.assign(window, { CONTENT });
