(()=>{"use strict";const e=window.wp.i18n;document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".wp-block-itmar-code-highlight button").forEach(t=>{t.addEventListener("click",t=>{const n=t.currentTarget;if(!(n instanceof HTMLElement))return;const o=n.previousElementSibling;if(!(o instanceof HTMLElement))return;const i=o.innerText;navigator.clipboard.writeText(i).then(()=>{var t;t=(0,e.__)("copied","block-collections"),jQuery("body").append("<div id='result_msg' >"+t+"</div>"),jQuery("#result_msg").slideDown(300,function(){setTimeout(function(){jQuery("#result_msg").slideUp(300,function(){jQuery(this).remove()})},2e3)})},e=>{console.error("Could not copy text: ",e)})})})})})();