{"version":3,"file":"DynamicMaps.CdcDRW1G.mjs","names":["React.useState","React.useMemo"],"sources":["https:/framerusercontent.com/modules/WpkaLDZvQmnXszYIWhDM/tw0SLNkL880Zn6XnKoIR/DynamicMaps.js"],"sourcesContent":["// ResponsiveGoogleMap.tsx\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ResponsiveGoogleMap(props){const{width,height,style,className,location,zoom,mapType,allowFullscreen,minWidth,minHeight,skeletonColor,shimmerColor,shimmerSpeed}=props;const[loaded,setLoaded]=React.useState(false);const src=React.useMemo(()=>{const params=new URLSearchParams;params.set(\"q\",location)// natural language OK\n;params.set(\"z\",String(Math.max(0,Math.min(21,zoom))));params.set(\"t\",mapType===\"satellite\"?\"k\":\"m\");params.set(\"output\",\"embed\");return`https://maps.google.com/maps?${params.toString()}`;},[location,zoom,mapType]);React.useEffect(()=>{setLoaded(false);},[src]);// Prefer Framer-provided numeric sizing, fallback to style, then min values\nconst resolvedWidth=typeof width===\"number\"?width:style?.width??minWidth;const resolvedHeight=typeof height===\"number\"?height:style?.height??minHeight;return /*#__PURE__*/_jsxs(\"div\",{className:className,style:{position:\"relative\",overflow:\"hidden\",display:\"block\",width:resolvedWidth,height:resolvedHeight,// Let Framer still inject other stuff (e.g. borderRadius, transforms)\n...style},children:[!loaded&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:`linear-gradient(\n                          90deg,\n                          ${skeletonColor} 0%,\n                          ${shimmerColor} 50%,\n                          ${skeletonColor} 100%\n                        )`,backgroundSize:\"200% 100%\",animation:`framer-map-shimmer ${Math.max(.6,shimmerSpeed)}s ease infinite`}}),/*#__PURE__*/_jsx(\"iframe\",{title:\"Google Map\",src:src,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:0,display:\"block\",opacity:loaded?1:0,transition:\"opacity 0.35s ease\"},loading:\"lazy\",onLoad:()=>setLoaded(true),allowFullScreen:allowFullscreen,referrerPolicy:\"no-referrer-when-downgrade\"}),/*#__PURE__*/_jsx(\"style\",{children:`\n              @keyframes framer-map-shimmer {\n                0% { background-position: 200% 0; }\n                100% { background-position: -200% 0; }\n              }\n            `})]});}addPropertyControls(ResponsiveGoogleMap,{location:{type:ControlType.String,title:\"Location\",defaultValue:\"Melbourne VIC\"},zoom:{type:ControlType.Number,title:\"Zoom\",defaultValue:14,min:0,max:21,step:1},mapType:{type:ControlType.Enum,title:\"Type\",options:[\"roadmap\",\"satellite\"],optionTitles:[\"Roadmap\",\"Satellite\"],defaultValue:\"roadmap\"},allowFullscreen:{type:ControlType.Boolean,title:\"Fullscreen\",defaultValue:true},minWidth:{type:ControlType.Number,title:\"Min W\",defaultValue:0,min:0,step:10},minHeight:{type:ControlType.Number,title:\"Min H\",defaultValue:0,min:0,step:10},skeletonColor:{type:ControlType.Color,title:\"Skeleton\",defaultValue:\"#E5E7EB\"},shimmerColor:{type:ControlType.Color,title:\"Shimmer\",defaultValue:\"#F3F4F6\"},shimmerSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:1.4,min:.6,max:4,step:.1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ResponsiveGoogleMap\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicMaps.map"],"mappings":"+LACyI,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,QAAM,SAAO,QAAM,YAAU,WAAS,OAAK,UAAQ,kBAAgB,WAAS,YAAU,gBAAc,eAAa,gBAAc,EAAW,CAAC,EAAO,GAAWA,EAAe,EAAK,EAAQ,EAAIC,MAAkB,CAAC,IAAM,EAAO,IAAI,gBACjS,OADiT,EAAO,IAAI,IAAI,CAAQ,EACzc,EAAO,IAAI,IAAI,OAAO,KAAK,IAAI,EAAE,KAAK,IAAI,GAAG,CAAI,CAAC,CAAC,C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