{"version":3,"file":"Article_Schema.CDyrQpNH.mjs","names":["useMemo","__esmMin","init_npm_react_18_3_1","pe","init_jsx_runtime","c","init_framer_Duogf4LG","addPropertyControls","Article_Schema","props","jsonLdString","toIsoIfPossible","value","date","resolvedPublishedDate","publishedDate","resolvedModifiedDate","modifiedDate","resolvedImageUrl","imageUrl","normalizedSiteUrl","siteUrl","normalizedSlug","slug","resolvedCanonicalUrl","canonicalUrl","normalizedCategory","category","resolvedSchemaType","schemaType","data","title","description","keywords","authorName","publisherName","publisherLogoUrl","publisher","init_Article_Schema","ControlType"],"sources":["https:/framerusercontent.com/modules/NKWLWEurqzkckgy36Z6W/XD5PTf0dyKte8AiqELjY/Article_Schema.js"],"sourcesContent":["// User request: Update this file in place so publishedDate/modifiedDate use Framer Date controls, imageUrl uses a Framer image control for CMS binding, and JSON-LD emits ISO-compatible dates while keeping all existing behavior.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Article_Schema(props){const{category,schemaType,title,description,publishedDate,modifiedDate,imageUrl,authorName,publisherName,publisherLogoUrl,siteUrl,slug,canonicalUrl,keywords}=props;const jsonLdString=useMemo(()=>{const toIsoIfPossible=value=>{if(!value)return\"\";const date=new Date(value);return Number.isNaN(date.getTime())?value:date.toISOString();};const resolvedPublishedDate=toIsoIfPossible(publishedDate);const resolvedModifiedDate=toIsoIfPossible(modifiedDate);const resolvedImageUrl=typeof imageUrl===\"string\"?imageUrl:imageUrl?.src??\"\";const normalizedSiteUrl=siteUrl.trim().replace(/\\/+$/,\"\");const normalizedSlug=slug.trim().replace(/^\\/+|\\/+$/g,\"\");const resolvedCanonicalUrl=canonicalUrl.trim()||(normalizedSiteUrl&&normalizedSlug?`${normalizedSiteUrl}/blog/${normalizedSlug}`:\"\");const normalizedCategory=category.trim().toLowerCase();const resolvedSchemaType=normalizedCategory===\"news\"?\"NewsArticle\":normalizedCategory===\"case studies\"||normalizedCategory===\"case study\"?\"CreativeWork\":schemaType;const data={\"@context\":\"https://schema.org\",\"@type\":resolvedSchemaType};if(title){if(resolvedSchemaType===\"CreativeWork\"){data.name=title;}else{data.headline=title;}}if(description)data.description=description;if(resolvedPublishedDate)data.datePublished=resolvedPublishedDate;if(resolvedModifiedDate)data.dateModified=resolvedModifiedDate;if(resolvedImageUrl)data.image=resolvedImageUrl;if(resolvedCanonicalUrl){data.url=resolvedCanonicalUrl;data.mainEntityOfPage={\"@type\":\"WebPage\",\"@id\":resolvedCanonicalUrl};}if(keywords)data.keywords=keywords;if(authorName){data.author={\"@type\":\"Person\",name:authorName};}if(publisherName||publisherLogoUrl){const publisher={\"@type\":\"Organization\"};if(publisherName)publisher.name=publisherName;if(publisherLogoUrl){publisher.logo={\"@type\":\"ImageObject\",url:publisherLogoUrl};}data.publisher=publisher;}return JSON.stringify(data);},[authorName,category,canonicalUrl,description,imageUrl,keywords,modifiedDate,publishedDate,publisherLogoUrl,publisherName,siteUrl,schemaType,slug,title]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:jsonLdString}})});}addPropertyControls(Article_Schema,{category:{type:ControlType.String,title:\"Category\",defaultValue:\"\",placeholder:\"Bind to CMS category (News / Case Studies)\"},schemaType:{type:ControlType.Enum,title:\"Schema Type\",options:[\"NewsArticle\",\"Article\",\"CreativeWork\"],optionTitles:[\"NewsArticle\",\"Article\",\"CreativeWork\"],defaultValue:\"NewsArticle\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\",placeholder:\"Bind to CMS title\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",placeholder:\"Bind to CMS description\",displayTextArea:true},publishedDate:{type:ControlType.Date,title:\"Published Date\",defaultValue:\"\",displayTime:true},modifiedDate:{type:ControlType.Date,title:\"Modified Date\",defaultValue:\"\",displayTime:true},imageUrl:{type:ControlType.ResponsiveImage,title:\"Image URL\"},authorName:{type:ControlType.String,title:\"Author Name\",defaultValue:\"\",placeholder:\"Bind to CMS author name\"},publisherName:{type:ControlType.String,title:\"Publisher Name\",defaultValue:\"\",placeholder:\"Bind to CMS publisher name\"},publisherLogoUrl:{type:ControlType.String,title:\"Publisher Logo URL\",defaultValue:\"\",placeholder:\"Bind to CMS publisher logo URL\"},siteUrl:{type:ControlType.String,title:\"Site URL\",defaultValue:\"https://hausing.co\",placeholder:\"https://hausing.co\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\",placeholder:\"Bind to CMS slug\"},canonicalUrl:{type:ControlType.String,title:\"Canonical URL\",defaultValue:\"\",placeholder:\"Bind to CMS canonical URL\"},keywords:{type:ControlType.String,title:\"Keywords\",defaultValue:\"\",placeholder:\"Optional: comma-separated keywords\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Article_Schema\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Article_Schema.map"],"mappings":"A,qKAIG,SAAwBQ,EAAe,EAAM,CAAC,GAAK,CAAC,WAAS,aAAW,QAAM,cAAY,gBAAc,eAAa,WAAS,aAAW,gBAAc,mBAAiB,UAAQ,OAAK,eAAa,YAAUC,EAAYC,EAAaV,MAAY,CAAC,IAAMW,EAAgB,GAAO,CAAC,GAAG,CAACC,EAAM,MAAM,GAAG,IAAMC,EAAK,IAAI,KAAKD,CAAK,EAAE,OAAO,OAAO,MAAMC,EAAK,QAAQ,CAAC,EAAED,EAAMC,EAAK,YAAY,CAAE,EAAQC,EAAsBH,EAAgBI,CAAa,EAAQC,EAAqBL,EAAgBM,CAAY,EAAQC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