{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/s78X49zjPgB5k9RpSciG/huNapRM8L2Ay9KinW8mb/Video.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsInCurrentNavigationTarget}from\"framer\";import{useInView}from\"framer-motion\";import{borderRadiusControl,useIsBrowserSafari,useIsOnCanvas,useRadius}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{memo,useCallback,useEffect,useMemo,useRef,useState}from\"react\";var ObjectFitType;(function(ObjectFitType){ObjectFitType[\"Fill\"]=\"fill\";ObjectFitType[\"Contain\"]=\"contain\";ObjectFitType[\"Cover\"]=\"cover\";ObjectFitType[\"None\"]=\"none\";ObjectFitType[\"ScaleDown\"]=\"scale-down\";})(ObjectFitType||(ObjectFitType={}));var SrcType;(function(SrcType){SrcType[\"Video\"]=\"Upload\";SrcType[\"Url\"]=\"URL\";})(SrcType||(SrcType={}));// Reduce renders\nfunction getProps(props){const{width,height,topLeft,topRight,bottomRight,bottomLeft,id,children,...rest}=props;return rest;}/**\n * VIDEO\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 112\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export function VideoFallback(props){const newProps=getProps(props);return /*#__PURE__*/_jsx(VideoMemo,{...newProps});}function usePlaybackControls(videoRef){const isInCurrentNavigationTarget=useIsInCurrentNavigationTarget();const requestingPlay=useRef(false);const setProgress=useCallback(rawProgress=>{if(!videoRef.current)return;const newProgress=(rawProgress===1?.999:rawProgress)*videoRef.current.duration;const isAlreadySet=Math.abs(videoRef.current.currentTime-newProgress)<.1;if(videoRef.current.duration>0&&!isAlreadySet){videoRef.current.currentTime=newProgress;}},[]);const play=useCallback(()=>{const isPlaying=videoRef.current.currentTime>0&&videoRef.current.onplaying&&!videoRef.current.paused&&!videoRef.current.ended&&videoRef.current.readyState>videoRef.current.HAVE_CURRENT_DATA;if(!isPlaying&&videoRef.current&&!requestingPlay.current&&isInCurrentNavigationTarget){requestingPlay.current=true;videoRef.current.play().catch(e=>{})// It's likely fine, swallow error\n.finally(()=>requestingPlay.current=false);}},[]);const pause=useCallback(()=>{if(!videoRef.current||requestingPlay.current)return;videoRef.current.pause();},[]);return{play,pause,setProgress};}function useAutoplayBehavior({playingProp,muted,loop,playsinline,controls}){const[initialPlayingProp]=useState(()=>playingProp);const[hasPlayingPropChanged,setHasPlayingPropChanged]=useState(false);if(playingProp!==initialPlayingProp&&!hasPlayingPropChanged){setHasPlayingPropChanged(true);}const behavesAsGif=// passing `playing === true` on mount indicates that the video should\n// autoplay, like a GIF\ninitialPlayingProp&&muted&&loop&&playsinline&&!controls&&// Some users of the <Video> component use it by wrapping it with\n// another smart component and adding their own controls on top. (The\n// controls use transitions to control the video: e.g., when clicking\n// the play button, the smart component will transition to a state with\n// <Video playing={true} />.) In this case, we don't want the video to\n// behave as a gif, as it will be weird if the video suddenly started\n// acting as such (and auto-pausing when leaving the viewport) as soon\n// as the site visitor mutes it and clicks \u201CPlay\u201D.\n!hasPlayingPropChanged;let autoplay;if(behavesAsGif)autoplay=\"on-viewport\";else if(initialPlayingProp)autoplay=\"on-mount\";else autoplay=\"no-autoplay\";return autoplay;}/**\n * The Video component has some effects that sync the video element with props\n * like `startTime`, `progress`, etc. React calls these effects whenever these\n * props change. However, it also calls them on the first mount, and this is\n * troublesome \u2013 if we\u2019re doing SSR, and the user changed the video state before\n * the video was hydrated, the initial `useEffect` call will reset the video\n * state. To avoid this, we use this flag.\n */let isMountedAndReadyForProgressChanges=false;const VideoMemo=/*#__PURE__*/memo(function VideoInner(props){const{srcType,srcFile,srcFileModern,srcUrl,playing:playingProp,muted,playsinline,controls,progress,objectFit,backgroundColor,onSeeked,onPause,onPlay,onEnd,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,poster,posterEnabled,startTime:startTimeProp,volume,loop}=props;const videoRef=useRef();const isSafari=useIsBrowserSafari();const wasPausedOnLeave=useRef(null);const wasEndedOnLeave=useRef(null);const isOnCanvas=useIsOnCanvas();const borderRadius=useRadius(props);// Hard-coding `autoplayBehavior` and `isInViewport` when on canvas as a\n// tiny perf optimization. isOnCanvas won\u2019t change through the lifecycle of\n// the component, so using these hooks conditionally should be safe\nconst autoplayBehavior=isOnCanvas?\"no-autoplay\":useAutoplayBehavior({playingProp,muted,loop,playsinline,controls});const isInViewport=isOnCanvas?true:useInView(videoRef);// Video elements behave oddly at 100% duration\nconst startTime=startTimeProp===100?99.9:startTimeProp;const{play,pause,setProgress}=usePlaybackControls(videoRef);// Pause/play via props\nuseEffect(()=>{if(isOnCanvas)return;if(playingProp)play();else pause();},[playingProp]);const src=useMemo(()=>{let fragment=\"\";if(srcType===\"URL\")return srcUrl+fragment;if(srcType===\"Upload\")return srcFile+fragment;},[srcType,srcFile,srcUrl,startTime]);// Volume Control\nuseEffect(()=>{if(videoRef.current&&!muted)videoRef.current.volume=(volume!==null&&volume!==void 0?volume:0)/100;},[volume]);return /*#__PURE__*/_jsxs(\"video\",{onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,loop:loop,ref:videoRef,onSeeked:e=>onSeeked===null||onSeeked===void 0?void 0:onSeeked(e),onPause:e=>onPause===null||onPause===void 0?void 0:onPause(e),onPlay:e=>onPlay===null||onPlay===void 0?void 0:onPlay(e),autoPlay:isOnCanvas?undefined:true,poster:posterEnabled?poster:undefined,preload:isOnCanvas?\"none\":\"auto\",controls:controls,muted:true,playsInline:true,style:{cursor:!!onClick?\"pointer\":\"auto\",width:\"100%\",height:\"100%\",borderRadius,display:\"block\",objectFit:objectFit,backgroundColor:backgroundColor,objectPosition:\"50% 50%\"},children:[/*#__PURE__*/_jsx(\"source\",{src:srcFileModern,type:\"video/webm\"}),/*#__PURE__*/_jsx(\"source\",{src:src,type:\"video/mp4\"})]});});VideoFallback.displayName=\"Video Fallback\";VideoFallback.defaultProps={srcType:\"URL\",srcUrl:\"https://assets.mixkit.co/videos/preview/mixkit-shining-sun-in-the-sky-surrounded-by-moving-clouds-31793-small.mp4\",srcFile:\"\",posterEnabled:false,controls:false,playing:true,loop:true,muted:true,playsinline:true,restartOnEnter:false,objectFit:\"cover\",backgroundColor:\"rgba(0,0,0,0)\",radius:0,volume:25,startTime:0};const groupsRegex=/[A-Z]{2,}|[A-Z][a-z]+|[a-z]+|[A-Z]|\\d+/gu;function capitalizeFirstLetter(value){return value.charAt(0).toUpperCase()+value.slice(1);}export function titleCase(value){const groups=value.match(groupsRegex)||[];return groups.map(capitalizeFirstLetter).join(\" \");}const objectFitOptions=[\"cover\",\"fill\",\"contain\",\"scale-down\",\"none\"];addPropertyControls(VideoFallback,{srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[\"URL\",\"Upload\"]},srcUrl:{type:ControlType.String,title:\"URL\",placeholder:\"../example.mp4\",hidden(props){return props.srcType===\"Upload\";},description:\"Hosted video file URL. For YouTube, use the YouTube component.\"},srcFile:{type:ControlType.File,title:\"File\",allowedFileTypes:[\"mp4\",\"webm\"],hidden(props){return props.srcType===\"URL\";}},srcFileModern:{type:ControlType.File,title:\"Src Webm\",allowedFileTypes:[\"mp4\",\"webm\"]},playing:{type:ControlType.Boolean,title:\"Playing\",enabledTitle:\"Yes\",disabledTitle:\"No\"},posterEnabled:{type:ControlType.Boolean,title:\"Poster\",enabledTitle:\"Yes\",disabledTitle:\"No\"},poster:{type:ControlType.Image,title:\" \",hidden:({posterEnabled})=>!posterEnabled},backgroundColor:{type:ControlType.Color,title:\"Background\"},...borderRadiusControl,startTime:{title:\"Start Time\",type:ControlType.Number,min:0,max:100,step:.1,unit:\"%\"},loop:{type:ControlType.Boolean,title:\"Loop\",enabledTitle:\"Yes\",disabledTitle:\"No\"},objectFit:{type:ControlType.Enum,title:\"Fit\",options:objectFitOptions,optionTitles:objectFitOptions.map(titleCase)},// restartOnEnter: {\n//     type: ControlType.Boolean,\n//     title: \"On ReEnter\",\n//     enabledTitle: \"Restart\",\n//     disabledTitle: \"Resume\",\n// },\ncontrols:{type:ControlType.Boolean,title:\"Controls\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},muted:{type:ControlType.Boolean,title:\"Muted\",enabledTitle:\"Yes\",disabledTitle:\"No\"},volume:{type:ControlType.Number,max:100,min:0,unit:\"%\",hidden:({muted})=>muted},onEnd:{type:ControlType.EventHandler},onSeeked:{type:ControlType.EventHandler},onPause:{type:ControlType.EventHandler},onPlay:{type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"titleCase\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"VideoProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"VideoFallback\":{\"type\":\"reactComponent\",\"name\":\"VideoFallback\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"112\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video.map"],
  "mappings": "sNAAwX,IAAIA,GAAe,SAASA,EAAc,CAACA,EAAc,KAAQ,OAAOA,EAAc,QAAW,UAAUA,EAAc,MAAS,QAAQA,EAAc,KAAQ,OAAOA,EAAc,UAAa,YAAa,GAAGA,IAAgBA,EAAc,CAAC,EAAE,EAAE,IAAIC,GAAS,SAASA,EAAQ,CAACA,EAAQ,MAAS,SAASA,EAAQ,IAAO,KAAM,GAAGA,IAAUA,EAAQ,CAAC,EAAE,EACntB,SAASC,EAASC,EAAM,CAAC,GAAK,CAAC,MAAAC,EAAM,OAAAC,EAAO,QAAAC,EAAQ,SAAAC,EAAS,YAAAC,EAAY,WAAAC,EAAW,GAAAC,EAAG,SAAAC,EAAS,GAAGC,CAAI,EAAET,EAAM,OAAOS,CAAK,CAQjH,SAASC,EAAcV,EAAM,CAAC,IAAMW,E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AAM,EAAE,MAAM,CAAC,KAAKA,EAAY,QAAQ,MAAM,QAAQ,aAAa,MAAM,cAAc,IAAI,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,IAAI,IAAI,IAAI,EAAE,KAAK,IAAI,OAAO,CAAC,CAAC,MAAArD,CAAK,IAAIA,CAAK,EAAE,MAAM,CAAC,KAAKqD,EAAY,YAAY,EAAE,SAAS,CAAC,KAAKA,EAAY,YAAY,EAAE,QAAQ,CAAC,KAAKA,EAAY,YAAY,EAAE,OAAO,CAAC,KAAKA,EAAY,YAAY,CAAC,CAAC",
  "names": ["ObjectFitType", "SrcType", "getProps", "props", "width", "height", "topLeft", "topRight", "bottomRight", "bottomLeft", "id", "children", "rest", "VideoFallback", "newProps", "p", "VideoMemo", "usePlaybackControls", "videoRef", "isInCurrentNavigationTarget", "useIsInCurrentNavigationTarget", "requestingPlay", "pe", "setProgress", "te", "rawProgress", "newProgress", "isAlreadySet", "play", "e", "pause", "useAutoplayBehavior", "playingProp", "muted", "loop", "playsinline", "controls", "initialPlayingProp", "ye", "hasPlayingPropChanged", "setHasPlayingPropChanged", "behavesAsGif", "autoplay", "VideoMemo", "X", "props", "srcType", "srcFile", "srcFileModern", "srcUrl", "playingProp", "muted", "playsinline", "controls", "progress", "objectFit", "backgroundColor", "onSeeked", "onPause", "onPlay", "onEnd", "onClick", "onMouseEnter", "onMouseLeave", "onMouseDown", "onMouseUp", "poster", "posterEnabled", "startTimeProp", "volume", "loop", "videoRef", "pe", "isSafari", "useIsBrowserSafari", "wasPausedOnLeave", "wasEndedOnLeave", "isOnCanvas", "useIsOnCanvas", "borderRadius", "useRadius", "autoplayBehavior", "useAutoplayBehavior", "isInViewport", "useInView", "startTime", "play", "pause", "setProgress", "usePlaybackControls", "ue", "src", "se", "fragment", "u", "e", "p", "VideoFallback", "groupsRegex", "capitalizeFirstLetter", "value", "titleCase", "objectFitOptions", "addPropertyControls", "ControlType", "borderRadiusControl"]
}
