(() => { const key = document.body.dataset.document; const target = document.getElementById("legal-document"); const escapeHtml = (value) => String(value).replace(/[&<>"']/g, (character) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[character]); fetch("/legal/legal_documents.json", { cache: "no-store" }) .then((response) => { if (!response.ok) throw new Error(`status ${response.status}`); return response.json(); }) .then((documents) => { const documentData = documents[key]; if (!documentData) throw new Error("document not found"); document.title = `${documentData.title} | RanaZe`; const sections = documentData.sections.map((section) => `

${escapeHtml(section.heading)}

${section.paragraphs.map((paragraph) => `

${escapeHtml(paragraph)}

`).join("")}
`).join(""); target.innerHTML = `
RanaZe: Step 3 Trainer

${escapeHtml(documentData.title)}

Effective ${escapeHtml(documentData.effectiveDate)} | Version ${escapeHtml(documentData.version)}

${escapeHtml(documentData.summary)}

${sections}`; }) .catch(() => { target.innerHTML = '

This document could not be loaded. Contact support@ranaze.com.

'; }); })();