{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/hyhmQlk8nyW7c0eaYNPt/bxbxZ5Qx5WQQD4AjVbRd/SVG.js"],
  "sourcesContent": ["// SVG Component with editable SVG code, color, and fit/fill options\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * SvgViewer\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function SvgViewer(props){const{svgCode,color,objectFit,style,widthFill,heightFill,lockProportion}=props;// Replace fill colors and remove opacity-related attributes\nconst processedSVG=useMemo(()=>{if(!svgCode)return\"\";let replaced=svgCode.replace(/fill=[\"'][^\"']*[\"']/gi,`fill=\"${color}\"`).replace(/fill-opacity=[\"'][^\"']*[\"']/gi,\"\").replace(/opacity=[\"'][^\"']*[\"']/gi,\"\").replace(/style=[\"'][^\"']*(fill|opacity)[^\"']*[\"']/gi,\"\");// Optional: force all fills to override via style injection\n// const styleBlock = `<style>* { fill: ${color} !important; opacity: 1 !important; }</style>`\n// replaced = replaced.replace(/<svg(.*?)>/, `<svg$1>${styleBlock}`)\nif(!/fill=/.test(replaced)){replaced=replaced.replace(/<svg(.*?)>/,`<svg$1 fill=\"${color}\">`);}return replaced;},[svgCode,color]);// Determine width, height, and aspect ratio\nlet svgWidth=widthFill?\"100%\":undefined;let svgHeight=heightFill?\"100%\":undefined;let preserveAspectRatio=\"xMidYMid meet\";if(objectFit===\"fill\"||widthFill&&heightFill&&!lockProportion){preserveAspectRatio=\"none\";}else if(lockProportion){preserveAspectRatio=\"xMidYMid meet\";}// Final SVG injection\nconst finalSVG=useMemo(()=>{if(!processedSVG)return\"\";let svg=processedSVG;svg=svg.replace(/(width|height)=[\"'][^\"']*[\"']/g,\"\");svg=svg.replace(/preserveAspectRatio=[\"'][^\"']*[\"']/g,\"\");let attrs=\"\";if(svgWidth)attrs+=` width=\"${svgWidth}\"`;if(svgHeight)attrs+=` height=\"${svgHeight}\"`;attrs+=` preserveAspectRatio=\"${preserveAspectRatio}\"`;svg=svg.replace(/<svg([^>]*)>/,`<svg$1${attrs}>`);return svg;},[processedSVG,svgWidth,svgHeight,preserveAspectRatio]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\",...style},children:/*#__PURE__*/_jsx(\"span\",{style:{width:\"100%\",height:\"100%\",display:\"inline-block\"},dangerouslySetInnerHTML:{__html:finalSVG}})});}// Framer controls\naddPropertyControls(SvgViewer,{svgCode:{type:ControlType.String,title:\"SVG Code\",defaultValue:'<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#0099FF\"/></svg>',displayTextArea:true,placeholder:\"Paste SVG code here...\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#0099FF\"},widthFill:{type:ControlType.Boolean,title:\"Width Fill\",defaultValue:true,enabledTitle:\"Fill\",disabledTitle:\"Auto\"},heightFill:{type:ControlType.Boolean,title:\"Height Fill\",defaultValue:true,enabledTitle:\"Fill\",disabledTitle:\"Auto\"},lockProportion:{type:ControlType.Boolean,title:\"Lock Proportion\",defaultValue:true,enabledTitle:\"Lock\",disabledTitle:\"Free\"},objectFit:{type:ControlType.Enum,title:\"Object Fit\",options:[\"fill\",\"contain\"],optionTitles:[\"Fill\",\"Fit\"],defaultValue:\"contain\",displaySegmentedControl:true,hidden:props=>props.widthFill||props.heightFill}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SvgViewer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SVG.map"],
  "mappings": "gEAMkB,SAAR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Q,cAAc,EAAE,wBAAwB,CAAC,OAAOH,CAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,CAC/uBI,EAAoBnB,EAAU,CAAC,QAAQ,CAAC,KAAKoB,EAAY,OAAO,MAAM,WAAW,aAAa,sHAAsH,gBAAgB,GAAK,YAAY,wBAAwB,EAAE,MAAM,CAAC,KAAKA,EAAY,MAAM,MAAM,QAAQ,aAAa,SAAS,EAAE,UAAU,CAAC,KAAKA,EAAY,QAAQ,MAAM,aAAa,aAAa,GAAK,aAAa,OAAO,cAAc,MAAM,EAAE,WAAW,CAAC,KAAKA,EAAY,QAAQ,MAAM,cAAc,aAAa,GAAK,aAAa,OAAO,cAAc,MAAM,EAAE,eAAe,CAAC,KAAKA,EAAY,QAAQ,MAAM,kBAAkB,aAAa,GAAK,aAAa,OAAO,cAAc,MAAM,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK,MAAM,aAAa,QAAQ,CAAC,OAAO,SAAS,EAAE,aAAa,CAAC,OAAO,KAAK,EAAE,aAAa,UAAU,wBAAwB,GAAK,OAAOnB,GAAOA,EAAM,WAAWA,EAAM,UAAU,CAAC,CAAC",
  "names": ["SvgViewer", "props", "svgCode", "color", "objectFit", "style", "widthFill", "heightFill", "lockProportion", "processedSVG", "se", "replaced", "svgWidth", "svgHeight", "preserveAspectRatio", "finalSVG", "svg", "attrs", "p", "addPropertyControls", "ControlType"]
}
