!function(){"use strict";class t{constructor(t,e){this.script=t,this.target=e,this._cancel=!1,this._stop=!1}preventDefault(){this._cancel=!0}stopPropagation(){this._stop=!0}replacePayload(t,e){null==e?(this.script.textContent=t,this.script.removeAttributeNode(this.script.getAttributeNode("src"))):this.script.textContent=this.script.textContent.replace(t,e)}loadPayloadSync(){if(!this.script.src)return;let t=new XMLHttpRequest;t.open("GET",this.script.src,!1),t.send(null),200!=t.status&&console.error("Failed to load script: "+this.script.src,"Status: "+t.status),this.script.textContent=t.responseText,this.script.removeAttributeNode(this.script.getAttributeNode("src"))}}var e=[],r=function(t){if(!t instanceof Function)throw new Error("Event handler must be a function.");e.push(t)},n=function(t){for(var r=e.length;r--;)e[r]===t&&e.splice(r,1)},o=window.addEventListener.bind(window),i=window.removeEventListener.bind(window);function s(r,n){var o=new t(r,n);if(window.onbeforescriptexecute instanceof Function)try{window.onbeforescriptexecute(o)}catch(t){console.error(t)}for(let t of e){if(o._stop)break;try{t(o)}catch(t){console.error(t)}}return o}window.addEventListener=function(){"beforescriptexecute"===arguments[0].toLowerCase()?r(arguments[1]):o.apply(null,arguments)},window.removeEventListener=function(){"beforescriptexecute"===arguments[0].toLowerCase()?n(arguments[1]):i.apply(null,arguments)},new MutationObserver((t=>{for(let e of t)for(let t of e.addedNodes){if("SCRIPT"!==t.tagName)continue;s(t,e.target)._cancel&&t.remove()}})).observe(document,{childList:!0,subtree:!0})}();