!function(){function e(e){let n="home"===e?"https://cdn.addi.com/home-banner-widget/prod/v1/home-banner-widget.esm.js":"https://cdn.addi.com/product-details-widget/prod/v1/product-details-widget.esm.js";const t=document.createElement("script");t.type="module",t.src=n,document.head.append(t)}const n=document.querySelector('script[data-name="wooAddiHomeBanner"]'),t=n?n.getAttribute("data-ally-slug"):null,a={showBanner:!1,bannerId:"",bannerElementRef:""};new Date;let d=null;function r(){jQuery("addi-widget").on("onWidgetRenderedEvent",(function(){})),jQuery("addi-widget").on("onWidgetClickedEvent",(function(){new Date}));const t=function(){const e=["/"];"undefined"!=typeof addiParams&&e.push(addiParams.home_url);const n=window.location.pathname;return e.some((e=>n===e))?"Home":""}();"undefined"!=typeof addiParams?"Home"===t&&null!=n?(a.showBanner="true"===n.getAttribute("data-show-banner"),a.bannerElementRef=n.getAttribute("data-banner-element-reference"),a.bannerId=n.getAttribute("data-banner-id"),a.showBanner&&o()):"true"==addiParams.is_product&&e("product"):"Home"===t&&null!=n?(a.showBanner="true"===n.getAttribute("data-show-banner"),a.bannerElementRef=n.getAttribute("data-banner-element-reference"),a.bannerId=n.getAttribute("data-banner-id"),a.showBanner&&o()):e()}function o(){e("home");const n=d||function(e){if(e)return d=document.querySelector(e),d}(a.bannerElementRef);if(n){const e=document.querySelector("addi-home-banner");e&&e.remove();const d=document.createElement("addi-home-banner");a.bannerId&&(d.setAttribute("ally-slug",t),d.setAttribute("banner-id",a.bannerId)),r=d,(o=n).parentNode.insertBefore(r,o.nextSibling)}else console.log("No reference node was not found for home banner.");var r,o}"complete"===document.readyState||"interactive"===document.readyState?r():document.addEventListener("DOMContentLoaded",r)}()