import{f as o,n as c,o as h,p as a,M as u,aC as f}from"./entry-25c4be3.js";const l=/^\.?\//;function i(t="",e){return t.endsWith("/")?t:t+"/"}function g(t=""){return t.startsWith("/")}function m(t=""){return g(t)?t:"/"+t}function d(t){return t&&t!=="/"}function p(t,...e){let r=t||"";for(const n of e.filter(s=>d(s)))if(r){const s=n.replace(l,"");r=i(r)+s}else r=n;return r}const _="img",y={__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(t){const e=t,r=o(()=>{if(e.src?.startsWith("/")&&!e.src.startsWith("//")){const n=m(i(f().app.baseURL));if(n!=="/"&&!e.src.startsWith(n))return p(n,e.src)}return e.src});return(n,s)=>(h(),c(u(a(_)),{src:a(r),alt:e.alt,width:e.width,height:e.height},null,8,["src","alt","width","height"]))}};export{y as default};
