async function s(t){var o,a;const e=(a=(o=navigator.clipboard)==null?void 0:o.writeText)==null?void 0:a.bind(navigator.clipboard);if(e){const c=e(t).then(()=>!0).catch(()=>!1);if(await Promise.race([c,new Promise(r=>{window.setTimeout(()=>r(!1),1e3)})]))return!0}return n(t)}function n(t){const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.top="-9999px",e.style.left="-9999px",e.style.opacity="0",document.body.appendChild(e),e.focus(),e.select();try{return document.execCommand("copy")}catch{return!1}finally{e.remove()}}export{s as c};
