{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/uet05eWp7Rs94LVkptJs/8FCRWPJW6s1XpC4iPs6o/Gradient_Blur.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 600\n\n */export function BackgroundBlur(props){const{blurAmount,accuracy,backgroundColor,children}=props;const effectiveBlurAmount=blurAmount||0;const numSteps=accuracy||50;const bgColor=backgroundColor// Only use if specified, otherwise no background.\n;const containerRef=useRef(null);const[containerSize,setContainerSize]=useState({width:0,height:0});useEffect(()=>{const handleResize=()=>{if(containerRef.current){const{width,height}=containerRef.current.getBoundingClientRect();setContainerSize({width,height});}};window.addEventListener(\"resize\",handleResize);handleResize();return()=>{window.removeEventListener(\"resize\",handleResize);};},[]);const getBlurStripStyle=index=>{const stepHeight=`${100/numSteps}%`;const cumulativeHeight=`${(index+1)/numSteps*100}%`;const opacity=(numSteps-index)/numSteps;return{position:\"absolute\",top:0,left:0,width:\"100%\",height:cumulativeHeight,backdropFilter:`blur(${effectiveBlurAmount*((numSteps-index)/numSteps)}px)`,zIndex:1,opacity};};return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"},children:[Array.from({length:numSteps},(_,index)=>//@ts-expect-error\n    /*#__PURE__*/_jsx(\"div\",{style:getBlurStripStyle(index)},index)),bgColor&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",background:`linear-gradient(to bottom, ${bgColor}, rgba(255, 255, 255, 0))`,zIndex:2}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:3},children:children})]});}addPropertyControls(BackgroundBlur,{blurAmount:{type:ControlType.Number,title:\"Blur Amount\",defaultValue:0,min:0,max:100},accuracy:{type:ControlType.Number,title:\"Accuracy\",defaultValue:50,min:10,max:100},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"\",description:\"s[via SegmentUI](https://www.segmentUI.com)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"BackgroundBlur\":{\"type\":\"reactComponent\",\"name\":\"BackgroundBlur\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gradient_Blur.map"],
  "mappings": "8HAMU,SAASA,EAAeC,EAAM,CAAC,GAAK,CAAC,WAAAC,EAAW,SAAAC,EAAS,gBAAAC,EAAgB,SAAAC,CAAQ,EAAEJ,EAAYK,EAAoBJ,GAAY,EAAQK,EAASJ,GAAU,GAASK,EAAQJ,EAC9KK,EAAaC,EAAO,IAAI,EAAO,CAACC,EAAcC,CAAgB,EAAEC,EAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAEC,EAAU,IAAI,CAAC,IAAMC,EAAa,IAAI,CAAC,GAAGN,EAAa,QAAQ,CAAC,GAAK,CAAC,MAAAO,EAAM,OAAAC,CAAM,EAAER,EAAa,QAAQ,sBAAsB,EAAEG,EAAiB,CAAC,MAAAI,EAAM,OAAAC,CAAM,CAAC,CAAE,CAAC,EAAE,OAAAC,EAAO,iBAAiB,SAASH,CAAY,EAAEA,EAAa,EAAQ,IAAI,CAACG,EAAO,oBAAoB,SAASH,CAAY,CAAE,CAAE,EAAE,CAAC,CAAC,EAAE,IAAMI,EAAkBC,GAAO,CAAC,IAAMC,EAAW,GAAG,IAAId,CAAQ,IAAUe,EAAiB,IAAIF,EAAM,GAAGb,EAAS,GAAG,IAAUgB,GAAShB,EAASa,GAAOb,EAAS,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAOe,EAAiB,eAAe,QAAQhB,IAAsBC,EAASa,GAAOb,EAAS,MAAM,OAAO,EAAE,QAAAgB,CAAO,CAAE,EAAE,OAAoBC,EAAM,MAAM,CAAC,IAAIf,EAAa,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,QAAQ,EAAE,SAAS,CAAC,MAAM,KAAK,CAAC,OAAOF,CAAQ,EAAE,CAACkB,EAAEL,IAC72BM,EAAK,MAAM,CAAC,MAAMP,EAAkBC,CAAK,CAAC,EAAEA,CAAK,CAAC,EAAEZ,GAAsBkB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,WAAW,8BAA8BlB,CAAO,4BAA4B,OAAO,CAAC,CAAC,CAAC,EAAekB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,OAAO,CAAC,EAAE,SAASrB,CAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,CAACsB,EAAoB3B,EAAe,CAAC,WAAW,CAAC,KAAK4B,EAAY,OAAO,MAAM,cAAc,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,WAAW,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,mBAAmB,aAAa,GAAG,YAAY,6CAA6C,CAAC,CAAC",
  "names": ["BackgroundBlur", "props", "blurAmount", "accuracy", "backgroundColor", "children", "effectiveBlurAmount", "numSteps", "bgColor", "containerRef", "pe", "containerSize", "setContainerSize", "ye", "ue", "handleResize", "width", "height", "window", "getBlurStripStyle", "index", "stepHeight", "cumulativeHeight", "opacity", "u", "_", "p", "addPropertyControls", "ControlType"]
}
