{"version":3,"file":"StructuredData.BRRZz_jN.mjs","names":["__esmMin","c","init_jsx_runtime","addPropertyControls","init_framer_B1b760uK","ControlType","StructuredData","props","artist","siteBase","isoDay","v","value","match","clean","slug","pageUrl","url","pathPrefix","data","name","kind","description","image","venue","startDate","endDate","medium","year","dimensions","creditText","key","init_StructuredData"],"sources":["https:/framerusercontent.com/modules/xZHch4bjpCvXuEZFSepr/22hrX1qWOgHOC2xQ8brj/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Structured Data\n *\n * Writes schema.org JSON-LD for a work or an exhibition so search engines and\n * AI assistants can read what the page is about. Renders nothing visible.\n *\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{kind=\"artwork\",name=\"\",description=\"\",image,year=\"\",medium=\"\",dimensions=\"\",venue=\"\",startDate=\"\",endDate=\"\",creditText=\"\",pageUrl=\"\",pathPrefix=\"\",siteBase=\"https://jamieholman.co.uk\"}=props;const artist={\"@type\":\"Person\",name:\"Jamie Holman\",url:siteBase,jobTitle:\"Artist\",address:{\"@type\":\"PostalAddress\",addressLocality:\"Blackburn\",addressRegion:\"Lancashire\",addressCountry:\"GB\"}};// Dates arrive as ISO timestamps; schema.org wants a plain calendar day.\nconst isoDay=value=>{const v=typeof value===\"string\"?value.trim():\"\";if(!v)return undefined;const match=v.match(/^\\d{4}-\\d{2}-\\d{2}/);return match?match[0]:undefined;};const clean=value=>typeof value===\"string\"?value.trim():\"\";const slug=clean(pageUrl);const url=slug?slug.startsWith(\"http\")?slug:`${siteBase.replace(/\\/$/,\"\")}/${clean(pathPrefix).replace(/^\\/|\\/$/g,\"\")}/${slug.replace(/^\\//,\"\")}`.replace(/([^:]\\/)\\/+/g,\"$1\"):undefined;let data=null;if(clean(name)){if(kind===\"profile\"){data={\"@context\":\"https://schema.org\",\"@type\":\"ProfilePage\",name:clean(name),description:clean(description)||undefined,url,inLanguage:\"en-GB\",mainEntity:{\"@id\":`${siteBase.replace(/\\/$/,\"\")}/#jamie-holman`}};}else if(kind===\"exhibition\"){data={\"@context\":\"https://schema.org\",\"@type\":\"ExhibitionEvent\",name:clean(name),description:clean(description)||undefined,image:clean(image?.src)||undefined,url,performer:artist,organizer:clean(venue)?{\"@type\":\"Organization\",name:clean(venue)}:undefined,location:clean(venue)?{\"@type\":\"Place\",name:clean(venue),address:clean(venue)}:undefined,startDate:isoDay(startDate),endDate:isoDay(endDate),eventStatus:\"https://schema.org/EventScheduled\",eventAttendanceMode:\"https://schema.org/OfflineEventAttendanceMode\"};}else{data={\"@context\":\"https://schema.org\",\"@type\":\"VisualArtwork\",name:clean(name),description:clean(description)||undefined,image:clean(image?.src)||undefined,url,creator:artist,artform:clean(medium)||undefined,artMedium:clean(medium)||undefined,dateCreated:clean(year)||undefined,size:clean(dimensions)||undefined,creditText:clean(creditText)||undefined,inLanguage:\"en-GB\"};}for(const key of Object.keys(data))if(data[key]===undefined)delete data[key];}return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",width:1,height:1,overflow:\"hidden\"},\"aria-hidden\":\"true\",children:data?/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(data).replace(/</g,\"\\\\u003c\")}}):null});}addPropertyControls(StructuredData,{kind:{type:ControlType.Enum,title:\"Kind\",options:[\"artwork\",\"exhibition\",\"profile\"],optionTitles:[\"Artwork\",\"Exhibition\",\"Profile\"],defaultValue:\"artwork\",displaySegmentedControl:true},name:{type:ControlType.String,title:\"Name\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},year:{type:ControlType.String,title:\"Year\",defaultValue:\"\",hidden:({kind})=>kind===\"exhibition\"},medium:{type:ControlType.String,title:\"Medium\",defaultValue:\"\",hidden:({kind})=>kind===\"exhibition\"},dimensions:{type:ControlType.String,title:\"Dimensions\",defaultValue:\"\",hidden:({kind})=>kind===\"exhibition\"},venue:{type:ControlType.String,title:\"Venue\",defaultValue:\"\",hidden:({kind})=>kind===\"artwork\"},startDate:{type:ControlType.Date,title:\"Start date\",optional:true,hidden:({kind})=>kind===\"artwork\"},endDate:{type:ControlType.Date,title:\"End date\",optional:true,hidden:({kind})=>kind===\"artwork\"},creditText:{type:ControlType.String,title:\"Photo credit\",defaultValue:\"\"},pageUrl:{type:ControlType.String,title:\"Slug\",defaultValue:\"\"},pathPrefix:{type:ControlType.String,title:\"Path prefix\",defaultValue:\"works\"},siteBase:{type:ControlType.String,title:\"Site base\",defaultValue:\"https://jamieholman.co.uk\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"1\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,4JAWG,SAAwBM,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,UAAU,OAAK,GAAG,cAAY,GAAG,QAAM,OAAK,GAAG,SAAO,GAAG,aAAW,GAAG,QAAM,GAAG,YAAU,GAAG,UAAQ,GAAG,aAAW,GAAG,UAAQ,GAAG,aAAW,GAAG,WAAS,6BAA6BC,EAAYC,EAAO,CAAC,QAAQ,SAAS,KAAK,eAAe,IAAIC,EAAS,SAAS,SAAS,QAAQ,CAAC,QAAQ,gBAAgB,gBAAgB,YAAY,cAAc,aAAa,eAAe,IAAI,CAAC,EAC/aC,EAAO,GAAO,CAAC,IAAMC,EAAE,OAAOC,GAAQ,SAASA,EAAM,KAAK,EAAE,GAAG,GAAG,CAACD,EAAE,OAAiB,IAAME,EAA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