{"version":3,"file":"ArticleSchema.DLOY0bO2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/FeoXFVS2NVbczIfiAL7b/W7tFjgwjSm31bjW437Pt/ArticleSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// Keeps a CMS value from closing the <script> tag early.\nfunction toSafeJson(value){return JSON.stringify(value).replace(/</g,\"\\\\u003c\");}/**\n * Article Schema\n *\n * Renders schema.org Article (or NewsArticle) JSON-LD plus its BreadcrumbList for a CMS\n * detail page. Invisible on the page. Author and publisher point at the site-wide\n * Organization, so search engines read one company, not two.\n *\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ArticleSchema(props){const{articleType=\"Article\",headline,description,slug,basePath,sectionName=\"Resources\",siteUrl,publisherName,image,datePublished,dateModified}=props;const origin=siteUrl.replace(/\\/+$/,\"\");const section=basePath.replace(/^\\/+|\\/+$/g,\"\");const sectionUrl=`${origin}/${section}`;const url=`${sectionUrl}/${slug}`;const organization={\"@type\":\"Organization\",\"@id\":`${origin}/#organization`,name:publisherName,url:origin};const article={\"@type\":articleType,headline,url,mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":url},isPartOf:{\"@id\":`${origin}/#website`},inLanguage:\"en\",author:organization,publisher:organization};if(description)article.description=description;if(image?.src)article.image=[image.src];if(datePublished)article.datePublished=datePublished;// Until a CMS \"Updated\" date is bound, the page has not changed since it was published.\nif(dateModified||datePublished)article.dateModified=dateModified||datePublished;const breadcrumb={\"@type\":\"BreadcrumbList\",itemListElement:[{\"@type\":\"ListItem\",position:1,name:\"Home\",item:`${origin}/`},{\"@type\":\"ListItem\",position:2,name:sectionName,item:sectionUrl},{\"@type\":\"ListItem\",position:3,name:headline,item:url}]};const schema={\"@context\":\"https://schema.org\",\"@graph\":[article,breadcrumb]};return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:1,height:1,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:toSafeJson(schema)}})});}addPropertyControls(ArticleSchema,{articleType:{type:ControlType.Enum,title:\"Type\",options:[\"Article\",\"NewsArticle\",\"BlogPosting\"],defaultValue:\"Article\"},headline:{type:ControlType.String,title:\"Headline\",defaultValue:\"Article title\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"Article description\",displayTextArea:true},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"article-slug\"},basePath:{type:ControlType.String,title:\"Base Path\",defaultValue:\"resources\"},sectionName:{type:ControlType.String,title:\"Section Name\",defaultValue:\"Resources\"},siteUrl:{type:ControlType.String,title:\"Site URL\",defaultValue:\"https://www.ttilabs.net\"},publisherName:{type:ControlType.String,title:\"Publisher\",defaultValue:\"Tti Testing Laboratories\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},datePublished:{type:ControlType.Date,title:\"Published\",optional:true},dateModified:{type:ControlType.Date,title:\"Updated\",optional:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleSchema\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"1\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArticleSchema.map"],"mappings":"6JACA,SAAS,EAAW,EAAM,CAAC,OAAO,KAAK,UAAU,CAAK,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAE,CAY7E,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,cAAY,UAAU,WAAS,cAAY,OAAK,WAAS,cAAY,YAAY,UAAQ,gBAAc,QAAM,gBAAc,gBAAc,EAAY,EAAO,EAAQ,QAAQ,OAAO,EAAE,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