top of page
White Logo No background.png

import wixData from 'wix-data'; import wixWindowFrontend from 'wix-window-frontend'; import wixLocationFrontend from 'wix-location-frontend'; const mediaUrl = (value) => { if (!value) return ''; if (typeof value === 'object') return value.url || value.src || value.fileUrl || ''; if (value.startsWith('wix:image://v1/')) return 'https://static.wixstatic.com/media/' + value.split('/')[3]; if (value.startsWith('wix:video://v1/')) return 'https://video.wixstatic.com/video/' + value.split('/')[3] + '/720p/mp4/file.mp4'; return value; }; $w.onReady(async function () { const html = $w('#html1'); let stagePayload, venuePayload; const send = () => { if(stagePayload)html.postMessage(stagePayload); if(venuePayload)html.postMessage(venuePayload); }; const route=()=>html.postMessage({type:'availabilityRoute',open:wixLocationFrontend.query.availability==='1',level:wixLocationFrontend.query.level||''}); html.onMessage((event) => { const type=event.data?.type; if(type==='availabilityCallback' && typeof event.data.preferences==='string'){ wixWindowFrontend.openLightbox('Stage Finder Callback',{preferences:event.data.preferences.slice(0,12000)}); } if(type==='stageFinderReady'||type==='availabilityReady'){send();if(type==='availabilityReady')route();} }); await Promise.all([ (async()=>{ try { const result = await wixData.query('21StageFinderJourney').ascending('sceneOrder').limit(50).find(); const stageItems=result.items.filter(item=>Number(item.sceneOrder)>0&&item.active!==false); const items=stageItems.map((item,index)=>({ n:String(index+1).padStart(2,'0'),c:item.accentColour?'#'+String(item.accentColour).replace('#',''):'', e:item.eyebrow||'',h:item.headline||item.title||'',d:item.description||'',stageRange:item.stageRange||item.title||'', primaryMedal:mediaUrl(item.image),secondaryMedal:mediaUrl(item.secondaryMedal), backgroundImage:mediaUrl(item.backgroundImage),backgroundVideo:mediaUrl(item.backgroundVideo), ctaLabel:item.ctaLabel||'',ctaLink:item.ctaLink||'' })); stagePayload={type:'stageFinderData',items,mobile:wixWindowFrontend.formFactor==='Mobile'};send(); }catch(error){console.error('Unable to load Stage Finder content',error);} })(), (async()=>{ try { let result=await wixData.query('Properties1').limit(100).find(),items=[...result.items]; while(result.hasNext()){result=await result.next();items.push(...result.items);} venuePayload={type:'stepping-stones-venues',items:items.map(item=>({ title:item.title,name:item.name,region:item.region,regions:item.regions,serviceAreas:item.serviceAreas, secondaryRegions:item.secondaryRegions,venuePageUrl:item.venuePageUrl,dynamicPageUrl:item.dynamicPageUrl, venueUrl:item.venueUrl,'link-venues-title':item['link-venues-title'] }))};send(); }catch(error){console.error('Unable to load venue areas',error);} })() ]); route(); });

  • Instagram

Stepping Stones Swimming ©2026

bottom of page