{"version":3,"file":"AcoSeoStructuredData.DIJs7GJc.mjs","names":["_jsx","__esmMin","c","init_jsx_runtime","RenderTarget","addPropertyControls","init_framer_BWzg2IRg","ControlType","publicUrl","value","url","origin","verifiedDate","match","date","buildSeoGraph","props","title","slug","collection","segment","graph","organizationId","page","currentLabel","parentUrl","crumbs","crumb","index","article","product","AcoSeoStructuredData","data","json","init_AcoSeoStructuredData"],"sources":["https:/framerusercontent.com/modules/kvALgEkl5bfjqrSfAdAt/H49nduKIiCezWWLZZEhx/AcoSeoStructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const origin=\"https://www.acokk.co.jp\";const organizationId=`${origin}/#organization`;function publicUrl(value){if(!value.startsWith(\"/\")||value.startsWith(\"//\")||/[?#\\\\\\s]/u.test(value))return;const url=new URL(value,origin);if(url.origin!==origin||url.pathname!==value)return;return url.href;}function verifiedDate(value){const match=value.trim().match(/^(\\d{4})[-./](\\d{1,2})[-./](\\d{1,2})(?:T.*)?$/);if(!match)return;const date=`${match[1]}-${match[2].padStart(2,\"0\")}-${match[3].padStart(2,\"0\")}`;if(!Number.isFinite(Date.parse(date)))return;return new Date(date).toISOString().slice(0,10)===date?date:undefined;}/** CMS values are supplied as props at render time. No DOM, effect or browser URL inference. */export function buildSeoGraph(props){const title=(props.title||\"\").trim();const slug=(props.slug||\"\").trim();const collection=(props.collectionPath||\"\").replace(/\\/$/,\"\");// Framer Slug bindings return a relative page URL; plain slugs are also supported.\nconst segment=slug.startsWith(`${collection}/`)?slug.slice(collection.length+1):slug;const pagePath=slug?`${collection}/${segment}`:props.pagePath;const url=publicUrl(pagePath||\"\");if(!url||!title||slug&&(!collection||/[/\\\\?#]/.test(segment)))return null;const graph=[{\"@type\":\"Organization\",\"@id\":organizationId,name:\"株式会社アコー\",url:`${origin}/`,foundingDate:\"1977-02-14\",address:{\"@type\":\"PostalAddress\",postalCode:\"279-0022\",addressCountry:\"JP\",addressRegion:\"千葉県\",addressLocality:\"浦安市\",streetAddress:\"今川1-1-40\"},telephone:\"+81-47-352-4761\",sameAs:[\"https://www.instagram.com/aco_clean_air/\",\"https://www.youtube.com/acomovie\"]}];const page={\"@type\":\"WebPage\",\"@id\":`${url}#webpage`,url,name:title,inLanguage:\"ja\",publisher:{\"@id\":organizationId}};graph.push(page);const currentLabel=(props.currentLabel||title).trim();const parentUrl=publicUrl(props.parentPath||\"\");// Emit only explicitly supplied, visible breadcrumbs. Never infer hierarchy from the URL.\nif(currentLabel&&url!==`${origin}/`&&(parentUrl||props.parentPath===\"/\")){const crumbs=[{name:\"ホーム\",item:`${origin}/`}];if(parentUrl&&parentUrl!==`${origin}/`&&parentUrl!==url&&props.parentLabel?.trim()){crumbs.push({name:props.parentLabel.trim(),item:parentUrl});}crumbs.push({name:currentLabel,item:url});page.breadcrumb={\"@id\":`${url}#breadcrumb`};graph.push({\"@type\":\"BreadcrumbList\",\"@id\":`${url}#breadcrumb`,itemListElement:crumbs.map((crumb,index)=>({\"@type\":\"ListItem\",position:index+1,...crumb}))});}if(props.kind===\"Article\"){const article={\"@type\":\"Article\",\"@id\":`${url}#article`,url,headline:title,inLanguage:\"ja\",publisher:{\"@id\":organizationId},mainEntityOfPage:{\"@id\":`${url}#webpage`}};const date=verifiedDate(props.publishedDate||\"\");if(date)article.datePublished=date;if(props.authorName?.trim())article.author={\"@type\":\"Person\",name:props.authorName.trim()};if(props.description?.trim())article.description=props.description.trim();graph.push(article);page.mainEntity={\"@id\":article[\"@id\"]};}else if(props.kind===\"Product\"&&props.description?.trim()){const product={\"@type\":\"Product\",\"@id\":`${url}#product`,url,name:title,description:props.description.trim(),manufacturer:{\"@id\":organizationId},mainEntityOfPage:{\"@id\":`${url}#webpage`}};graph.push(product);page.mainEntity={\"@id\":product[\"@id\"]};}return{\"@context\":\"https://schema.org\",\"@graph\":graph};}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AcoSeoStructuredData(props){if(RenderTarget.current()===RenderTarget.canvas)return null;const data=buildSeoGraph(props);if(!data)return null;const json=JSON.stringify(data).replace(/</g,\"\\\\u003c\").replace(/>/g,\"\\\\u003e\").replace(/&/g,\"\\\\u0026\").replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\");return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",\"data-aco-seo\":\"true\",dangerouslySetInnerHTML:{__html:json}});}addPropertyControls(AcoSeoStructuredData,{kind:{type:ControlType.Enum,options:[\"WebPage\",\"Article\",\"Product\"],defaultValue:\"WebPage\",title:\"Type\"},pagePath:{type:ControlType.String,title:\"Page path\",defaultValue:\"\"},collectionPath:{type:ControlType.String,title:\"Collection\",defaultValue:\"\"},slug:{type:ControlType.String,title:\"CMS slug\",defaultValue:\"\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},publishedDate:{type:ControlType.String,title:\"Published\",defaultValue:\"\"},parentPath:{type:ControlType.String,title:\"Crumb parent\",defaultValue:\"\"},parentLabel:{type:ControlType.String,title:\"Parent label\",defaultValue:\"\"},currentLabel:{type:ControlType.String,title:\"Current label\",defaultValue:\"\"},authorName:{type:ControlType.String,title:\"Author\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AcoSeoStructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"buildSeoGraph\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AcoSeoStructuredData.map"],"mappings":"A,oKAAkM,SAASQ,EAAUC,EAAM,CAAC,GAAG,CAACA,EAAM,WAAW,GAAG,GAAGA,EAAM,WAAW,IAAI,GAAG,YAA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