const a=["rgba(0, 0, 0, 0)","transparent","initial","inherit","revert","revert-layer","unset"];class r{static async copyToClipboard(t){if(navigator.clipboard)try{await navigator.clipboard.writeText(t);return}catch{}const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}static getParentNearestBackground(t){if(!t||typeof window>"u")return"#fff";const e=window.getComputedStyle(t).backgroundColor;return a.includes(e)?r.getParentNearestBackground(t.parentElement):e}}export{r as P};
