{"version":3,"file":"Paper_Texture.BZ2ktIfw.mjs","names":["useId","useState"],"sources":["https:/framerusercontent.com/modules/5kmSWzWeKBr6YEoCPhRW/MKRnYEfPRlLY9rM7172m/Paper_Texture.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useId}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n * @framerDisableUnlink\n */export default function PaperTexture(props){const{contentDesktop,contentTablet,contentMobile,paperColor=\"#f0e8d8\",grainScale=1.2,intensity=.85,radiusTopLeft=0,radiusTopRight=0,radiusBottomRight=0,radiusBottomLeft=0,horizontalAlign=\"center\",verticalAlign=\"center\",style}=props;const id=useId();const filterId=`smoothpaper-${id}`;const borderRadius=`${radiusTopLeft}px ${radiusTopRight}px ${radiusBottomRight}px ${radiusBottomLeft}px`;const isFillHeight=style?.height!==undefined&&style?.height!==\"auto\";const outerHeight=isFillHeight?\"100%\":\"auto\";const childHeight=isFillHeight?\"100%\":\"auto\";const[windowWidth,setWindowWidth]=useState(typeof window!==\"undefined\"?window.innerWidth:1200);useEffect(()=>{const handleResize=()=>setWindowWidth(window.innerWidth)// Update breakpoint on resize\n;window.addEventListener(\"resize\",handleResize)// Attach listener\n;return()=>window.removeEventListener(\"resize\",handleResize)// Cleanup\n;},[]);let activeContent;if(windowWidth<=665){activeContent=contentMobile;}else if(windowWidth<=1199){activeContent=contentTablet;}else{activeContent=contentDesktop;}return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:outerHeight,overflow:\"hidden\",borderRadius,boxSizing:\"border-box\",isolation:\"isolate\",...style},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .paper-content > * {\n                    width: 100% !important;\n                    height: ${childHeight} !important;\n                    min-height: unset !important;\n                    flex-shrink: 0 !important;\n                }\n            `}),/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",width:0,height:0,pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"filter\",{id:filterId,x:\"0%\",y:\"0%\",width:\"100%\",height:\"100%\",colorInterpolationFilters:\"linearRGB\",children:[/*#__PURE__*/_jsx(\"feTurbulence\",{type:\"fractalNoise\",baseFrequency:\"0.02\",numOctaves:\"6\",seed:\"4\",result:\"noise\"}),/*#__PURE__*/_jsx(\"feDiffuseLighting\",{in:\"noise\",lightingColor:paperColor,surfaceScale:grainScale,result:\"light\",children:/*#__PURE__*/_jsx(\"feDistantLight\",{azimuth:\"45\",elevation:\"65\"})})]})})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,backgroundColor:paperColor,zIndex:0,pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",opacity:intensity,mixBlendMode:\"multiply\",zIndex:0,pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"rect\",{width:\"100%\",height:\"100%\",filter:`url(#${filterId})`})}),/*#__PURE__*/_jsx(\"div\",{className:\"paper-content\",style:{position:\"relative\",display:\"flex\",flexDirection:\"column\",alignItems:horizontalAlign,justifyContent:verticalAlign,width:\"100%\",height:childHeight},children:activeContent})]});}addPropertyControls(PaperTexture,{contentDesktop:{type:ControlType.ComponentInstance,title:\"Desktop\"},contentTablet:{type:ControlType.ComponentInstance,title:\"Tablet\"},contentMobile:{type:ControlType.ComponentInstance,title:\"Mobile\"},horizontalAlign:{type:ControlType.Enum,title:\"Horizontal\",defaultValue:\"center\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Start\",\"Center\",\"End\"]},verticalAlign:{type:ControlType.Enum,title:\"Vertical\",defaultValue:\"center\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Start\",\"Center\",\"End\"]},paperColor:{type:ControlType.Color,title:\"Paper Color\",defaultValue:\"#f0e8d8\"},grainScale:{type:ControlType.Number,title:\"Grain Depth\",defaultValue:1.2,min:.1,max:4,step:.1},intensity:{type:ControlType.Number,title:\"Intensity\",defaultValue:.85,min:0,max:1,step:.05},radiusTopLeft:{type:ControlType.Number,title:\"Top Left\",defaultValue:0,min:0,max:500},radiusTopRight:{type:ControlType.Number,title:\"Top Right\",defaultValue:0,min:0,max:500},radiusBottomRight:{type:ControlType.Number,title:\"Bottom Right\",defaultValue:0,min:0,max:500},radiusBottomLeft:{type:ControlType.Number,title:\"Bottom Left\",defaultValue:0,min:0,max:500}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PaperTexture\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"400\",\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"300\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Paper_Texture.map"],"mappings":"wMAMG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,iBAAe,gBAAc,gBAAc,aAAW,UAAU,aAAW,IAAI,YAAU,IAAI,gBAAc,EAAE,iBAAe,EAAE,oBAAkB,EAAE,mBAAiB,EAAE,kBAAgB,SAAS,gBAAc,SAAS,SAAO,EAA6B,EAAS,eAAvBA,GAAO,GAA0C,EAAa,GAAG,EAAc,KAAK,EAAe,KAAK,EAAkB,KAAK,EAAiB,IAAU,EAAa,GAAO,SAAS,IAAA,IAAW,GAAO,SAAS,OAAa,EAAY,EAAa,OAAO,OAAa,EAAY,EAAa,OAAO,OAAY,CAAC,EAAY,GAAgBC,EAAgB,IAAS,OAA8B,KAAlB,EAAO,WAAgB,CAAC,MAAc,CAAC,IAAM,MAAiB,EAAe,EAAO,WAAW,CAExvB,OADA,EAAO,iBAAiB,S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