{"version":3,"file":"StructuredData.I6_t7v82.mjs","names":["useEffect","_jsx","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","window","c","init_jsx_runtime","ce","addPropertyControls","init_framer_DzFZHHXo","StructuredData","props","schemaType","headline","description","image","author","publisherName","datePublished","videoUrl","imageUrl","canonicalUrl","markerId","toIsoDate","value","parsed","json","cleaned","MARKER_ATTR","el","script","init_StructuredData","ControlType"],"sources":["https:/framerusercontent.com/modules/WWVtzJ0V8o95GUqyXZu3/orw2BYbLjmmEbHaV6nDP/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const MARKER_ATTR=\"data-structured-data-id\";/**\n * Injects a JSON-LD <script> tag into document.head for SEO structured data\n * (schema.org). Invisible on the page; read by search engines only.\n *\n * Uses imperative DOM injection (document.createElement + appendChild)\n * rather than rendering a <script> as JSX, because Framer's canvas/runtime\n * strips <script> elements rendered directly by code components.\n *\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType=\"Article\",headline=\"\",description=\"\",image,author=\"\",publisherName=\"LightSource\",datePublished,videoUrl=\"\"}=props;const imageUrl=image?.src??\"\";useEffect(()=>{if(typeof document===\"undefined\")return;const canonicalUrl=window.location.href;const markerId=`sd-${schemaType}-${window.location.pathname}`;const toIsoDate=value=>{if(!value)return undefined;const parsed=new Date(value);return Number.isNaN(parsed.getTime())?value:parsed.toISOString();};let json;if(schemaType===\"VideoObject\"){json={\"@context\":\"https://schema.org\",\"@type\":\"VideoObject\",name:headline,description,thumbnailUrl:imageUrl?[imageUrl]:undefined,uploadDate:toIsoDate(datePublished),contentUrl:videoUrl||undefined,embedUrl:videoUrl||undefined};}else if(schemaType===\"DefinedTerm\"){json={\"@context\":\"https://schema.org\",\"@type\":\"DefinedTerm\",name:headline,description,url:canonicalUrl||undefined,inDefinedTermSet:publisherName};}else{json={\"@context\":\"https://schema.org\",\"@type\":schemaType,headline,description,image:imageUrl||undefined,author:author?{\"@type\":\"Person\",name:author}:undefined,publisher:{\"@type\":\"Organization\",name:publisherName},datePublished:toIsoDate(datePublished),mainEntityOfPage:canonicalUrl?{\"@type\":\"WebPage\",\"@id\":canonicalUrl}:undefined};}const cleaned=JSON.parse(JSON.stringify(json));document.querySelectorAll(`script[${MARKER_ATTR}=\"${markerId}\"]`).forEach(el=>el.remove());const script=document.createElement(\"script\");script.type=\"application/ld+json\";script.setAttribute(MARKER_ATTR,markerId);script.textContent=JSON.stringify(cleaned);document.head.appendChild(script);return()=>{script.remove();};},[schemaType,headline,description,imageUrl,author,publisherName,datePublished,videoUrl]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Schema Type\",options:[\"Article\",\"BlogPosting\",\"NewsArticle\",\"VideoObject\",\"DefinedTerm\"],optionTitles:[\"Article\",\"Blog Post\",\"News Article\",\"Video\",\"Glossary Term\"],defaultValue:\"Article\"},headline:{type:ControlType.String,title:\"Headline / Name\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:props=>props.schemaType===\"DefinedTerm\"},author:{type:ControlType.String,title:\"Author\",defaultValue:\"\",hidden:props=>props.schemaType===\"VideoObject\"||props.schemaType===\"DefinedTerm\"},publisherName:{type:ControlType.String,title:\"Publisher / Site Name\",defaultValue:\"LightSource\"},datePublished:{type:ControlType.Date,title:\"Date Published\",optional:true,hidden:props=>props.schemaType===\"DefinedTerm\"},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"\",hidden:props=>props.schemaType!==\"VideoObject\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"0\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"0\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,oLAaG,SAAwBW,EAAeC,EAAM,CAAC,GAAK,CAACC,aAAW,UAAUC,WAAS,GAAGC,cAAY,GAAGC,QAAMC,SAAO,GAAGC,gBAAc,cAAcC,gBAAcC,WAAS,IAAIR,EAAYS,EAASL,GAAO,KAAK,GAA+gD,OAA5gDhB,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,IAAMsB,EAAajB,EAAO,SAAS,KAAWkB,EAAS,MAAMV,EAAW,GAAGR,EAAO,SAAS,WAAiBmB,EAAUC,GAAO,CAAC,GAAG,CAACA,EAAM,OAAiB,IAAMC,EAAO,IAAI,KAAKD,CAAK,EAAE,OAAO,OAAO,MAAMC,EAAO,QAAQ,CAAC,EAAED,EAAMC,EAAO,YAAY,CAAE,EAAMC,EAAmcA,EAA3bd,IAAa,cAAoB,CAAC,WAAW,qBAAqB,QAAQ,cAAc,KAAKC,EAASC,cAAY,aAAaM,EAAS,CAACA,CAAQ,EAAE,IAAA,GAAU,WAAWG,EAAUL,CAAa,EAAE,WAAWC,GAAU,IAAA,GAAU,SAASA,GAAU,IAAA,EAAS,EAAWP,IAAa,cAAoB,CAAC,WAAW,qBAAqB,QAAQ,cAAc,KAAKC,EAASC,cAAY,IAAIO,GAAc,IAAA,GAAU,iBAAiBJ,CAAa,EAAa,CAAC,WAAW,qBAAqB,QAAQL,EAAWC,WAASC,cAAY,MAAMM,GAAU,IAAA,GAAU,OAAOJ,EAAO,CAAC,QAAQ,SAAS,KAAKA,CAAM,EAAE,IAAA,GAAU,UAAU,CAAC,QAAQ,eAAe,KAAKC,CAAa,EAAE,cAAcM,EAAUL,CAAa,EAAE,iBAAiBG,EAAa,CAAC,QAAQ,UAA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