import{B as e,M as t}from"./vendor-vue-D9nMs6_1.js";function n(n,r=`style`){let i=null,a=!1;function o(){i?.remove(),i=null}function s(e,t){let n=e,r=n.customCss||n.container?.customCss;n._node?.id&&r?.trim()&&t(r);for(let[e,r]of Object.entries(n))e!==`_node`&&e!==`container`&&e!==`customCss`&&r&&typeof r==`object`&&!Array.isArray(r)&&s(r,t)}function c(e){return e.replace(/:\s*([^;}\n]+?)(?=\s*!important|\s*;|\s*})/g,(e,t)=>{let n=t.trim();return n===``||n.startsWith(`/*`)?e:`: ${n} !important`})}function l(){a||(a=!0,requestAnimationFrame(()=>{if(a=!1,!n.value){o();return}let e=[];s(n.value,t=>e.push(c(t)));let t=e.join(`

`);if(!t.trim()){o();return}i||(i=document.createElement(`style`),i.id=`lb-custom-css-injector-${r.replace(/[^a-z0-9_-]/gi,`-`).toLowerCase()}`,document.head.appendChild(i)),i.textContent!==t&&(i.textContent=t)}))}return e(n,l,{deep:!0,immediate:!0}),t(o),{syncStyles:l,removeAll:o}}export{n as t};