{"version":3,"file":"PaperTexture.CbE1warD.mjs","names":["useId","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","p","ie","addPropertyControls","init_framer_DKtAEkcX","ControlType","PaperTexture","props","uid","isLight","mode","baseFrequency","grain","octaves","scale","offset","third","matrix","strength","init_PaperTexture"],"sources":["https:/framerusercontent.com/modules/SW6W07FZsceLZzQ2Fc4S/7M49vK8dJXlvrYIN95fW/PaperTexture.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useId}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Paper Texture\n *\n * A soft cardstock or paper grain that sits over a section's color.\n * Decorative only. Use \"light\" on cream, \"dark\" on green or burgundy.\n *\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function PaperTexture(props){const{mode=\"light\",grain=\"paper\",strength=1}=props;const uid=useId().replace(/:/g,\"\");const isLight=mode===\"light\";// Fine grain for cardstock, a mix of grain and long fibers for paper.\nconst baseFrequency=grain===\"cardstock\"?\"0.85\":\"0.55 0.9\";const octaves=grain===\"cardstock\"?3:5;// Squash the noise into a narrow range so it shades the color, not replaces it.\nconst scale=isLight?.2:.5;const offset=isLight?.8:.25;const third=(scale/3).toFixed(4);const matrix=`${third} ${third} ${third} 0 ${offset} ${third} ${third} ${third} 0 ${offset} ${third} ${third} ${third} 0 ${offset} 0 0 0 1 0`;return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{...props.style,position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\",mixBlendMode:isLight?\"multiply\":\"overlay\",opacity:Math.max(0,Math.min(1,(isLight?.85:.32)*strength))},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"100%\",height:\"100%\",xmlns:\"http://www.w3.org/2000/svg\",style:{display:\"block\"},children:[/*#__PURE__*/_jsxs(\"filter\",{id:`nhpaper${uid}`,x:\"0\",y:\"0\",width:\"100%\",height:\"100%\",colorInterpolationFilters:\"sRGB\",children:[/*#__PURE__*/_jsx(\"feTurbulence\",{type:\"fractalNoise\",baseFrequency:baseFrequency,numOctaves:octaves,seed:7,stitchTiles:\"stitch\"}),/*#__PURE__*/_jsx(\"feColorMatrix\",{type:\"matrix\",values:matrix})]}),/*#__PURE__*/_jsx(\"rect\",{width:\"100%\",height:\"100%\",filter:`url(#nhpaper${uid})`})]})});}addPropertyControls(PaperTexture,{mode:{type:ControlType.Enum,title:\"On\",options:[\"light\",\"dark\"],optionTitles:[\"Cream (light)\",\"Green or red (dark)\"],defaultValue:\"light\",displaySegmentedControl:true},grain:{type:ControlType.Enum,title:\"Grain\",options:[\"paper\",\"cardstock\"],optionTitles:[\"Paper\",\"Cardstock\"],defaultValue:\"paper\",displaySegmentedControl:true},strength:{type:ControlType.Number,title:\"Strength\",defaultValue:1,min:0,max:2,step:.05}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PaperTexture\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"1200\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PaperTexture.map"],"mappings":"A,iLAWG,SAAwBU,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,QAAQ,QAAM,QAAQ,WAAS,GAAGC,EAAYC,EAAIZ,EAAM,CAAC,CAAC,QAAQ,KAAK,EAAE,EAAQa,EAAQC,IAAO,QACpJC,EAAcC,IAAQ,YAAY,OAAO,WAAiBC,EAAQD,IAAQ,YAAY,EAAE,EACxFE,EAAML,EAAQ,GAAG,GAASM,EAAON,EAAQ,GAAG,IAAUO,GAAOF,EAAM,EAAA,CAAG,QAAQ,CAAC,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