{"version":3,"file":"StructuredData.CAdjT_Fp.mjs","names":[],"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\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"4JACA,SAAS,EAAU,EAAE,CAAC,IAAM,EAAE,EAAE,KAAK,EAAE,GAAG,q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