(function() { class WmseUtils { static isHomePage() { if (window.hasOwnProperty('ShopifyAnalytics') && window.ShopifyAnalytics.hasOwnProperty('meta') && window.ShopifyAnalytics.meta.hasOwnProperty('page') && window.ShopifyAnalytics.meta.page.hasOwnProperty('pageType') && window.ShopifyAnalytics.meta.page.pageType !== undefined) { return ShopifyAnalytics.meta.page.pageType === 'home'; } const pathname = window.location.pathname; const langCodePattern = /^\/[a-z]{2}(\/)?$/; return pathname === '/' || pathname === '' || langCodePattern.test(pathname); } } console.log('%c------ 3D Seasonal Effects by Effective Apps is Initializing ------', 'color: cyan'); console.log('%c------ Contact us at support@effectify.co for help and questions about the app ------', 'color: cyan'); if (window.WMSE_SCRIPT_INJECTED !== undefined) { return; } window.WMSE_SCRIPT_INJECTED = true; function wmseMain() {
	let initialDisplay = "block";
    if ('2' === '2') {
        if (!WmseUtils.isHomePage())
            initialDisplay = "none";
    }
    else if ('3' === '2' && 'https://mrchristmas.com/collections/mr-halloween'.split(",").every(url => new URL(url).pathname !== window.location.pathname)) {
        initialDisplay = "none";
    }

    jQuery("head").prepend('<style>#effectiveAppsSnow{display: ' + initialDisplay + '; position:fixed;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:1000}</style>')
    jQuery("body").prepend('<div id="effectiveAppsSnow"></div>');
    wmseLoadScript("https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js", wmseInitSnow)
    let effectTimeout = parseInt('15');
    if (effectTimeout > 0) {
        setTimeout(function() {
            document.getElementById('effectiveAppsSnow').style.display = "none";
        }, effectTimeout * 1000);
    }
}

function wmseInitSnow() {
    particlesJS("effectiveAppsSnow", {
        "particles": {
            "number": {
                "value": parseInt('120'),
                "density": {
                    "enable": true,
                    "value_area": 800
                }
            },
            "color": {
                "value": "#ffffff"
            },
            "opacity": {
                "value": 0.7,
                "random": false,
                "anim": {
                    "enable": false
                }
            },
            "size": {
                "value": 5,
                "random": true,
                "anim": {
                    "enable": false
                }
            },
            "line_linked": {
                "enable": false
            },
            "move": {
                "enable": true,
                "speed": parseInt('3'),
                "direction": "bottom",
                "random": true,
                "straight": false,
                "out_mode": "out",
                "bounce": false,
                "attract": {
                    "enable": true,
                    "rotateX": 300,
                    "rotateY": 1200
                }
            }
        },
        "interactivity": {
            "events": {
                "onhover": {
                    "enable": false
                },
                "onclick": {
                    "enable": false
                },
                "resize": false
            }
        },
        "retina_detect": true
    });
}

function wmseLoadScript(url, success){
     var script = document.createElement('script');
     script.src = url;
     var head = document.getElementsByTagName('head')[0],
     done = false;
     head.appendChild(script);
     script.onload = script.onreadystatechange = function() {
        if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
             done = true;
             success();
             script.onload = script.onreadystatechange = null;
             head.removeChild(script);
        }
    };
}

if (typeof jQuery === 'undefined'){
    wmseLoadScript('https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js', wmseMain);
} else {
    wmseMain();
}function WMSE_getShopifyThemeName() { try { if (window.WMSE_THEME_OVERRIDE !== undefined) { return window.WMSE_THEME_OVERRIDE; } if (window.BOOMR !== undefined && window.BOOMR.themeName !== undefined && window.BOOMR.themeName.length > 0) { return window.BOOMR.themeName.toLowerCase(); } else { return Shopify.theme.name.toLowerCase(); } } catch (err) { return ""; } } function getLsWithExpiry(key){const itemStr=localStorage.getItem(key);if (!itemStr){return null;}const item=JSON.parse(itemStr);const now=new Date();if (now.getTime() > item.expiry){localStorage.removeItem(key);return null;}return item.value.toString();}function setLsWithExpiry(key, value, ttl){value=value.toString();const now=new Date();const item={value: value,expiry: now.getTime() + ttl,};localStorage.setItem(key, JSON.stringify(item));} function verifyjQuery(e){if("undefined"==typeof jQuery){var t=document.createElement("script");t.src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js";var a=document.getElementsByTagName("head")[0],n=!1;a.appendChild(t),t.onload=t.onreadystatechange=function(){n||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(n=!0,e(),t.onload=t.onreadystatechange=null,a.removeChild(t))}}else e()} verifyjQuery(function() { function addCssToDocument(css){ var style = document.createElement('style'); style.innerText = css; document.head.appendChild(style); } addCssToDocument('[effective-apps-decoration="true"] { zoom: 0.8; } @media all and (max-width: 600px) { [effective-apps-decoration="true"] { zoom: 0.7 !important; } }'); if ("3"==="7" && null===getLsWithExpiry("wmse_payg_i")){jQuery.get("https://app.seasoneffects.com/ri/ee4b9af2987711ef88acaacba7fd3b42.js"); setLsWithExpiry("wmse_payg_i", "true", 604800000);}  if (['ella', 'wayan', 'halo', 'bonnita'].includes(WMSE_getShopifyThemeName())) { addCssToDocument('*:empty { display: unset; }'); } if (['halo'].includes(WMSE_getShopifyThemeName())) { addCssToDocument('.background-overlay{display:none!important;}'); } if (['shapes', 'flex', 'lumia', 'publisher'].includes(WMSE_getShopifyThemeName())) { addCssToDocument('html, body { width: unset !important; height: unset !important; }'); } }); setTimeout(function() { window.EFFECTIVE_APPS_WMSE_TIMEOUT_REACHED = true; for (let decoration of document.querySelectorAll('[effective-apps-decoration="true"]')) {decoration.style.display = "none";} }, 15000) }());