import{isLocalLink as m}from"../../../utils/path/is-local-link.js";import{reporter as c}from"../../tools/notifiers/reporter.js";import{FileNotFoundError as s,copyStaticFile as l}from"../../utils/index.js";const d=(t,i,n)=>{let o=t.image;if(o&&m(t.image))try{const e=l(i,o,n);e&&(o=e)}catch(e){e instanceof s?c.panicOnBuildContentError("Could not resolve SEO image: "+e.message):c.panicOnBuild("Could not resolve SEO image: "+e.message)}return{...t,image:o,meta:t.meta&&t.meta.map(e=>{let r=e.content;if(m(r))try{const a=l(i,r,n);a&&(r=a)}catch{}return{name:e.name,content:r}})}};export{d as copySeoAssets};
