import{t as D,o as v,q as p,ah as T,aD as $,W as A,X as H,ad as L,aE as M,aF as S,aG as O,O as q,aH as w,P as c}from"./DhlfkVbH.js";function P(r,a,i=!1,f=!1,t=!1){var s=r,u="";D(()=>{var e=T;if(u===(u=a()??"")){v&&p();return}if(e.nodes_start!==null&&($(e.nodes_start,e.nodes_end),e.nodes_start=e.nodes_end=null),u!==""){if(v){A.data;for(var l=p(),h=l;l!==null&&(l.nodeType!==H||l.data!=="");)h=l,l=L(l);if(l===null)throw M(),S;O(A,h),s=q(l);return}var o=u+"";i?o=`<svg>${o}</svg>`:f&&(o=`<math>${o}</math>`);var n=w(o);if((i||f)&&(n=c(n)),O(c(n),n.lastChild),i||f)for(;c(n);)s.before(c(n));else s.before(n)}})}function E(r){var a,i,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var t=r.length;for(a=0;a<t;a++)r[a]&&(i=E(r[a]))&&(f&&(f+=" "),f+=i)}else for(i in r)r[i]&&(f&&(f+=" "),f+=i);return f}function F(){for(var r,a,i=0,f="",t=arguments.length;i<t;i++)(r=arguments[i])&&(a=E(r))&&(f&&(f+=" "),f+=a);return f}function W(r){return typeof r=="object"?F(r):r??""}const N=[...` 	
\r\f \v\uFEFF`];function G(r,a,i){var f=r==null?"":""+r;if(a&&(f=f?f+" "+a:a),i){for(var t in i)if(i[t])f=f?f+" "+t:t;else if(f.length)for(var s=t.length,u=0;(u=f.indexOf(t,u))>=0;){var e=u+s;(u===0||N.includes(f[u-1]))&&(e===f.length||N.includes(f[e]))?f=(u===0?"":f.substring(0,u))+f.substring(e+1):u=e}}return f===""?null:f}function j(r,a=!1){var i=a?" !important;":";",f="";for(var t in r){var s=r[t];s!=null&&s!==""&&(f+=" "+t+": "+s+i)}return f}function d(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function X(r,a){if(a){var i="",f,t;if(Array.isArray(a)?(f=a[0],t=a[1]):f=a,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,u=0,e=!1,l=[];f&&l.push(...Object.keys(f).map(d)),t&&l.push(...Object.keys(t).map(d));var h=0,o=-1;const b=r.length;for(var n=0;n<b;n++){var g=r[n];if(e?g==="/"&&r[n-1]==="*"&&(e=!1):s?s===g&&(s=!1):g==="/"&&r[n+1]==="*"?e=!0:g==='"'||g==="'"?s=g:g==="("?u++:g===")"&&u--,!e&&s===!1&&u===0){if(g===":"&&o===-1)o=n;else if(g===";"||n===b-1){if(o!==-1){var R=d(r.substring(h,o).trim());if(!l.includes(R)){g!==";"&&n++;var C=r.substring(h,n).trim();i+=" "+C+";"}}h=n+1,o=-1}}}}return f&&(i+=j(f)),t&&(i+=j(t,!0)),i=i.trim(),i===""?null:i}return r==null?null:String(r)}function Y(r,a,i,f,t,s){var u=r.__className;if(v||u!==i||u===void 0){var e=G(i,f,s);(!v||e!==r.getAttribute("class"))&&(e==null?r.removeAttribute("class"):a?r.className=e:r.setAttribute("class",e)),r.__className=i}else if(s&&t!==s)for(var l in s){var h=!!s[l];(t==null||h!==!!t[l])&&r.classList.toggle(l,h)}return s}export{F as a,W as c,P as h,Y as s,X as t};
