{"version":3,"file":"StructuredData.Dq-_ug6t.mjs","names":["__esmMin","init_jsx_runtime","c","addPropertyControls","init_framer_BEr93sCn","ControlType","toIsoDate","s","m","MONTHS","StructuredData","props","payload","json","headline","doc","type","publisherName","publisherUrl","LOGO","description","image","iso","datePublished","url","init_StructuredData"],"sources":["https:/framerusercontent.com/modules/8uZcUgFU2HXVGYdAQBIk/Y8m1nhXydrGBinw9K6bG/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const LOGO=\"https://framerusercontent.com/images/MiGrazyK55sONXrsgNp8bIfWSVs.png\";const MONTHS={jan:\"01\",feb:\"02\",mar:\"03\",apr:\"04\",may:\"05\",jun:\"06\",jul:\"07\",aug:\"08\",sep:\"09\",oct:\"10\",nov:\"11\",dec:\"12\"};// CMS DateLabel is \"26 Aug 2025\"; schema.org wants ISO 8601 (\"2025-08-26\").\nfunction toIsoDate(s){const t=s.trim();if(/^\\d{4}-\\d{2}-\\d{2}/.test(t))return t.slice(0,10);const m=t.match(/^(\\d{1,2})\\s+([A-Za-z]{3})[A-Za-z]*\\.?\\s+(\\d{4})$/);if(m&&MONTHS[m[2].toLowerCase()])return`${m[3]}-${MONTHS[m[2].toLowerCase()]}-${m[1].padStart(2,\"0\")}`;return\"\";}/**\n * Emits a <script type=\"application/ld+json\"> block.\n *\n * Framer exposes per-page <head> custom code only in the editor, not through\n * the agent API. Google and Bing read JSON-LD anywhere in the document, so a\n * body-level script is a valid, agent-applicable route.\n *\n * Two modes:\n *  - `json`: a complete JSON-LD document (static pages).\n *  - field mode: when `json` is empty, an Article/BlogPosting object is built\n *    from the individual props, each of which can be bound to a CMS field on a\n *    detail page (a var() only substitutes when it is the WHOLE control value).\n *\n * Renders nothing visible and validates before emitting — a typo can never\n * ship broken markup.\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerDisableUnlink\n */export default function StructuredData(props){const{json=\"\",type=\"Article\",headline=\"\",description=\"\",image=\"\",datePublished=\"\",url=\"\",publisherName=\"TrollWall AI\",publisherUrl=\"https://trollwall.ai/\"}=props;let payload=\"\";try{if(json.trim()){payload=JSON.stringify(JSON.parse(json));}else if(headline){const doc={\"@context\":\"https://schema.org\",\"@type\":type||\"Article\",headline,author:{\"@type\":\"Organization\",name:publisherName,url:publisherUrl},publisher:{\"@type\":\"Organization\",name:publisherName,url:publisherUrl,logo:{\"@type\":\"ImageObject\",url:LOGO}},inLanguage:\"en\"};if(description)doc.description=description;if(image)doc.image=[image];const iso=datePublished?toIsoDate(datePublished):\"\";if(iso)doc.datePublished=iso;if(url){// CMS pages can only hand over the slug; build the canonical URL\ndoc.mainEntityOfPage=/^https?:/.test(url)?url:`https://trollwall.ai/article/${url}`;doc.url=doc.mainEntityOfPage;}payload=JSON.stringify(doc);}else{return null;}}catch{return null;}return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:payload.replace(/</g,\"\\\\u003c\")}});}addPropertyControls(StructuredData,{json:{type:ControlType.String,title:\"JSON-LD\",displayTextArea:true,defaultValue:\"\"},type:{type:ControlType.String,title:\"Type\",defaultValue:\"Article\"},headline:{type:ControlType.String,title:\"Headline\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\"},image:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\"},datePublished:{type:ControlType.String,title:\"Published\",defaultValue:\"\"},url:{type:ControlType.String,title:\"URL\",defaultValue:\"\"},publisherName:{type:ControlType.String,title:\"Publisher\",defaultValue:\"TrollWall AI\"},publisherUrl:{type:ControlType.String,title:\"Publisher URL\",defaultValue:\"https://trollwall.ai/\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerDisableUnlink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