self.unlocker=(()=>{const e={log(...e){},error(...e){}},t="allow-copy_script",o="allow-copy_style",n=(t=window.top)=>{try{const e=t.document.getElementById(o);e&&e.remove()}catch(t){e.error("[simple allow copy] cannot remove css",t)}},c=(t=window)=>{try{const e=t.document,o=[].slice.apply(e.getElementsByTagName("iframe"));return[].concat(t,...o.map((e=>e.contentWindow)).map((e=>c(e))))}catch(o){return e.error("[simple allow copy] cannot get frame window",o),[t]}};let r=[],a=!1;const l=()=>{a=!0,r.forEach((c=>{((t=window.top)=>{try{const e=new CustomEvent("allow_copy",{detail:{unlock:!0}});t.document.dispatchEvent(e)}catch(t){e.error("[simple allow copy] cannot enable agent",t)}})(c),((c=window.top)=>{try{const e=c.document;n(c);const r=e.createElement("STYLE");r.id=o,r.innerHTML=`html, body, *, *::before, *::after, html body *, #${t} ~ body * {\n  -webkit-user-select: initial !important; \n  user-select: initial !important; \n} `,e.documentElement.append(r)}catch(t){e.error("[simple allow copy] cannot add css",t)}})(c)}))},s=()=>{a=!1,r.forEach((t=>{((t=window.top)=>{try{const e=new CustomEvent("allow_copy",{detail:{unlock:!1}});t.document.dispatchEvent(e)}catch(t){e.error("[simple allow copy] cannot disable agent",t)}})(t),n(t)}))};a?l():s();const i=()=>{r=c(),e.log("windows ",r),r.forEach((o=>((o=window.top)=>{try{const e=o.document;if(!e.getElementById(t)){const o=e.createElement("SCRIPT");o.id=t,o.src=chrome.runtime.getURL("content_scripts/copy.js"),e.documentElement.append(o)}}catch(t){e.error("[simple allow copy] cannot inject agent",t)}})(o))),a?l():s()};return i(),[1e3,3e3,5e3,1e4].forEach((e=>{setTimeout(i,e)})),{enable:l,disable:s}})();