{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/Nc6OoIKQx6aWrUzro23r/3BqlxoyHsGm1hRptppeJ/DynamicHeight.js", "ssg:https://framerusercontent.com/modules/H8HctNAKs4gcC6xEt1uO/AxLx6KVE5HjAiJA0veWb/Map_v2.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";export function withDynamicAndRelativeUnits(Component){return props=>{const name=props[\"data-framer-name\"]||\"\";const declarations=name.toLowerCase().split(\"|\");let dynamicStyle={...props.style};// Regex to match width or height followed by a valid CSS value\nconst regex=/(width|height):\\s*([0-9.]+[a-z%]+)/i;declarations.forEach(declaration=>{const match=declaration.match(regex);if(match){const property=match[1]// Extracted property (width or height)\n;const value=match[2]// Extracted value (e.g., \"100vh\", \"50vh\", \"10dvh\")\n;dynamicStyle[property]=value;}});return /*#__PURE__*/_jsx(Component,{...props,style:dynamicStyle});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDynamicAndRelativeUnits\":{\"type\":\"reactHoc\",\"name\":\"withDynamicAndRelativeUnits\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicHeight.map", "import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function WayfinderMap(props){// References to hold DOM elements for the map and UI\nconst mapRef=useRef(null);const uiRef=useRef(null);const wayfinderRef=useRef(null);const[scriptsLoaded,setScriptsLoaded]=useState(false);// Helper function to dynamically load external scripts\nconst loadScript=src=>{return new Promise((resolve,reject)=>{// Check if the script is already loaded\nif(document.querySelector(`script[src=\"${src}\"]`)){resolve();return;}const script=document.createElement(\"script\");script.src=src;script.async=true;script.onload=()=>resolve();script.onerror=error=>reject(error);document.head.appendChild(script);});};// Helper function to dynamically load external stylesheets\nconst loadStylesheet=href=>{return new Promise((resolve,reject)=>{if(document.querySelector(`link[href=\"${href}\"]`)){resolve();return;}const link=document.createElement(\"link\");link.href=href;link.rel=\"stylesheet\";link.onload=()=>resolve();link.onerror=error=>reject(error);document.head.appendChild(link);});};// Load required resources on mount\nuseEffect(()=>{const loadResources=async()=>{try{await loadStylesheet(\"https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;700&display=swap\");await loadScript(\"https://cdn.wayfinder.acquiredigital.com/stagging/js-api/three.min.js\");await loadScript(\"https://cdn.wayfinder.acquiredigital.com/stagging/js-api/wayfinderv2.js\");await loadScript(\"https://cdn.wayfinder.acquiredigital.com/stagging/js-api/wf-map-ui.umd.cjs\");setScriptsLoaded(true);}catch(error){console.error(\"Error loading resources:\",error);}};loadResources();return()=>{if(wayfinderRef.current){wayfinderRef.current.destroy();}};},[]);// Initialise Wayfinder when scripts are loaded\nuseEffect(()=>{if(scriptsLoaded&&mapRef.current&&uiRef.current){if(wayfinderRef.current){wayfinderRef.current.destroy();}const mapSettings=getMapSettings(props);wayfinderRef.current=new Wayfinder(mapRef.current,mapSettings);uiRef.current.wayfinder=wayfinderRef.current;uiRef.current.settings={features:{currentLocation:false},behaviour:{zoomToDestination:true}};wayfinderRef.current.loadFromApiKey(props.apiKey);}},[scriptsLoaded]);const getMapSettings=props=>({startFloorId:props.initialFloor,initialZoomMode:\"1\",background:{color:props.backgroundColor},routeLine:{color:\"#3DA1FF\",color2:\"#ffffff\",size:.3,yPosition:2},destinations:{hover:\"#C1E771\",selected:\"#2FB035\"},shadows:props.shadowsEnabled,icon:{scale:60,minSize:40,maxSize:100,inFrontOfFloatingLabels:false,combineWithFloatingLabels:true,transitIconsHavePriority:true,fadeTime:250,overlapMargin:2},lighting:{rotateLights:false,shadowBias:4e-4},angle:0,tilt:45,label:{style:{fontName:\"Lexend\",sizeInPx:50,padding:10,alignment:\"center\"},color:\"#111111\",hover:\"#000000\",selected:\"#000000\",shadowColor:\"#ffffff\",shadowHover:\"#ffffff\",shadowSelected:\"#ffffff\",shadowDistance:2,shadowSize:0,float:{enabled:props.floatEnabled,font:{name:\"Lexend\",size:16,weight:300,alignment:\"center\"},overlapMargin:6,stopAfterClashCount:0,prioritizeByLabelSize:false,centerOnLabel:true,showLabelOnFlagship:false,dots:{enabled:true,size:3,color:\"#000000\"},shadow:\"#000000\",useLabelColor:true,shadowSize:0,shadowDistance:2}}});return /*#__PURE__*/_jsx(\"wf-map-ui\",{ref:uiRef,id:\"wayfinderUI\",style:{width:\"100%\",height:\"100dvh\"},children:/*#__PURE__*/_jsx(\"div\",{ref:mapRef,id:\"wayfinderMap\",style:{width:\"100%\",height:\"100dvh\"}})});}// Property Controls for Framer UI\naddPropertyControls(WayfinderMap,{initialFloor:{type:ControlType.String,title:\"Initial Floor\",defaultValue:\"\"},shadowsEnabled:{type:ControlType.Boolean,title:\"Shadows\",defaultValue:false},backgroundColor:{type:ControlType.Color,title:\"Map Background Color\",defaultValue:\"#F0F0F0\"},apiKey:{type:ControlType.String,title:\"API Key\",defaultValue:\"b664166918ef48fa-45bd933bde445da9ab726b4907954001\"},floatEnabled:{type:ControlType.Boolean,title:\"Floating Labels\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WayfinderMap\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Map_v2.map"],
  "mappings": "8GAAkD,SAASA,EAA4BC,EAAU,CAAC,OAAOC,GAAO,CAA0C,IAAMC,GAApCD,EAAM,kBAAkB,GAAG,IAA2B,YAAY,EAAE,MAAM,GAAG,EAAME,EAAa,CAAC,GAAGF,EAAM,KAAK,EACrOG,EAAM,sCAAsC,OAAAF,EAAa,QAAQG,GAAa,CAAC,IAAMC,EAAMD,EAAY,MAAMD,CAAK,EAAE,GAAGE,EAAM,CAAC,IAAMC,EAASD,EAAM,CAAC,EACnJE,EAAMF,EAAM,CAAC,EACnBH,EAAaI,CAAQ,EAAEC,CAAM,CAAC,CAAC,EAAsBC,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C,CAAC,GAAG,OAAoBoB,EAAK,YAAY,CAAC,IAAIjB,EAAM,GAAG,cAAc,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,EAAE,SAAsBiB,EAAK,MAAM,CAAC,IAAInB,EAAO,GAAG,eAAe,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,CACpoDoB,EAAoBtB,EAAa,CAAC,aAAa,CAAC,KAAKuB,EAAY,OAAO,MAAM,gBAAgB,aAAa,EAAE,EAAE,eAAe,CAAC,KAAKA,EAAY,QAAQ,MAAM,UAAU,aAAa,EAAK,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,uBAAuB,aAAa,SAAS,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,UAAU,aAAa,mDAAmD,EAAE,aAAa,CAAC,KAAKA,EAAY,QAAQ,MAAM,kBAAkB,aAAa,EAAI,CAAC,CAAC",
  "names": ["withDynamicAndRelativeUnits", "Component", "props", "declarations", "dynamicStyle", "regex", "declaration", "match", "property", "value", "p", "WayfinderMap", "props", "mapRef", "pe", "uiRef", "wayfinderRef", "scriptsLoaded", "setScriptsLoaded", "ye", "loadScript", "src", "resolve", "reject", "script", "error", "loadStylesheet", "href", "link", "ue", "mapSettings", "getMapSettings", "p", "addPropertyControls", "ControlType"]
}
