!function(){const e="[PaypalIframeTimer.js] ",a=window.IAB_PAYPAL_IFRAME_DEBUG_FLAG;a&&console.log(e+`PaypalIframeTimer.js injected into ${window.location.href}`);let t=null,n=null;const s=s=>{let o=n;var i;s!==o&&(n=s,a&&console.log(e+"iframeVisible changed from "+o+" to "+s),i={event_name:n?"IABPaypalButtonVisible":"IABPaypalButtonNotVisible",iframe_name:t},window?.webkit?.messageHandlers?.fbIABPaypalJSTimerExpression?(window.webkit.messageHandlers.fbIABPaypalJSTimerExpression.postMessage(i),a&&console.log(e+"Sending message to fbIABPaypalJSTimerExpression",i)):BuyWithPayPalMessageHandler?BuyWithPayPalMessageHandler.postMessage(JSON.stringify(i)):a&&console.log(e+"No message handler found for fbIABPaypalJSTimerExpression"))};window.addEventListener("message",(n=>{if(n.data&&"IABPaypalSmartButtonDetected"===n.data.event_name)(n=>{let s=t;n!==s&&(t=n,a&&console.log(e+"iframeName changed from "+s+" to "+n))})(n.data.iframe_name);else if(n.data&&"IABPaypalSmartButtonSyntheticClick"===n.data.event_name){document.getElementsByName(t)[0].contentWindow.postMessage(n.data,"*")}}));setInterval((()=>{if(null!==t){const e=document.getElementsByName(t)[0];s((e=>{if(e&&e.offsetParent){const a=getComputedStyle(e);return"none"!=a.display&&"visible"==a.visibility}return!1})(e))}}),100)}();