{"version":3,"file":"shared-lib.N23Bt8-m.mjs","names":["useState","useCallback","useMemo","customEvent","metadata","metadata","siteMetadata","metadataVersion","__FramerMetadata__","siteMetadata"],"sources":["https:/framerusercontent.com/modules/nYQT3GXAmnGfclqcl0F5/ZIW7HsRYTSjnxJpEIdBe/CheckoutSliderDrag.js","https:/framerusercontent.com/modules/hGWQ6DoocusTRlKjXbzF/itczqvbEqpED3jEVlLGI/siteMetadata.js","https:/framerusercontent.com/modules/xh7BUcWVJKZtVQokTfLY/7UDbw1p6WwtzSBfmN2M0/augiA20Il.js","https:/framerusercontent.com/modules/EVbYMGkVuPj6xh9tljh0/jeXqpBGobjOuishxO9wc/A47xPzddh.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useMemo,useCallback,useRef,useState,startTransition}from\"react\";import{useAnimationControls,useReducedMotion}from\"framer-motion\";const TRACK_WIDTH=373;const THUMB_WIDTH=126;const MAX_TRAVEL=TRACK_WIDTH-THUMB_WIDTH;const COMPLETE_THRESHOLD=MAX_TRAVEL*(2/3);const REDIRECT_URL=\"https://buy.stripe.com/eVaaGx3P888R7UkfZi\";const SHORT_SCROLL_THRESHOLD=48;const CHECKOUT_PROGRESS_EVENT=\"checkout-slider-progress\";function clamp(value,min,max){return Math.min(Math.max(value,min),max);}function getChevronAnimation(prefersReducedMotion,delay){if(prefersReducedMotion){return{animate:{x:0,opacity:1},transition:undefined};}return{animate:{x:[-3,5,-3],opacity:[.45,1,.45]},transition:{duration:1.2,delay,repeat:Infinity,repeatType:\"loop\",ease:\"easeInOut\"}};}export function ChevronPulseOne(Component){return /*#__PURE__*/forwardRef(function ChevronPulseOneOverride(props,ref){const prefersReducedMotion=useReducedMotion();const motion=useMemo(()=>getChevronAnimation(prefersReducedMotion,0),[prefersReducedMotion]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:motion.animate,transition:motion.transition,style:{...props.style,pointerEvents:\"none\"}});});}export function ChevronPulseTwo(Component){return /*#__PURE__*/forwardRef(function ChevronPulseTwoOverride(props,ref){const prefersReducedMotion=useReducedMotion();const motion=useMemo(()=>getChevronAnimation(prefersReducedMotion,.18),[prefersReducedMotion]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:motion.animate,transition:motion.transition,style:{...props.style,pointerEvents:\"none\"}});});}export function ChevronPulseThree(Component){return /*#__PURE__*/forwardRef(function ChevronPulseThreeOverride(props,ref){const prefersReducedMotion=useReducedMotion();const motion=useMemo(()=>getChevronAnimation(prefersReducedMotion,.36),[prefersReducedMotion]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:motion.animate,transition:motion.transition,style:{...props.style,pointerEvents:\"none\"}});});}export function ShowAfterShortScroll(Component){return /*#__PURE__*/forwardRef(function ShowAfterShortScrollOverride(props,ref){const prefersReducedMotion=useReducedMotion();const[isVisible,setIsVisible]=useState(false);const updateVisibility=useCallback(scrollY=>{const shouldShow=scrollY>SHORT_SCROLL_THRESHOLD;startTransition(()=>setIsVisible(current=>current===shouldShow?current:shouldShow));},[]);useEffect(()=>{if(typeof window===\"undefined\")return;updateVisibility(window.scrollY||0);const handleScroll=()=>{updateVisibility(window.scrollY||0);};window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>{window.removeEventListener(\"scroll\",handleScroll);};},[updateVisibility]);const animate=useMemo(()=>{if(prefersReducedMotion){return{opacity:isVisible?1:0,y:0};}return{opacity:isVisible?1:0,y:isVisible?0:28};},[isVisible,prefersReducedMotion]);const transition=useMemo(()=>{if(prefersReducedMotion){return{duration:.01,ease:\"linear\"};}return{duration:.32,ease:\"easeOut\"};},[prefersReducedMotion]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:animate,transition:transition,style:{...props.style,pointerEvents:isVisible?props.style?.pointerEvents??\"auto\":\"none\"}});});}export function FadeWithCheckoutProgress(Component){return /*#__PURE__*/forwardRef(function FadeWithCheckoutProgressOverride(props,ref){const prefersReducedMotion=useReducedMotion();const[progress,setProgress]=useState(0);useEffect(()=>{if(typeof window===\"undefined\")return;const handleProgress=event=>{const customEvent=event;const nextProgress=clamp(customEvent.detail?.progress??0,0,1);startTransition(()=>setProgress(nextProgress));};window.addEventListener(CHECKOUT_PROGRESS_EVENT,handleProgress);return()=>{window.removeEventListener(CHECKOUT_PROGRESS_EVENT,handleProgress);};},[]);const opacity=useMemo(()=>{const fadeThreshold=2/3;return clamp(1-progress/fadeThreshold,0,1);},[progress]);const transition=useMemo(()=>{if(prefersReducedMotion)return{duration:.01,ease:\"linear\"};return{duration:.2,ease:\"easeOut\"};},[prefersReducedMotion]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{opacity},transition:transition,style:{...props.style,pointerEvents:\"none\"}});});}export function ScrollToTopOnOpen(Component){return /*#__PURE__*/forwardRef(function ScrollToTopOnOpenOverride(props,ref){useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const previousScrollRestoration=window.history.scrollRestoration;if(\"scrollRestoration\"in window.history){window.history.scrollRestoration=\"manual\";}const resetToTop=()=>{window.scrollTo(0,0);document.documentElement.scrollTop=0;if(document.body){document.body.scrollTop=0;}};resetToTop();const rafId=window.requestAnimationFrame(()=>{resetToTop();});const handlePageShow=()=>{resetToTop();window.requestAnimationFrame(()=>{resetToTop();});};window.addEventListener(\"pageshow\",handlePageShow);return()=>{window.cancelAnimationFrame(rafId);window.removeEventListener(\"pageshow\",handlePageShow);if(\"scrollRestoration\"in window.history){window.history.scrollRestoration=previousScrollRestoration;}};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}export function CheckoutSliderDrag(Component){return /*#__PURE__*/forwardRef(function CheckoutSliderDragOverride(props,ref){const controls=useAnimationControls();const redirectedRef=useRef(false);const completingRef=useRef(false);const[isDragging,setIsDragging]=useState(false);const publishProgress=useCallback(progressValue=>{if(typeof window===\"undefined\")return;const progress=clamp(progressValue,0,1);window.dispatchEvent(new CustomEvent(CHECKOUT_PROGRESS_EVENT,{detail:{progress}}));},[]);const redirectNow=useCallback(()=>{if(redirectedRef.current)return;redirectedRef.current=true;if(typeof window!==\"undefined\"){window.location.assign(REDIRECT_URL);}},[]);const animateBackToStart=useCallback(()=>{publishProgress(0);void controls.start({x:0,transition:{type:\"spring\",stiffness:420,damping:36}}).then(()=>{publishProgress(0);});},[controls,publishProgress]);const completeAndRedirect=useCallback(()=>{if(completingRef.current||redirectedRef.current)return;completingRef.current=true;publishProgress(1);redirectNow();},[publishProgress,redirectNow]);const handleDrag=useCallback((event,info)=>{if(completingRef.current||redirectedRef.current)return;props.onDrag?.(event,info);const traveled=clamp(info.offset.x,0,MAX_TRAVEL);publishProgress(traveled/MAX_TRAVEL);if(traveled>=COMPLETE_THRESHOLD){completeAndRedirect();}},[completeAndRedirect,props,publishProgress]);const handleDragStart=useCallback((event,info)=>{if(completingRef.current||redirectedRef.current)return;startTransition(()=>setIsDragging(true));props.onDragStart?.(event,info);},[props]);const handleDragEnd=useCallback((event,info)=>{startTransition(()=>setIsDragging(false));props.onDragEnd?.(event,info);if(completingRef.current||redirectedRef.current)return;const traveled=clamp(info.offset.x,0,MAX_TRAVEL);if(traveled>=COMPLETE_THRESHOLD){completeAndRedirect();}else{animateBackToStart();}},[animateBackToStart,completeAndRedirect,props]);const handlePointerCancel=useCallback(event=>{startTransition(()=>setIsDragging(false));props.onPointerCancel?.(event);if(completingRef.current||redirectedRef.current)return;animateBackToStart();},[animateBackToStart,props]);const handleKeyDown=useCallback(event=>{props.onKeyDown?.(event);if(event.defaultPrevented)return;if(event.key===\"Enter\"||event.key===\" \"){event.preventDefault();completeAndRedirect();}},[completeAndRedirect,props]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,drag:completingRef.current?false:\"x\",dragDirectionLock:true,dragConstraints:{left:0,right:MAX_TRAVEL},dragElastic:0,dragMomentum:false,animate:controls,onDragStart:handleDragStart,onDrag:handleDrag,onDragEnd:handleDragEnd,onPointerCancel:handlePointerCancel,onKeyDown:handleKeyDown,role:props.role??\"button\",tabIndex:props.tabIndex??0,\"aria-label\":props[\"aria-label\"]??\"Complete checkout\",style:{...props.style,cursor:isDragging?\"grabbing\":\"grab\",touchAction:\"pan-y\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"ChevronPulseTwo\":{\"type\":\"reactHoc\",\"name\":\"ChevronPulseTwo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CheckoutSliderDrag\":{\"type\":\"reactHoc\",\"name\":\"CheckoutSliderDrag\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FadeWithCheckoutProgress\":{\"type\":\"reactHoc\",\"name\":\"FadeWithCheckoutProgress\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ChevronPulseOne\":{\"type\":\"reactHoc\",\"name\":\"ChevronPulseOne\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ScrollToTopOnOpen\":{\"type\":\"reactHoc\",\"name\":\"ScrollToTopOnOpen\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ChevronPulseThree\":{\"type\":\"reactHoc\",\"name\":\"ChevronPulseThree\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShowAfterShortScroll\":{\"type\":\"reactHoc\",\"name\":\"ShowAfterShortScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CheckoutSliderDrag.map","// Generated by Framer (3ad0d99)\nexport default function metadata(params,activeLocale){return{description:\"Made with Framer\",robots:\"max-image-preview:large\",title:\"My Framer Site\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (6ae8a13)\nimport siteMetadata from\"#framer/local/siteMetadata/siteMetadata/siteMetadata.js\";export default function metadata(params,activeLocale){return{breakpoints:[{hash:\"72rtr7\"}],description:siteMetadata(params,activeLocale).description,elements:{},robots:\"max-image-preview:large\",serializationId:\"framer-pl04r\",title:siteMetadata(params,activeLocale).title||\"Home\",viewport:\"width=390\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (6ae8a13)\nimport siteMetadata from\"#framer/local/siteMetadata/siteMetadata/siteMetadata.js\";export default function metadata(params,activeLocale){return{breakpoints:[{hash:\"1n5ycgj\"}],description:siteMetadata(params,activeLocale).description,elements:{},robots:\"max-image-preview:large\",serializationId:\"framer-U3nJC\",title:siteMetadata(params,activeLocale).title||\"Seguir Sevilla\",viewport:\"width=390\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"+MAA+d,SAAS,EAAM,EAAM,EAAI,EAAI,CAAC,OAAO,KAAK,IAAI,KAAK,IAAI,EAAM,CAAG,EAAE,CAAG,CAAE,CAA2+C,SAAgB,EAAqB,EAAU,CAAC,OAAoB,EAAW,SAAsC,EAAM,EAAI,CAAC,IAAM,EAAqB,EAAiB,EAAO,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,EAAiBC,EAAY,GAAS,CAAC,IAAM,EAAW,EAAQ,EAAuB,MAAoB,EAAa,GAAS,IAAU,EAAW,EAAQ,CAAU,CAAC,CAAE,EAAE,CAAC,CAAC,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,EAAiB,EAAO,SAAS,CAAC,EAAE,IAAM,MAAiB,CAAC,EAAiB,EAAO,SAAS,CAAC,CAAE,EAAgE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