internal export const PROC_TAGS = { "?xml" : "?>\n" , "!DOCTYPE" : ">\n" , "!ENTITY" : ">\n" , "!ELEMENT" : ">\n" , "!ATTLIST" : ">\n" , } ; internal export const RE_TAG = /^([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?$/ ; internal export const COMMENT = "__COMMENT__" ; internal export const CDATA = "!CDATA" ; internal export const NO_SPANS = { button : 1 , option : 1 , script : 1 , style : 1 , text : 1 , textarea : 1 , title : 1 , } ; const tagMap = ( tags ) : { [ id ] : boolean ; } => tags . split ( " " ) . reduce ( ( acc , x ) => ( ( acc [ x ] = true ) , acc ) , { } ) ; internal export const SVG_TAGS = tagMap ( "animate animateColor animateMotion animateTransform circle clipPath color-profile defs desc discard ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter font foreignObject g image line linearGradient marker mask metadata mpath path pattern polygon polyline radialGradient rect set stop style svg switch symbol text textPath title tref tspan use view" ) ; internal export const VOID_TAGS = tagMap ( "area base br col command embed hr img input keygen link meta param source stop track use wbr ?xml" ) ; internal export const NO_CLOSE_EMPTY = tagMap ( "animate circle ellipse line path polygon polyline rect" ) ; internal export const ATTRIB_JOIN_DELIMS = { accept : "," , sizes : "," , srcset : "," , } ;