"use strict";var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)l(o,t,{get:e[t],enumerable:!0})},f=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!N.call(o,r)&&r!==t&&l(o,r,{get:()=>e[r],enumerable:!(n=d(e,r))||n.enumerable});return o};var h=o=>f(l({},"__esModule",{value:!0}),o);var k={};u(k,{is:()=>s,serialize:()=>g,walk:()=>y});module.exports=h(k);function i(o){return e=>e.type===o}var s={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:i("root"),element:i("element"),customElement:i("custom-element"),component:i("component"),fragment:i("fragment"),expression:i("expression"),text:i("text"),doctype:i("doctype"),comment:i("comment"),frontmatter:i("frontmatter")},m=class{constructor(e){this.callback=e}async visit(e,t,n){if(await this.callback(e,t,n),s.parent(e)){let r=[];for(let a=0;an(a)):s.frontmatter(r)?t+=`---${r.value}--- `:s.comment(r)?t+=``:s.expression(r)?(t+="{",r.children.forEach(a=>n(a)),t+="}"):s.literal(r)?t+=r.value:s.tag(r)&&(t+=`<${r.name}`,t+=x(r),r.children.length==0&&e.selfClose?t+=" />":(t+=">",r.children.forEach(a=>n(a)),t+=``))}return n(o),t}0&&(module.exports={is,serialize,walk});