{"version":3,"file":"LoopVideo.B_g0Roik.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_BEr93sCn","ControlType","LoopVideo","ref","v","io","e","src","poster","label","style","fit","radius","background","inset","init_LoopVideo","p"],"sources":["https:/framerusercontent.com/modules/mk6Mg4Hc23Ent18zFywe/IZHFl6bnydsuDxZaeLVD/LoopVideo.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 450\n */export default function LoopVideo({src,poster,label,radius,fit,background,inset,style}){const ref=useRef(null);useEffect(()=>{const v=ref.current;if(!v||typeof IntersectionObserver===\"undefined\")return;const still=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;if(still)return;const io=new IntersectionObserver(([e])=>{if(e.isIntersecting){if(v.preload!==\"auto\")v.preload=\"auto\";v.play().catch(()=>{});}else v.pause();},{rootMargin:\"200px 0px\"});io.observe(v);return()=>io.disconnect();},[src]);return /*#__PURE__*/_jsx(\"video\",{ref:ref,src:src,poster:poster?.src,\"aria-label\":label,muted:true,loop:true,playsInline:true,preload:\"none\",disablePictureInPicture:true,style:{...style,display:\"block\",width:\"100%\",height:\"100%\",objectFit:fit||\"cover\",borderRadius:radius,background:background||\"#0b0f1a\",padding:fit===\"contain\"?inset||0:0,boxSizing:\"border-box\"}});}LoopVideo.defaultProps={label:\"\",radius:4,fit:\"cover\",background:\"#0b0f1a\",inset:0};addPropertyControls(LoopVideo,{src:{type:ControlType.String,title:\"MP4 URL\"},poster:{type:ControlType.ResponsiveImage,title:\"Poster\"},label:{type:ControlType.String,title:\"Label\"},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:32,defaultValue:4},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\"],optionTitles:[\"Fill\",\"Fit\"],defaultValue:\"cover\"},background:{type:ControlType.Color,title:\"Stage\",defaultValue:\"#0b0f1a\"},inset:{type:ControlType.Number,title:\"Inset\",min:0,max:120,defaultValue:0,hidden:p=>p.fit!==\"contain\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoopVideo\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"450\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"800\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoopVideo.map"],"mappings":"A,+LAKG,SAAwBY,EAAU,CAAC,MAAI,SAAO,QAAM,SAAO,MAAI,aAAW,QAAM,SAAO,CAAC,IAAMC,EAAIb,EAAO,IAAI,EAAmZ,OAAjZO,MAAc,CAAC,IAAMO,EAAED,EAAI,QAA4I,GAAjI,CAACC,GAAG,OAAO,qBAAuB,KAA+BV,EAAO,aAAa,kCAAkC,CAAC,CAAC,QAAiB,OAAO,IAAMW,EAAG,IAAI,sBAAsB,CAACC,KAAK,CAAIA,EAAE,gBAAmBF,EAAE,UAAU,SAAO,EAAE,QAAQ,QAAOA,EAAE,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,GAAQA,EAAE,MAAM,CAAE,EAAE,CAAC,WAAW,WAAW,CAAC,EAAgB,OAAdC,EAAG,QAAQD,CAAC,MAAYC,EAAG,WAAW,CAAE,EAAE,CAACE,CAAG,CAAC,EAAsB,gBAAK,QAAQ,CAAK,MAAQ,MAAI,OAAOC,GAAQ,IAAI,aAAaC,EAAM,MAAM,GAAK,KAAK,GAAK,YAAY,GAAK,QAAQ,OAAO,wBAAwB,GAAK,MAAM,CAAC,GAAGC,EAAM,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,UAAUC,GAAK,QAAQ,aAAaC,EAAO,WAA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