{"version":3,"file":"Glass.B-PwPy2X.mjs","names":["useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/JvcxgV07RWBWP9nZcoLP/qa88m4qS0dyucebp8kuK/Glass.js"],"sourcesContent":["// Liquid Glass Effect component for Framer\n// Based on macOS-style glass effect with multiple layers\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{ControlType,addPropertyControls}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n */export default function LiquidGlass({blurAmount=3,tintOpacity=.25,tintColor=\"#FFFFFF\",shineIntensity=.5,shadowIntensity=.2,shadowColor=\"#000000\",borderRadius=12,useDistortion=true}){const svgRef=useRef(null);// Create SVG distortion filter\nuseEffect(()=>{if(!useDistortion||!svgRef.current)return;const svg=svgRef.current;svg.innerHTML=`\n            <defs>\n                <filter id=\"glass-distortion\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n                    <feTurbulence \n                        baseFrequency=\"0.02 0.03\" \n                        numOctaves=\"3\" \n                        result=\"turbulence\"\n                    />\n                    <feDisplacementMap \n                        in=\"SourceGraphic\" \n                        in2=\"turbulence\" \n                        scale=\"2\"\n                    />\n                </filter>\n            </defs>\n        `;},[useDistortion]);const containerStyle={position:\"relative\",overflow:\"hidden\",borderRadius:`${borderRadius}px`,boxShadow:`0 6px 6px rgba(${hexToRgb(shadowColor)}, ${shadowIntensity}), 0 0 20px rgba(${hexToRgb(shadowColor)}, ${shadowIntensity*.5})`,width:\"100%\",height:\"100%\"};const effectStyle={position:\"absolute\",zIndex:0,inset:0,backdropFilter:`blur(${blurAmount}px)`,WebkitBackdropFilter:`blur(${blurAmount}px)`,filter:useDistortion?\"url(#glass-distortion)\":\"none\",overflow:\"hidden\",isolation:\"isolate\",borderRadius:`${borderRadius}px`};const tintStyle={zIndex:1,position:\"absolute\",inset:0,background:`${tintColor}${Math.round(tintOpacity*255).toString(16).padStart(2,\"0\")}`,borderRadius:`${borderRadius}px`};const shineStyle={position:\"absolute\",inset:0,zIndex:2,overflow:\"hidden\",borderRadius:`${borderRadius}px`,boxShadow:`inset 2px 2px 1px 0 rgba(255, 255, 255, ${shineIntensity}), inset -1px -1px 1px 1px rgba(255, 255, 255, ${shineIntensity})`};return /*#__PURE__*/_jsxs(_Fragment,{children:[useDistortion&&/*#__PURE__*/_jsx(\"svg\",{ref:svgRef,style:{position:\"absolute\",width:0,height:0,pointerEvents:\"none\"}}),/*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:effectStyle}),/*#__PURE__*/_jsx(\"div\",{style:tintStyle}),/*#__PURE__*/_jsx(\"div\",{style:shineStyle})]})]});}// Helper function to convert hex color to RGB values\nfunction hexToRgb(hex){// Remove the hash if present\nhex=hex.replace(\"#\",\"\");// Handle 3-digit hex\nif(hex.length===3){hex=hex.split(\"\").map(char=>char+char).join(\"\");}// Parse RGB values\nconst r=parseInt(hex.substring(0,2),16);const g=parseInt(hex.substring(2,4),16);const b=parseInt(hex.substring(4,6),16);return`${r}, ${g}, ${b}`;}addPropertyControls(LiquidGlass,{blurAmount:{type:ControlType.Number,title:\"Blur Amount\",defaultValue:3,min:0,max:20,step:.5,unit:\"px\"},tintOpacity:{type:ControlType.Number,title:\"Tint Opacity\",defaultValue:.25,min:0,max:1,step:.05},tintColor:{type:ControlType.Color,title:\"Tint Color\",defaultValue:\"#FFFFFF\"},shineIntensity:{type:ControlType.Number,title:\"Shine Intensity\",defaultValue:.5,min:0,max:1,step:.1},shadowIntensity:{type:ControlType.Number,title:\"Shadow Intensity\",defaultValue:.2,min:0,max:1,step:.1},shadowColor:{type:ControlType.Color,title:\"Shadow Color\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:50,step:1,unit:\"px\"},useDistortion:{type:ControlType.Boolean,title:\"Glass Distortion\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LiquidGlass\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"200\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Glass.map"],"mappings":"wRAQG,SAAwB,EAAY,CAAC,aAAW,EAAE,cAAY,IAAI,YAAU,UAAU,iBAAe,GAAG,kBAAgB,GAAG,cAAY,UAAU,eAAa,GAAG,gBAAc,IAAM,CAAC,IAAM,EAAOA,EAAO,KAAK,CAClN,MAAc,CAAC,GAAG,CAAC,GAAe,CAAC,EAAO,QAAQ,OAAO,IAAM,EAAI,EAAO,QAAQ,EAAI,UAAU;;;;;;;;;;;;;;;WAepF,CAAC,EAAc,CAAC,CAAC,IAAM,EAAe,CAAC,SAAS,WAAW,SAAS,SAAS,aAAa,GAAG,EAAa,IAAI,UAAU,kBAAkB,EAAS,EAAY,CAAC,IAAI,EAAgB,mBAAmB,EAAS,EAAY,CAAC,IAAI,EAAgB,GAAG,GAAG,MAAM,OAAO,OAAO,OAAO,CAAO,EAAY,CAAC,SAAS,WAAW,OAAO,EAAE,MAAM,EAAE,eAAe,QAAQ,EAAW,KAAK,qBAAqB,QAAQ,EAAW,KAAK,OAAO,EAAc,yBAAyB,OAAO,SAAS,SAAS,UAAU,UAAU,aAAa,GAAG,EAAa,IAAI,CAAO,EAAU,CAAC,OAAO,EAAE,SAAS,WAAW,MAAM,EAAE,WAAW,GAAG,IAAY,KAAK,MAAM,EAAY,IAAI,CAAC,SAAS,GAAG,CAAC,SAAS,EAAE,IAAI,GAAG,aAAa,GAAG,EAAa,IAAI,CAAO,EAAW,CAAC,SAAS,WAAW,MAAM,EAAE,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