window.copyBPlAdminShortcode=function(e){var t=document.querySelector("#bPlAdminShortcode-"+e+" input");t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.querySelector("#bPlAdminShortcode-"+e+" .tooltip").innerHTML="Copied Successfully!"},document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("ttbCopyBtn"),t=document.getElementById("ttbShortcodeInput");function o(e){const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999);try{document.execCommand("copy"),n()}catch(e){console.error("Fallback copy failed:",e),alert("Copy failed. Please copy manually.")}document.body.removeChild(t)}function n(){const t=e.textContent;e.textContent="✅ Successfully Copied!",e.disabled=!0,setTimeout((()=>{e.textContent=t,e.disabled=!1}),2e3)}e&&t&&e.addEventListener("click",(async()=>{const e=t.value;if(navigator.clipboard&&navigator.clipboard.writeText)try{return await navigator.clipboard.writeText(e),void n()}catch(t){console.warn("Clipboard API failed, using fallback.",t),o(e)}else o(e)}))}));