/* Alchemy — SITE ROUTES. Canonical production URL for every page, so cross-page links point at the real domain instead of local filenames. In this prototype the pages are local .html files, so `alcUrl()` returns the local file when you're previewing and the production URL everywhere else. That keeps the click-through working here while the exported markup carries the real links. Set FORCE_PRODUCTION = true to always emit production URLs. */ const SITE = 'https://www.alchemycowork.com'; const FORCE_PRODUCTION = false; window.ALCHEMY_ROUTES = { home: { slug: '/', file: 'index.html' }, dtg: { slug: '/downtown-gastonia', file: 'DTG.html' }, clt: { slug: '/charlotte', file: 'CLT.html' }, lry: { slug: '/loray', file: 'Loray.html' }, virtualTour: { slug: '/virtual-tour', file: 'VirtualTour.html' }, tour: { slug: '/schedule-a-tour', file: 'index.html#tour' }, contact: { slug: '/contact', file: 'index.html#contact' }, meeting: { slug: '/meeting-rooms', file: 'index.html#meeting' }, dayPass: { slug: '/day-passes', file: 'index.html#daypass' }, plans: { slug: '/plans', file: 'index.html#tiers' }, businessClub:{ slug: '/business-club', file: 'index.html#tiers' }, desks: { slug: '/dedicated-desks', file: 'index.html#tiers' }, offices: { slug: '/private-offices', file: 'index.html#tiers' }, privacy: { slug: '/privacy-policy', file: '../../legal/privacy-policy-ghl-embed.html' }, terms: { slug: '/terms-and-conditions', file: '../../legal/terms-conditions-ghl-embed.html' }, }; /* True when this is the real site rather than a local preview of it. Covers the live domain and any GHL preview/staging host, since exported markup must emit real slugs there too. Set FORCE_PRODUCTION for anything else. */ const isProduction = () => { if (FORCE_PRODUCTION) return true; const h = window.location.hostname || ''; return /alchemycowork\.com$/i.test(h) || /(^|\.)(gohighlevel|leadconnectorhq|msgsndr)\.com$/i.test(h) || /\.gohighlevel\.com$/i.test(h); }; /* Resolve a route key to a URL. `hash` appends an in-page anchor. */ window.alcUrl = (key, hash) => { const r = (window.ALCHEMY_ROUTES || {})[key]; if (!r) return '#'; const suffix = hash ? '#' + hash : ''; return isProduction() ? SITE + r.slug + suffix : r.file + suffix; }; /* Canonical production URL, regardless of environment — for sitemaps, Notion documentation, and anything pasted outside the site. */ window.alcCanonical = (key) => { const r = (window.ALCHEMY_ROUTES || {})[key]; return r ? SITE + r.slug : SITE; }; window.ALCHEMY_SITE = SITE;