import{o as v,p as M,q as S,r as N}from"./_-DtOPbauA.js";import"./index-0z3IXZ2m.js";var P=v(function(t,e,o){return t+(o?" ":"")+M(e)}),p=(t=>(t.ALL_SERIES="media-center-all-series",t.ALL_COMPANIES="media-center-all-companies",t.INDIVIDUAL_COMPANY="media-center-individual-company",t.INDIVIDUAL_COLLECTION="media-center-individual-collection",t.INDIVIDUAL_SERIES="media-center-individual-series",t))(p||{}),w=(t=>(t.ARTICLE="article",t.WEBSITE="website",t.RESOURCES="resources",t))(w||{});const I=(...t)=>[...t,"max-image-preview:large"].filter(e=>e).join(", "),$=(t,e="")=>e?{property:t,content:e}:void 0,E=(t,e="")=>e?{name:t,content:e}:void 0,A=t=>t?{"script:ld+json":t}:void 0,L=({rel:t,href:e,as:o})=>t&&e?{rel:t,href:e,as:o,tagName:"link"}:void 0,R=t=>({tagName:"link",rel:"canonical",href:t}),O=t=>t?[{property:"og:url",content:t},R(t)]:[],V=t=>{const{title:e,description:o,price:s,currency:i}=t;return s.trim().length>0?{"script:ld+json":{"@context":"https://schema.org/","@type":"Product",name:e,description:o,offers:{"@type":"Offer",price:s,priceCurrency:i}}}:{}},_=t=>[{title:t},{property:"og:title",content:t}],k=t=>[{name:"description",content:t},{property:"og:description",content:t}],y=({seo:t,schema:e,imagesToPreload:o,contentType:s,title:i,description:a})=>{const n=[..._(i),...k(a),...O(t.canonicalUrl),$("og:type",s||"website"),$("og:image",t==null?void 0:t.imageUrl),$("og:site_name",t.siteName),$("oc:keywords",t.keywords)];return Array.isArray(e)&&n.push(...e.map(A)),Array.isArray(o)&&n.push(...o.map(L)),n.filter(c=>c)},B=(t,{schema:e,imagesToPreload:o,robots:s})=>{const i=[...t,E("robots",s||"noindex")];return Array.isArray(e)&&i.push(...e.map(A)),Array.isArray(o)&&i.push(...o.map(L)),i.filter(a=>a)},F=({pagination:t,contentName:e,siteName:o,type:s,pageType:i,canonicalUrl:a,imageUrl:n,imagesToPreload:c,schema:l,robots:r})=>{const m=s==="content-type",f=[T({pageType:i,contentName:e,isContentType:m})];if(t){const{currentPage:h,totalCount:u}=t;h>0&&f.push(`page ${h} of ${Math.max(h,u)}`)}f.push(`${o}`);const d=f.join(" | "),b=m?`Explore the latest multimedia resources brought to you by the editors of ${o}`:`Explore the latest articles brought to you by the editors of ${o}`;return[E("robots",r||"noindex"),...y({seo:{siteName:o,canonicalUrl:a,imageUrl:n},schema:l,imagesToPreload:c,title:d,description:b})].filter(h=>h)},T=({pageType:t,contentName:e,isContentType:o})=>{switch(t){case p.ALL_SERIES:return"Series collection of podcasts, videos, and webinars";case p.ALL_COMPANIES:return"Recent digital contributions from other companies";case p.INDIVIDUAL_COMPANY:return`Recent digital contributions from ${e}`;case p.INDIVIDUAL_COLLECTION:case p.INDIVIDUAL_SERIES:return`${e} collection`;default:return`Recent ${e}${o?"":" articles"}`}},Y=({seo:t,paginationPageData:e,contentType:o,seriesPageType:s,imagesToPreload:i,schema:a,robots:n,pageName:c})=>{if(!t)return[];const{entryTitle:l,pagination:r,isAuthor:m=!1,isChildrenPage:f=!1}=e;let d=`${l}${m?"":" recent news"} | page ${r==null?void 0:r.currentPage} of ${r==null?void 0:r.totalCount} | ${t.siteName&&l.includes(t.siteName)?"":t.siteName}`,b="Explore the latest news and expert commentary"+(m?" ":` on ${l} `)+`brought to you by the editors of ${t.siteName}`;const g=`Explore the latest news on this event brought to you by the editors of ${t.siteName}`;if(s){const u=[`${l} ${s} collection`];if(t.siteName&&!l.includes(t.siteName)&&u.push(t.siteName),r){const{currentPage:x,totalCount:D}=r;u.push(`page ${x} of ${D}`)}d=u.join(" | ")}else o==="publicationTitle"?(d=`${l} Issue Archive | page ${r==null?void 0:r.currentPage} of ${r==null?void 0:r.totalCount} `,b=`Explore all the issues of ${l}, brought to you by the editors of ${t.siteName}`):c==="resources"&&(d=`${t.siteName} | page ${r==null?void 0:r.currentPage} of ${r==null?void 0:r.totalCount} | Resource Library`,b=`Explore the latest multimedia resources brought to you by the editors of ${t.siteName}`);return[{name:"robots",content:n||I(t!=null&&t.noIndex?"noindex":"")},...y({seo:t,schema:a,contentType:o,imagesToPreload:i,title:d,description:f?g:b})].filter(u=>u)},G=({contentName:t,siteName:e,canonicalUrl:o,imageUrl:s,imagesToPreload:i,schema:a,robots:n,pageType:c})=>{let l=`${P(t)} | ${e}`,r=`Explore the latest ${t} brought to you by the editors of ${e}`;return c==="media-center-individual-company"&&(r=`Explore the latest multimedia resources brought to you by the editors of ${e}`,l=`Recent digital contributions from ${t} | ${e}`),c==="media-center-individual-series"&&(r=`Explore the latest multimedia resources brought to you by the editors of ${e}`,l=`${t} collection | ${e}`),[E("robots",n||"noindex"),...y({seo:{siteName:e,canonicalUrl:o,imageUrl:s},schema:a,imagesToPreload:i,title:l,description:r})]},W=({seo:t,imagesToPreload:e,schema:o,robots:s,title:i,description:a})=>[E("robots",s||"noindex"),...y({seo:t,schema:o,imagesToPreload:e,title:i,description:a})],J=({seo:t,schema:e,contentType:o,imagesToPreload:s,robots:i,pageName:a})=>{if(!t)return[];let n,c;switch(a){case"resources":c=`${t.siteName} Resource Library`,n=`Explore the latest multimedia resources brought to you by the editors of ${t.siteName}`;break;case"cashGrainBids":c=`Latest Cash Grain Bids | ${t.siteName}`,n=`Explore the latest Cash Grain Bids brought to you by the editors of ${t.siteName}`;break;default:c=S(t.metaTitle),n=N(t.metaDescription)}return[{name:"robots",content:i||I(t!=null&&t.noIndex?"noindex":"",t.noArchive?"noarchive":"")},...y({seo:t,schema:e,contentType:o,imagesToPreload:s,title:c,description:n}),$("twitter:card","summary")].filter(r=>r)},q=t=>{var a,n,c,l;const e=t.template,o=(a=e==null?void 0:e.bodyJson)==null?void 0:a.find(r=>r.type==="paragraph"),s=(n=o==null?void 0:o.content)==null?void 0:n.find(r=>r.type==="text"),i=(l=(c=s==null?void 0:s.text)==null?void 0:c.split("."))==null?void 0:l[0];return(e==null?void 0:e.summary)||`${i}.`},C=t=>{const e=new Date(t);return`${e.toLocaleString("default",{year:"numeric"})} - ${e.toLocaleString("default",{month:"long"})}`},z=t=>{var n,c;if(((n=t.metadata)==null?void 0:n.sourceType)!=="List of Entries")return;const{publishedDate:e,publicationTitle:o,pagination:s}=t.template,i=s.currentPage===1,a=i?t.seo.metaTitle:(c=o[0])==null?void 0:c.title;if(a&&e){const l=C(e),r=[];return r.push(`${a} Issue ${l}`),i||r.push(`page ${s.currentPage} of ${s.totalCount}`),r.push(t.seo.siteName),r.join(" | ")}},H=t=>{var s;if(((s=t.metadata)==null?void 0:s.sourceType)!=="List of Entries")return;const{publishedDate:e,pagination:o}=t.template;if(e){const i=C(e);return o.currentPage===1?t.seo.metaDescription:`Read on ${i} Issue, brought to you by the editors of ${t.seo.siteName}`}};export{p as M,w as P,G as a,Y as b,F as c,J as d,_ as e,k as f,I as g,O as h,V as i,B as j,R as k,W as l,z as m,H as n,q as o,P as s}; //# sourceMappingURL=meta-jsFaSjt1.js.map