{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/hq9zDOaPP6IeGhPwPPVO/ic7BTH7LogCU135WG8By/Video.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame,addPropertyControls,ControlType}from\"framer\";export function ResponsiveVideoWithPosterPreview({videoDesktop,videoMobile,posterDesktop,posterMobile,autoplay=true,loop=true,muted=true,preload=\"auto\",breakpoint=768,borderRadius=0}){const[isMobile,setIsMobile]=React.useState(false);const[shouldLoad,setShouldLoad]=React.useState(false);const containerRef=React.useRef(null);const videoSrc=isMobile?videoMobile:videoDesktop;const poster=isMobile?posterMobile:posterDesktop;// Determine if it's mobile\nReact.useEffect(()=>{const checkScreen=()=>{setIsMobile(window.innerWidth<=breakpoint);};checkScreen();window.addEventListener(\"resize\",checkScreen);return()=>window.removeEventListener(\"resize\",checkScreen);},[breakpoint]);// Lazy load with IntersectionObserver\nReact.useEffect(()=>{const observer=new IntersectionObserver(([entry])=>{if(entry.isIntersecting){setShouldLoad(true);observer.disconnect();}},{threshold:.1});if(containerRef.current)observer.observe(containerRef.current);return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(Frame,{ref:containerRef,background:\"transparent\",width:\"100%\",height:\"100%\",radius:borderRadius,overflow:\"hidden\",style:{position:\"relative\"},children:shouldLoad&&/*#__PURE__*/_jsx(\"video\",{src:videoSrc,poster:poster,autoPlay:autoplay,muted:muted,loop:loop,preload:preload,playsInline:true,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius,display:\"block\"}})});}addPropertyControls(ResponsiveVideoWithPosterPreview,{videoDesktop:{type:ControlType.String,title:\"Desktop Video\",placeholder:\"https://cdn.shopify.com/...\"},videoMobile:{type:ControlType.String,title:\"Mobile Video\",placeholder:\"https://cdn.shopify.com/...\"},posterDesktop:{type:ControlType.String,title:\"Poster Desktop\",placeholder:\"https://cdn.shopify.com/...\"},posterMobile:{type:ControlType.String,title:\"Poster Mobile\",placeholder:\"https://cdn.shopify.com/...\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:true},preload:{type:ControlType.Enum,title:\"Preload\",options:[\"auto\",\"metadata\",\"none\"],defaultValue:\"auto\"},breakpoint:{type:ControlType.Number,title:\"Mobile Max Width\",defaultValue:768,min:320,max:1024},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:100}});\nexport const __FramerMetadata__ = {\"exports\":{\"ResponsiveVideoWithPosterPreview\":{\"type\":\"reactComponent\",\"name\":\"ResponsiveVideoWithPosterPreview\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video.map"],
  "mappings": "4HAAwI,SAASA,EAAiC,CAAC,aAAAC,EAAa,YAAAC,EAAY,cAAAC,EAAc,aAAAC,EAAa,SAAAC,EAAS,GAAK,KAAAC,EAAK,GAAK,MAAAC,EAAM,GAAK,QAAAC,EAAQ,OAAO,WAAAC,EAAW,IAAI,aAAAC,EAAa,CAAC,EAAE,CAAC,GAAK,CAACC,EAASC,CAAW,EAAQC,EAAS,EAAK,EAAO,CAACC,EAAWC,CAAa,EAAQF,EAAS,EAAK,EAAQG,EAAmBC,EAAO,IAAI,EAAQC,EAASP,EAAST,EAAYD,EAAmBkB,EAAOR,EAASP,EAAaD,EAC3hB,OAAMiB,EAAU,IAAI,CAAC,IAAMC,EAAY,IAAI,CAACT,EAAYU,EAAO,YAAYb,CAAU,CAAE,EAAE,OAAAY,EAAY,EAAEC,EAAO,iBAAiB,SAASD,CAAW,EAAQ,IAAIC,EAAO,oBAAoB,SAASD,CAAW,CAAE,EAAE,CAACZ,CAAU,CAAC,EACxNW,EAAU,IAAI,CAAC,IAAMG,EAAS,IAAI,qBAAqB,CAAC,CAACC,CAAK,IAAI,CAAIA,EAAM,iB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Y,OAAO,MAAM,SAAS,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC",
  "names": ["ResponsiveVideoWithPosterPreview", "videoDesktop", "videoMobile", "posterDesktop", "posterMobile", "autoplay", "loop", "muted", "preload", "breakpoint", "borderRadius", "isMobile", "setIsMobile", "ye", "shouldLoad", "setShouldLoad", "containerRef", "pe", "videoSrc", "poster", "ue", "checkScreen", "window", "observer", "entry", "p", "Frame", "addPropertyControls", "ControlType"]
}
