{"version":3,"file":"Flip.AzUfUdsu.mjs","names":["React.useContext","React.useMemo","React.Fragment","React.useRef","React.useId","Image","Children"],"sources":["https:/framerusercontent.com/modules/3HMfeZ3JVYHwbp6uBTSb/H5ijgYChPQ1W4U0UYRMm/x2AgBANd0.js","https:/framerusercontent.com/modules/bmv0hIBfDZtANPW07xgp/yQocToPi6O0X9bugXhZb/Flip.js"],"sourcesContent":["// Generated by Framer (15813d8)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,getLoadingLazyAtYPosition,Image,Link,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";const enabledGestures={fEPqhiQsJ:{hover:true}};const serializationHash=\"framer-0WgL3\";const variantClassNames={fEPqhiQsJ:\"framer-v-brj20r\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants===null||variants===void 0?void 0:variants.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const toResponsiveImage=value=>{if(typeof value===\"object\"&&value!==null&&typeof value.src===\"string\"){return value;}return typeof value===\"string\"?{src:value}:undefined;};const transition1={damping:60,delay:0,mass:1,stiffness:500,type:\"spring\"};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value!==null&&value!==void 0?value:config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion(React.Fragment);const getProps=({height,id,link,preview,width,...props})=>{var _ref;return{...props,vrLI4xOWv:(_ref=preview!==null&&preview!==void 0?preview:props.vrLI4xOWv)!==null&&_ref!==void 0?_ref:{src:\"https://framerusercontent.com/images/cfnyUL5JXGibjDcMuM7B4cU4RAg.png?scale-down-to=512\",srcSet:\"https://framerusercontent.com/images/cfnyUL5JXGibjDcMuM7B4cU4RAg.png 500w\"},zLcXJpINA:link!==null&&link!==void 0?link:props.zLcXJpINA};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{activeLocale,setLocale}=useLocaleInfo();const{style,className,layoutId,variant,vrLI4xOWv,zLcXJpINA,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({defaultVariant:\"fEPqhiQsJ\",enabledGestures,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const ref1=React.useRef(null);const defaultLayoutId=React.useId();const sharedStyleClassNames=[];const componentViewport=useComponentViewport();return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId!==null&&layoutId!==void 0?layoutId:defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(Link,{href:zLcXJpINA,openInNewTab:true,children:/*#__PURE__*/_jsx(Image,{...restProps,...gestureHandlers,as:\"a\",background:{alt:\"\",fit:\"fill\",intrinsicHeight:400,intrinsicWidth:333.3333333333333,loading:getLoadingLazyAtYPosition((componentViewport===null||componentViewport===void 0?void 0:componentViewport.y)||0),pixelHeight:600,pixelWidth:500,sizes:(componentViewport===null||componentViewport===void 0?void 0:componentViewport.width)||\"100vw\",...toResponsiveImage(vrLI4xOWv),...{positionX:\"center\",positionY:\"center\"}},className:`${cx(serializationHash,...sharedStyleClassNames,\"framer-brj20r\",className,classNames)} framer-ayw4s8`,\"data-framer-name\":\"Variant 1\",layoutDependency:layoutDependency,layoutId:\"fEPqhiQsJ\",ref:ref!==null&&ref!==void 0?ref:ref1,style:{borderBottomLeftRadius:4,borderBottomRightRadius:4,borderTopLeftRadius:4,borderTopRightRadius:4,opacity:.5,...style},variants:{\"fEPqhiQsJ-hover\":{opacity:1}},...addPropertyOverrides({\"fEPqhiQsJ-hover\":{\"data-framer-name\":undefined}},baseVariant,gestureVariant)})})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-0WgL3.framer-ayw4s8, .framer-0WgL3 .framer-ayw4s8 { display: block; }\",\".framer-0WgL3.framer-brj20r { cursor: pointer; height: 193px; overflow: visible; position: relative; text-decoration: none; width: 161px; }\",\".framer-0WgL3.framer-v-brj20r.hover.framer-brj20r { aspect-ratio: 0.8333333333333333 / 1; height: var(--framer-aspect-ratio-supported, 193px); }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 193\n * @framerIntrinsicWidth 161\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"NLdH7tNGi\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerVariables {\"vrLI4xOWv\":\"preview\",\"zLcXJpINA\":\"link\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerComponentViewportWidth true\n */const Framerx2AgBANd0=withCSS(Component,css,\"framer-0WgL3\");export default Framerx2AgBANd0;Framerx2AgBANd0.displayName=\"template\";Framerx2AgBANd0.defaultProps={height:193,width:161};addPropertyControls(Framerx2AgBANd0,{vrLI4xOWv:{__defaultAssetReference:\"data:framer/asset-reference,cfnyUL5JXGibjDcMuM7B4cU4RAg.png?originalFilename=image.png&preferredSize=auto\",title:\"Preview\",type:ControlType.ResponsiveImage},zLcXJpINA:{title:\"Link\",type:ControlType.Link}});addFonts(Framerx2AgBANd0,[{explicitInter:true,fonts:[]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"Framerx2AgBANd0\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"161\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"NLdH7tNGi\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerImmutableVariables\":\"true\",\"framerIntrinsicHeight\":\"193\",\"framerComponentViewportWidth\":\"true\",\"framerContractVersion\":\"1\",\"framerVariables\":\"{\\\"vrLI4xOWv\\\":\\\"preview\\\",\\\"zLcXJpINA\\\":\\\"link\\\"}\",\"framerDisplayContentsDiv\":\"false\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./x2AgBANd0.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion}from\"framer-motion\";import{Children,cloneElement}from\"react\";/**\n *\n * FLIP\n * By Benjamin\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n *\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export default function Flip(props){var ref,ref1;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const hasChildren=Children.count(props.children)>0;const hasOneChild=Children.count(props.children)===1;const variants={initial:{rotateY:0},hover:{rotateY:180}};/* Empty state */ if(!hasChildren){return /*#__PURE__*/ _jsxs(\"section\",{style:placeholderStyles,children:[/*#__PURE__*/ _jsx(\"div\",{style:emojiStyles,children:\"☂️\"}),/*#__PURE__*/ _jsx(\"p\",{style:titleStyles,children:\"Connect to Content\"}),/*#__PURE__*/ _jsx(\"p\",{style:subtitleStyles,children:\"Add two layers to flip between on hover.\"})]});}if(hasOneChild){return /*#__PURE__*/ _jsxs(\"section\",{style:placeholderStyles,children:[/*#__PURE__*/ _jsx(\"div\",{style:emojiStyles,children:\"✅\"}),/*#__PURE__*/ _jsx(\"p\",{style:titleStyles,children:\"One more!\"}),/*#__PURE__*/ _jsx(\"p\",{style:subtitleStyles,children:\"Add two layers to flip between on hover.\"})]});}return /*#__PURE__*/ _jsx(motion.div,{style:{width:\"100%\",height:\"100%\",position:\"relative\",perspective:1200,...props.style},whileHover:\"hover\",children:/*#__PURE__*/ _jsxs(motion.div,{style:{width:\"100%\",height:\"100%\",position:\"absolute\",userSelect:\"none\",transformStyle:\"preserve-3d\"},variants:variants,transition:props.hoverTransition,children:[/*#__PURE__*/ _jsx(\"div\",{style:{...childStyles},children:/*#__PURE__*/ cloneElement(props.children[0],{...props.children[0].props,style:{...(ref=props.children[0].props)===null||ref===void 0?void 0:ref.style,width:\"100%\",height:\"100%\"}})}),/*#__PURE__*/ _jsx(\"div\",{style:{...childStyles,transform:\"rotateY(180deg)\"},children:/*#__PURE__*/ cloneElement(props.children[1],{...props.children[1].props,style:{...(ref1=props.children[1].props)===null||ref1===void 0?void 0:ref1.style,width:\"100%\",height:\"100%\"}})})]})});};Flip.displayName=\"Flip\";addPropertyControls(Flip,{children:{type:ControlType.Array,title:\"Content\",control:{type:ControlType.ComponentInstance},maxCount:2},hoverTransition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{spring:350,damping:30}}});const childStyles={width:\"100%\",height:\"100%\",position:\"absolute\",backfaceVisibility:\"hidden\"};/* Placeholder Styles */ const placeholderStyles={display:\"flex\",width:\"100%\",height:\"100%\",placeContent:\"center\",placeItems:\"center\",flexDirection:\"column\",color:\"#96F\",background:\"rgba(136, 85, 255, 0.1)\",fontSize:11,overflow:\"hidden\",padding:\"20px 20px 30px 20px\"};const emojiStyles={fontSize:32,marginBottom:10};const titleStyles={margin:0,marginBottom:10,fontWeight:600,textAlign:\"center\"};const subtitleStyles={margin:0,opacity:.7,maxWidth:120,lineHeight:1.5,textAlign:\"center\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Flip\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"*\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerI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