{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/useIsomorphicLayoutEffect.js@^0.2.0", "ssg:https://framer.com/m/framer/useMeasuredSize.js", "ssg:https://framerusercontent.com/modules/P1X4TYc3JsBIPb750mLx/NiwL5cJmet5wwlRAustt/CurvyBG.js"],
  "sourcesContent": ["import{useLayoutEffect,useEffect}from\"react\";/**\n * Swaps `useLayoutEffect` for `useEffect` on the server to avoid React warnings.\n * NOTE! The effect won't run on the server.\n */ export const useIsomorphicLayoutEffect=typeof document!==\"undefined\"?useLayoutEffect:useEffect;\nexport const __FramerMetadata__ = {\"exports\":{\"useIsomorphicLayoutEffect\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useIsomorphicLayoutEffect.map", "import*as React from\"react\";import{useIsomorphicLayoutEffect}from\"https://framer.com/m/framer/useIsomorphicLayoutEffect.js@^0.2.0\";let safeResizeObserver=undefined;try{if(typeof window!==undefined){safeResizeObserver=window.ResizeObserver;}}catch(e){// happy linting!\n}class SharedObserver{//@ts-ignore\nupdateResizedElements(entries){for(const entry of entries){const callbackForElement=this.callbacks.get(entry.target);if(callbackForElement)callbackForElement(entry.contentRect);}}observeElementWithCallback(element,callback){if(!this.sharedResizeObserver)return;this.sharedResizeObserver.observe(element);this.callbacks.set(element,callback);}unobserve(element){if(!this.sharedResizeObserver)return;this.sharedResizeObserver.unobserve(element);this.callbacks.delete(element);}constructor(){this.callbacks=new WeakMap();const ResizeObserver1=safeResizeObserver;if(!ResizeObserver1)return;this.sharedResizeObserver=new ResizeObserver1(this.updateResizedElements.bind(this));}}const sharedResizeObserver=new SharedObserver();/**\n * Uses a globally shared resize observer, and returns an updated\n * size object when the element's size changes. This is the recommended way to\n * use a Resize Observer: https://github.com/WICG/resize-observer/issues/59.\n */ export function useMeasuredSize(ref,callback){const[size,setSize]=React.useState(null);function updateSize(newSize){if(!size||newSize.height!==size.height||newSize.width!==size.width){if(callback)callback(newSize);setSize({width:newSize.width,height:newSize.height});}}// On mount, immediately measure and set a size. This will defer paint until\n// no more updates are scheduled. Additionally add our element to the shared\n// ResizeObserver with a callback to perform when the element resizes.\n// Finally, remove the element from the observer when the component is unmounted.\nuseIsomorphicLayoutEffect(()=>{if(!ref.current)return;const{offsetWidth,offsetHeight}=ref.current;// Defer paint until initial size is added.\nupdateSize({width:offsetWidth,height:offsetHeight});// Resize observer will race to add the initial size, but since the size\n// is set above, it won't trigger a render on mount since it should\n// match the measured size. Future executions of the callback will\n// trigger renders if the size changes.\nsharedResizeObserver.observeElementWithCallback(ref.current,updateSize);return()=>{if(!ref.current)return;sharedResizeObserver.unobserve(ref.current);};},[]);return size;}export function useSizeChange(ref,callback){const size=React.useRef(null);const updateSize=React.useCallback(newSize=>{if(!size.current||newSize.height!==size.current.height||newSize.width!==size.current.width){size.current={width:newSize.width,height:newSize.height};if(callback)callback(size.current);}},[callback]);// On mount, immediately measure and set a size. This will defer paint until\n// no more updates are scheduled. Additionally add our element to the shared\n// ResizeObserver with a callback to perform when the element resizes.\n// Finally, remove the element from the observer when the component is unmounted.\nuseIsomorphicLayoutEffect(()=>{if(!ref.current)return;const{offsetWidth,offsetHeight}=ref.current;// Defer paint until initial size is added.\nupdateSize({width:offsetWidth,height:offsetHeight});// Resize observer will race to add the initial size, but since the size\n// is set above, it won't trigger a render on mount since it should\n// match the measured size. Future executions of the callback will\n// trigger renders if the size changes.\nsharedResizeObserver.observeElementWithCallback(ref.current,updateSize);return()=>{if(!ref.current)return;sharedResizeObserver.unobserve(ref.current);};},[callback]);return null;}\nexport const __FramerMetadata__ = {\"exports\":{\"useSizeChange\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMeasuredSize\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useMeasuredSize.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useMeasuredSize}from\"https://framer.com/m/framer/useMeasuredSize.js\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function CurvyBG(props){const{middleComponent,image,tileWidth,tileHeight,variant}=props;// Reference for the middle content to measure height\nconst middleRef=useRef(null);const size=useMeasuredSize(middleRef);var _size_height;const middleHeight=(_size_height=size===null||size===void 0?void 0:size.height)!==null&&_size_height!==void 0?_size_height:200// Default height if undefined\n;const uniqueId=useRef(`pattern-${Math.random().toString(36).substr(2,9)}`);const topCurveHeight=90;const bottomCurveHeight=90;const effectiveTopCurveHeight=variant!==\"Bottom\"?topCurveHeight:0;const effectiveBottomCurveHeight=variant!==\"Top\"?bottomCurveHeight:0;const totalHeight=middleHeight+effectiveTopCurveHeight+effectiveBottomCurveHeight;const translateY=variant===\"Top\"?-45:variant===\"Bottom\"?45:0;return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"3342px\",height:totalHeight,viewBox:`0 0 3342 ${totalHeight}`,fill:\"transparent\",style:{position:\"absolute\",transform:`translateY(${translateY}px)`},children:[/*#__PURE__*/_jsxs(\"defs\",{children:[/*#__PURE__*/_jsx(\"pattern\",{id:`${uniqueId.current}-texturedPattern`,patternUnits:\"userSpaceOnUse\",width:tileWidth,height:tileHeight,children:/*#__PURE__*/_jsx(\"image\",{href:image,width:tileWidth,height:tileHeight,preserveAspectRatio:\"none\"})}),/*#__PURE__*/_jsx(\"pattern\",{id:`${uniqueId.current}-secondPattern`,patternUnits:\"userSpaceOnUse\",width:tileWidth,height:tileHeight,patternTransform:`translate(0, -${effectiveTopCurveHeight+middleHeight})`,children:/*#__PURE__*/_jsx(\"image\",{href:image,width:tileWidth,height:tileHeight,preserveAspectRatio:\"none\"})})]}),variant!==\"Bottom\"&&/*#__PURE__*/_jsx(\"g\",{fill:`url(#${uniqueId.current}-texturedPattern)`,children:/*#__PURE__*/_jsx(\"path\",{d:\"M2731.52,44.52c-225.14-50.19-335.93-65.98-522.81-4.79-218.21,58.21-311.48,48.74-548.19,4.79-225.14-50.19-335.93-65.98-522.81-4.79-218.21,58.21-311.48,48.74-548.19,4.79C338.88-11.35,229.98-24.61,0,63.54v26.6h3342V22.31c-264.84,77.07-352.41,70.13-610.47,22.22Z\"})}),/*#__PURE__*/_jsx(\"rect\",{width:\"100%\",height:middleHeight,y:effectiveTopCurveHeight,fill:`url(#${uniqueId.current}-texturedPattern)`}),variant!==\"Top\"&&/*#__PURE__*/_jsx(\"g\",{fill:`url(#${uniqueId.current}-secondPattern)`,children:/*#__PURE__*/_jsx(\"path\",{d:\"M2270.99,0H0v74.06C229.99-14.09,338.87-.83,589.52,55.04c211.12,39.2,308.14,50.98,481.47,11.76,20.96-4.74,109.04-29.72,129.01-34.82,151.86-38.8,261.5-21.3,460.52,23.06,211.13,39.2,308.14,50.98,481.47,11.76,20.96-4.75,109.02-29.71,129-34.82,151.86-38.8,261.51-21.3,460.53,23.06,258.06,47.92,345.63,54.86,610.47-22.22V0h-1071Z\",transform:`translate(0, ${effectiveTopCurveHeight+middleHeight-1})`})})]}),/*#__PURE__*/_jsx(\"div\",{ref:middleRef,style:{position:\"relative\",display:\"flex\",// position: \"relative\",\n// zIndex: 1,\nwidth:\"100%\",height:\"100%\",// boxSizing: \"border-box\",\n// minHeight: \"200px\",\n// display: \"flex\",\njustifyContent:\"center\",// alignItems: \"center\", // Ensures vertical alignment\nflexGrow:1}})]});}// Styles are written in object syntax\nconst containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"visible\",position:\"relative\",width:\"100%\",height:\"100%\"};addPropertyControls(CurvyBG,{image:{type:ControlType.Image,title:\"Image\"},tileWidth:{type:ControlType.Number,title:\"Tile Width\",defaultValue:1920,min:10,max:3e3},tileHeight:{type:ControlType.Number,title:\"Tile Height\",defaultValue:1080,min:10,max:3e3},variant:{type:ControlType.Enum,title:\"Variant\",options:[\"Top\",\"Middle\",\"Bottom\"],optionTitles:[\"Top\",\"Middle\",\"Bottom\"],defaultValue:\"Middle\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CurvyBG\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CurvyBG.map"],
  "mappings": "qIAGW,IAAMA,EAA0B,OAAO,SAAW,IAAYC,EAAgBC,ECH0C,IAAIC,EAA6B,GAAG,CAAI,OAAOC,IAAS,SAAWD,EAAmBC,EAAO,eAAgB,MAAS,CACzP,CAAC,IAAMC,EAAN,KAAoB,CACrB,sBAAsBC,EAAQ,CAAC,QAAUC,KAASD,EAAQ,CAAC,IAAME,EAAmB,KAAK,UAAU,IAAID,EAAM,MAAM,EAAKC,GAAmBA,EAAmBD,EAAM,WAAW,CAAE,CAAC,CAAC,2BAA2BE,EAAQC,EAAS,CAAK,KAAK,uBAA4B,KAAK,qBAAqB,QAAQD,CAAO,EAAE,KAAK,UAAU,IAAIA,EAAQC,CAAQ,EAAE,CAAC,UAAUD,EAAQ,CAAK,KAAK,uBAA4B,KAAK,qBAAqB,UAAUA,CAAO,EAAE,KAAK,UAAU,OAAOA,CAAO,EAAE,CAAC,aAAa,CAAC,KAAK,UAAU,IAAI,QAAU,IAAME,EAAgBR,EAAuBQ,IAAuB,KAAK,qBAAqB,IAAIA,EAAgB,KAAK,sBAAsB,KAAK,IAAI,CAAC,EAAE,CAAC,EAAOC,EAAqB,IAAIP,EAIrrB,SAASQ,EAAgBC,EAAIJ,EAAS,CAAC,GAAK,CAACK,EAAKC,CAAO,EAAQC,EAAS,IAAI,EAAE,SAASC,EAAWC,EAAQ,EAAI,CAACJ,GAAMI,EAAQ,SAASJ,EAAK,QAAQI,EAAQ,QAAQJ,EAAK,SAAUL,GAASA,EAASS,CAAO,EAAEH,EAAQ,CAAC,MAAMG,EAAQ,MAA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C,KAAKA,EAAY,OAAO,MAAM,cAAc,aAAa,KAAK,IAAI,GAAG,IAAI,GAAG,EAAE,QAAQ,CAAC,KAAKA,EAAY,KAAK,MAAM,UAAU,QAAQ,CAAC,MAAM,SAAS,QAAQ,EAAE,aAAa,CAAC,MAAM,SAAS,QAAQ,EAAE,aAAa,QAAQ,CAAC,CAAC",
  "names": ["useIsomorphicLayoutEffect", "fe", "ue", "safeResizeObserver", "window", "SharedObserver", "entries", "entry", "callbackForElement", "element", "callback", "ResizeObserver1", "sharedResizeObserver", "useMeasuredSize", "ref", "size", "setSize", "ye", "updateSize", "newSize", "useIsomorphicLayoutEffect", "offsetWidth", "offsetHeight", "CurvyBG", "props", "middleComponent", "image", "tileWidth", "tileHeight", "variant", "middleRef", "pe", "size", "useMeasuredSize", "_size_height", "middleHeight", "uniqueId", "topCurveHeight", "bottomCurveHeight", "effectiveTopCurveHeight", "effectiveBottomCurveHeight", "totalHeight", "translateY", "u", "containerStyle", "p", "addPropertyControls", "ControlType"]
}
