{"version":3,"file":"StructuredData.B1bC0POG.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/8pb5UmB3fd9ZqCbhZysZ/8hjZ5RVhgWTb9yDvHlrA/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";function normalizePathSegment(value){return value.trim().replace(/^\\/+|\\/+$/g,\"\");}function buildCanonicalUrl(canonicalUrl,pathPrefix,slug){const providedCanonical=canonicalUrl.trim();if(providedCanonical)return providedCanonical;const baseUrl=\"https://tower33.com\";const segments=[normalizePathSegment(pathPrefix),normalizePathSegment(slug)].filter(Boolean);if(segments.length===0)return baseUrl;return`${baseUrl}/${segments.join(\"/\")}`;}function normalizePublishedDate(value){const trimmed=value.trim();if(!trimmed)return undefined;const parsed=new Date(trimmed);if(Number.isNaN(parsed.getTime()))return undefined;return parsed.toISOString();}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType,title,description,canonicalUrl,pathPrefix,slug,imageUrl,image={src:\"https://framerusercontent.com/images/DTte2zk99fdqZA5iMWzdPY2bhY.png?width=692&height=107&kb=8\",alt:\"Tower33 image\"},publishedDate,logo={src:\"https://framerusercontent.com/images/DTte2zk99fdqZA5iMWzdPY2bhY.png?width=692&height=107&kb=8\",alt:\"Tower33 logo\"},email,socialProfiles}=props;const sanitizedProfiles=useMemo(()=>{return(socialProfiles||[]).filter(value=>Boolean(value&&value.trim()));},[socialProfiles]);const resolvedCanonicalUrl=useMemo(()=>{return buildCanonicalUrl(canonicalUrl,pathPrefix,slug);},[canonicalUrl,pathPrefix,slug]);const normalizedPublishedDate=useMemo(()=>{return normalizePublishedDate(publishedDate);},[publishedDate]);const resolvedArticleImage=useMemo(()=>{const trimmedImageUrl=imageUrl.trim();if(trimmedImageUrl)return trimmedImageUrl;return image?.src||undefined;},[image?.src,imageUrl]);const structuredData=useMemo(()=>{const publisher={\"@type\":\"Organization\",name:\"Tower33\",url:\"https://tower33.com\",logo:logo?.src?{\"@type\":\"ImageObject\",url:logo.src}:undefined,email:email||undefined,sameAs:sanitizedProfiles.length>0?sanitizedProfiles:undefined};if(schemaType===\"Organization\"||schemaType===\"ProfessionalService\"){return{\"@context\":\"https://schema.org\",\"@type\":schemaType,name:title,description,url:resolvedCanonicalUrl,logo:logo?.src||undefined,image:image?.src||undefined,email:email||undefined,sameAs:sanitizedProfiles.length>0?sanitizedProfiles:undefined};}if(schemaType===\"WebSite\"){return{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",name:title,description,url:resolvedCanonicalUrl,image:image?.src||undefined};}if(schemaType===\"Article\"){return{\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",headline:title,description,mainEntityOfPage:resolvedCanonicalUrl,url:resolvedCanonicalUrl,datePublished:normalizedPublishedDate,image:resolvedArticleImage,publisher};}return{\"@context\":\"https://schema.org\",\"@type\":\"Article\",additionalType:\"https://schema.org/CaseStudy\",headline:title,description,mainEntityOfPage:resolvedCanonicalUrl,url:resolvedCanonicalUrl,datePublished:normalizedPublishedDate,image:resolvedArticleImage,about:\"Marketing Case Study\",publisher};},[description,email,image?.src,imageUrl,logo?.src,normalizedPublishedDate,resolvedArticleImage,resolvedCanonicalUrl,sanitizedProfiles,schemaType,title]);const jsonLd=useMemo(()=>JSON.stringify(structuredData),[structuredData]);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:jsonLd}})});}addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Schema\",options:[\"Organization\",\"WebSite\",\"ProfessionalService\",\"Article\",\"CaseStudy\"],optionTitles:[\"Organization\",\"WebSite\",\"Professional Service\",\"Article\",\"Case Study\"],defaultValue:\"Organization\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Tower33\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"Tower33 digital marketing and web services.\",displayTextArea:true},canonicalUrl:{type:ControlType.String,title:\"Canonical URL\",defaultValue:\"\"},pathPrefix:{type:ControlType.String,title:\"Path Prefix\",defaultValue:\"\",placeholder:\"blog or case-studies\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\",placeholder:\"my-article-slug\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},imageUrl:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\",placeholder:\"https://example.com/image.jpg\"},publishedDate:{type:ControlType.String,title:\"Published Date\",defaultValue:\"\",placeholder:\"2024-01-01 or Jan 1, 2024\"},logo:{type:ControlType.ResponsiveImage,title:\"Logo\"},email:{type:ControlType.String,title:\"Email\",defaultValue:\"info@tower33.com\"},socialProfiles:{type:ControlType.Array,title:\"Social Profiles\",control:{type:ControlType.String,placeholder:\"https://\"},defaultValue:[\"https://www.linkedin.com/company/tower33-digital-inc-\",\"https://www.facebook.com/tower33.digital\",\"https://www.instagram.com/tower33digital/\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"0KAA0H,SAAS,EAAqB,EAAM,CAAC,OAAO,EAAM,KAAK,CAAC,CAAC,QAAQ,aAAa,EAAE,CAAE,CAAC,SAAS,EAAkB,EAAa,EAAW,EAAK,CAAC,IAAM,EAAkB,EAAa,KAAK,EAAE,GAAG,EAAkB,OAAO,EAAkB,IAAM,EAAQ,sBAA4B,EAAS,CAAC,EAAqB,CAAU,EAAE,EAAqB,CAAI,CAAC,CAAC,CAAC,OAAO,OAAO,EAAwC,OAAnC,EAAS,SAAS,EA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