import{o as p,S as l,n as f,b,h,i as y}from"./legacy-shell-D4JdMu14.js";const w=t=>{u(),l.supportedLanguages.forEach(e=>{const o=t.canonical?.[e];if(!o)return;const r=document.createElement("link");r.setAttribute("rel","alternate"),r.setAttribute("hreflang",l.hreflangMap[e]||e),r.setAttribute("href",o),document.head.appendChild(r)});const i=t.canonical?.[l.defaultLanguage];if(i){const e=document.createElement("link");e.setAttribute("rel","alternate"),e.setAttribute("hreflang","x-default"),e.setAttribute("href",i),document.head.appendChild(e)}},s="seo-jsonld-page",n=(t,i)=>{if(!i)return;let e=document.querySelector(`meta[name="${t}"]`);e?e.setAttribute("content",i):(e=document.createElement("meta"),e.setAttribute("name",t),e.setAttribute("content",i),document.head.appendChild(e))},a=(t,i)=>{if(!i)return;let e=document.querySelector(`meta[property="${t}"]`);e?e.setAttribute("content",i):(e=document.createElement("meta"),e.setAttribute("property",t),e.setAttribute("content",i),document.head.appendChild(e))},d=t=>{if(!t)return;let i=document.querySelector('link[rel="canonical"]');i?(i.setAttribute("href",t),i.removeAttribute("data-model-canonical")):(i=document.createElement("link"),i.setAttribute("rel","canonical"),i.setAttribute("href",t),document.head.appendChild(i))},u=()=>{document.querySelectorAll('link[rel="alternate"][hreflang]').forEach(t=>t.remove())},m=t=>{const i=document.getElementById(s);if(!t){i&&i.remove();return}if(i){i.text=JSON.stringify(t);return}const e=document.createElement("script");e.type="application/ld+json",e.id=s,e.text=JSON.stringify(t),document.head.appendChild(e)},S=(t,i)=>{if(!t?.model)return;const e=p(t),{siteInfo:o}=l;document.title=e.title,n("description",e.description),n("keywords",e.keywords),d(e.canonical);const r=document.querySelector('link[rel="canonical"]');r&&r.setAttribute("data-model-canonical",t.model),u(),a("og:site_name",o.siteName),a("og:type","website"),a("og:title",e.title);const c=e.socialDescription||e.description;a("og:description",c),a("og:url",e.canonical),a("og:image",e.ogImage),a("og:image:alt",e.title),a("og:locale","en_US"),document.querySelectorAll('meta[property="og:locale:alternate"]').forEach(g=>g.remove()),n("twitter:card","summary_large_image"),n("twitter:title",e.title),n("twitter:description",c),n("twitter:image",e.ogImage),o.twitterHandle&&(n("twitter:site",o.twitterHandle),n("twitter:creator",o.twitterHandle)),m(f(t,{memberRecords:i?.memberRecords}))},_=(t,i="en")=>{if(!t?.slug)return;const e=b(t,i),{siteInfo:o}=l;document.title=e.title,n("description",e.description),n("keywords",e.keywords),d(e.canonical),w({canonical:h("post",{slug:t.slug})}),a("og:site_name",o.siteName),a("og:type","article"),a("og:title",e.title),a("og:description",e.socialDescription),a("og:url",e.canonical),a("og:image",e.ogImage),a("og:image:alt",e.title),a("og:locale",l.ogLocaleMap[i]||"en_US"),t.published_at&&a("article:published_time",t.published_at),t.updated_at&&a("article:modified_time",t.updated_at),document.querySelectorAll('meta[property="og:locale:alternate"]').forEach(r=>r.remove()),n("twitter:card","summary_large_image"),n("twitter:title",e.title),n("twitter:description",e.socialDescription),n("twitter:image",e.ogImage),o.twitterHandle&&(n("twitter:site",o.twitterHandle),n("twitter:creator",o.twitterHandle)),document.documentElement.lang=i,m(y(t,i))};export{_ as a,a as b,n as c,w as d,S as e,u as r,m as s,d as u};
