{"version":3,"file":"shared-lib.DVTit2Cj.mjs","names":["useState","useCallback","nodes","useMemo"],"sources":["https:/framerusercontent.com/modules/mPadgw9O62a7tIapVvyX/WHgKv3PyXAULEGNefWMS/NetworkBackground.js","https:/framerusercontent.com/modules/ySyqYOWDxWUbzPLxoPMq/HploA7izsDX3gSuCelIl/siteMetadata.js"],"sourcesContent":["// Network background component with glowing hover effects for header use\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,useMemo,useCallback,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";/**\n * Network Background\n * \n * Interactive network visualization with nodes and connections that glow on hover.\n * Perfect for header backgrounds with dynamic visual effects.\n *\n * @framerIntrinsicWidth 1440\n * @framerIntrinsicHeight 500\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function NetworkBackground(props){const{nodeCount=50,nodeSize=4,nodeColor=\"#FFFFFF\",lineColor=\"#005555\",lineWidth=2,glowColor=\"#0099FF\",glowIntensity=10,animationSpeed=.5,connectionDistance=180}=props;const[nodes,setNodes]=useState([]);const[connections,setConnections]=useState([]);const[hoveredElement,setHoveredElement]=useState(null);const[dimensions,setDimensions]=useState({width:800,height:400});const isStatic=useIsStaticRenderer();// Initialize nodes with random positions and velocities\nconst initializeNodes=useCallback((width,height)=>{const newNodes=[];for(let i=0;i<nodeCount;i++){newNodes.push({id:i,x:Math.random()*width,y:Math.random()*height,vx:(Math.random()-.5)*animationSpeed,vy:(Math.random()-.5)*animationSpeed});}return newNodes;},[nodeCount,animationSpeed]);// Calculate connections between nearby nodes\nconst calculateConnections=useCallback(nodes=>{const newConnections=[];for(let i=0;i<nodes.length;i++){for(let j=i+1;j<nodes.length;j++){const dx=nodes[i].x-nodes[j].x;const dy=nodes[i].y-nodes[j].y;const distance=Math.sqrt(dx*dx+dy*dy);if(distance<connectionDistance){newConnections.push({from:nodes[i],to:nodes[j],distance});}}}return newConnections;},[connectionDistance]);// Update dimensions when component size changes\nuseEffect(()=>{if(typeof window!==\"undefined\"){const width=props.style?.width===\"100%\"?window.innerWidth:(props.style?.width)||1440;const height=props.style?.height===\"100%\"?window.innerHeight:(props.style?.height)||500;setDimensions({width,height});}},[props.style]);// Initialize nodes when component mounts or parameters change\nuseEffect(()=>{const newNodes=initializeNodes(dimensions.width,dimensions.height);startTransition(()=>{setNodes(newNodes);setConnections(calculateConnections(newNodes));});},[initializeNodes,calculateConnections,dimensions]);// Animation loop for moving nodes\nuseEffect(()=>{if(isStatic||animationSpeed===0)return;const interval=setInterval(()=>{startTransition(()=>{setNodes(prevNodes=>{const updatedNodes=prevNodes.map(node=>{let newX=node.x+node.vx;let newY=node.y+node.vy;let newVx=node.vx;let newVy=node.vy;// Bounce off edges\nif(newX<=0||newX>=dimensions.width){newVx=-newVx;newX=Math.max(0,Math.min(dimensions.width,newX));}if(newY<=0||newY>=dimensions.height){newVy=-newVy;newY=Math.max(0,Math.min(dimensions.height,newY));}return{...node,x:newX,y:newY,vx:newVx,vy:newVy};});setConnections(calculateConnections(updatedNodes));return updatedNodes;});});},50);return()=>clearInterval(interval);},[isStatic,animationSpeed,dimensions,calculateConnections]);const handleMouseEnter=useCallback(elementId=>{if(!isStatic){startTransition(()=>setHoveredElement(elementId));}},[isStatic]);const handleMouseLeave=useCallback(()=>{if(!isStatic){startTransition(()=>setHoveredElement(null));}},[isStatic]);const glowFilter=useMemo(()=>{return`drop-shadow(0 0 ${glowIntensity}px ${glowColor})`;},[glowIntensity,glowColor]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor:\"transparent\",overflow:\"hidden\",cursor:\"default\",...props.style},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"100%\",height:\"100%\",style:{position:\"absolute\",top:0,left:0},children:[connections.map((connection,index)=>{const connectionId=`connection-${index}`;const isHovered=hoveredElement===connectionId;const opacity=1-connection.distance/connectionDistance*.7;return /*#__PURE__*/_jsx(motion.line,{x1:connection.from.x,y1:connection.from.y,x2:connection.to.x,y2:connection.to.y,stroke:isHovered?glowColor:lineColor,strokeWidth:isHovered?lineWidth*2:lineWidth,opacity:isHovered?1:opacity,style:{filter:isHovered?glowFilter:\"none\",cursor:\"pointer\"},onMouseEnter:()=>handleMouseEnter(connectionId),onMouseLeave:handleMouseLeave,animate:{stroke:isHovered?glowColor:lineColor,strokeWidth:isHovered?lineWidth*2:lineWidth,opacity:isHovered?1:opacity},transition:{duration:.2}},connectionId);}),nodes.map(node=>{const nodeId=`node-${node.id}`;const isHovered=hoveredElement===nodeId;return /*#__PURE__*/_jsx(motion.circle,{cx:node.x,cy:node.y,r:isHovered?nodeSize*1.5:nodeSize,fill:isHovered?glowColor:nodeColor,style:{filter:isHovered?glowFilter:\"none\",cursor:\"pointer\"},onMouseEnter:()=>handleMouseEnter(nodeId),onMouseLeave:handleMouseLeave,animate:{r:isHovered?nodeSize*1.5:nodeSize,fill:isHovered?glowColor:nodeColor},transition:{duration:.2}},nodeId);})]})});}addPropertyControls(NetworkBackground,{nodeCount:{type:ControlType.Number,title:\"Node Count\",defaultValue:50,min:5,max:100,step:1},nodeSize:{type:ControlType.Number,title:\"Node Size\",defaultValue:4,min:1,max:20,step:1,unit:\"px\"},nodeColor:{type:ControlType.Color,title:\"Node Color\",defaultValue:\"#FFFFFF\"},lineColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"#005555\"},lineWidth:{type:ControlType.Number,title:\"Line Width\",defaultValue:2,min:.5,max:5,step:.5,unit:\"px\"},glowColor:{type:ControlType.Color,title:\"Glow Color\",defaultValue:\"#0099FF\"},glowIntensity:{type:ControlType.Number,title:\"Glow Intensity\",defaultValue:10,min:0,max:30,step:1,unit:\"px\"},animationSpeed:{type:ControlType.Number,title:\"Animation Speed\",defaultValue:.5,min:0,max:3,step:.1},connectionDistance:{type:ControlType.Number,title:\"Connection Distance\",defaultValue:180,min:50,max:300,step:10,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NetworkBackground\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"1440\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"500\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NetworkBackground.map","// Generated by Framer (5da142a)\nexport default function metadata(params,activeLocale){return{customHTMLHeadEnd:'<script type=\"text/javascript\">\\n    (function(c,l,a,r,i,t,y){\\n        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\\n        t=l.createElement(r);t.async=1;t.src=\"https://www.clarity.ms/tag/\"+i;\\n        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\\n    })(window, document, \"clarity\", \"script\", \"t54v7nyznl\");\\n</script>\\n',description:\"At Bridgestack Energies, we harness innovation and sustainability to deliver energy solutions that empower communities. Our commitment to eco-friendly practices ensures a brighter, sustainable future for all.\",favicon:\"https://framerusercontent.com/assets/ggwpAEyal8eVlwgFhNAygH0uMSM.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/i826NMfbIaTa0OyNhuYJnVcjqPk.png\",title:\"Bridgestack Energies\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"ybAYG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,YAAU,GAAG,WAAS,EAAE,YAAU,UAAU,YAAU,UAAU,YAAU,EAAE,YAAU,UAAU,gBAAc,GAAG,iBAAe,GAAG,qBAAmB,KAAK,EAAW,CAAC,EAAM,GAAUA,EAAS,EAAE,CAAC,CAAM,CAAC,EAAY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