{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/bXGhJgHWV7t5GE2I9VQ3/g0ddhJYnxU77T3YCHsHH/CustomVideo.js", "ssg:https://framerusercontent.com/modules/Fsq3TkBfZJY61F6YkYAK/wqYTkUjCQR3M3fg16vzs/Showcase.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef}from\"react\";function CustomVideo(props){const videoRef=useRef(null);const popupRef=useRef(null);const[showPopup,setShowPopup]=useState(false);const[hasStarted,setHasStarted]=useState(false);const savedDate=localStorage.getItem(\"user_email_date\");const isEmailCollectedToday=()=>{if(!savedDate)return false;const savedDay=new Date(savedDate).toDateString();const today=new Date().toDateString();return savedDay===today;};const movePopupToFullScreen=()=>{setTimeout(()=>{if(document.fullscreenElement&&document.exitFullscreen){document.exitFullscreen();}if(videoRef.current?.webkitExitFullscreen){videoRef.current.webkitExitFullscreen();}},100);};useEffect(()=>{const video=videoRef.current;if(!video)return;const handleTimeUpdate=()=>{if(video.currentTime>=600&&!isEmailCollectedToday()){video.pause();setShowPopup(true);movePopupToFullScreen();}};video.addEventListener(\"timeupdate\",handleTimeUpdate);return()=>video.removeEventListener(\"timeupdate\",handleTimeUpdate);},[isEmailCollectedToday]);const handleFormSubmit=()=>{setTimeout(()=>{setShowPopup(false);localStorage.setItem(\"user_email_date\",new Date().toISOString());videoRef.current?.play();},1e3);};useEffect(()=>{if(showPopup){document.body.style.overflow=\"hidden\";const portalId=\"46657045\";const formId=\"1c18e026-6868-4687-805f-61770d669c9d\";const script=document.createElement(\"script\");script.src=\"https://js.hsforms.net/forms/v2.js\";script.async=true;script.onload=()=>{if(window.hbspt){window.hbspt.forms.create({region:\"na1\",portalId:portalId,formId:formId,target:\"#hubspot-form\",onFormSubmitted:()=>handleFormSubmit()});}};document.body.appendChild(script);}else{document.body.style.overflow=\"\";}return()=>{document.body.style.overflow=\"\";};},[showPopup]);const handlePlay=()=>{setHasStarted(true);setTimeout(()=>{videoRef.current?.play();},100);};return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:mediaWrapperStyle,children:[!hasStarted&&props.placeholderImage&&/*#__PURE__*/_jsxs(\"div\",{style:placeholderWrapperStyle,onClick:handlePlay,children:[/*#__PURE__*/_jsx(\"img\",{src:props.placeholderImage,alt:\"Play Preview\",style:mediaElementStyle}),/*#__PURE__*/_jsx(\"div\",{style:playButtonStyle,children:\"\u25B6\"})]}),/*#__PURE__*/_jsxs(\"video\",{ref:videoRef,style:mediaElementStyle,controls:true,playsInline:true,width:\"100%\",height:\"100%\",children:[/*#__PURE__*/_jsx(\"source\",{src:props.link,type:\"video/mp4\"}),\"Your browser does not support the video tag.\"]})]}),showPopup&&/*#__PURE__*/_jsx(\"div\",{ref:popupRef,style:popupStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:formContainerStyle,children:[/*#__PURE__*/_jsx(\"h3\",{children:\"Enter Your Email to Continue\"}),/*#__PURE__*/_jsx(\"div\",{id:\"hubspot-form\"})]})})]});}addPropertyControls(CustomVideo,{link:{type:ControlType.Link,title:\"Video Link\",defaultValue:\"https://www.framer.com\"},placeholderImage:{type:ControlType.Image,title:\"Placeholder Image\"}});// Styles\nconst containerStyle={width:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\"};const mediaWrapperStyle={width:\"100%\",aspectRatio:\"16/9\",position:\"relative\",overflow:\"hidden\",borderRadius:\"8px\",background:\"#000\"};const mediaElementStyle={width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius:\"8px\",display:\"block\",zIndex:1};const placeholderWrapperStyle={width:\"100%\",height:\"100%\",position:\"relative\",cursor:\"pointer\",zIndex:2};const playButtonStyle={position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",background:\"rgba(0, 0, 0, 0.6)\",color:\"#fff\",borderRadius:\"50%\",padding:\"16px 20px\",fontSize:\"24px\",pointerEvents:\"none\"};const popupStyle={position:\"fixed\",top:0,left:0,width:\"100%\",height:\"100%\",background:\"#fff\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:1e3};const formContainerStyle={textAlign:\"center\"};export default CustomVideo;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomVideo.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";const platforms=[{title:\"Share on Twitter\",id:\"twitter\",icon:/*#__PURE__*/_jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"30\",height:\"30\",viewBox:\"0 0 30 30\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 1C22.732 1 29 7.26801 29 15C29 22.732 22.732 29 15 29C7.26801 29 1 22.732 1 15C1 7.26801 7.26801 1 15 1ZM5.4707 6.41211L12.5547 15.708L5.90234 23.4121H8.9248L13.9717 17.5684L18.4248 23.4121H24.4707L17.1836 13.8486L23.6074 6.41211H20.584L15.7666 11.9893L11.5166 6.41211H5.4707ZM21.0156 21.7119H19.2881L15.1182 16.2402L16.0361 15.1768L21.0156 21.7119ZM14.6191 13.3174L13.7012 14.3799L8.92578 8.1123H10.6533L14.6191 13.3174Z\",fill:\"#6F8294\"})})},{title:\"Share on Linkedin\",id:\"linkedin\",icon:/*#__PURE__*/_jsxs(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"30\",height:\"30\",viewBox:\"0 0 30 30\",fill:\"none\",children:[/*#__PURE__*/_jsx(\"g\",{clipPath:\"url(#clip0_4390_2522)\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15.0001 0.599609C7.0471 0.599609 0.600098 7.04661 0.600098 14.9996C0.600098 22.9526 7.0471 29.3996 15.0001 29.3996C22.9531 29.3996 29.4001 22.9526 29.4001 14.9996C29.4001 7.04661 22.9531 0.599609 15.0001 0.599609ZM11.4751 20.9681H8.5591V11.5841H11.4751V20.9681ZM9.9991 10.4321C9.0781 10.4321 8.4826 9.77961 8.4826 8.97261C8.4826 8.14911 9.0961 7.51611 10.0366 7.51611C10.9771 7.51611 11.5531 8.14911 11.5711 8.97261C11.5711 9.77961 10.9771 10.4321 9.9991 10.4321ZM22.1251 20.9681H19.2091V15.7676C19.2091 14.5571 18.7861 13.7351 17.7316 13.7351C16.9261 13.7351 16.4476 14.2916 16.2361 14.8271C16.1581 15.0176 16.1386 15.2876 16.1386 15.5561V20.9666H13.2211V14.5766C13.2211 13.4051 13.1836 12.4256 13.1446 11.5826H15.6781L15.8116 12.8861H15.8701C16.2541 12.2741 17.1946 11.3711 18.7681 11.3711C20.6866 11.3711 22.1251 12.6566 22.1251 15.4196V20.9681Z\",fill:\"#6F8294\"})}),/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsx(\"clipPath\",{id:\"clip0_4390_2522\",children:/*#__PURE__*/_jsx(\"rect\",{width:\"30\",height:\"30\",fill:\"white\"})})})]})}];export function withSocialShare(ComponentType){const onSocialClick=platform=>{if(platform===\"linkedin\"){window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${window.location.href}`,\"_blank\");return;}if(platform===\"twitter\"){window.open(`https://twitter.com/share?text='Hi there, checkout this hot article on Phrutos '&url=${window.location.href}`,\"_blank\");return;}};return props=>/*#__PURE__*/_jsx(ComponentType,{...props,children:/*#__PURE__*/_jsx(\"ul\",{style:{...socialStyle},children:platforms.map(item=>/*#__PURE__*/_jsx(\"li\",{style:{...socialIconStyle},onClick:()=>onSocialClick(item?.id),title:item?.title,children:item?.icon}))})});}const socialStyle={display:\"flex\",listStyle:\"none\",gap:\"10px\",padding:\"0px\",justifyContent:\"center\"};const socialIconStyle={cursor:\"pointer\",display:\"flex\",alignItems:\"center\"};\nexport const __FramerMetadata__ = {\"exports\":{\"withSocialShare\":{\"type\":\"reactHoc\",\"name\":\"withSocialShare\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Showcase.map"],
  "mappings": "8JAA0J,SAASA,EAAYC,EAAM,CAAC,IAAMC,EAASC,EAAO,IAAI,EAAQC,EAASD,EAAO,IAAI,EAAO,CAACE,EAAUC,CAAY,EAAEC,EAAS,EAAK,EAAO,CAACC,EAAWC,CAAa,EAAEF,EAAS,EAAK,EAAQG,EAAU,aAAa,QAAQ,iBAAiB,EAAQC,EAAsB,IAAI,CAAC,GAAG,CAACD,EAAU,MAAO,GAAM,IAAME,EAAS,IAAI,KAAKF,CAAS,EAAE,aAAa,EAAQG,EAAM,IAAI,KAAK,EAAE,aAAa,EAAE,OAAOD,IAAWC,CAAM,EAAQC,EAAsB,IAAI,CAAC,WAAW,IAAI,CAAI,SAAS,mBAAmB,SAAS,gBAAgB,SAAS,eAAe,EAAMZ,EAAS,SAAS,sBAAsBA,EAAS,QAAQ,qBAAqB,CAAG,EAAE,GAAG,CAAE,EAAEa,EAAU,IAAI,CAAC,IAAMC,EAAMd,EAAS,QAAQ,GAAG,CAACc,EAAM,OAAO,IAAMC,EAAiB,IAAI,CAAID,EAAM,aAAa,KAAK,CAACL,EAAsB,IAAGK,EAAM,MAAM,EAAEV,EAAa,EAAI,EAAEQ,EAAsB,EAAG,EAAE,OAAAE,EAAM,iBAAiB,aAAaC,CAAgB,EAAQ,IAAID,EAAM,oBAAoB,aAAaC,CAAgB,CAAE,EAAE,CAACN,CAAqB,CAAC,EAAE,IAAMO,EAAiB,IAAI,CAAC,WAAW,IAAI,CAACZ,EAAa,EAAK,EAAE,aAAa,QAAQ,kBAAkB,IAAI,KAAK,EAAE,YAAY,CAAC,EAAEJ,EAAS,SAAS,KAAK,CAAE,EAAE,GAAG,CAAE,EAAEa,EAAU,IAAI,CAAC,GAAGV,EAAU,CAAC,SAAS,KAAK,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ailCollectedToday", "savedDay", "today", "movePopupToFullScreen", "ue", "video", "handleTimeUpdate", "handleFormSubmit", "portalId", "formId", "script", "window", "handlePlay", "u", "containerStyle", "mediaWrapperStyle", "placeholderWrapperStyle", "p", "mediaElementStyle", "playButtonStyle", "popupStyle", "formContainerStyle", "addPropertyControls", "ControlType", "CustomVideo_default", "platforms", "p", "u", "withSocialShare", "ComponentType", "onSocialClick", "platform", "window", "props", "socialStyle", "item", "socialIconStyle"]
}
