{"version":3,"file":"JSON_LD_Schema.DqQWdd1P.mjs","names":["__esmMin","init_jsx_runtime","c","addPropertyControls","RenderTarget","ControlType","init_framer_Bf4_tcb2","toJsonLd","raw","input","data","type","count","JsonLdSchema","props","json","ok","summary","html","init_JSON_LD_Schema"],"sources":["https:/framerusercontent.com/modules/Sw0Diks9rVQN68mFtDuv/OOB4VYMKn4OzW8pGCQDi/JSON_LD_Schema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// Accepts raw JSON or a full <script type=\"application/ld+json\"> block\nfunction toJsonLd(input){const raw=(input??\"\").replace(/<script[^>]*>/gi,\"\").replace(/<\\/script>/gi,\"\").trim();if(!raw)return{ok:false,html:\"\",summary:\"Empty\"};try{const data=JSON.parse(raw);const type=Array.isArray(data)?\"Array\":data[\"@type\"]??\"Unknown\";const count=Array.isArray(data?.mainEntity)?` \\xb7 ${data.mainEntity.length} items`:\"\";// Escape \"<\" so content can never close the script tag early\nconst html=JSON.stringify(data).replace(/</g,\"\\\\u003c\");return{ok:true,html,summary:`${type}${count}`};}catch(error){return{ok:false,html:\"\",summary:\"Invalid JSON\"};}}/**\n * Outputs JSON-LD structured data into the page HTML.\n * Invisible on the published site; shows a small label on the canvas.\n *\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 24\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function JsonLdSchema(props){const{json=\"\"}=props;const{ok,html,summary}=toJsonLd(json);const isCanvas=RenderTarget.current()===RenderTarget.canvas;if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",minWidth:\"max-content\",padding:\"4px 8px\",borderRadius:6,fontSize:11,fontFamily:\"monospace\",color:ok?\"#0B6B3A\":\"#A61B1B\",background:ok?\"#E3F6EA\":\"#FBE4E4\"},children:`JSON-LD: ${summary}`});}if(!ok)return null;return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:html}});}addPropertyControls(JsonLdSchema,{json:{type:ControlType.String,title:\"JSON-LD\",displayTextArea:true,defaultValue:\"\",placeholder:'{\"@context\":\"https://schema.org\", ...}'}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"JsonLdSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"160\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./JSON_LD_Schema.map"],"mappings":"A,qKACA,SAASO,EAAS,EAAM,CAAC,IAAMC,GAAKC,GAAO,GAAA,CAAI,QAAQ,kBAAkB,EAAE,CAAC,CAAC,QAAQ,eAAe,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,CAACD,EAAI,MAAM,CAAC,GAAG,GAAM,KAAK,GAAG,QAAQ,OAAO,EAAE,GAAG,CAAC,IAAME,EAAK,KAAK,MAAMF,CAAG,EAAQG,EAAK,MAAM,QAAQD,CAAI,EAAE,QAAQA,EAAK,UAAU,UAAgBE,EAAM,MAAM,QAAQF,GAAM,UAAU,EAAE,SAASA,EAAK,WAAW,OAAO,QAAQ,GAC3R,MAAM,CAAC,GAAG,GAAK,KAA5D,KAAK,UAAUA,CAAI,CAAC,CAAC,QAAQ,KAAK,SAA6B,EAAE,QAAQ,GAAGC,IAAOC,GAAO,CAAE,MAAa,CAAC,MAAM,CAAC,GAAG,GAAM,KAAK,GAAG,QAAQ,cAAc,CAAE,CAAC,CASnK,SAAwBC,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,IAAIC,EAAW,CAAC,KAAG,OAAK,WAASP,EAASQ,CAAI,EAAsV,OAArUX,EAAa,QAAQ,IAAIA,EAAa,OAAwC,gBAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,SAAS,cAAc,QA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