{"version":3,"file":"Code.CmrM_D9c.mjs","names":["React","Player"],"sources":["https:/framerusercontent.com/modules/iNOwL4b0hrSj8qX8HOkW/sR7utiSemrR5F2hXjfDr/Code.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import React from\"react\";import{createPortal}from\"react-dom\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";import Player from\"@vimeo/player\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"transparent\",muted:true});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function with100Height(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{height:\"calc(100vh - 100px)\"}});});}export function withViewportHeight(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[localRef,setLocalRef]=React.useState(null);const offset=React.useMemo(()=>{if(localRef){return window.getComputedStyle(localRef).gap;}return\"0px\";},[localRef]);return /*#__PURE__*/_jsx(Component,{ref:el=>{if(ref){if(typeof ref===\"function\"){ref(el);}else{ref.current=el;}}setLocalRef(el);},...props,style:{height:`calc(100vh - ${offset})`}});});}export function withViewportMaxHeight(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[localRef,setLocalRef]=React.useState(null);const offset=React.useMemo(()=>{if(localRef){return window.getComputedStyle(localRef).gap;}return\"0px\";},[localRef]);return /*#__PURE__*/_jsx(Component,{ref:el=>{if(ref){if(typeof ref===\"function\"){ref(el);}else{ref.current=el;}}setLocalRef(el);},...props,style:{maxHeight:`calc(100vh - ${offset})`}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function withFullSize(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[placeholderRef,setPlaceholderRef]=React.useState(null);const parent=React.useMemo(()=>{if(placeholderRef){return placeholderRef.parentElement.parentElement.parentElement.childNodes[0];}return null;},[placeholderRef]);return /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"},ref:setPlaceholderRef}),parent&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{position:\"fixed\",left:\"0\",top:\"0\",width:\"100vw\",height:\"100vh\"}}),parent)]});});}export function withVimeoVideo(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();const[wrapperRef,setWrapperRef]=React.useState(null);const[videoAPI,setVideoAPI]=React.useState(null);const[isLoading,setLoading]=React.useState(true);React.useEffect(()=>setLoading(false),[]);const mutationCallback=React.useCallback(mutationList=>{for(const mutation of mutationList){if(mutation.type===\"childList\"){mutation.addedNodes.forEach(node=>{if(node.nodeType===Node.ELEMENT_NODE){const iframe=node.querySelector(\"iframe\");if(iframe){setVideoAPI(new Player(iframe));}}});}}},[]);const mutationObserver=React.useMemo(()=>{if(isLoading){return null;}return new MutationObserver(mutationCallback);},[isLoading,mutationCallback]);React.useEffect(()=>{if(wrapperRef&&mutationObserver){mutationObserver.observe(wrapperRef,{subtree:true,childList:true});return()=>{mutationObserver.disconnect();};}},[mutationObserver,wrapperRef]);const setVideoVolume=React.useCallback(()=>{if(videoAPI){videoAPI.off(\"timeupdate\",setVideoVolume);if(store.muted){videoAPI.setVolume(0);}else{videoAPI.setVolume(1);}}},[videoAPI,store.muted]);React.useEffect(()=>{if(videoAPI){videoAPI.on(\"timeupdate\",setVideoVolume);}},[videoAPI,store.muted,setVideoVolume]);React.useEffect(()=>{if(videoAPI){setVideoVolume();}},[store.muted,setVideoVolume]);return /*#__PURE__*/_jsx(\"div\",{ref:setWrapperRef,style:{width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}export function withVimeoMute(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();React.useEffect(()=>{setStore({muted:true});},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:()=>{setStore({muted:!store.muted});}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withViewportMaxHeight\":{\"type\":\"reactHoc\",\"name\":\"withViewportMaxHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVimeoVideo\":{\"type\":\"reactHoc\",\"name\":\"withVimeoVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullSize\":{\"type\":\"reactHoc\",\"name\":\"withFullSize\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withViewportHeight\":{\"type\":\"reactHoc\",\"name\":\"withViewportHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with100Height\":{\"type\":\"reactHoc\",\"name\":\"with100Height\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVimeoMute\":{\"type\":\"reactHoc\",\"name\":\"withVimeoMute\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Code.map"],"mappings":"2cACia,SAAgB,EAAc,EAAU,CAAC,OAAoB,GAAY,EAAM,IAA2B,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAG,C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