{"version":3,"file":"ProjectVideoEmbed.CCm2Uwd6.mjs","names":["useMemo","_jsx","__esmMin","pe","c","init_jsx_runtime","init_npm_react_18_3_1","init_framer_BWzg2IRg","addPropertyControls","ControlType","parseEmbedUrl","rawUrl","parsed","host","videoId","hValue","embed","ProjectVideoEmbed","props","url","style","embedSrc","init_ProjectVideoEmbed"],"sources":["https:/framerusercontent.com/modules/tNi5d32BJm6jbXa9Q7yj/cMHhiVhVtsrctKkU9wyr/ProjectVideoEmbed.js"],"sourcesContent":["// User request: Create two minimal Framer code components for editable native CMS template. 1 ProjectVideoEmbed.tsx receives url string control 'URL', parses Vimeo normal player URLs numeric IDs and YouTube watch/short/embed/youtu.be; render iframe https://player.vimeo.com/video/ID or youtube-nocookie.com/embed/ID; 16:9 ratio, no autoplay, allow fullscreen media, title descriptive; blank url return null no placeholder, component will conditionally hidden on canvas via CMS. SSR safe. width fills height determined native frame aspectRatio16/9, iframe100% both. @width any height any. Preserve query Vimeo h if private. 2 ProjectThumbnail.tsx image ControlType.Image name 'Image', optional alt, black clipped matte widthheight100%, real img objectfitcover, local hover state transform scale1.12 transition450ms smooth, frame never scales. No external navigation inside (native parent links to CMS item); keyboard focus-within if possible, reduced motion respect. Full editable font unrelated no typography. Return exact component ids. No global styles no data hardcode. Need image handling Framer Image string or objectsrc safe.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";function parseEmbedUrl(rawUrl){if(!rawUrl.trim())return\"\";if(typeof URL===\"undefined\")return\"\";try{const parsed=new URL(rawUrl);const host=parsed.hostname.toLowerCase();// Vimeo\nif(host.includes(\"vimeo.com\")){const pathIdMatch=parsed.pathname.match(/\\/(?:video\\/)?(\\d+)/);const videoId=pathIdMatch?.[1];if(!videoId)return\"\";const hValue=parsed.searchParams.get(\"h\");const embed=new URL(`https://player.vimeo.com/video/${videoId}`);if(hValue)embed.searchParams.set(\"h\",hValue);return embed.toString();}// YouTube\nif(host.includes(\"youtube.com\")||host.includes(\"youtu.be\")){let videoId=\"\";if(host.includes(\"youtu.be\")){videoId=parsed.pathname.split(\"/\").filter(Boolean)[0]??\"\";}else if(parsed.pathname.startsWith(\"/watch\")){videoId=parsed.searchParams.get(\"v\")??\"\";}else{const match=parsed.pathname.match(/\\/(?:embed|shorts|live)\\/([A-Za-z0-9_-]{6,})/);videoId=match?.[1]??\"\";}if(!videoId)return\"\";return`https://www.youtube-nocookie.com/embed/${videoId}`;}}catch(_error){return\"\";}return\"\";}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ProjectVideoEmbed(props){const{url=\"\",style}=props;const embedSrc=useMemo(()=>parseEmbedUrl(url),[url]);if(!embedSrc)return null;return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:style?.position??\"relative\",width:style?.width??\"100%\",height:style?.height??\"100%\",aspectRatio:\"16 / 9\",overflow:\"hidden\",background:\"#000000\"},children:/*#__PURE__*/_jsx(\"iframe\",{title:\"Project video embed\",src:embedSrc,allow:\"fullscreen; picture-in-picture; encrypted-media\",allowFullScreen:true,loading:\"eager\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:\"0\"}})});}addPropertyControls(ProjectVideoEmbed,{url:{type:ControlType.String,title:\"URL\",defaultValue:\"\",placeholder:\"https://vimeo.com/123456789\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectVideoEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectVideoEmbed.map"],"mappings":"A,0KAC0H,SAASU,EAAcC,EAAO,CAA4B,GAAxB,CAACA,EAAO,KAAK,GAAc,OAAO,IAAM,IAAY,MAAM,GAAG,GAAG,CAAC,IAAMC,EAAO,IAAI,IAAID,CAAM,EAAQE,EAAKD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