import{Gn as e,Hn as t,Kn as n,Rn as r,Un as i,Vn as a,Wn as o,eo as s,qn as c,zn as l}from"./index.dkY5s53S.js";function u(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){d.lastIndex=i;let e=d.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}var d,f=s((()=>{d=/[#.]/g})),p=s((()=>{f()}));function m(e,t,n){let r=n?b(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=u(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,h(i))a.unshift(i);else for(let[t,n]of Object.entries(i))g(e,o.properties,t,n)}for(let e of a)_(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function h(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function g(e,t,n,r){let i=o(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?l(r):i.commaSeparated?c(r):i.commaOrSpaceSeparated?l(c(r).join(` `)):v(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?y(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(v(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function _(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)_(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?_(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function v(t,n,r){if(typeof r==`string`){if(t.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((t.boolean||t.overloadedBoolean)&&(r===``||e(r)===e(n)))return!0}return r}function y(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function b(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var x=s((()=>{n(),p(),t(),r()})),S,C=s((()=>{S=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.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.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`)})),w,T,E=s((()=>{t(),x(),C(),w=m(a,`div`),T=m(i,`g`,S)})),D=s((()=>{E()}));export{w as n,T as r,D as t};