{"version":3,"file":"shared-lib.DGqbeOCg.mjs","names":["__esmMin","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","init_npm_react_18_3_1","addPropertyControls","init_framer_BisrWwwE","ControlType","SeoHeadSync","route","base","origin","expected","meta","value","element","selector","attribute","key","scheduled","stopped","sync","title","description","language","href","links","n","keep","link","observer","init_SeoHeadSync"],"sources":["https:/framerusercontent.com/modules/qrNGSehIKvSR6MsSnPmy/lplqyXXUv3lXt9NuhEFe/SeoHeadSync.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Preserves each page's SEO metadata when Framer updates the document after hydration.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n */export default function SeoHeadSync({title=\"\",description=\"\"}){React.useEffect(()=>{const route=window.location.pathname.replace(/\\/$/,\"\")||\"/\";const base=route.replace(/^\\/(?:it|fr|ja)(?=\\/|$)/,\"\")||\"/\";const origin=\"https://www.yunescalore.com\";const expected={en:origin+base,it:origin+\"/it\"+(base===\"/\"?\"\":base),fr:origin+\"/fr\"+(base===\"/\"?\"\":base),ja:origin+\"/ja\"+(base===\"/\"?\"\":base),\"x-default\":origin+base};const meta=(selector,attribute,key,value)=>{if(!value)return;let element=document.head.querySelector(selector);if(!element){element=document.createElement(\"meta\");element.setAttribute(attribute,key);document.head.appendChild(element);}if(element.content!==value)element.content=value;};let scheduled=false;let stopped=false;const sync=()=>{if(stopped||(window.location.pathname.replace(/\\/$/,\"\")||\"/\")!==route)return;if(title&&document.title!==title)document.title=title;meta('meta[name=\"description\"]',\"name\",\"description\",description);meta('meta[property=\"og:title\"]',\"property\",\"og:title\",title);meta('meta[property=\"og:description\"]',\"property\",\"og:description\",description);meta('meta[name=\"twitter:title\"]',\"name\",\"twitter:title\",title);meta('meta[name=\"twitter:description\"]',\"name\",\"twitter:description\",description);for(const[language,href]of Object.entries(expected)){const links=[...document.head.querySelectorAll('link[rel=\"alternate\"][hreflang]')].filter(n=>n.hreflang===language);let keep=links.find(n=>n.href===href&&!n.hasAttribute(\"data-framer-generated-hreflang\"))||links.find(n=>n.href===href);if(!keep){keep=document.createElement(\"link\");keep.rel=\"alternate\";keep.hreflang=language;keep.href=href;document.head.appendChild(keep);}for(const link of links)if(link!==keep)link.remove();}};const observer=new MutationObserver(()=>{if(scheduled)return;scheduled=true;queueMicrotask(()=>{scheduled=false;sync();});});sync();observer.observe(document.head,{childList:true,subtree:true,attributes:true,attributeFilter:[\"content\",\"href\",\"hreflang\"],characterData:true});return()=>{stopped=true;observer.disconnect();};},[title,description]);return /*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"none\"}});}addPropertyControls(SeoHeadSync,{title:{type:ControlType.String,title:\"Page title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Page description\",defaultValue:\"\",displayTextArea:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SeoHeadSync\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"1\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SeoHeadSync.map"],"mappings":"A,wLAMG,SAAwBU,EAAY,CAAC,QAAM,GAAG,cAAY,IAAI,CAAq9D,OAAp9DL,MAAoB,CAAC,IAAMM,EAAMT,EAAO,SAAS,SAAS,QAAQ,MAAM,EAAE,GAAG,IAAUU,EAAKD,EAAM,QAAQ,0BAA0B,EAAE,GAAG,IAAUE,EAAO,8BAAoCC,EAAS,CAAC,GAAGD,EAAOD,EAAK,GAAGC,EAAO,OAAOD,IAAO,IAAI,GAAGA,GAAM,GAAGC,EAAO,OAAOD,IAAO,IAAI,GAAGA,GAAM,GAAGC,EAAO,OA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