{"version":3,"file":"StructuredData.D645hb95.mjs","names":[],"sources":["https:/framerusercontent.com/modules/YgMQJaP49jEitA4OSsIB/i7XaY0i43LtO13tgWoLq/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const SITE=\"https://www.kidsight.io\";const LOGO=\"https://framerusercontent.com/images/X9kRr7KLrZdPS4rjFphE1cGbrpA.png\";const ORG={\"@type\":\"Organization\",name:\"KidSight\",url:SITE+\"/\",logo:LOGO};const BANDS=[[\"verdict02\",0,2],[\"verdict35\",3,5],[\"verdict68\",6,8],[\"verdict910\",9,10]];function crumbs(items){return{\"@type\":\"BreadcrumbList\",itemListElement:items.map(([name,url],i)=>({\"@type\":\"ListItem\",position:i+1,name,item:url}))};}// Age range from the bands whose verdict is \"Good fit\", e.g. \"3-8\".\nfunction ageRange(props){const fits=BANDS.filter(([key])=>props[key]===\"Good fit\");if(fits.length===0)return undefined;return`${fits[0][1]}-${fits[fits.length-1][2]}`;}function buildGraph(props){const{kind,name,description,slug,published:date,image}=props;if(!name||!slug)return null;if(String(kind).toLowerCase().includes(\"post\")){const url=`${SITE}/blog/${slug}`;const post={\"@type\":\"BlogPosting\",headline:name,description,url,mainEntityOfPage:url,author:ORG,publisher:ORG};if(date)post.datePublished=date;if(image?.src)post.image=[image.src.split(\"?\")[0]];return[post,crumbs([[\"Home\",SITE+\"/\"],[\"Blog\",SITE+\"/blog\"],[name,url]])];}const url=`${SITE}/shows/${slug}`;const series={\"@type\":\"CreativeWorkSeries\",name};const range=ageRange(props);if(range)series.typicalAgeRange=range;const page={\"@type\":\"WebPage\",name:`What age is ${name} for?`,description,url,about:series,publisher:ORG};if(image?.src)page.primaryImageOfPage=image.src.split(\"?\")[0];return[page,crumbs([[\"Home\",SITE+\"/\"],[\"Shows\",SITE+\"/shows\"],[name,url]])];}/**\n * Invisible. Writes schema.org JSON-LD for a blog post or show page from CMS fields.\n *\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const graph=buildGraph(props);if(!graph)return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0}});const json=JSON.stringify({\"@context\":\"https://schema.org\",\"@graph\":graph}).replace(/</g,\"\\\\u003c\");return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:json}})});}addPropertyControls(StructuredData,{kind:{type:ControlType.Enum,title:\"Kind\",options:[\"post\",\"show\"],optionTitles:[\"Blog post\",\"Show page\"],defaultValue:\"post\",displaySegmentedControl:true},name:{type:ControlType.String,title:\"Name\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\"},published:{type:ControlType.Date,title:\"Published\",optional:true,hidden:p=>p.kind!==\"post\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},verdict02:{type:ControlType.String,title:\"Verdict 0–2\",defaultValue:\"\",hidden:p=>p.kind!==\"show\"},verdict35:{type:ControlType.String,title:\"Verdict 3–5\",defaultValue:\"\",hidden:p=>p.kind!==\"show\"},verdict68:{type:ControlType.String,title:\"Verdict 6–8\",defaultValue:\"\",hidden:p=>p.kind!==\"show\"},verdict910:{type:ControlType.String,title:\"Verdict 9–10\",defaultValue:\"\",hidden:p=>p.kind!==\"show\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\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