{"version":3,"file":"GLSMotionField.CL259oxp.mjs","names":["useState","useMemo"],"sources":["https:/framerusercontent.com/modules/HB56DqLDAu7AEoE0VdM9/Kah9ohpW7OtNC1MomRQm/GLSMotionField.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";import{startTransition,useEffect,useMemo,useState}from\"react\";// User request: Create a lightweight self-contained Framer code component named GLSMotionField based on twelve separate GLS logo paths, keeping decorative transparent behavior, node-fragment visibility, subtle drift/pulse motion, optional vertical parallax, and reduced-motion/static fallbacks.\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function GLSMotionField(props){const{primaryColor,secondaryColor,opacity,scale,positionX,positionY,visibleNodes,speed,intensity,cropOverflow,parallax}=props;const isStaticRenderer=useIsStaticRenderer();const[reducedMotion,setReducedMotion]=useState(false);const[parallaxOffset,setParallaxOffset]=useState(0);useEffect(()=>{if(typeof window===\"undefined\")return;const media=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>{startTransition(()=>{setReducedMotion(media.matches);});};update();media.addEventListener(\"change\",update);return()=>media.removeEventListener(\"change\",update);},[]);const shouldAnimate=!isStaticRenderer&&!reducedMotion;const motionAmount=Math.max(.15,Math.min(1.2,intensity));const speedFactor=Math.max(.35,Math.min(2.2,speed));useEffect(()=>{if(typeof window===\"undefined\")return;if(!parallax||!shouldAnimate){startTransition(()=>setParallaxOffset(0));return;}const handleScroll=()=>{const next=Math.max(-20,Math.min(20,window.scrollY*.015))*motionAmount;startTransition(()=>{setParallaxOffset(next);});};handleScroll();window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",handleScroll);},[parallax,shouldAnimate,motionAmount]);const nodePaths=useMemo(()=>[\"M54.37,32.86c-.12,7.21-10.96,7.21-11.09,0,.12-7.21,10.96-7.21,11.09,0h0Z\",\"M37.74,33.13c-.12,7.57-11.23,7.57-11.35,0,.12-7.57,11.23-7.57,11.35,0h0Z\",\"M21.12,28.77c-.12,7.04-10.7,7.04-10.82,0,.12-7.04,10.7-7.04,10.82,0h0Z\",\"M10.56,20.85c-.11,6.34-9.39,6.34-9.5,0,.11-6.34,9.39-6.33,9.5,0h0Z\",\"M9.24,13.33c-.1,6.16-9.13,6.16-9.24,0,.1-6.16,9.13-6.16,9.24,0h0Z\",\"M13.73,7.13c-.09,5.28-8.09,5.28-8.18,0,.09-5.28,8.09-5.28,8.18,0h0Z\",\"M26.13,3.7c-.09,4.93-7.3,4.93-7.39,0,.09-4.93,7.3-4.93,7.39,0h0Z\",\"M39.59,3.7c-.08,4.58-7.05,4.58-7.13,0,.08-4.58,7.05-4.58,7.13,0h0Z\",\"M53.05,7.26c-.09,5.1-7.57,5.1-7.65,0,.09-5.1,7.57-5.1,7.65,0h0Z\",\"M64.4,13.59c-.1,5.46-8.35,5.45-8.45,0,.1-5.46,8.35-5.45,8.45,0h0Z\",\"M69.15,20.32c-.11,6.33-9.39,6.33-9.5,0,.11-6.33,9.39-6.33,9.5,0h0Z\",\"M66.25,27.71c-.11,6.69-9.91,6.68-10.03,0,.11-6.68,9.91-6.68,10.03,0h0Z\"],[]);const total=nodePaths.length;const clampedVisible=Math.max(3,Math.min(total,Math.round(visibleNodes)));const startIndex=Math.max(0,Math.floor((total-clampedVisible)/2));const activeIndices=useMemo(()=>Array.from({length:clampedVisible},(_,i)=>startIndex+i),[clampedVisible,startIndex]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:cropOverflow?\"hidden\":\"visible\",pointerEvents:\"none\",background:\"transparent\"},children:/*#__PURE__*/_jsx(motion.svg,{viewBox:\"0 0 69.15 38.8\",preserveAspectRatio:\"xMidYMid slice\",style:{width:\"100%\",height:\"100%\",display:\"block\",overflow:\"visible\",opacity:shouldAnimate?opacity:opacity*.78,transform:`translate(${positionX}px, ${positionY+parallaxOffset}px) scale(${scale})`,transformOrigin:\"50% 50%\"},children:activeIndices.map((index,localIndex)=>{const isPrimary=localIndex%2===0;const baseDrift=3.8+localIndex%4*1.5;const drift=Math.min(10,baseDrift*motionAmount);const pulseDuration=(12+localIndex*.35)/speedFactor;const driftDuration=(13+localIndex%5*1.2)/speedFactor;return /*#__PURE__*/_jsx(motion.g,{animate:shouldAnimate?{x:[0,drift*.6,-drift*.45,0],y:[0,-drift*.4,drift*.55,0]}:undefined,transition:shouldAnimate?{duration:driftDuration,repeat:Infinity,ease:\"easeInOut\",delay:localIndex*.45/speedFactor}:undefined,children:/*#__PURE__*/_jsx(motion.path,{d:nodePaths[index],fill:isPrimary?primaryColor:secondaryColor,fillOpacity:.72,animate:shouldAnimate?{scale:[1,1.06,1],opacity:[.72,.9,.72]}:undefined,transition:shouldAnimate?{duration:pulseDuration,repeat:Infinity,ease:\"easeInOut\",delay:localIndex/clampedVisible*4.2/speedFactor}:undefined,style:{transformBox:\"fill-box\",transformOrigin:\"center\"}})},`node-${index}`);})})});}addPropertyControls(GLSMotionField,{primaryColor:{type:ControlType.Color,title:\"Primary\",defaultValue:\"#CCCCCC\"},secondaryColor:{type:ControlType.Color,title:\"Secondary\",defaultValue:\"#EEEEEE\"},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.34,min:0,max:1,step:.01},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:1.8,min:.4,max:6,step:.1},positionX:{type:ControlType.Number,title:\"X\",defaultValue:0,min:-1200,max:1200,step:1},positionY:{type:ControlType.Number,title:\"Y\",defaultValue:0,min:-1200,max:1200,step:1},visibleNodes:{type:ControlType.Number,title:\"Nodes\",defaultValue:12,min:3,max:12,step:1},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.3,max:2,step:.1},intensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:.7,min:.1,max:1.5,step:.05},cropOverflow:{type:ControlType.Boolean,title:\"Crop\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},parallax:{type:ControlType.Boolean,title:\"Parallax\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GLSMotionField\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GLSMotionField.map"],"mappings":"sQAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,eAAa,iBAAe,UAAQ,QAAM,YAAU,YAAU,eAAa,QAAM,YAAU,eAAa,YAAU,EAAY,EAAiB,EAAoB,EAAO,CAAC,EAAc,GAAkBA,EAAS,EAAK,EAAO,CAAC,EAAe,GAAmBA,EAAS,CAAC,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAM,EAAO,WAAW,kCAAkC,EAAQ,MAAW,CAAC,MAAoB,CAAC,EAAiB,EAAM,OAAO,CAAE,CAAC,CAAE,EAAmD,OAAjD,EAAO,EAAE,EAAM,iBAAiB,SAAS,CAAM,MAAY,EAAM,oBAAoB,SAAS,CAAM,CAAE,EAAE,CAAC,CAAC,EAAE,IAAM,EAAc,CAAC,GAAkB,CAAC,EAAoB,EAAa,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,CAAS,CAAC,EAAQ,EAAY,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,CAAK,CAAC,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,GAAG,CAAC,GAAU,CAAC,EAAc,CAAC,MAAoB,EAAkB,CAAC,CAAC,EAAE,MAAO,CAAC,IAAM,MAAiB,CAAC,IAAM,EAAK,KAAK,IAAI,IAAI,KAAK,IAAI,GAAG,EAAO,QAAQ,IAAI,CAAC,EAAE,EAAa,MAAoB,CAAC,EAAkB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