{"version":3,"file":"LD_JSON_ScriptInjector.klua9iv-.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/mY039FmM8FIlYloNN4Xt/PkpvXOTGdCSJNrgs11RQ/LD_JSON_ScriptInjector.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function SchemaInjector({schemaString}){useEffect(()=>{// Do nothing if the string is empty.\nif(!schemaString){return;}// Validate that the string is actual JSON before injecting.\ntry{JSON.parse(schemaString);}catch(error){// If JSON.parse fails, the string is not valid JSON.\n// We log an error in the console and stop.\nconsole.error(\"Framer SchemaInjector: Invalid JSON string provided.\",error);return;}const script=document.createElement(\"script\");script.type=\"application/ld+json\";// If the JSON is valid, set the script's content.\nscript.textContent=schemaString;document.head.appendChild(script);},[schemaString])// The effect runs when the schemaString prop changes.\n;return /*#__PURE__*/_jsx(_Fragment,{});}addPropertyControls(SchemaInjector,{ld_type:{title:\"Schema JSON Type\",type:ControlType.String,displayTextArea:true,description:\"Mention JSON-LD schema type.\",defaultValue:\"\"},schemaString:{title:\"Schema JSON\",type:ControlType.String,displayTextArea:true,description:\"Paste your complete JSON-LD schema object here.\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SchemaInjector\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LD_JSON_ScriptInjector.map"],"mappings":"iLAAkJ,SAAwB,EAAe,CAAC,gBAAc,CAMvM,OANwM,MAAc,CACvN,GAAG,CAAC,EAAc,OAClB,GAAG,CAAC,KAAK,MAAM,CAAY,CAAE,OAAO,EAAM,CAE1C,QAAQ,MAAM,uDAAuD,CAAK,EAAE,MAAO,CAAC,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,KAAK,sBAC9I,EAAO,YAAY,EAAa,SAAS,KAAK,YAAY,CAAM,CAAE,EAAE,CAAC,CAAY,CAAC,EAC7D,EAAKA,EAAU,CAAC,CAAC,CAAE,iBANwB,IAA6B,IAAoD,EAMxG,EAAoB,EAAe,CAAC,QAAQ,CAAC,MAAM,mBAAmB,KAAK,EAAY,OAAO,gBAAgB,GAAK,YAAY,+BAA+B,aAAa,EAAE,EAAE,aAAa,CAAC,MAAM,cAAc,KAAK,EAAY,OAAO,gBAAgB,GAAK,YAAY,kDAAkD,aAAa,EAAE,CAAC,CAAC"}