import{c as l}from"./links.96ffe3f0.js";import{t as r}from"./tags.83142c1f.js";import{c as p}from"./postContent.2b412d8b.js";const d={methods:{parseTags(e){const n=l();return!e||!n.tags?e:(n.tags.forEach(o=>{if(o.id==="custom_field"){const a=new RegExp(`#${o.id}-([a-zA-Z0-9_-]+)`),c=e.match(a);c&&c[1]&&(e=e.replace(a,p(c[1])));return}if(o.id==="tax_name"){const a=new RegExp(`#${o.id}-([a-zA-Z0-9_-]+)`,"g");e=e.replace(a,`[${o.name} - $1]`);return}const t=new RegExp(`#${o.id}(?![a-zA-Z0-9_])`,"g");o.id==="separator_sa"&&this.separator!==void 0&&(e=e.replace(t,this.separator));const s=e.match(t),u=n.liveTags[o.id]||o.value;s&&(e=e.replace(t,"%|%"+u))}),e=e.replace(/%\|%/g,""),r.decodeHTMLEntities(r.decodeHTMLEntities(e.replace(/<(?:.|\n)*?>/gm," ").replace(/\s/g," "))))}}};export{d as T};
