{"version":3,"file":"AdvancedImageEmbed.CvsLvyXg.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/RiGxsGL6mFNBPuxu3nQW/lura6MSx43hq4McHfr2s/AdvancedImageEmbed.js"],"sourcesContent":["// Advanced image embed component that loads images from external URLs to save bandwidth.\n// CMS-ready with URL and alt text properties. Performance optimized with fixed sizing.\n// Includes fallback support and accessibility features.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useState,useEffect}from\"react\";/**\n * Advanced Image Embed\n *\n * @framerTemplate\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any\n */export default function AdvancedImageEmbed(props){const{imageUrl=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",altText=\"Image\",fitSettings={objectFit:\"cover\",objectPosition:\"center\"},useVariableFit=false,variableObjectFit=\"cover\",variableFocalPoint=\"center\",loading=\"lazy\",borderRadius=0,scale=1,enableFullscreen=false,style}=props;const[hasError,setHasError]=useState(false);const[isLoading,setIsLoading]=useState(false);const[isFullscreen,setIsFullscreen]=useState(false);// Reset states when imageUrl changes\nuseEffect(()=>{setHasError(false);setIsLoading(false);},[imageUrl]);const fallbackImage=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\";const displayUrl=hasError?fallbackImage:imageUrl||fallbackImage;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const showLoading=isLoading&&!isCanvas;// Determine which fit settings to use\nconst actualObjectFit=useVariableFit?variableObjectFit:fitSettings?.objectFit||\"cover\";const actualObjectPosition=useVariableFit?variableFocalPoint:fitSettings?.objectPosition||\"center\";const handleImageClick=()=>{if(enableFullscreen&&!isCanvas){setIsFullscreen(true);}};const handleCloseFullscreen=()=>{setIsFullscreen(false);};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",minHeight:5,minWidth:5,overflow:\"hidden\",backgroundColor:showLoading?\"#f0f0f0\":\"transparent\",borderRadius:`${borderRadius}px`,cursor:enableFullscreen&&!isCanvas?\"zoom-in\":\"default\"},onClick:handleImageClick,children:[showLoading&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",color:\"#999\",fontSize:\"14px\"},children:\"Loading...\"}),/*#__PURE__*/_jsx(\"img\",{src:displayUrl,alt:altText,loading:loading,onLoad:()=>setIsLoading(false),onError:()=>{setHasError(true);setIsLoading(false);},style:{width:\"100%\",height:\"100%\",objectFit:actualObjectFit,objectPosition:actualObjectPosition,display:\"block\",opacity:showLoading?0:1,transition:\"opacity 0.3s ease\",transform:`scale(${scale})`}}),hasError&&isCanvas&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:\"8px\",left:\"8px\",right:\"8px\",backgroundColor:\"rgba(255, 0, 0, 0.8)\",color:\"white\",padding:\"4px 8px\",fontSize:\"12px\",borderRadius:\"4px\"},children:\"Failed to load image. Using fallback.\"})]}),isFullscreen&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",backgroundColor:\"rgba(0, 0, 0, 0.95)\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:9999},children:[/*#__PURE__*/_jsx(\"button\",{onClick:handleCloseFullscreen,style:{position:\"absolute\",top:\"20px\",right:\"20px\",width:\"48px\",height:\"48px\",backgroundColor:\"rgba(255, 255, 255, 0.15)\",border:\"2px solid rgba(255, 255, 255, 0.3)\",borderRadius:\"50%\",cursor:\"pointer\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",transition:\"all 0.2s ease\",zIndex:1e4},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=\"rgba(255, 255, 255, 0.25)\";e.currentTarget.style.borderColor=\"rgba(255, 255, 255, 0.5)\";},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=\"rgba(255, 255, 255, 0.15)\";e.currentTarget.style.borderColor=\"rgba(255, 255, 255, 0.3)\";},\"aria-label\":\"Close fullscreen\",children:/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"white\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"18\",y1:\"6\",x2:\"6\",y2:\"18\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"6\",y1:\"6\",x2:\"18\",y2:\"18\"})]})}),/*#__PURE__*/_jsx(\"img\",{src:displayUrl,alt:altText,style:{maxWidth:\"90%\",maxHeight:\"90%\",objectFit:\"contain\",cursor:\"default\"}})]})]});}addPropertyControls(AdvancedImageEmbed,{imageUrl:{type:ControlType.String,title:\"Image URL\",defaultValue:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",placeholder:\"https://example.com/image.jpg\",description:\"External image URL to load\"},altText:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"Image\",placeholder:\"Describe the image...\",description:\"Alternative text for accessibility and SEO\"},borderRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:0,min:0,max:100,step:1,unit:\"px\",displayStepper:false},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:1,min:.1,max:3,step:.1,unit:\"x\",displayStepper:false},useVariableFit:{type:ControlType.Boolean,title:\"Variable Fit\",defaultValue:false,enabledTitle:\"Variable\",disabledTitle:\"Fixed\",description:\"Enable to control fit settings from outside (CMS-ready)\"},fitSettings:{type:ControlType.Object,title:\"Fit Settings\",controls:{objectFit:{type:ControlType.Enum,title:\"Object Fit\",options:[\"contain\",\"cover\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Contain\",\"Cover\",\"Fill\",\"None\",\"Scale Down\"],defaultValue:\"cover\"},objectPosition:{type:ControlType.Enum,title:\"Focal Point\",options:[\"center\",\"top\",\"bottom\",\"left\",\"right\",\"top left\",\"top right\",\"bottom left\",\"bottom right\"],optionTitles:[\"Center\",\"Top\",\"Bottom\",\"Left\",\"Right\",\"Top Left\",\"Top Right\",\"Bottom Left\",\"Bottom Right\"],defaultValue:\"center\"}},defaultValue:{objectFit:\"cover\",objectPosition:\"center\"},hidden:({useVariableFit})=>useVariableFit},variableObjectFit:{type:ControlType.Enum,title:\"Object Fit\",options:[\"contain\",\"cover\",\"fill\",\"none\",\"scale-down\"],optionTitles:[\"Contain\",\"Cover\",\"Fill\",\"None\",\"Scale Down\"],defaultValue:\"cover\",hidden:({useVariableFit})=>!useVariableFit},variableFocalPoint:{type:ControlType.Enum,title:\"Focal Point\",options:[\"center\",\"top\",\"bottom\",\"left\",\"right\",\"top left\",\"top right\",\"bottom left\",\"bottom right\"],optionTitles:[\"Center\",\"Top\",\"Bottom\",\"Left\",\"Right\",\"Top Left\",\"Top Right\",\"Bottom Left\",\"Bottom Right\"],defaultValue:\"center\",hidden:({useVariableFit})=>!useVariableFit},loading:{type:ControlType.Enum,title:\"Loading\",options:[\"lazy\",\"eager\"],optionTitles:[\"Lazy\",\"Eager\"],defaultValue:\"lazy\",displaySegmentedControl:true,description:\"Image loading strategy\"},enableFullscreen:{type:ControlType.Boolean,title:\"Fullscreen\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Enable to allow clicking image to view fullscreen\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AdvancedImageEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"300\",\"framerContractVersion\":\"1\",\"framerTemplate\":\"*\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Ad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