import{t as e}from"./rolldown-runtime.CMAw1HyY.mjs";import{A as t,B as n,E as r,F as i,L as a,N as o,P as s,V as c,g as l,l as u,s as d}from"./react.CI8P-fjo.mjs";import{I as f,t as p,x as m}from"./motion.BVf0CFxb.mjs";import{$ as h,D as g,N as ee,o as _,vt as v}from"./framer.Wxc585TD.mjs";var y,b,x=e((()=>{h(),y={position:`relative`,width:`100%`,height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`},{...y},b={onClick:{type:_.EventHandler},onMouseEnter:{type:_.EventHandler},onMouseLeave:{type:_.EventHandler}},_.Number,_.Boolean,_.String,_.Enum}));function te(e,t){return S(!0,e,t)}function ne(e,t){return S(!1,e,t)}function S(e,t,n=!0){let r=v();i(()=>{n&&r===e&&t()},[r])}var C=e((()=>{h(),r()}));function w(e){let n=t(null);return n.current===null&&(n.current=e()),n.current}var T=e((()=>{r()})),E=e((()=>{h()})),D=e((()=>{h()})),O=e((()=>{r()})),k=e((()=>{h()})),A,j,M=e((()=>{n(),r(),A=()=>{if(c!==void 0){let e=c.userAgent.toLowerCase();return(e.indexOf(`safari`)>-1||e.indexOf(`framermobile`)>-1||e.indexOf(`framerx`)>-1)&&e.indexOf(`chrome`)<0}else return!1},j=()=>o(()=>A(),[])})),N=e((()=>{r(),D()})),P=e((()=>{r(),h(),D(),T()})),F=e((()=>{h(),r(),x()}));function I(){return o(()=>g.current(),[])}function re(){return o(()=>g.current()===g.canvas,[])}var L=e((()=>{r(),h()})),R=e((()=>{r()}));function ie(e){let{borderRadius:t,isMixedBorderRadius:n,topLeftRadius:r,topRightRadius:i,bottomRightRadius:a,bottomLeftRadius:s}=e;return o(()=>n?`${r}px ${i}px ${a}px ${s}px`:`${t}px`,[t,n,r,i,a,s])}var z,B=e((()=>{r(),h(),z={borderRadius:{title:`Radius`,type:_.FusedNumber,toggleKey:`isMixedBorderRadius`,toggleTitles:[`Radius`,`Radius per corner`],valueKeys:[`topLeftRadius`,`topRightRadius`,`bottomRightRadius`,`bottomLeftRadius`],valueLabels:[`TL`,`TR`,`BR`,`BL`],min:0}},_.FusedNumber})),V=e((()=>{x(),C(),T(),E(),D(),O(),k(),M(),N(),P(),F(),L(),R(),B()}));function H(e){let{width:t,height:n,topLeft:r,topRight:i,bottomRight:a,bottomLeft:o,id:s,children:c,...l}=e;return l}function U(e){return u(Y,{...H(e)})}function ae(e){let n=v(),r=t(!1),i=t(!1),a=s(t=>{if(!e.current)return;let n=(t===1?.999:t)*e.current.duration,r=Math.abs(e.current.currentTime-n)<.1;e.current.duration>0&&!r&&(e.current.currentTime=n)},[]);return{play:s(()=>{let t=e.current;t&&(t.preload=`auto`,!(t.currentTime>0&&t.onplaying&&!t.paused&&!t.ended&&t.readyState>=t.HAVE_CURRENT_DATA)&&t&&!r.current&&n&&(r.current=!0,i.current=!0,t.play().catch(e=>{}).finally(()=>r.current=!1)))},[]),pause:s(()=>{!e.current||r.current||(e.current.pause(),i.current=!1)},[]),setProgress:a,isPlaying:i}}function oe({playingProp:e,muted:t,loop:n,playsinline:r,controls:i}){let[o]=a(()=>e),[s,c]=a(!1);e!==o&&!s&&c(!0);let l=o&&t&&n&&r&&!i&&!s,u;return u=l?`on-viewport`:o?`on-mount`:`no-autoplay`,u}function W(e){return e.charAt(0).toUpperCase()+e.slice(1)}function G(e){return(e.match(/[A-Z]{2,}|[A-Z][a-z]+|[a-z]+|[A-Z]|\d+/gu)||[]).map(W).join(` `)}var K,q,J,Y,X,Z=e((()=>{d(),h(),p(),V(),r(),(function(e){e.Fill=`fill`,e.Contain=`contain`,e.Cover=`cover`,e.None=`none`,e.ScaleDown=`scale-down`})(K||={}),(function(e){e.Video=`Upload`,e.Url=`URL`})(q||={}),J=`https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4`,Y=l(function(e){let{srcType:n=`URL`,srcUrl:r,srcFile:a=``,posterEnabled:s=!1,controls:c=!1,playing:l=!0,loop:d=!0,muted:p=!0,playsinline:h=!0,restartOnEnter:ee=!1,objectFit:_=`cover`,backgroundColor:v=`rgba(0,0,0,0)`,radius:y=0,volume:b=25,startTime:x=0,poster:S,playing:C,progress:w,onSeeked:T,onPause:E,onPlay:D,onEnd:O,onClick:k,onMouseEnter:A,onMouseLeave:M,onMouseDown:N,onMouseUp:P}=e,F=t(),L=j(),R=t(null),z=t(null),B=re(),V=I(),H=B||V===g.export,U=ie(e),W=H?`no-autoplay`:oe({playingProp:C,muted:p,loop:d,playsinline:h,controls:c}),G=H?!0:f(F),K=H?!1:f(F,{margin:`10%`,once:!0}),q=x===100?99.9:x,{play:Y,pause:X,setProgress:Z,isPlaying:Q}=ae(F);i(()=>{H||W!==`on-viewport`&&(C?Y():X())},[W,C]),i(()=>{H||(G&&C&&W!==`no-autoplay`&&Y(),W===`on-viewport`&&X())},[W,G,C]),i(()=>{!B||S||s||q||!F.current||(F.current.currentTime=.01)},[s,S,q]);let $=t(!1);i(()=>{if(!$.current){$.current=!0;return}Z(((m(w)?w.get():(w??0)*.01)??0)||(q??0)/100)},[q,a,r,w]),i(()=>{if(m(w))return w.on(`change`,e=>Z(e))},[w]),te(()=>{R.current!==null&&F.current&&(!z&&d||!R.current)&&Y()}),ne(()=>{F.current&&(z.current=F.current.ended,R.current=F.current.paused,X())});let se=o(()=>{if(n===`URL`)return r+``;if(n===`Upload`)return a+``},[n,a,r,q]);return i(()=>{L&&F.current&&W===`on-mount`&&setTimeout(()=>Y(),50)},[]),i(()=>{F.current&&!p&&(F.current.volume=(b??0)/100)},[b]),u(`video`,{onClick:k,onMouseEnter:A,onMouseLeave:M,onMouseDown:N,onMouseUp:P,src:se,loop:d,ref:F,onSeeked:e=>T?.(e),onPause:e=>E?.(e),onPlay:e=>D?.(e),onEnded:e=>O?.(e),autoPlay:Q.current||W===`on-mount`||C&&W===`on-viewport`&&G,preload:Q.current?`auto`:H&&!S?`metadata`:W!==`on-mount`&&!K?`none`:`metadata`,poster:s&&!a&&r===J?`https://framerusercontent.com/images/5ILRvlYXf72kHSVHqpa3snGzjU.jpg`:s&&S?S:void 0,onLoadedData:()=>{let e=F.current;e&&(e.currentTime<.3&&q>0&&Z((q??0)*.01),(Q.current||W===`on-mount`||C&&W===`on-viewport`&&G)&&Y())},controls:c,muted:H?!0:p,playsInline:h,style:{cursor:k?`pointer`:`auto`,width:`100%`,height:`100%`,borderRadius:U,display:`block`,objectFit:_,backgroundColor:v,objectPosition:`50% 50%`}})}),U.displayName=`Video`,X=[`cover`,`fill`,`contain`,`scale-down`,`none`],ee(U,{srcType:{type:_.Enum,displaySegmentedControl:!0,title:`Source`,options:[`URL`,`Upload`]},srcUrl:{type:_.String,title:`URL`,defaultValue:`https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4`,hidden(e){return e.srcType===`Upload`}},srcFile:{type:_.File,title:`File`,allowedFileTypes:[`mp4`,`webm`],hidden(e){return e.srcType===`URL`}},playing:{type:_.Boolean,title:`Playing`,enabledTitle:`Yes`,disabledTitle:`No`},...z,posterEnabled:{type:_.Boolean,title:`Poster`,enabledTitle:`Yes`,disabledTitle:`No`},poster:{type:_.Image,title:`Image`,hidden:({posterEnabled:e})=>!e,description:`We recommend adding a poster. [Learn more](https://www.framer.com/help/articles/how-are-videos-optimized-in-framer/).`},backgroundColor:{type:_.Color,title:`Background`,defaultValue:`rgba(0,0,0,0)`},startTime:{title:`Start Time`,type:_.Number,min:0,max:100,step:.1,unit:`%`},loop:{type:_.Boolean,title:`Loop`,enabledTitle:`Yes`,disabledTitle:`No`},objectFit:{type:_.Enum,title:`Fit`,options:X,optionTitles:X.map(G)},controls:{type:_.Boolean,title:`Controls`,enabledTitle:`Show`,disabledTitle:`Hide`,defaultValue:!1},muted:{type:_.Boolean,title:`Muted`,enabledTitle:`Yes`,disabledTitle:`No`},volume:{type:_.Number,max:100,min:0,unit:`%`,hidden:({muted:e})=>e,defaultValue:25},onEnd:{type:_.EventHandler},onSeeked:{type:_.EventHandler},onPause:{type:_.EventHandler},onPlay:{type:_.EventHandler},...b})}));export{w as a,T as i,Z as n,b as o,V as r,U as t}; //# sourceMappingURL=Video.-Q2TV0pw.mjs.map