!function(t){"use strict";t(document).ready((function(){const e=document.querySelectorAll("[data-popup-id]");0!==e.length&&e.forEach((function(e){const n=e.getAttribute("data-popup-id"),o="true"===e.getAttribute("data-close-bg-click"),c="true"===e.getAttribute("data-show-close-btn"),i=e.getAttribute("data-popup-animation")||"mfp-fade",a=e.getAttribute("data-close-button-color"),l=e.querySelector(".wp-block-button__link, .wp-element-button, a, button");l&&(t(l).magnificPopup({items:{src:n,type:"inline"},mainClass:i,closeOnBgClick:o,showCloseBtn:c,closeBtnInside:!0,fixedContentPos:!0,removalDelay:300,callbacks:{beforeOpen:function(){this.st.mainClass=i},open:function(){if(a){const t=this.wrap.find(".mfp-close");t.length&&t.css("color",a)}}}}),l.addEventListener("click",(function(t){t.preventDefault()})))}))}))}(jQuery);