{"version":3,"file":"YouTubeCover.CWCuf-nL.mjs","names":["__esmMin","init_jsx_runtime","c","addPropertyControls","init_framer_B6PCHH0A","ControlType","YouTubeCover","props","videoId","url","isShort","containerStyle","iframeStyle","shortStyle","videoStyle","init_YouTubeCover"],"sources":["https:/framerusercontent.com/modules/gIeqzJsTardSifQ4AI5F/tkQR7qb00toDIzgKdvOj/YouTubeCover.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function YouTubeCover(props){const{url}=props;const getVideoId=url=>{if(!url)return\"\";if(url.includes(\"shorts/\")){return url.split(\"shorts/\")[1].split(\"?\")[0];}if(url.includes(\"youtu.be/\")){return url.split(\"youtu.be/\")[1].split(\"?\")[0];}if(url.includes(\"v=\")){return url.split(\"v=\")[1].split(\"&\")[0];}return\"\";};const videoId=getVideoId(url);const isShort=url?.includes(\"shorts\");return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsx(\"iframe\",{src:`https://www.youtube.com/embed/${videoId}?controls=1&rel=0&modestbranding=1`,style:{...iframeStyle,...isShort?shortStyle:videoStyle},frameBorder:\"0\",allow:\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",allowFullScreen:true})});}const containerStyle={position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"};const iframeStyle={position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",border:\"0\"};const videoStyle={width:\"100vw\",height:\"56.25vw\",minWidth:\"177.77vh\",minHeight:\"100vh\"};const shortStyle={width:\"56.25vh\",height:\"100vh\",minWidth:\"100vw\",minHeight:\"177.77vw\"};addPropertyControls(YouTubeCover,{url:{type:ControlType.String,title:\"YouTube URL\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"YouTubeCover\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./YouTubeCover.map"],"mappings":"A,4JAA+F,SAAwBM,EAAa,EAAM,CAAC,GAAK,CAAC,OAAKC,EAAuRC,GAAhQ,GAAUC,EAAgBA,EAAI,SAAS,SAAS,EAAUA,EAAI,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAOA,EAAI,SAAS,WAAW,EAAUA,EAAI,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAOA,EAAI,SAAS,IAAI,EAAUA,EAAI,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAU,GAAjO,GAAoP,CAAWA,CAAG,EAAQC,EAAQD,GAAK,SAAS,QAAQ,EAAE,MAAoB,gBAAK,MAAM,CAAC,MAAME,EAAe,SAAsB,gBAAK,SAAS,CAAC,IAAI,iCAAiCH,EAAQ,oCAAoC,MAAM,CAAC,GAAGI,EAAY,GAAGF,EAAQG,EAAWC,CAAU,EAAE,YAAY,IAAI,MAAM,2FAA2F,gBAAgB,EAAI,CAAC,CAAC,CAAC,CAAE,C,kDAAO,EAAe,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,QAAQ,EAAQ,EAAY,CAAC,SAAS,WAAW,IAAI,MAAM,KAAK,MAAM,UAAU,wBAAwB,OAAO,GAAG,EAAQ,EAAW,CAAC,MAAM,QAAQ,OAAO,UAAU,SAAS,WAAW,UAAU,OAAO,EAAQ,EAAW,CAAC,MAAM,UAAU,OAAO,QAAQ,SAAS,QAAQ,UAAU,UAAU,EAAEX,EAAoBG,EAAa,CAAC,IAAI,CAAC,KAAKD,EAAY,OAAO,MAAM,aAAa,CAAC,CAAC,C"}