{"version":3,"file":"JsonLdScript.82mcoWDX.mjs","names":["__esmMin","init_jsx_runtime","c","init_framer_D1IzEvwH","addPropertyControls","ControlType","extractJson","code","OPEN_TAG","CLOSE_TAG","JsonLdScript","props","json","init_JsonLdScript"],"sources":["https:/framerusercontent.com/modules/AWZjpg6bfzbZgSvl3Yu4/mE5mwRTwzjSwDMDK1Ok7/JsonLdScript.js"],"sourcesContent":["// JsonLdScript: renders a CMS field value that contains a\n// <script type=\"application/ld+json\">...</script> wrapper as a real\n// top-level JSON-LD script tag (not an iframe srcdoc Embed).\n// One string prop, `code`. Strips the wrapper; returns null when empty.\n// SSR-safe: no effects, no window, renders synchronously.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const OPEN_TAG=/^\\s*<script\\b[^>]*>/i;const CLOSE_TAG=/<\\/script>\\s*$/i;function extractJson(code){if(typeof code!==\"string\")return\"\";const inner=code.replace(OPEN_TAG,\"\").replace(CLOSE_TAG,\"\").trim();// Guard against a premature close tag inside the JSON. \"<\\/\" is valid JSON.\nreturn inner.replace(/<\\//g,\"<\\\\/\");}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function JsonLdScript(props){const{code=\"\"}=props;const json=extractJson(code);if(!json)return null;return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json}});}addPropertyControls(JsonLdScript,{code:{type:ControlType.String,title:\"Code\",defaultValue:\"\",placeholder:'<script type=\"application/ld+json\">{...}</script>',displayTextArea:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"JsonLdScript\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./JsonLdScript.map"],"mappings":"A,4JAKuK,SAASM,EAAY,EAAK,CACjM,OADqM,OAAOC,GAAO,SAA8BA,EAAK,QAAQC,EAAS,EAAE,CAAC,CAAC,QAAQC,EAAU,EAAE,CAAC,CAAC,KACtR,CAAC,CAAC,QAAQ,OAAO,MAAM,EADgM,EAC9L,CAGjC,SAAwBC,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,IAAIC,EAAYC,EAAKN,EAAYC,CAAI,EAAuB,OAAjBK,EAAqC,gBAAK,SAAS,CAAC,KAAK,sBAAsB,wBAAwB,CAAC,OAAOA,CAAI,CAAC,CAAC,EAAzG,IAA2G,C,8CAJvH,EAAS,uBAA6B,EAAU,kBAIwER,EAAoBM,EAAa,CAAC,KAAK,CAAC,KAAKL,EAAY,OAAO,MAAM,OAAO,aAAa,GAAG,YAAY,qDAAoD,gBAAgB,EAAI,CAAC,CAAC,C"}