{"version":3,"file":"ArticleSchema.DXVmqbVl.mjs","names":["__esmMin","c","init_jsx_runtime","addPropertyControls","init_framer_BisrWwwE","ControlType","toIso","value","date","ArticleSchema","props","imageUrl","image","published","datePublished","modified","dateModified","authorName","author","data","type","headline","PUBLISHER","json","style","init_ArticleSchema"],"sources":["https:/framerusercontent.com/modules/8fTjkZrJ2E1h6KdGysZl/1C6WfQNxk38i9EMlROXC/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();}// Same entity as the homepage Organization JSON-LD (custom code snippet ejbmeyATB)\nconst PUBLISHER={\"@type\":\"Organization\",\"@id\":\"https://morningconsult.com/#organization\",name:\"Morning Consult\",url:\"https://morningconsult.com/\",logo:{\"@type\":\"ImageObject\",url:\"https://framerusercontent.com/images/0kJoQzqubVjVKtpeMMspqbyafI.png\",width:512,height:512}};/**\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,publisher:PUBLISHER};// 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\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"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,CAOlO,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,GAAU,UAAUK,CAAS,EACnlBC,EAAK,KAAK,UAAUJ,CAAI,C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