{"version":3,"file":"CrossCompInteractions_Prod.0vb-eXdT.mjs","names":["mask","SVG","getProps","Icon","useRef","useState"],"sources":["https:/framerusercontent.com/modules/dFo0J9trhkAOcBqFQrj2/pDJh71NgCYYUYWA0EEjM/eSfm_ioFO.js","https:/framerusercontent.com/modules/Net3SlH5S0DyaoRIzqY6/oVJQXly2kkfDHcZOnOp4/sZnm5y2YA.js","https:/framerusercontent.com/modules/5al7X0wNtaoDRZccWNoK/tyLpwCeg78T6S7A7wpsn/CrossCompInteractions_Prod.js"],"sourcesContent":["// Generated by Framer (4307032)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 6.5 13 L 6.5 0 M 0 6.5 L 6.5 0 M 13 6.5 L 6.5 0\" fill=\"transparent\" height=\"13px\" id=\"GtabgoHqM\" stroke-dasharray=\"0\" stroke-linecap=\"round\" stroke-linejoin=\"miter\" stroke-miterlimit=\"4\" stroke-width=\"2\" stroke=\"var(--1iy22j1, rgb(255,0,0))\" transform=\"translate(1.5 1.5) rotate(-90 6.5 6.5)\" width=\"13px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,FI_PnSuuz:fill??props.FI_PnSuuz??\"rgb(255, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,FI_PnSuuz,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-xXS6e\",className),layoutId:layoutId,ref:ref,style:{\"--1iy22j1\":FI_PnSuuz,...style}});});const css=[`.framer-xXS6e { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--1iy22j1); mask: ${mask}; width: 16px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 16\n * @framerIntrinsicHeight 16\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"FI_PnSuuz\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Arrow Left\",\"color\":{\"type\":\"variable\",\"value\":\"1iy22j1\"},\"set\":{\"localId\":\"vectorSet/Xk6xwlhZR\",\"id\":\"Xk6xwlhZR\",\"moduleId\":\"b2g7jVhr3iqSE5G7QRNt\"}}\n */const Icon=withCSS(Component,css,\"framer-xXS6e\");Icon.displayName=\"Arrow Left\";export default Icon;addPropertyControls(Icon,{FI_PnSuuz:{defaultValue:\"rgb(255, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"16\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVariables\":\"{\\\"FI_PnSuuz\\\":\\\"fill\\\"}\",\"framerImmutableVariables\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"Arrow Left\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"1iy22j1\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/Xk6xwlhZR\\\",\\\"id\\\":\\\"Xk6xwlhZR\\\",\\\"moduleId\\\":\\\"b2g7jVhr3iqSE5G7QRNt\\\"}}\",\"framerIntrinsicWidth\":\"16\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (4307032)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 6.5 13 L 6.5 0 M 0 6.5 L 6.5 0 M 13 6.5 L 6.5 0\" fill=\"transparent\" height=\"13px\" id=\"u1FCB1KCy\" stroke-dasharray=\"0\" stroke-linecap=\"round\" stroke-linejoin=\"miter\" stroke-miterlimit=\"4\" stroke-width=\"2\" stroke=\"var(--1iy22j1, rgb(255,0,0))\" transform=\"translate(1.5 1.5) rotate(90 6.5 6.5)\" width=\"13px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,FI_PnSuuz:fill??props.FI_PnSuuz??\"rgb(255, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,FI_PnSuuz,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-cK0Ly\",className),layoutId:layoutId,ref:ref,style:{\"--1iy22j1\":FI_PnSuuz,...style}});});const css=[`.framer-cK0Ly { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--1iy22j1); mask: ${mask}; width: 16px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 16\n * @framerIntrinsicHeight 16\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"FI_PnSuuz\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Arrow Right\",\"color\":{\"type\":\"variable\",\"value\":\"1iy22j1\"},\"set\":{\"localId\":\"vectorSet/Xk6xwlhZR\",\"id\":\"Xk6xwlhZR\",\"moduleId\":\"b2g7jVhr3iqSE5G7QRNt\"}}\n */const Icon=withCSS(Component,css,\"framer-cK0Ly\");Icon.displayName=\"Arrow Right\";export default Icon;addPropertyControls(Icon,{FI_PnSuuz:{defaultValue:\"rgb(255, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"16\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"16\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Arrow Right\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"1iy22j1\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/Xk6xwlhZR\\\",\\\"id\\\":\\\"Xk6xwlhZR\\\",\\\"moduleId\\\":\\\"b2g7jVhr3iqSE5G7QRNt\\\"}}\",\"framerImmutableVariables\":\"true\",\"framerVariables\":\"{\\\"FI_PnSuuz\\\":\\\"fill\\\"}\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType,addPropertyControls,RenderTarget}from\"framer\";import{useEffect,useRef,cloneElement,useState,useInsertionEffect}from\"react\";import{useInView}from\"framer-motion\";// ------------------------------------------------------------ //\n// PROPERTY CONTROLS\n// ------------------------------------------------------------ //\naddPropertyControls(CrossCompInteractions,{mode:{type:ControlType.Enum,title:\"Mode\",options:[\"trigger\",\"target\"],optionTitles:[\"Trigger\",\"Target\"],defaultValue:\"trigger\",displaySegmentedControl:true},//----------------------------- trigger ----------------------------- //\ninteractionId:{type:ControlType.String,title:\"ID\",defaultValue:\"interaction-1\",hidden:props=>props.mode===\"target\"},interaction:{type:ControlType.Enum,title:\"On\",options:[\"mouseEnter\",\"mouseLeave\",\"mouseDown\",\"click\",\"appear\"],optionTitles:[\"Mouse Enter\",\"Mouse Leave\",\"Click Start\",\"Click\",\"Appear\"],defaultValue:\"click\",hidden:props=>props.mode===\"target\"},offScreen:{type:ControlType.Enum,title:\"Off Screen\",options:[\"play\",\"pause\"],optionTitles:[\"Play\",\"Pause\"],defaultValue:\"pause\",displaySegmentedControl:true,hidden:props=>props.mode===\"target\"||props.interaction!==\"appear\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:10,step:.1,unit:\"s\",displayStepper:true,hidden:props=>props.mode===\"target\"},//----------------------------- target ----------------------------- //\nnativeComponent:{type:ControlType.ComponentInstance,title:\"Component\",hidden:props=>props.mode===\"trigger\"},componentWidth:{type:ControlType.Enum,title:\"Width\",options:[\"default\",\"fill\"],optionTitles:[\"Default\",\"Fill\"],defaultValue:\"default\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>props.mode===\"trigger\"},componentHeight:{type:ControlType.Enum,title:\"Height\",options:[\"default\",\"fill\"],optionTitles:[\"Default\",\"Fill\"],defaultValue:\"default\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>props.mode===\"trigger\"},interactionVariants:{type:ControlType.Array,title:\"Interactions\",control:{type:ControlType.Object,controls:{interactionId:{type:ControlType.String,title:\"ID\",defaultValue:\"interaction-1\"},repeat:{type:ControlType.Enum,title:\"Repeat\",options:[\"once\",\"cycle\"],optionTitles:[\"Once\",\"Cycle\"],defaultValue:\"once\",displaySegmentedControl:true},variant:{type:ControlType.String,title:\"Variant\",placeholder:\"Variant 2\",hidden:props=>props.repeat===\"cycle\",description:\"Exact name of the variant you want to switch to.\"}}},defaultValue:[{interactionId:\"interaction-1\",variant:\"\"}],hidden:props=>props.mode===\"trigger\"}});// ------------------------------------------------------------ //\n// DEFAULT PROPS\n// ------------------------------------------------------------ //\nCrossCompInteractions.defaultProps={mode:\"trigger\",// trigger\ninteraction:\"click\",interactionId:\"interaction-1\",offScreen:\"pause\",delay:0,// target\nnativeComponent:null,componentWidth:\"default\",componentHeight:\"default\",interactionVariants:[{interactionId:\"interaction-1\",variant:\"\",repeat:\"once\"}]};// ------------------------------------------------------------ //\n// MAIN COMPONENT\n// ------------------------------------------------------------ //\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n */export default function CrossCompInteractions(props){const isOnFramerCanvas=RenderTarget.hasRestrictions();const containerRef=useRef(null);const isInView=useInView(containerRef,{once:false,amount:\"some\"});const offScreenIsInView=props.offScreen===\"pause\"?isInView:true;// Use custom hooks\nuseTrigger({mode:props.mode,containerRef:containerRef,interactionId:props.interactionId,variant:\"\",interaction:props.interaction,isInView:offScreenIsInView,delay:props.delay});const clonedContent=useTarget(props.mode,props.nativeComponent,props.interactionVariants,props.componentWidth,props.componentHeight);return /*#__PURE__*/_jsx(\"div\",{id:`${props.interactionId}-${props.mode}`,ref:containerRef,style:{width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:props.componentWidth===\"default\"?\"fit-content\":\"100%\",height:props.componentHeight===\"default\"?\"fit-content\":\"100%\",display:\"flex\"},children:clonedContent})});}const useTrigger=props=>{useEffect(()=>{if(props.mode!==\"trigger\"||!props.containerRef.current)return;const subparent=props.containerRef.current.parentElement;const parent=subparent?.parentElement;if(!parent)return;// Handle \"appear\" interaction separately\nif(props.interaction===\"appear\"){if(props.isInView){setTimeout(()=>{InteractionManager.getInstance().trigger(props.interactionId,\"\");},props.delay*1e3)// Convert seconds to milliseconds\n;}return;}// Map Framer interaction types to DOM events\nconst eventMap={mouseEnter:\"mouseenter\",mouseLeave:\"mouseleave\",mouseDown:\"mousedown\",click:\"click\",appear:\"none\"};// Get the corresponding DOM event\nconst domEvent=eventMap[props.interaction];// Event handler function\nconst handleInteraction=()=>{setTimeout(()=>{InteractionManager.getInstance().trigger(props.interactionId,\"\");},props.delay*1e3)// Convert seconds to milliseconds\n;};// Add event listener only for non-appear interactions\nif(domEvent!==\"none\"){parent.addEventListener(domEvent,handleInteraction);// Cleanup function to remove event listener\nreturn()=>{parent.removeEventListener(domEvent,handleInteraction);};}},[props.mode,props.interactionId,props.interaction,props.isInView,props.containerRef,props.delay]);};const useTarget=(mode,nativeComponent,interactionVariants,componentWidth,componentHeight)=>{const[clonedContent,setClonedContent]=useState(nativeComponent);const cycleStateRef=useRef({});const lastUpdateTimeRef=useRef({});const isInitializedRef=useRef({});const DEBOUNCE_TIME=50// ms\n;// Pre-render width and height adjustment using useInsertionEffect\nuseInsertionEffect(()=>{if(mode!==\"target\"||!nativeComponent.length)return;const sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});setClonedContent(sizeAdjustedContent);},[mode,nativeComponent,componentWidth,componentHeight]);// Clear interaction manager on mount in preview mode, but only once\nuseEffect(()=>{if(typeof window!==\"undefined\"&&window.location.href.includes(\"framercanvas.com\")){InteractionManager.clearPreviewOnce();}},[]);// Extract all available variants from the target component\nuseEffect(()=>{if(mode!==\"target\"||!nativeComponent.length)return;const findPropertyControls=element=>{if(!element)return null;if(element.type?.propertyControls?.variant?.options&&element.type?.propertyControls?.variant?.optionTitles){return element.type.propertyControls.variant;}if(element.props?.children){return findPropertyControls(element.props.children);}return null;};const variantControl=findPropertyControls(nativeComponent[0]);if(!variantControl){return;}const{options}=variantControl;// Get the default variant from the component props\nconst getDefaultVariant=component=>{if(!component)return undefined;if(component.props?.variant)return component.props.variant;if(component.props?.children)return getDefaultVariant(component.props.children);return undefined;};const defaultVariant=getDefaultVariant(nativeComponent[0]);// Initialize variant cycles for each interaction\nconst newVariantCycles={};interactionVariants.forEach(pair=>{if(pair.repeat===\"cycle\"){// Find the index of the default variant\nconst startIndex=defaultVariant?options.indexOf(defaultVariant):0;newVariantCycles[pair.interactionId]={currentIndex:startIndex>=0?startIndex:0,variants:options};}});cycleStateRef.current=newVariantCycles;// Apply initial variants for cycling interactions\n// First ensure we have size-adjusted content\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});// Then apply cycling variants while preserving size adjustments and respecting default variant\nconst initialContent=sizeAdjustedContent.map(component=>{const cyclingPairs=interactionVariants.filter(pair=>pair.repeat===\"cycle\");if(cyclingPairs.length>0){// For cycling variants, keep the default variant\ncyclingPairs.forEach(pair=>{const cycle=newVariantCycles[pair.interactionId];if(cycle&&cycle.variants.length>0){isInitializedRef.current[pair.interactionId]=true;if(defaultVariant){// Keep the default variant\n// @ts-expect-error this is Framer layer\ncomponent=cloneWithVariant(component,defaultVariant,componentWidth,componentHeight);}}});}return component;});setClonedContent(initialContent);},[mode,nativeComponent,interactionVariants,componentWidth,componentHeight]);useEffect(()=>{if(mode!==\"target\")return;const handleVariantChange=interactionId=>{const now=Date.now();const lastUpdate=lastUpdateTimeRef.current[interactionId]||0;// Debounce check\nif(now-lastUpdate<DEBOUNCE_TIME){return;}lastUpdateTimeRef.current[interactionId]=now;// Find the matching variant pair for this interaction ID\nconst matchingPair=interactionVariants.find(pair=>pair.interactionId===interactionId);if(!matchingPair){return;}// Handle cycling if repeat is \"cycle\"\nif(matchingPair.repeat===\"cycle\"){const cycle=cycleStateRef.current[interactionId];if(!cycle||!cycle.variants||cycle.variants.length===0){return;}// Calculate next index\nconst nextIndex=(cycle.currentIndex+1)%cycle.variants.length;const nextVariant=cycle.variants[nextIndex];// First ensure we have size-adjusted content\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});// Then apply the next variant while preserving size adjustments\nconst newContent=sizeAdjustedContent.map(component=>cloneWithVariant(component,nextVariant,componentWidth,componentHeight));setClonedContent(newContent);// Update the ref\ncycleStateRef.current={...cycleStateRef.current,[interactionId]:{...cycle,currentIndex:nextIndex}};}else{// First ensure we have size-adjusted content\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});// Then apply the variant while preserving size adjustments\nconst newContent=sizeAdjustedContent.map(component=>cloneWithVariant(component,matchingPair.variant,componentWidth,componentHeight));setClonedContent(newContent);}};// Only set initial content if not already initialized and has cycling variants\nconst hasUninitializedCycles=interactionVariants.some(pair=>pair.repeat===\"cycle\"&&!isInitializedRef.current[pair.interactionId]);if(hasUninitializedCycles){// First apply size adjustments\nconst sizeAdjustedContent=nativeComponent.map(component=>{if(!isReactElement(component))return component;return /*#__PURE__*/cloneElement(component,{// @ts-expect-error this is Framer layer\nstyle:{// @ts-expect-error this is Framer layer\n...component.props.style,width:componentWidth===\"fill\"?\"100%\":component.props.width,height:componentHeight===\"fill\"?\"100%\":component.props.height}});});setClonedContent(sizeAdjustedContent);}// Get interaction manager instance\nconst interactionManager=InteractionManager.getInstance();// Store listeners for cleanup\nconst listeners={};// Register listeners for all interaction IDs\ninteractionVariants.forEach(pair=>{const listener=()=>handleVariantChange(pair.interactionId);listeners[pair.interactionId]=listener;interactionManager.addListener(pair.interactionId,listener);});// Cleanup listeners on unmount\nreturn()=>{Object.entries(listeners).forEach(([interactionId,listener])=>{interactionManager.removeListener(interactionId,listener);});};},[nativeComponent,mode,interactionVariants,componentWidth,componentHeight]);return clonedContent;};// ------------------------------------------------------------ //\n// HELPERS\n// ------------------------------------------------------------ //\n// Type guard to ensure we're working with a ReactElement\nconst isReactElement=el=>{return el&&typeof el===\"object\"&&\"props\"in el;};// Clone with variant function\nconst cloneWithVariant=(element,targetVariant,componentWidth,componentHeight)=>{// Early return for non-element nodes\nif(!isReactElement(element)){return element;}// Type guard for variant props\nconst hasVariantProp=props=>{return props&&typeof props===\"object\"&&\"variant\"in props;};// Type guard for children props\nconst hasChildrenProp=props=>{return props&&typeof props===\"object\"&&\"children\"in props;};// Check if this element has a variant prop\nif(hasVariantProp(element.props)){const newProps={...element.props,variant:targetVariant,style:{...element.props.style,width:componentWidth===\"fill\"?\"100%\":element.props.width,height:componentHeight===\"fill\"?\"100%\":element.props.height}};// Clone children recursively\nnewProps.children=element.props.children?cloneWithVariant(element.props.children,targetVariant,componentWidth,componentHeight):element.props.children;return /*#__PURE__*/cloneElement(element,newProps);}// If it has children, recursively clone them\nif(hasChildrenProp(element.props)){return /*#__PURE__*/cloneElement(element,{...element.props,style:{...element.props.style,width:componentWidth===\"fill\"?\"100%\":element.props.width,height:componentHeight===\"fill\"?\"100%\":element.props.height},children:cloneWithVariant(element.props.children,targetVariant,componentWidth,componentHeight)});}return element;};class InteractionManager{static getInstance(){if(!InteractionManager.instance){InteractionManager.instance=new InteractionManager;}return InteractionManager.instance;}addListener(interactionId,listener){if(!this.listeners[interactionId]){this.listeners[interactionId]=[];}// Add instanceId to help with cleanup\nconst wrappedListener=variant=>{if(InteractionManager.instanceId===this.getCurrentInstanceId()){listener(variant);}};this.listeners[interactionId].push(wrappedListener);}removeListener(interactionId,listener){if(!this.listeners[interactionId])return;this.listeners[interactionId]=this.listeners[interactionId].filter(l=>l!==listener);// Clean up empty listener arrays\nif(this.listeners[interactionId].length===0){delete this.listeners[interactionId];}}clearAllListeners(){this.listeners={};// Generate new instance ID to invalidate old listeners\nInteractionManager.instanceId=Math.random().toString(36).substring(7);}getCurrentInstanceId(){return InteractionManager.instanceId;}trigger(interactionId,variant){if(!this.listeners[interactionId])return;this.listeners[interactionId].forEach(listener=>listener(variant));}static clearPreviewOnce(){if(!InteractionManager.isPreviewCleared){InteractionManager.getInstance().clearAllListeners();InteractionManager.isPreviewCleared=true;}}constructor(){_define_property(this,\"listeners\",{});// Listen for preview reloads\nif(typeof window!==\"undefined\"){window.addEventListener(\"unload\",()=>{this.clearAllListeners();});}}}_define_property(InteractionManager,\"instance\",void 0);_define_property(InteractionManager,\"instanceId\",Math.random().toString(36).substring(7));_define_property(InteractionManager,\"isPreviewCleared\",false);CrossCompInteractions.displayName=\"Cross Comp Interactions\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CrossCompInteractions\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CrossCompInteractions_Prod.map"],"mappings":"+TAC2C,IAAsE,IAA4B,CAAoCA,EAAK,giBAAwiBC,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,MAAI,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG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