{"version":3,"file":"ArticleSchema.B-aBeW76.mjs","names":["__esmMin","c","init_jsx_runtime","addPropertyControls","init_framer_BL9pqxmF","ControlType","toIso","value","date","ArticleSchema","props","imageUrl","image","published","datePublished","modified","dateModified","authorName","author","data","type","headline","json","style","init_ArticleSchema"],"sources":["https:/framerusercontent.com/modules/8fTjkZrJ2E1h6KdGysZl/zy5F2Z6OQEcwCmpVTF1u/ArticleSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";function toIso(value){if(!value)return undefined;const date=new Date(value);return isNaN(date.getTime())?undefined:date.toISOString();}/**\n * Outputs schema.org Article JSON-LD for a CMS detail page.\n * Renders nothing visible; bind each control to a CMS field.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ArticleSchema(props){const{type,headline,image,datePublished,dateModified,author,style}=props;const imageUrl=typeof image===\"string\"?image:image?.src;const published=toIso(datePublished);const modified=toIso(dateModified)??published;const authorName=author?.trim();const data={\"@context\":\"https://schema.org\",\"@type\":type,headline:headline?.trim()||undefined,image:imageUrl?[imageUrl]:undefined,datePublished:published,dateModified:modified,author:authorName?{\"@type\":/morning consult/i.test(authorName)?\"Organization\":\"Person\",name:authorName}:undefined};// Escape \"<\" so field content can never close the script tag early\nconst json=JSON.stringify(data).replace(/</g,\"\\\\u003c\");return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{...style,display:\"none\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json}})});}ArticleSchema.defaultProps={type:\"Article\",headline:\"\"};addPropertyControls(ArticleSchema,{type:{type:ControlType.Enum,title:\"Type\",options:[\"Article\",\"NewsArticle\",\"BlogPosting\"],defaultValue:\"Article\"},headline:{type:ControlType.String,title:\"Headline\",defaultValue:\"\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},datePublished:{type:ControlType.Date,title:\"Published\"},dateModified:{type:ControlType.Date,title:\"Modified\"},author:{type:ControlType.String,title:\"Author\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleSchema\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArticleSchema.map"],"mappings":"A,4JAA+F,SAASM,EAAM,EAAM,CAAC,GAAG,CAACC,EAAM,OAAiB,IAAMC,EAAK,IAAI,KAAKD,CAAK,EAAE,OAAO,MAAMC,EAAK,QAAQ,CAAC,EAAE,IAAA,GAAUA,EAAK,YAAY,CAAE,CAMlO,SAAwBC,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,WAAS,QAAM,gBAAc,eAAa,SAAO,SAAOC,EAAYC,EAAS,OAAOC,GAAQ,SAASA,EAAMA,GAAO,IAAUC,EAAUP,EAAMQ,CAAa,EAAQC,EAAST,EAAMU,CAAY,GAAGH,EAAgBI,EAAWC,GAAQ,KAAK,EAAQC,EAAK,CAAC,WAAW,qBAAqB,QAAQC,EAAK,SAASC,GAAU,KAAK,GAAG,IAAA,GAAU,MAAMV,EAAS,CAACA,CAAQ,EAAE,IAAA,GAAU,cAAcE,EAAU,aAAaE,EAAS,OAAOE,EAAW,CAAC,QAAQ,mBAAmB,KAAKA,CAAU,EAAE,eAAe,SAAS,KAAKA,CAAU,EAAE,IAAA,EAAS,EAC/jBK,EAAK,KAAK,UAAUH,CAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,EAAE,MAAoB,gBAAK,MAAM,CAAC,cAAc,GAAK,MAAM,CAAC,GAAGI,EAAM,QAAQ,MAAM,EAAE,SAAsB,gBAAK,SAAS,CAAC,KAAK,sBAAsB,wBAAwB,CAAC,OAAOD,CAAI,CAAC,CAAC,CAAC,CAAC,CAAE,C,sCAAC,EAAc,aAAa,CAAC,KAAK,UA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