(function() {
    var name = '';
    var inventory = "S:nYrEvWWcqUkAKowqzw0-uh85a86ryE6RycwSPzqPavTz-qRxe2Vb4kpgr5R3SnQbmThU5nOZUV3hJGInqzULTbFYx7GxrFcSLBTX9PJDhqIn8ITe4SkvtVg7F7j1g1tigUiAXadmeimwB7M7Yo5mGtUUizHbpLZFf2O04Q==";
    var logSampleRatePercent = -1;
    var logSampling = Math.random() * 100 <= logSampleRatePercent;
    var isIE = (function() {
        var ver = navigator.userAgent.match(/MSIE ([0-9]{1,}[\\.0-9]{0,})|Trident\/.*rv:([0-9]{1,}[\\.0-9]{0,})/);
        if (!ver) {
            return false;
        }
        ver.shift();
        return ver.filter(function(str) { return str != undefined; }).pop();
    });
    var logEvent = function (event) {
        if (!logSampling) {
            logger('log sampling disabled, event: ' + event);
            return;
        }
        var eventURL = new URL("https:\/\/ads.counciladvertising.net\/event\/log");
        eventURL.searchParams.set('inventory', inventory);
        eventURL.searchParams.set('event', event);
        var xhr = new XMLHttpRequest();
        xhr.open('GET', eventURL.toString());
        logger('sending audit event: ' + event);
        xhr.send();
    };
    var debuggingEnabled = function () {
        if (window.location && window.location.search.indexOf('can_debug') !== -1) {
            return true;
        }

        return window.localStorage && window.localStorage.getItem('can_debug') == 'true';
    }
    var logger = function () {
        if (debuggingEnabled()) {
            if (window._canStore && !window._canStore.debugLogsPrinted) {
                window._canStore.debugLogsPrinted = true;

                if (isIE()) {
                    console.debug(
                        "[CAN] If you can see this, CAN debug logs are turned ON"
                    );
                } else {
                    console.debug(
                        "%c[CAN] %cIf you can see this, CAN debug logs are turned ON",
                        "font-size: 3em; color: #267cae; font-weight: bolder; font",
                        "font-size: 3em; color: #f47401; font-weight: bold"
                    );
                }
            }
            for (var msgKey in arguments) {
                var msg = arguments[msgKey];
                console.debug("[can] [" + name + "]: "+msg);
            }
        }
    };
    logEvent('script_load');
    (function(currentScript) {
    if (!window._canStore) {
        window._canStore = {};
    }
    name = "div-gpt-ad-visitwest-doublempu";
    var isSlotEnabled = false;
    var isRTBEnabled = false;
    var consentDecisionMade = false;
    var consentManagement = true;
    var segmentationCategories = [];

    if (consentManagement) {
        logger('waiting for IAB CMP to provide consent info');
        var cmpFrame = null;
        var cmpInterval = null;

        var checkConsent = function (tcData, success) {
                        if (consentDecisionMade) {
                return;
            }

            var shouldCheckConsent = tcData.gdprApplies !== false;

            var requiredPurposes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            var purposesWithoutConsent = requiredPurposes
                .filter(function (key) {
                    return tcData.purpose.consents[key] !== true
                        && tcData.purpose.legitimateInterests[key] !== true;
                });

            var vendorsWithConsent = Object
                .keys(tcData.vendor.consents)
                .map(function (key) { return parseInt(key); })
                .filter(function (key) {
                    return tcData.vendor.consents[key] === true;
                });

            var consentGranted = !shouldCheckConsent ||
                (
                    vendorsWithConsent.length > 0
                    && purposesWithoutConsent.length === 0
                    && tcData.isServiceSpecific
                );

            if (consentGranted) {
                clearInterval(cmpInterval);
                consentDecisionMade = true;
                logEvent('consent_granted');
                logger('consent granted; continuing');
                if (cmpFrame) {
                    cmpFrame.postMessage(
                        {
                            __tcfapiCall: {
                                command: 'removeEventListener',
                                version: 2,
                                callId: Math.random()+'',
                                parameter: tcData.listenerId
                            }
                        },
                        '*'
                    );
                    window.removeEventListener('message', readPostMessage);
                } else {
                    window.__tcfapi('removeEventListener', 2, function () {}, tcData.listenerId);
                }
                beginInit();
            } else {
                logEvent('consent_denied');
                logger('consent not granted; exiting');
                window._canStore.consent = {
                    vendorsWithConsent: vendorsWithConsent,
                    purposesWithoutConsent: purposesWithoutConsent,
                };
            }
        }

        var getTCFLocatorFrame = function() {
            let frame = window;

            while (frame) {
                try {
                    if (frame.frames['__tcfapiLocator']) {
                        cmpFrame = frame;
                        break;
                    }
                } catch (ignore) {}

                if (frame === window.top) {
                    break;
                }
                frame = frame.parent;
            }

            return cmpFrame;
        }

        var readPostMessage = function (event) {
            var payload = event.data;
            try {
                if (typeof payload === 'string') {
                    payload = JSON.parse(payload);
                }
            } catch (ignore) { }
            if (!payload || !payload.__tcfapiReturn) {
                return;
            }
            var commandResult = payload.__tcfapiReturn.returnValue;
            if (! commandResult.tcString) {
                return;
            }

            checkConsent(payload.__tcfapiReturn.returnValue, payload.__tcfapiReturn.success);
        };

        var checkForCMP = function (delay) {
            if (window.__tcfapi) {
                logger('found TCF API via current window');
                cmpInterval = setInterval(function () {
                    window.__tcfapi('addEventListener', 2, checkConsent);
                }, 150);
                return;
            }
            var locatorFrame = getTCFLocatorFrame();
            var cmpFrame = locatorFrame;
            if (locatorFrame && locatorFrame != window.top) {
                cmpFrame = locatorFrame.parent;
            }

            if (cmpFrame) {
                logger('found TCF API via locator frame');
                window.addEventListener(
                    'message',
                    readPostMessage,
                    false
                );
                cmpInterval = setInterval(function () {
                    cmpFrame.postMessage(
                        {
                            __tcfapiCall: {
                                command: 'addEventListener',
                                version: 2,
                                callId: Math.random()+'',
                            }
                        },
                        '*'
                    );
                }, 150);
                return;
            }

            var nextDelay = delay + 100;
            setTimeout(checkForCMP, nextDelay, nextDelay);
            return;
        };
        setTimeout(checkForCMP, 0, 0);
    } else {
        setTimeout(function () { beginInit() }, 0);
    }

    var validateRTBResponse = function (xhr) {
        if (xhr.status != 200) {
            logger('slot and RTB are disabled: a failure occurred resolving the RTB check for ' + window.location.href, xhr.status, xhr.statusText, xhr.responseText);
            isSlotEnabled = false;
            isRTBEnabled = false;
            return;
        }
        var responseJson;
        try {
            responseJson = JSON.parse(xhr.responseText);
        } catch (err) {
            logger('slot and RTB are disabled: a failure occurred parsing the RTB response', err);
            isSlotEnabled = false;
            isRTBEnabled = false;
            return;
        }

        if (responseJson.is_blocked) {
            logger('slot is disabled: endpoint is blocked');
            isSlotEnabled = false;
        } else {
            logger('slot is enabled');
            isSlotEnabled = true;
        }

        if (responseJson.is_sensitive) {
            logger('RTB is disabled: endpoint is sensitive');
            isRTBEnabled = false;
        } else {
            logger('RTB is enabled');
            isRTBEnabled = true;
        }

        if (responseJson.categories) {
            logger('Received segmentation categories: ' + responseJson.categories.join(', '));
            segmentationCategories = responseJson.categories;
        }
    };

    var beginInit = function () {
        logger('checking RTB state');

        var windowURL = window.location.hostname + window.location.pathname;
        var xhr = new XMLHttpRequest();
        xhr.open('GET', "https:\/\/ads.counciladvertising.net\/tag\/config\/visitwest\/doublempu" + "?url=" + encodeURIComponent(windowURL));
        xhr.setRequestHeader('Accept', 'application/json');

        xhr.onload = function() {
            validateRTBResponse(xhr);
            start();
        };
        xhr.onerror = function() {
            logger('a failure occurred resolving the RTB check for ' + window.location.href);
            start();
        };

        xhr.send();
    };
    var start = function() {
        if (! isSlotEnabled) {
            return;
        }
        var blacklist = ["@","%2540","%40","user=","email=","emailaddress=","password=","pw=","un=","username="];

var shouldAbortDueToPII = function () {
    var url = (window.location.search || window.location.href).toLowerCase();
    for (var i = 0; i < blacklist.length; i++) {
        var word = blacklist[i];
        if (url.indexOf(word) !== -1 || decodeURIComponent(url).indexOf(word) !== -1) {
            logger("aborted load after finding "+word);
            return true;
        };
    };

    return false;
}

if (isRTBEnabled) {
    (function() {
        var script = document.createElement('script');
        var url = "https:\/\/cdn.pbxai.com\/e2140966-98d4-471a-b2f6-1c773ac644dc.js";

        script.setAttribute('async', 'async');



        var singleton = true;
        if (singleton) {
            if (window._canStore[btoa(url)]) {
                return;
            }
            window._canStore[btoa(url)] = true;
        }
        script.setAttribute('src', url);
        document.head.appendChild(script);
    })();
}

var sizeMapping = [{"minWidth":0,"sizes":[[300,600],[300,250],[300,189]]}];
var sizeConfig = [{"mediaQuery":"(min-width: 980px)","sizesSupported":[[728,90]],"labels":["desktop"]},{"mediaQuery":"(min-width: 0px) and (max-width: 980px)","sizesSupported":[[320,50]],"labels":["mobile"]},{"mediaQuery":"(min-width: 0px)","sizesSupported":[[320,50],[300,250],[300,189],[120,600],[160,600],[300,600],[970,250]]},{"mediaQuery":"(min-width: 900px)","sizesSupported":[[728,90],[970,250],[970,90]],"labels":["desktop"]},{"mediaQuery":"(min-width: 580px) and (max-width: 899px)","sizesSupported":[[728,90]],"labels":["tablet"]},{"mediaQuery":"(min-width: 0px) and (max-width: 579px)","sizesSupported":[[320,50],[300,50]],"labels":["mobile"]}];
var sizes = [[300,600],[300,250],[300,189]];

window._canStore = window._canStore || {};
window._canStore.units = window._canStore.units || {};
var adunit = "doublempu";
window._canStore['units'][adunit] = window._canStore['units'][adunit] || 0;
window._canStore['units'][adunit]++;
var div_id = "div-gpt-ad-visitwest-doublempu-"+window._canStore['units'][adunit];

var before = "",
    div = '<div style="display:inline-block"><div id="'+div_id+'-parent"><div id="'+div_id+'"></div></div></div>',
    after = "",
    uri = "\/code\/visitwest\/doublempu\/public";
var slotContent = before+div+after;

var findScript = function() {
    var scripts = document.getElementsByTagName("script");
    for (var i = 0; i < scripts.length; i++) {
        if (!scripts[i].hasAttribute("data-can-ad")) {
            continue;
        };
        if (scripts[i].getAttribute("data-can-ad") != "") {
            continue;
        };
        if (scripts[i].getAttribute("src").indexOf(uri) !== -1) {
            return scripts[i];
        };
    };
    return null;
};

var cScript = currentScript || findScript();
if (!cScript) {
    throw new Error("Could not find the currently executing CAN script (are you missing data-can-ad attribute?)");
}

cScript.setAttribute('data-can-ad', 'loading');
cScript.insertAdjacentHTML('beforeBegin', before+div+after);
var adSlot = document.getElementById(div_id);
var adParent = adSlot.parentNode;

var can_metricsInit = function () {
    if (!can_isMaster) {
        return;
    }

    window.googletag.cmd.push(function() {
        var assertive_entityId = 'ZqQR9DLXHDW57pd3g';
        var assertive_debug = 0;
        var assertive_sampleRate = 1/13;
        var assertive_timeout = AUCTION_TIMEOUT_MS;
        var assertive_layout = '';
        var assertive_userState = null;
        var custom1 = [];
        if (uamEnabled) {
            custom1.push('uam');
        }
        if (consentManagement) {
            custom1.push('consentManagement');
        }
        var assertive_custom_1 = custom1.join('-');
        var assertive_custom_2 = getCPMAdjustment();
        var assertive_custom_4 = window._canStore.auction_count;
        window.addEventListener('canSlotBidded', function (e) {
            assertive_custom_4 = e.auction_number;
        });
        var assertive_custom_5 = isFixedOrder ? 'fixedOrder' : 'random';

        !function () {
            'use strict';
            var I = '1.8', _ = 'https://api.assertcom.de', e = 'assertive_analytics_', y = e.concat('sessionUUID'), s = e.concat('sessionStart'), a = e.concat('sessionRandom'), h = e.concat('sessionUTM'), b = e.concat('sessionReferrer'), w = E(), U = [], S = [], t = t || localStorage.getItem('assertiveYield') && -1 !== localStorage.getItem('assertiveYield').indexOf('debug') || -1 !== d('assertiveYield').indexOf('debug');
            function E(e) {
                return e ? (e ^ 16 * Math.random() >> e / 4).toString(16) : ([10000000] + -1000 + -4000 + -8000 + -100000000000).replace(/[018]/g, E);
            }
            function d(e) {
                return decodeURI(window.location.search.replace(new RegExp('^(?:.*[&\\?]' + escape(e).replace(/[\.\+\*]/g, '\\$&') + '(?:\\=([^&]*))?)?.*$', 'i'), '$1'));
            }
            function R(e) {
                t && console.log(e);
            }
            Array.prototype.find || Object.defineProperty(Array.prototype, 'find', {
                value: function (e) {
                    if (null == this)
                        throw new TypeError('"this" is null or not defined');
                    var t = Object(this), n = t.length >>> 0;
                    if ('function' != typeof e)
                        throw new TypeError('predicate must be a function');
                    for (var i = arguments[1], r = 0; r < n;) {
                        var o = t[r];
                        if (e.call(i, o, r, t))
                            return o;
                        r++;
                    }
                },
                configurable: !0,
                writable: !0
            }), function () {
                if (!localStorage.getItem(s) || Date.now() > localStorage.getItem(s)) {
                    localStorage.setItem(y, E()), localStorage.setItem(a, Math.random()), document.referrer ? localStorage.setItem(b, document.referrer) : localStorage.removeItem(b);
                    var e = [
                            'utm_source',
                            'utm_medium',
                            'utm_campaign',
                            'utm_term',
                            'utm_content'
                        ], t = {};
                    for (var n in e) {
                        var i = e[n], r = d(i);
                        '' !== r && (t[i] = r);
                    }
                    var o = JSON.stringify(t);
                    o !== JSON.stringify({}) ? localStorage.setItem(h, o) : localStorage.removeItem(h);
                }
                localStorage.setItem(s, Date.now() + 1800000);
            }(), -1 !== d('assertiveYield').indexOf('check') && alert('Assertive Yield: Check'), ('undefined' == typeof assertive_sampleRate || assertive_sampleRate && localStorage.getItem(a) < assertive_sampleRate) && function e() {
                if (n)
                    return;
                if ('undefined' == typeof googletag || !googletag.pubadsReady)
                    return void setTimeout(e, 20);
                n = !0;
                var v = null;
                window.addEventListener('blur', function () {
                    if (v) {
                        var e = new XMLHttpRequest(), t = _ + '?event=click&entityId=' + assertive_entityId + '&impressionUUID=' + U[v];
                        e.open('GET', t, !0), e.send();
                    }
                });
                googletag.cmd.push(function () {
                    googletag.pubads().addEventListener('slotRenderEnded', function (e) {
                        if (!e.isEmpty)
                            if ('undefined' != typeof assertive_entityId) {
                                var t = e.slot, n = t.getSlotElementId(), i = t.getAdUnitPath(), r = document.getElementById(n), o = null;
                                if (r) {
                                    if (pbjs.adUnits.find(function (e) {
                                            return e.code === n;
                                        }))
                                        o = n;
                                    else {
                                        if (!pbjs.adUnits.find(function (e) {
                                                return e.code === i;
                                            }))
                                            return;
                                        o = i;
                                    }
                                    var s = r.getElementsByTagName('iframe')[0];
                                    s.addEventListener('mouseover', function () {
                                        v = n;
                                    }), s.addEventListener('touchstart', function () {
                                        v = n;
                                    }), s.addEventListener('mouseout', function () {
                                        v = null;
                                    }), s.addEventListener('touchend', function () {
                                        v = null;
                                    });
                                    var a = t.getHtml(), d = /(?:pbjs\.renderAd\(document, |adId: |hb_adid":\[|adId[\s]+=[\s]+)['"](.*?)["']/g.exec(a), l = d ? d[1] : t.getTargeting('hb_adid')[0], u = !!d, c = pbjs.getBidResponsesForAdUnitCode(o).bids.find(function (e) {
                                            return e.adId === l;
                                        });
                                    U[n] = E(), R('Session UUID: ' + localStorage.getItem(y) + ', PageView UUID: ' + w + ', Impression UUID: ' + U[n]), R('Slot Id: ' + n + ', AdUnitPath: ' + i), c && R(' - Highest PreBid ' + c.cpm + ' from ' + c.bidderCode + ' with id ' + l), c || R(' - No PreBids!!!'), R(' - Winner: ' + (u ? 'prebid' : 'dfp (Direct/AdX/AdSense)') + ' with size ' + (u ? c.width : e.size[0]) + 'x' + (u ? c.height : e.size[1])), R('---------------');
                                    var m = null, p = null;
                                    c && (c.appnexus ? m = c.appnexus.buyerMemberId ? c.appnexus.buyerMemberId : null : c.rubicon && (m = c.rubicon.networkId ? c.rubicon.networkId : null, p = c.rubicon.advertiserId ? c.rubicon.advertiserId : null));
                                    var realCPM = c ? c.cpm * getBidderCPMAdjustment(c.bidderCode) : 0;
                                    var f = {
                                        version: I,
                                        entityId: assertive_entityId,
                                        siteUUID: 'undefined' != typeof assertive_siteUUID ? assertive_siteUUID : null,
                                        sessionUUID: localStorage.getItem(y),
                                        pageViewUUID: w,
                                        impressionUUID: U[n],
                                        slotId: n,
                                        adUnitPath: i,
                                        highestPreBid: realCPM,
                                        highestPreBid_partner: c ? c.bidderCode : '',
                                        buyerId: m,
                                        brandId: p,
                                        dealId: c && c.dealId ? c.dealId : null,
                                        creativeId: c && c.creativeId ? c.creativeId : null,
                                        mediaType: c && c.mediaType ? c.mediaType : null,
                                        currency: c && c.currency ? c.currency : null,
                                        netRevenue: c && c.netRevenue ? c.netRevenue : null,
                                        creative_width: u ? c.width : e.size[0],
                                        creative_height: u ? c.height : e.size[1],
                                        preBidWon: u,
                                        timeToRespond: c ? c.timeToRespond : null,
                                        protocol: window.location.protocol,
                                        host: window.location.host,
                                        pathname: window.location.pathname,
                                        pathname_split: window.location.pathname.split('/').filter(function (e) {
                                            return e;
                                        }),
                                        referrer: localStorage.getItem(b),
                                        utm: localStorage.getItem(h),
                                        prebid_timeout: assertive_timeout || null,
                                        prebid_version: pbjs.version || null,
                                        userState: 'undefined' != typeof assertive_userState ? assertive_userState : null,
                                        layout: 'undefined' != typeof assertive_layout ? assertive_layout : null,
                                        custom_1: 'undefined' != typeof assertive_custom_1 ? assertive_custom_1 : null,
                                        custom_2: 'undefined' != typeof assertive_custom_2 ? assertive_custom_2 : null,
                                        custom_3: 'undefined' != typeof assertive_custom_3 ? assertive_custom_3 : null,
                                        custom_4: 'undefined' != typeof assertive_custom_4 ? assertive_custom_4 : null,
                                        custom_5: 'undefined' != typeof assertive_custom_5 ? assertive_custom_5 : null,
                                        bps_type: t.getTargeting('ay_bid')[0] || null,
                                        bps_algo: t.getTargeting('ay_algo')[0] || null
                                    };
                                    S.push(f);
                                    var g = new XMLHttpRequest();
                                    g.open('POST', _, !0), g.setRequestHeader('Content-Type', 'text/plain'), g.send(JSON.stringify(f)), R('SENT!!!');
                                }
                            } else
                                console.error('Assertive Yield: Entity ID is mandatory and not defined, exiting...');
                    }), googletag.pubads().addEventListener('impressionViewable', function (e) {
                        var t = e.slot.getSlotElementId();
                        if (U[t]) {
                            var n = new XMLHttpRequest(), i = _ + '?event=activeView&entityId=' + assertive_entityId + '&impressionUUID=' + U[t];
                            n.open('GET', i, !0), n.send();
                        }
                    });
                });
            }();
            var n = !1;
        }();
    });
};

window.addEventListener('can_firstLoad', can_metricsInit);

var AUCTION_TIMEOUT_MS = 1500;
var can_render_at = null;
var can_bidding = true;
var can_isMaster = false;
var gpt_slot = null;
var aborted = false;
var gdpr_code = null;
var auctionTimeoutTimer = null;
var premiumCampaigns = [];
var adUnits = [{
    code: div_id,
    sizeConfig: sizeConfig,
    mediaTypes: {
        banner: {
            sizes: sizes,
        },
    },
    bids: [{"bidder":"rubicon","params":{"accountId":"13950","siteId":"448890","zoneId":"2605396","position":"atf"}},{"bidder":"appnexus","params":{"placementId":"28018624"}},{"bidder":"richaudience","params":{"pid":"z0Mtlyn9PF","supplyType":"site"}},{"bidder":"onetag","params":{"pubId":"76fa7f635ee4817","ext":{"placement_name":"van_visitwest"}}},{"bidder":"sharethrough","params":{"pkey":"TeN3PLwGcMdgYsmTDoIHUnKH"}}],
}];
var uamEnabled = true;
var prebidEnabled = true;
var tamTest = false;
var geoEdgeEnabled = false;
var id5Enabled = true;
var backgroundEnabled = false;

var mobileWidth = 980;

if (backgroundEnabled) {
    logger('Enabling ad slot background');
    adParent.style.background = '#545454';
    adParent.style.color = 'white';
    adParent.style['text-align'] = 'right';
    adParent.style['padding'] = '2px';

    var backgroundText = document.createElement('div');
    backgroundText.style.paddingRight = '5px';
    backgroundText.style.fontSize = '0.8em';
    if (window.innerWidth > mobileWidth) {
        backgroundText.innerText = "Advertisement";
    } else {
        backgroundText.innerText = "Advertisement";
    }
    adParent.appendChild(backgroundText);
}

var durationId = null;
var durationTest = null;
var durationTestKey = "dm_ab_all";
var assertive_custom_3 = null;

var apsSlot = {
    slotID: div_id,
    sizes: sizes,
    slotName: adunit,
};
if (!window._canStore.auction_count) {
    window._canStore.auction_count = {};
}
window._canStore.auction_count[div_id] = 0;

var mobileOnly = false;
var desktopOnly = false;
var safeFrame = false;
var sandbox = false;
var isFixedOrder = Math.random() < 0.5;
var shouldAbortDueToViewport = function () {
    if (mobileOnly && window.innerWidth > mobileWidth) {
        return true;
    }
    if (desktopOnly && window.innerWidth <= mobileWidth) {
        return true;
    }
    return false;
};

if (window.innerWidth > mobileWidth && durationTest !== null) {
    durationTest = null;
}
if (durationTest !== null) {
    logger('Duration Media test is ' + (durationTest ? 'enabled' : 'disabled') + ', key: ' + durationTestKey);
} else {
    logger('Not eligible for Duration Media test');
}
if (durationTest) {
    var script = document.createElement('script');
    script.setAttribute('async', 'async');
    script.setAttribute('id', 'dm-script');
    script.setAttribute('src', 'https://tag.durationmedia.net/sites/' + durationId + '/dm.js');
    document.head.appendChild(script);
}

if (shouldAbortDueToViewport()) {
    aborted = true;
}
if (shouldAbortDueToPII()) {
    aborted = true;
}

var bidderCPMAdjustments = {"districtm":0.85,"emxdigital":0.8};

var isPremium = function (campaignId) {
    return premiumCampaigns.indexOf(campaignId) !== -1;
}

var isBidAdjustmentControl = function () {
    return true;
}

var getCPMAdjustment = function () {
    return 1;
    return 3.75;
};

var getBidderCPMAdjustment = function (bidder) {
    return (bidderCPMAdjustments[bidder] ? bidderCPMAdjustments[bidder] : 1);
};

var adjustBidCPM = function(bidcpm, bidder) {
    return bidcpm * getCPMAdjustment() * getBidderCPMAdjustment(bidder);
};

var getCurrentAuctionCount = function () {
    return window._canStore.auction_count[div_id];
};

var getBAKeyValue = function() {
    if (isBidAdjustmentControl()) {
        return "control:" + getCPMAdjustment();
    }
    return getCPMAdjustment();
};

var incrementAuctionCount = function (adUnitCode) {
    if (adUnitCode !== undefined) {
        window._canStore.auction_count[adUnitCode]++;
        return window._canStore.auction_count[adUnitCode];
    }

    for (var adKey in window._canStore.auction_count) {
        window._canStore.auction_count[adKey]++;
    }
};

var addScript = function(url, callback, timeout) {
    var script = document.createElement("script");

    script.type = "text/javascript";
    script.src = url;
    script.async = 'async';
    if (callback) {
        var hasLoaded = false;
        var runCallback = function (ev) {
            if (!hasLoaded) {
                hasLoaded = true;
                if (!ev) {
                    logger('script load timedout');
                }
                callback(ev);
            }
        };
        script.addEventListener('error', runCallback);
        script.addEventListener('load', runCallback);
        if (timeout) {
            setTimeout(function () {
                runCallback(null);
            }, timeout);
        }
    }
    var head = document.head || document.getElementsByTagName('head')[0];
    head.appendChild(script);

    return script;
};

var load_pbjs = function (cdns) {
    if (cdns.length === 0) {
        logger('Failed to fetch prebid.js from all locations');
        return;
    }
    var cdn = cdns.shift();
    logger('loading pbjs from ' + cdn);
    var canpb = document.createElement('script');
    canpb.async = true;
    canpb.type = 'text/javascript';
    canpb.src = cdn;
    canpb.addEventListener('error', function (ev) {
        this.parentNode.removeChild(this);
        load_pbjs(cdns);
    });
    canpb.addEventListener('load', function (ev) {
        logger('pbjs loaded');
    });
    var pbnode = document.getElementsByTagName('script')[0];
    pbnode.parentNode.insertBefore(canpb, pbnode);
};

if (isRTBEnabled && !window._canStore.pbjs_loading && prebidEnabled) {
    logger("loading pbjs");
    window.pbjs = window.pbjs || {};
    window.pbjs.que = window.pbjs.que || [];

    var cdn_locations = ["https:\/\/can-cdn.net\/v3\/prebid\/1748442418.js","https:\/\/assets.counciladvertising.net\/v3\/prebid\/1748442418.js"];
    load_pbjs(cdn_locations);
    window._canStore.pbjs_loading = true;
};

var geoEdgeQueue = [];
var whenGeoEdgeLoaded = function (callback) {
    if (!isRTBEnabled || !geoEdgeEnabled) {
        callback();
        return;
    }
    if (geoEdgeEnabled && window._canStore.geoEdgeLoaded) {
        callback();
        return;
    }
    if (geoEdgeEnabled && !window._canStore.geoEdgeLoaded) {
        geoEdgeQueue.push(callback);
        return;
    }
    callback();
    return;
}
var processGeoEdgeQueue = function() {
    logger('processing geo edge queue');
    logger('calling ' + geoEdgeQueue.length + ' callbacks');
    for (var key in geoEdgeQueue) {
        var callback = geoEdgeQueue[key];
        callback();
    }
    geoEdgeQueue = [];
};

if (isRTBEnabled && geoEdgeEnabled && window._canStore.geoEdgeLoaded === undefined) {
    window._canStore.geoEdgeLoaded = false;
    window.grumi = {
        cfg: {
            advs: {
                "4550639478": true,
                "4731635477": true,
                "4771136304": true,
                "4844267673": true,
                "4893277808": true,
                "1147205061": true,
                "4575376766": true,
                "4581615339": true,
                "1076514141": true,
                "1036619421": true,
                "1046124261": true,
                "1095599781": true,
                "4569555814": true,
                "1827299661": true,
                "4569014878": true,
                "4550997071": true,
                "931563021": true,
                "4732150468": true,
                "939827661": true,
                "4585520617": true,
                "4585520839": true,
                "2038354221": true,
                "4556310368": true,
                "4487282594": true,
                "4655112892": true,
                "4936550325": true,
                "4893274799": true
            }
        },
        key: '99cae4d2-6e12-4f07-9590-b7d4d16635e2'
    };

    logger('loading geoedge');
    addScript('https://rumcdn.geoedge.be/99cae4d2-6e12-4f07-9590-b7d4d16635e2/grumi-ip.js', function (ev) {
        window._canStore.geoEdgeLoaded = true;
        logger('geoedge loaded');
        processGeoEdgeQueue();
    }, 4000);
}

var loadGPT = function () {
    logger("loading gpt");

    var gads = document.createElement('script');
    gads.async = true;
    gads.type = 'text/javascript';
    gads.src = 'https://securepubads.g.doubleclick.net/tag/js/gpt.js';
    var gan = document.getElementsByTagName('script')[0];
    gan.parentNode.insertBefore(gads, gan);
};
if (!window.googletag) {
    window.googletag = window.googletag || {};
    window.googletag.cmd = window.googletag.cmd || [];

    whenGeoEdgeLoaded(function () {
        loadGPT();
    });

    logger("I will load GPT");
} else {
    logger("I will not load GPT");
}

window.googletag.cmd.push(function() {
    logger('gpt ready');
    window.googletag.pubads().setTargeting('hb_auction_type', 'default');
    if (!isRTBEnabled) {
        window.googletag.pubads().setTargeting('scdexcl', 'true');
    }
    if (durationTest !== null) {
        window.googletag.pubads().setTargeting(durationTestKey, durationTest ? 'enabled' : 'disabled');
    }
});

if (isRTBEnabled && uamEnabled) {
    !function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function(){q("i",arguments)},fetchBids:function(){q("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)}("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js");
    apstag.init({
        pubID: '9547a513-f2e5-4004-bd92-dc734efe7cf2',
        adServer: 'googletag',
        simplerGPT: true,
        schain: {
            complete: 1,
            ver: "1.0",
            nodes: [
                {
                    asi: "can-digital.net",
                    sid: "496",
                    hp: 1,
                }
            ]
        }
    });
}

var can_dispatchEvent = function (event, data) {
    var evt = document.createEvent('Event');
    evt.initEvent(event, true, true);
    for (var dataKey in data) {
        evt[dataKey] = data[dataKey];
    }
    window.dispatchEvent(evt);
};

var handleBids = function() {
    if (!can_bidding) {
        return;
    };
    logger('handleBids()');
    can_dispatchEvent('canAuctionFinished');
};

var can_refreshSlot = function() {
    if (!can_bidding || aborted) {
        return;
    };
    logger('dfp refresh() start');
    can_bidding = false;

    can_dispatchEvent('canSlotBidded', {
        gpt_slot: gpt_slot,
        div_id: div_id,
        auction_number: getCurrentAuctionCount(),
    });

    window.googletag.cmd.push(function() {
        whenGeoEdgeLoaded(function() {
            logger('dfp refresh() actual');
            can_render_at = null;
            window.googletag.pubads().refresh([gpt_slot]);
            setTimeout(function () {
                if (can_render_at == null) {
                    can_render_at = Date.now();
                    can_ad_active_viewed = true;
                }
            }, 4000);
        });
    });
};

window.addEventListener('canAuctionFinished', can_refreshSlot);

var can_refresh = function(handler, adUnitCode) {
    can_bidding = true;

    if (!isRTBEnabled) {
        handler();
        return;
    }

    var isRefresh = getCurrentAuctionCount() > 0;
    logger('set hb_auction_type: ' + (isRefresh ? 'refresh' : 'initial'));
    window.googletag.pubads().setTargeting('hb_auction_type', isRefresh ? 'refresh' : 'initial');
    window.googletag.pubads().setTargeting('hb_sequence', isFixedOrder ? 'fixed' : 'random');
    if (tamTest) {
        window.googletag.pubads().setTargeting('hb_tam_ab_test', prebidEnabled ? 'tam_pb' : 'tam');
    }

    var auctions = [];
    if (uamEnabled) {
        auctions.push('uam');
    }
    if (prebidEnabled) {
        auctions.push('prebid');
    }
    var auctionManager = {
        'gpt': false,
    };
    auctions.forEach(function (auction) {
        auctionManager[auction] = false;
    });

    var allAuctionsComplete = function() {
        return auctions.map(function(auction) {
            return auctionManager[auction];
        })
        .filter(Boolean)
        .length === auctions.length;
    };

    var gptRefresh = function () {
        logger('[auction] gptRefresh');
        auctionManager.gpt = true;
        if (window.apstag && (consentDecisionMade || !consentManagement)) {
            logger('[auction] apstag.setDisplayBids()');
            apstag.setDisplayBids();
        }

        if (prebidEnabled) {
            logger('[auction] pbjs.setTargetingForGPTAsync()');
            window.pbjs.setTargetingForGPTAsync();
        }

        if (id5Enabled) {
            var id5_control = 'id5 not detected';
            var userIds = window.pbjs.getUserIds();
            if (userIds.id5id && userIds.id5id.ext && userIds.id5id.ext.abTestingControlGroup !== undefined) {
                id5_control = userIds.id5id.ext.abTestingControlGroup ? 'control' : 'experimental';
            }
            window.googletag.pubads().setTargeting('hb_id5_ab', id5_control);
            assertive_custom_3 = id5_control;
            logger('Setting id5 control key to ' + id5_control);
        }

        handler();
    };

    var handleAuctionComplete = function(auction, cancelled) {
        if (cancelled === true) {
            logger('[auction] cancel: ' + auction);
        } else {
            logger('[auction] complete: ' + auction);
        }
        if (auctionManager.gpt) {
            return;
        }
        auctionManager[auction] = true;
        if (!allAuctionsComplete()) {
            return;
        }

        logger("auction end");
        if (consentManagement && !consentDecisionMade) {
            logger('[auction] abort: CMP not found');
            return;
        }
        gptRefresh();
    };

    var opts = {
        bidsBackHandler: function () {
            handleAuctionComplete('prebid');
        },
        timeout: AUCTION_TIMEOUT_MS,
    };

    var apsSlots = window._canStore.apsSlots;
    if (adUnitCode) {
        logger('auction init: slot ' + adUnitCode);
        opts.adUnitCodes = [adUnitCode];
        apsSlots = [gpt_slot];
        incrementAuctionCount(adUnitCode);
    } else {
        logger('auction init: full');
        incrementAuctionCount();
    }

    if (prebidEnabled) {
        window.pbjs.que.push(function() {
            logger('auction start: prebid');
            window.pbjs.requestBids(opts);
        });
    }

    if (window.apstag) {
        var beginUamAuction = function () {
            logger('auction start: uam');
            apstag.fetchBids({
                slots: apsSlots,
                timeout: AUCTION_TIMEOUT_MS,
                params: {
                    adRefresh: isRefresh ? "1" : "0",
                },
            }, function(bids) {
                handleAuctionComplete('uam');
            });
        };

                if (consentManagement && consentDecisionMade) {
            beginUamAuction();
        }
                if (!consentManagement && !consentDecisionMade) {
            beginUamAuction();
        }
    }
};

var allLoaded = function() {
    var scripts = document.getElementsByTagName("script");
    try {
        for (var k = 0; k < scripts.length; k++) {
            var script = scripts[k];
            if (script.hasAttribute('data-can-ad')) {
                if (script.getAttribute('data-can-ad') != 'loaded') {
                    return false;
                };
            };
        };
    } catch (e) {
        console.error(e);
    };
    return true;
};

var masterSelection = function() {
    if (!aborted) {
        logger("add ad unit");
        if (isRTBEnabled && prebidEnabled) {
            window.pbjs.addAdUnits(adUnits);
        }
    } else {
        adParent.parentNode.removeChild(adParent);
    };

    var documentReady = function() {
        if (allLoaded()) {
            if (window._canStore.loaded) {
                return;
            };
            can_isMaster = true;
            window._canStore.loaded = true;
            if (isRTBEnabled && prebidEnabled) {
                window.pbjs.bidderSettings = {
                    standard: {
                        bidCpmAdjustment: function (bidcpm, bid) {
                            return adjustBidCPM(bidcpm, bid.bidderCode);
                        },
                        adserverTargeting: [
                            {
                                key: "hb_bidder",
                                val: function(bidResponse) {
                                    return bidResponse.bidderCode;
                                }
                            },
                            {
                                key: "hb_adid",
                                val: function(bidResponse) {
                                    return bidResponse.adId;
                                }
                            },
                            {
                                key: "hb_pb",
                                val: function(bidResponse) {
                                    return bidResponse.pbCg;
                                }
                            },
                            {
                                key: 'hb_size',
                                val: function (bidResponse) {
                                    return bidResponse.size;
                                }
                            },
                            {
                                key: 'hb_source',
                                val: function (bidResponse) {
                                    return bidResponse.source;
                                }
                            },
                            {
                                key: 'hb_format',
                                val: function (bidResponse) {
                                    return bidResponse.mediaType;
                                }
                            },
                            {
                                key: 'hb_cache_id',
                                val: function (bidResponse) {
                                    return bidResponse.videoCacheKey;
                                }
                            },
                            {
                                key: 'hb_uuid',
                                val: function (bidResponse) {
                                    return bidResponse.videoCacheKey;
                                }
                            },
                        ],
                    },
                };

                var userIds = [
                    {
                        name: "quantcastId",
                    },
                ];
                if (id5Enabled) {
                    userIds.push({
                        name: 'id5Id',
                        params: {
                            partner: 983,
                            abTesting: {
                                enabled: true,
                                controlGroupPct: 0.5,
                            },
                        },
                        storage: {
                            type: 'html5',
                            name: 'id5id',
                            expires: 90,
                            refreshInSeconds: 8*3600,
                        },
                    });
                }

                userIds.push({
                    name: 'identityLink',
                    params: {
                        pid: 14135,
                        notUse3P: true,
                    },
                    storage: {
                        type: 'html5',
                        name: 'idl_env',
                        expires: 15,
                        refreshInSeconds: 1800,
                    },
                });

                var pbConfig = {
                    bidderSequence: isFixedOrder ? 'fixed' : 'random',
                    enableSendAllBids: true,
                    priceGranularity: {
                        buckets: [
                            {
                                max: 20,
                                increment: 0.05,
                            },
                            {
                                max: 50,
                                increment: 0.50,
                            },
                        ],
                    },
                    currency: {
                        adServerCurrency: "GBP",
                        rates: {"USD":{"GBP":0.7435237605078059},"EUR":{"GBP":0.8668}},
                    },
                    sizeConfig: sizeConfig,
                    userSync: {
                        userIds: userIds,
                        filterSettings: {
                            iframe: {
                                bidders: '*',
                                filter: 'include',
                            },
                            image: {
                                bidders: '*',
                                filter: 'include',
                            },
                        },
                        auctionDelay: 250,
                    },
                    schain: {
                        validation: "strict",
                        config: {
                            ver: "1.0",
                            complete: 1,
                            nodes: [
                                {
                                    asi: "can-digital.net",
                                    sid: "496",
                                    hp: 1,
                                }
                            ]
                        }
                    },
                    floors: {
                        data: {
                            floorProvider: 'static',
                            currency: 'GBP',
                            skipRate: 0,
                            modelVersion: '1',
                            schema: {
                                fields: [ 'size' ],
                            },
                            values: {
                                '320x50': 0.09,
                                '300x600': 0.29,
                                '970x250': 0.49,
                                '*': 0.19,
                            },
                        },
                    },
                };
                if (consentManagement) {
                    pbConfig.consentManagement = {
                        gdpr: {
                            cmpApi: 'iab',
                            timeout: Math.pow(2, 31) - 1,
                            rules: [
                                {
                                    purpose: "storage",
                                    enforcePurpose: true,
                                    enforceVendor: true
                                }
                            ]
                        }
                    };
                }
                window.pbjs.setConfig(pbConfig);
            }
            window.googletag.cmd.push(function() {
                if (safeFrame || sandbox) {
                    logger('safeFrame enabled');
                    window.googletag.pubads().setForceSafeFrame(true);
                }
                if (sandbox) {
                    logger('sandbox enabled');
                    window.googletag.pubads().setSafeFrameConfig({ sandbox: true });
                }
            });

            logger('firstLoad');

            if (!prebidEnabled || !isRTBEnabled || window.pbjs.adUnits.length > 0) {
                window.googletag.cmd.push(function() {
                    can_dispatchEvent('can_firstLoad');
                    can_refresh(handleBids);
                });
            }
        };
    };

    var bootstrap = function() {
        cScript.setAttribute('data-can-ad', 'loaded');
        if (document.readyState == 'interactive' || document.readyState == 'complete') {
            documentReady();
        } else {
            document.addEventListener('readystatechange', function() {
                if (document.readyState == 'interactive' || document.readyState == 'complete') {
                    documentReady();
                };
            });
        };
    };

    if (gdpr_code == null) {
        logger('bootstrap: no gdpr');
        bootstrap();
    } else {
        logger('bootstrap: awaiting consent');
        window.addEventListener('canGdprConsent', function(e) {
            if (e.consent) {
                logger('bootstrap: got consent event');
                bootstrap();
            }
        });
        if (!window._canStore['gdpr']) {
            logger('bootstrap: loading gdpr');
            addScript(gdpr_code);
            window._canStore['gdpr'] = true;
        } else {
            if (window.__can_gdpr) {
                logger('bootstrap: consent already exists');
                bootstrap();
            }
        };
    };
};

window.googletag.cmd.push(function() {
    if (aborted) {
        return;
    };
    var mapping = window.googletag.sizeMapping();

    for (var k = 0; k < sizeMapping.length; k++) {
        mapping.addSize([sizeMapping[k].minWidth, 0], sizeMapping[k].sizes);
    };
    mapping = mapping.build();

    logger("dfp define");
        gpt_slot = window.googletag.defineSlot('/31781941/van_visitwest', sizes, div_id)
            .setTargeting('category', segmentationCategories)
        .addService(window.googletag.pubads())
        .defineSizeMapping(mapping);

    if (!window._canStore.apsSlots) {
        window._canStore.apsSlots = [];
    }
    window._canStore.apsSlots.push(gpt_slot);

        window.googletag.pubads().disableInitialLoad();
    window.googletag.pubads().enableSingleRequest();
    window.googletag.pubads().enableAsyncRendering();
    window.googletag.enableServices();
    logger('dfp display()');
    window.googletag.display(div_id);
});

window.googletag.cmd.push(function() {
    googletag.pubads().addEventListener('slotRenderEnded', function(render) {
        if (render.slot.getSlotElementId() == div_id) {
            can_render_at = Date.now();
        };
    });
});

if (isRTBEnabled && prebidEnabled) {
    window.pbjs.que.push(masterSelection);
} else {
    masterSelection();
}

if (isRTBEnabled) {
    window._qevents = window._qevents || [];
    (function() {
        var elem = document.createElement('script');
        elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge")
                    + ".quantserve.com/quant.js";
        elem.async = true;
        elem.type = "text/javascript";
        var scpt = document.getElementsByTagName('script')[0];
        scpt.parentNode.insertBefore(elem, scpt);
    })();

            window._qevents.push({
            qacct:"p-mjq2rgU4Jj7VF"
        });
        }

var can_ad_refresh_enabled = true,
    can_ad_refresh_num = 0,
    can_ad_visible = false,
    can_ad_visible_at = false,
    can_ad_visible_time = 0,
    can_ad_refresh_max = -1,
    can_ad_refresh_time = 30000,
    can_ad_active_viewed = false;

logger('CAN refresh ' + (can_ad_refresh_enabled ? 'enabled' : 'disabled'));

var can_isVisible = function() {
    var bounds = adSlot.getBoundingClientRect();
    return !document.hidden
        && bounds.top <= window.innerHeight
        && bounds.bottom >= 0
        && bounds.width > 0
        && adSlot.offsetParent !== null;
};

var can_visibleDuration = function() {
    if (!can_render_at) {
        return 0;
    };
    var extra = 0;
    if (can_ad_visible) {
        extra = Date.now()-(Math.max(can_ad_visible_at, can_render_at));
    };
    return can_ad_visible_time + extra;
};

var can_setVisible = function(status) {
    logger('ad visible: '+status);
    if (status) {
        can_ad_visible = true;
        can_ad_visible_at = Date.now();
    } else {
        can_ad_visible = false;
        can_ad_visible_time += Date.now()-Math.max(can_ad_visible_at, can_render_at);
    }
};

if (can_isVisible()) {
    can_setVisible(true);
};

var can_scrollHandler = function() {
    if (!can_ad_refresh_enabled && can_ad_refresh_max != -1 && can_ad_refresh_num >= can_ad_refresh_max) {
        window.removeEventListener('scroll', can_scrollHandler);
    };
    if (can_ad_visible && !can_isVisible()) {
        can_ad_visible = false;
        if (can_ad_visible_at != false) {
            can_setVisible(false);
        };
    };
    if (!can_ad_visible && can_isVisible()) {
        can_setVisible(true);
    };
};

var can_visibilityHandler = function() {
    if (!can_ad_refresh_enabled && can_ad_refresh_max != -1 && can_ad_refresh_num >= can_ad_refresh_max) {
        window.removeEventListener('visibilitychange', can_visibilityHandler);
    };
    can_setVisible(!document.hidden && can_isVisible());
};

window.addEventListener('scroll', can_scrollHandler, { passive: true });
window.addEventListener('visibilitychange', can_visibilityHandler, { passive: true });
setInterval(function () {
    if (can_ad_visible && !can_isVisible()) {
        can_setVisible(false);
    }
    if (!can_ad_visible && can_isVisible()) {
        can_setVisible(true);
    }
}, 1000);

window.googletag.cmd.push(function () {
    googletag.pubads().addEventListener('slotRenderEnded', function (render) {
        if (render.isEmpty) {
            can_ad_active_viewed = true;
        }
        if (render.slot.getSlotElementId() == div_id) {
            if (premiumCampaigns.indexOf(render.campaignId) !== -1) {
                logger('premium served; disabling refresh');
                can_ad_refresh_enabled = false;
                window.removeEventListener('scroll', can_scrollHandler);
                window.removeEventListener('visibilitychange', can_visibilityHandler);
                clearTimeout(can_ad_refresh_timer);
            }
        }
    });
    googletag.pubads().addEventListener('impressionViewable', function (render) {
        if (render.slot.getSlotElementId() == div_id) {
            logger('refresh; active viewed')
            can_ad_active_viewed = true;
        }
    });
});
var can_ad_refresh_timer = setInterval(function() {
    if (!can_ad_refresh_enabled && can_ad_refresh_max != -1 && can_ad_refresh_num >= can_ad_refresh_max) {
        logger('removing refresh timer');
        clearTimeout(can_ad_refresh_timer);
        return;
    };

    if (can_ad_refresh_enabled && can_isVisible() && can_ad_active_viewed) {
        if (can_render_at != false && Date.now()-can_render_at >= can_ad_refresh_time && can_visibleDuration() >= can_ad_refresh_time) {
            logger('refresh time exceeded: '+(can_visibleDuration())+" ms");
            can_ad_refresh_num++;
            can_setVisible(true);
            can_ad_visible_time = 0;
            can_ad_active_viewed = false;
            can_refresh(can_refreshSlot, adSlot.id);
        };
    }
}, 500);

if (isRTBEnabled) {
    (function() {
        var script = document.createElement('script');
        var url = "\/\/get.s-onetag.com\/f6eb36e8-0c75-4c60-85f6-fc03561fd890\/tag.min.js";

        script.setAttribute('async', 'async');



        var singleton = false;
        if (singleton) {
            if (window._canStore[btoa(url)]) {
                return;
            }
            window._canStore[btoa(url)] = true;
        }
        script.setAttribute('src', url);
        document.head.appendChild(script);
    })();
}

if (isRTBEnabled) {
    (function() {
        var script = document.createElement('script');
        var url = "\/\/cdn.pbxai.com\/e2140966-98d4-471a-b2f6-1c773ac644dc.js";

        script.setAttribute('async', 'async');



        var singleton = false;
        if (singleton) {
            if (window._canStore[btoa(url)]) {
                return;
            }
            window._canStore[btoa(url)] = true;
        }
        script.setAttribute('src', url);
        document.head.appendChild(script);
    })();
}

if (isRTBEnabled) {
    (function() {
        var script = document.createElement('script');
        var url = "\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4493513562102535";

        script.setAttribute('async', 'async');

        script.setAttribute('crossorigin', 'anonymous');


        var singleton = false;
        if (singleton) {
            if (window._canStore[btoa(url)]) {
                return;
            }
            window._canStore[btoa(url)] = true;
        }
        script.setAttribute('src', url);
        document.head.appendChild(script);
    })();
}
    };
})(document.currentScript);
})();
