{"version":3,"file":"HtmlInjector.CEZgn7p1.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/uJ6MoqSaJoTtuTootMQc/dfWliXUAPy8kkT1hALce/HtmlInjector.js"],"sourcesContent":["// HTML Injector component that renders custom HTML content\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function HtmlInjector(props){const{htmlContent=\"<p>Paste your HTML content here</p>\",allowScripts=false,sanitize=true}=props;const processedHTML=useMemo(()=>{let html=htmlContent;if(sanitize&&!allowScripts){// Remove script tags and event handlers for security\nhtml=html.replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\"\");html=html.replace(/\\son\\w+=\"[^\"]*\"/gi,\"\");html=html.replace(/\\son\\w+='[^']*'/gi,\"\");html=html.replace(/javascript:/gi,\"\");}return html;},[htmlContent,allowScripts,sanitize]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",overflow:\"auto\",position:\"relative\"},dangerouslySetInnerHTML:{__html:processedHTML}});}addPropertyControls(HtmlInjector,{htmlContent:{type:ControlType.String,title:\"HTML Content\",defaultValue:\"<p>Paste your HTML content here</p>\",displayTextArea:true,placeholder:\"Enter your HTML code...\"},allowScripts:{type:ControlType.Boolean,title:\"Allow Scripts\",defaultValue:false,enabledTitle:\"Enabled\",disabledTitle:\"Disabled\"},sanitize:{type:ControlType.Boolean,title:\"Sanitize HTML\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HtmlInjector\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HtmlInjector.map"],"mappings":"kQAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,cAAY,sCAAsC,eAAa,GAAM,WAAS,IAAM,EAAY,EAAcA,MAAY,CAAC,IAAI,EAAK,EACc,OADC,GAAU,CAAC,IACnN,EAAK,EAAK,QAAQ,sDAAsD,GAAG,CAAC,EAAK,EAAK,QAAQ,oBAAoB,GAAG,CAAC,EAAK,EAAK,QAAQ,oBAAoB,GAAG,CAAC,EAAK,EAAK,QAAQ,gBAAgB,GAAG,EAAS,GAAO,CAAC,EAAY,EAAa,EAAS,CAAC,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,OAAO,SAAS,WAAW,CAAC,wBAAwB,CAAC,OAAO,EAAc,CAAC,CAAC,kBAJtW,IAAoD,IAA2B,CAIyR,EAAoB,EAAa,CAAC,YAAY,CAAC,KAAK,EAAY,OAAO,MAAM,eAAe,aAAa,sCAAsC,gBAAgB,GAAK,YAAY,0BAA0B,CAAC,aAAa,CAAC,KAAK,EAAY,QAAQ,MAAM,gBAAgB,aAAa,GAAM,aAAa,UAAU,cAAc,WAAW,CAAC,SAAS,CAAC,KAAK,EAAY,QAAQ,MAAM,gBAAgB,aAAa,GAAK,aAAa,KAAK,cAAc,MAAM,CAAC,CAAC"}