! function() {
"use strict";
var t;
void 0 === window.CleverCore && (t = new((() => {
var t = Object.defineProperty,
e = Object.defineProperties,
i = Object.getOwnPropertyDescriptors,
s = Object.getOwnPropertySymbols,
o = Object.prototype.hasOwnProperty,
r = Object.prototype.propertyIsEnumerable,
n = (e, i, s) => i in e ? t(e, i, {
enumerable: !0,
configurable: !0,
writable: !0,
value: s
}) : e[i] = s,
a = (t, e) => {
for (var i in e || (e = {})) o.call(e, i) && n(t, i, e[i]);
if (s)
for (var i of s(e)) r.call(e, i) && n(t, i, e[i]);
return t
},
l = (t, s) => e(t, i(s)),
h = (t, e, i) => n(t, "symbol" != typeof e ? e + "" : e, i),
c = (t, e, i) => new Promise(((s, o) => {
var r = t => {
try {
a(i.next(t))
} catch (t) {
o(t)
}
},
n = t => {
try {
a(i.throw(t))
} catch (t) {
o(t)
}
},
a = t => t.done ? s(t.value) : Promise.resolve(t.value).then(r, n);
a((i = i.apply(t, e)).next())
})),
d = {
Class: "clever-core-ads",
MultiClass: "clever-core-ads-multiproduct",
CookieLastTrackerPrefix: "clever-last-tracker-",
CookieCounterPrefix: "clever-counter-",
CookieLifeTime: 720,
btnCss: {
right: "5px",
top: "5px",
width: "25px",
cursor: "pointer",
"min-width": "auto",
height: "25px",
position: "absolute",
"z-index": 99,
margin: "0"
},
DevGroups: [79651, 67645, 79455]
},
u = [/adspreview\.googleusercontent\.com/i, /usrfiles\.com/i],
p = {
SKIP: 1,
BGCOLOR: "#fff",
FRAMEBGCOLOR: "#fff",
COLOR: "#000",
PUBCOLOR: "#a2a2a2",
BORDER: "solid 5px #fff",
FONT_SIZE: "10px",
FONT: "Arial, Helvetica, sans-serif",
RADIUS: "7px",
BORDER_SPACE: 10,
BOX_SHADOW: "0 0 10px 0 rgba(50, 50, 50, 0.5)"
};
function m(t, e, i, s) {
return (t /= s / 2) < 1 ? i / 2 * t * t * t * t + e : -i / 2 * ((t -= 2) * t * t * t - 2) + e
}
function g(t = 0, e = 0, i = 400) {
const s = window.scrollX || window.pageXOffset,
o = window.scrollY || window.pageYOffset,
r = t - s,
n = e - o,
a = (new Date).getTime(),
l = window.setInterval((function() {
const t = (new Date).getTime() - a,
e = m(t, s, r, i),
h = m(t, o, n, i);
t >= i && window.clearInterval(l), window.scrollTo(e, h)
}), 1e3 / 60)
}
var C = t => t.charAt(0).toUpperCase() + t.slice(1),
b = () => f("hostname"),
f = t => {
var e, i, s;
try {
return null != (s = null != (i = null == (e = window.top) ? void 0 : e.location[t]) ? i : window.parent.location[t]) ? s : window.location[t]
} catch (e) {
return window.location[t]
}
},
M = t => {
var e;
if (!t) return "";
const i = /^(.+)\.(android|iphone)\.(.+)\.adsenseformobileapps\.com$/i.exec(t);
return null != (e = null == i ? void 0 : i[3]) ? e : ""
},
D = t => btoa(t),
O = (t, e = "DOMContentLoaded") => {
"loading" !== document.readyState ? t() : document.addEventListener(e, (() => {
t()
}))
},
k = t => {
const {
defaultUrl: e,
ts: i,
height: s
} = t;
let o = e;
return i && (o += `&ts=${i}`), s && (o += `&hei=${s}`), o
},
v = t => t.replace(/(.)([A-Z])/g, (function(t, e, i) {
return e + "-" + i
})).toLowerCase(),
I = () => {
const t = window.location.href,
e = document.referrer;
return ["doubleclick.net", "googlesyndication.com", "googleadservices.com"].some((i => t.includes(i) || e.includes(i)))
},
w = class {
constructor(t) {
this.URL = t
}
static exists() {
var t;
if ("undefined" != typeof $sf && "ext" in $sf) return !0;
if (window.location.href.includes("safeframe.googlesyndication.com")) return !0;
if ([62958].includes(x.group.ID)) try {
return !(null == (t = window.top) ? void 0 : t.location.hostname)
} catch (t) {
return !0
}
return !1
}
isEnabled() {
return 1 === x.group.SafeFrame
}
currentAncestor() {
if ("Firefox" === x.User.Browser) {
let t = window;
try {
for (; t !== window.top;) {
if (t.document.referrer) {
const e = new URL(t.document.referrer);
return this.URL.FetchDomain(e.origin)
}
t = t.parent
}
} catch (t) {
return x._debug("ancestorOrigin is not supported in Firefox Browser"), null
}
}
const t = window.location.ancestorOrigins;
if (void 0 === t || 0 === t.length) return null;
let e = t[0];
const i = ".cdn.ampproject.org";
return e.includes("-") && e.includes(i) && (e = this.URL.FetchDomain(e).split(i)[0].replace(/[-]+/g, ".")), this.URL.FetchDomain(e)
}
},
y = class t {
constructor(e, i, s, o, r) {
this.SafeFrame = i, this.AMP = s, this.URL = o, this.DOM = r, h(this, "BlockedRoomsByRegion", {
447: ["MI", "NV", "NY", "ID", "WA", "VT", "KY"]
}), h(this, "Click", 0), h(this, "Counter", 0), h(this, "InternalReference", 0), h(this, "Start", new Date), h(this, "isMultiProduct"), h(this, "WhitelistApps", ["com.example.flutter_ads_package", "com.example.core_clever_core_app_gam_demo", "com.example.coreCleverCoreAppGamDemo", "com.clever.core_clever_core_app_gam_demo"]), h(this, "CurrentApp", ""), h(this, "postMessageSources", ["https://sender.cleverwebserver.com"]), h(this, "CallbackUrl"), h(this, "Trackers"), h(this, "Timeout"), h(this, "InternalReferenceList"), h(this, "Whitelist"), h(this, "SDK"), h(this, "IsWL"), h(this, "Latency", {
Start: new Date,
End: new Date
}), h(this, "defaultOptions", {
group: {
ID: 0,
UniqueID: 0,
Expire: 24,
Wait: 5,
Alias: null,
LastDayHits: null,
Subdomains: null,
ParentID: null,
DisableMobile: null,
DisableIframes: 0,
UseLink: 0,
Version: null,
Active: 0,
DOMLoad: !0,
Theme: "LIGHT",
AutoClose: 0,
AnimationTimer: 750,
TriggerTimer: 0,
TCF: 0,
last_build_date: 0,
ads_script_type: ""
},
timeout: 0,
trackers: [],
internalRef: [],
whitelistDomains: ["partner.googleadservices.com", "ads.localhost", "adtester.yahooinc.com", "jac.yahoosandbox.com", "s.yimg.com", "creative-preview-an.com", "previewads.com", "livepreview.adform.com"],
whitelistApps: ["127.0.0.1"],
callbackUrl: null
}), e = this.prepareOptions(e), t.group = e.group, this.CallbackUrl = e.callbackUrl, this.Trackers = e.trackers, this.isMultiProduct = e.trackers.some((t => 1 === t.multiproduct)), this.Timeout = e.timeout, this.InternalReferenceList = e.internalRef, this.Whitelist = e.whitelistDomains, this.WhitelistApps = this.WhitelistApps.concat(e.whitelistApps), this.SDK = this.getSDK(), this.IsWL = this.IsWhitelist()
}
get Group() {
return t.group
}
set User(e) {
t.User = e
}
get User() {
return t.User
}
static _debug(t) {
console.log("CLVR: " + t)
}
Debug(e) {
t._debug(e)
}
SSL() {
return "https:" === location.protocol
}
getLocationHref() {
var t;
if (w.exists() && this.SafeFrame.isEnabled()) return null != (t = this.SafeFrame.currentAncestor()) ? t : "";
let e = f("href");
return this.AMP.isEnabled() && this.AMP.exists() && (e = window.context.sourceUrl), e
}
get TimeSpent() {
return (Date.now() - this.Start.getTime()) / 1e3
}
IsWhitelist() {
const e = this.DOM.Meta("gam-ref-url"),
i = M(e);
if (i) return !!this.WhitelistApps.includes(i) && (this.CurrentApp = i, !0);
const s = this.Trackers.find((t => t.publisher_app_id === e));
if (s && s.bundleId && this.WhitelistApps.includes(s.bundleId)) return this.CurrentApp = s.bundleId, !0;
let o = this.AMP.fetchCurrentDomain();
w.exists() && this.SafeFrame.isEnabled() && (o = o || this.SafeFrame.currentAncestor()), o = o || this.URL.CurrentDomain();
const r = {
"pubads.g.doubleclick.net": ["msid"],
"script.cleverwebserver.com": ["bid", "app"]
};
if (o in r) {
const t = r[o],
e = new URLSearchParams(window.location.search);
if (t.every((t => !e.has(t)))) return !1;
for (const i of t) {
const t = e.get(i);
if (t && this.WhitelistApps.includes(t)) return this.CurrentApp = t, !0
}
return !1
}
for (let e = 0; e < this.Whitelist.length; ++e) {
if (this.Whitelist[e].toLowerCase() === o.toLowerCase()) return !0;
if (1 === t.group.Subdomains && o.match(new RegExp("." + this.Whitelist[e] + "$", "i"))) return !0
}
return !1
}
getExpireTime() {
return this.User.Mobile && t.group.ExpireMobile ? t.group.ExpireMobile : t.group.Expire
}
prepareOptions(t) {
var e, i, s, o, r, n;
return {
trackers: this.normalizeTrackers(null != (e = t.trackers) ? e : this.defaultOptions.trackers),
group: null != (i = t.group) ? i : this.defaultOptions.group,
timeout: null != (s = t.timeout) ? s : this.defaultOptions.timeout,
internalRef: null != (o = t.internalRef) ? o : this.defaultOptions.internalRef,
whitelistDomains: [...this.defaultOptions.whitelistDomains, ...null != (r = t.whitelistDomains) ? r : []],
whitelistApps: [...this.defaultOptions.whitelistApps, ...t.whitelistApps],
callbackUrl: null != (n = t.callbackUrl) ? n : this.defaultOptions.callbackUrl
}
}
getSDK() {
var t;
const e = new URLSearchParams(window.location.search);
if (e.has("sdk")) return null != (t = e.get("sdk")) ? t : "";
return M(this.DOM.Meta("gam-ref-url")) ? "GAM" : ""
}
normalizeTrackers(t) {
return t.map(((t, e) => {
var i, s, o, r, n, h, c, d, u;
return l(a({}, t), {
FileW: Number(null != (i = t.FileW) ? i : 0),
FileH: Number(null != (s = t.FileH) ? s : 0),
multiproduct: Number(null != (o = t.multiproduct) ? o : 0),
OnlyMobile: Number(null != (r = t.OnlyMobile) ? r : 0),
DisallowOnTarget: Number(null != (n = t.DisallowOnTarget) ? n : 0),
CTR: null != (h = t.CTR) ? h : "AA",
SimultaneityGap: Number(null != (c = t.SimultaneityGap) ? c : 0),
Simultaneity: Number(null != (d = t.Simultaneity) ? d : 0),
Sort: Number(null != (u = t.Sort) ? u : e)
})
}))
}
};
h(y, "MinimalVisibility", .5), h(y, "User", {
ID: 0,
CTR: "AA",
remote_addr: !1,
LastGroup: !1,
t: 0,
Browser: void 0,
Platform: void 0,
bot: void 0,
Mobile: 0,
Region: void 0,
lastTracker: void 0,
s: void 0,
bv: void 0,
cont: void 0
}), h(y, "group");
var x = y,
T = class {
constructor(t, e) {
this.URL = t, this.DOM = e, h(this, "domains", ["ampproject.net", "ads.localhost"]), h(this, "isVisible", !1), h(this, "isAMP", !1)
}
exists() {
for (const t of this.domains) {
const e = new RegExp(t + "$"),
i = this.URL.FetchDomain(b());
if (null !== e.exec(i)) return !0
}
return !1
}
isEnabled() {
return void 0 !== x.group.AMP && 1 === x.group.AMP
}
fetchCurrentDomain() {
const t = this.DOM.Meta("origin");
return t ? this.URL.FetchDomain(t) : null
}
registerViewObserver(t) {
this.isAMP = !0, window.context.observeIntersection((e => {
e.forEach((e => {
this.isVisible || e.intersectionRatio >= x.MinimalVisibility && (this.isVisible = !0, t())
}))
}))
}
},
L = class {
constructor(t, e) {
this.DOM = t, this.URL = e
}
Click() {
const t = this.DOM.Meta("callback-url-click");
null !== t && "put-your-click-macro-here" !== t && (this.URL.IsValid(t) ? this.appendIframe(t) : x._debug("Callback: Invalid click URL"))
}
View() {
const t = this.DOM.Meta("callback-url-view");
null !== t && "put-your-view-macro-here" !== t && (this.URL.IsValid(t) ? this.appendIframe(t) : x._debug("Callback: Invalid view URL"))
}
appendIframe(t) {
const e = document.createElement("iframe");
e.setAttribute("style", "width: 1px; height: 1px; border: none; bottom: 0; left: 0; display: none;"), e.setAttribute("src", t), document.body.appendChild(e)
}
},
S = class {
constructor() {
h(this, "cache", new Map)
}
set(t, e) {
this.cache.set(t, e)
}
get(t) {
return this.cache.get(t)
}
},
F = "https://assets.cleverwebserver.com/ArrowMinimal.png",
H = "https://assets.cleverwebserver.com/Pixel.gif",
E = "https://assets.cleverwebserver.com/Close.png",
R = "https://assets.cleverwebserver.com/CloseSquare.png",
U = "https://assets.cleverwebserver.com/Clever.png",
B = "https://assets.cleverwebserver.com/CleverLogo.ico",
A = "https://assets.cleverwebserver.com/ArrowDown.png",
_ = class {
constructor(t) {
h(this, "tracker"), h(this, "DOM"), h(this, "Net"), h(this, "AMP"), h(this, "Registry"), h(this, "Callback"), h(this, "CodeUtils"), h(this, "Hooks"), h(this, "TCF"), h(this, "Translation"), h(this, "URL"), h(this, "Tracker");
const {
tracker: e,
Registry: i,
DOM: s,
AMP: o,
Net: r,
Callback: n,
CodeUtils: a,
Hooks: l,
TCF: c,
Translation: d,
URL: u,
Tracker: p
} = t;
this.tracker = e, this.DOM = s, this.Net = r, this.AMP = o, this.Registry = i, this.Callback = n, this.CodeUtils = a, this.Hooks = l, this.TCF = c, this.Translation = d, this.URL = u, this.Tracker = p
}
getInitialState(t) {
return {
body: t && document.querySelector(t) || document.body.querySelector(".GoogleActiveViewElement") || document.body.querySelector(".GoogleActiveViewInnerContainer") || document.body,
baseUrl: this.Net.fetchBaseUrl(this.tracker),
defaultUrl: this.Net.getDefaultUrl(this.tracker) || ""
}
}
getBlock(t) {
const e = d.Class;
if (1 === this.tracker.multiproduct && this.Registry.isMultiProduct) {
const e = this.CodeUtils.getMultiProductDiv(this.tracker);
return !!e && (t ? [e.div] : e.div)
}
let i = t ? this.DOM.getByClass(e) : this.AMP.exists() ? this.DOM.getByID("c") : this.DOM.getByClass(e)[0];
if (!i) {
x._debug("No .clever-core-ads detected");
const s = this.DOM.Meta("target");
if (s && window.name !== s) {
x._debug("Placeholder found by target");
const o = this.DOM.getByID(s);
if (!o) return x._debug("No sourceBannerFrame found"), !1;
const r = this.DOM.clone(o, "div");
r.className = e, this.DOM.replace(o, r), i = t ? this.DOM.getByClass(e) : this.DOM.getByClass(e)[0]
}
if (t) {
if (0 === (null == i ? void 0 : i.length)) return !1
} else if (!i) return !1
}
return i
}
getBlocks() {
return this.getBlock(!0)
}
createId(t) {
if (t.includes("_")) throw new Error("Invalid character in id");
return `clever-${x.group.ID}-${this.tracker.ID}-${t}`
}
handleFormatClick() {
return this.Net.fetchBaseUrl(this.tracker, {
ts: this.Registry.TimeSpent,
frominter: "1",
click: "1"
})
}
partialDelete(t) {
t.remove()
}
delete(t) {
this.DOM.setHTML(t, ""), this.DOM.css(t, "display", "none"), this.DOM.remove(t)
}
},
G = class extends _ {
constructor(t, e) {
super(e), this.config = t, h(this, "wasShown"), h(this, "autoCloseTimeout", null), this.wasShown = !1, this.config = l(a({}, t), {
closable: void 0 === t.closable || t.closable
})
}
Close(t = !0) {
const {
baseUrl: e
} = this.getInitialState();
if (!1 !== this.config.closable) return t && this.DOM.customFetch(e + "&closed=1"), this.DOM.clearEvents(), "base" === this.config.closeFormat ? this.closeBase() : "banner" === this.config.closeFormat ? this.closeBanner() : "other" === this.config.closeFormat ? this.closeOther() : void 0;
x._debug(`Format: ${this.config.name} is not closable`)
}
closeBase() {
const t = `#${this.GetId()}`,
e = document.querySelector(t);
e ? e.remove() : x._debug(`element: ${t} not found`)
}
closeBanner() {
"unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].beforeClose, []);
const t = this.DOM.getByClass(d.Class);
if (0 === t.length) return !1;
const e = t => {
this.DOM.setHTML(t, ""), this.DOM.css(t, "display", "none"), this.DOM.remove(t)
};
for (const i in t) {
const s = t[i];
this.DOM.css(s, {
height: "0",
opacity: "0",
marginTop: "0"
}), setTimeout(e, x.group.AnimationTimer + 500, s)
}
return "unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].afterClose, []), !0
}
closeOther() {
"unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].beforeClose, []);
const t = this.DOM.getByID(this.GetId());
return t ? (setTimeout((() => {
this.delete(t)
}), x.group.AnimationTimer + 500), "unknown" !== this.config.hook && this.Hooks.Call(this.Hooks.Events.Formats[this.config.hook].afterClose, []), !0) : (x._debug(`Element ${this.GetId()} not found`), !1)
}
GetId(t, e) {
if (this.config.requiredPosition && void 0 === t) throw new Error("Position is required for this format");
let i = this.createId(`${this.config.name}`);
return t && (i += `-${t}`), e && (i += `-${e}`), i
}
addScrollListener(t = !1, e, i, s) {
if (this.wasShown) return;
const o = r => {
this.isMinimallyVisible(r, e, t, i, (() => {
window.removeEventListener("scroll", o), s && s()
}))
};
window.addEventListener("scroll", o)
}
isMinimallyVisible(t, e = 250, i = !1, s, o) {
const r = s ? s() : document.getElementById(this.GetId());
if (null === r) return;
const {
defaultUrl: n
} = this.getInitialState();
if (this.DOM.isMinimallyVisible(r)) {
if (this.wasShown) return;
if (this.wasShown = !0, i) {
const t = r.querySelectorAll("iframe");
for (let i = 0; i < t.length; i++) e = (null != e ? e : "height" in r) ? Number(r.style.height) : r.clientHeight, this.DOM.attr(t[i], {
src: n + `&hei=${e}&ts=` + this.Registry.TimeSpent + "&cube-side=" + i
})
} else {
const t = r.querySelector("iframe");
t && this.DOM.attr(t, {
src: n + `&hei=${e}&ts=` + this.Registry.TimeSpent
})
}
x._debug(`Do Callback: ${this.config.name}`), this.CodeUtils.DoCallback(this.tracker, !0), o && o()
}
}
bindBeforeUnloaded() {
if (!("A" === this.Registry.CurrentApp)) {
if (x.User.Mobile && x.User.Mobile > 0) {
let t = null;
const e = () => {
"hidden" === document.visibilityState ? t = setTimeout((() => {
const {
baseUrl: t
} = this.getInitialState(), e = new Image;
e.style.display = "none", e.src = t + "&unload=1"
}), 1e3) : "visible" === document.visibilityState && clearTimeout(t)
};
this.DOM.bind(window, "visibilitychange", e)
}
const t = () => {
const {
baseUrl: t
} = this.getInitialState(), e = new Image;
e.style.display = "none", e.src = t + "&unload=1"
};
this.DOM.bind(window, "beforeunload", t)
}
}
autoCloseValidation() {
if (x.group.AutoClose > 0) {
const {
baseUrl: t
} = this.getInitialState();
this.autoCloseTimeout = window.setTimeout((() => {
this.DOM.customFetch(t + "&autoclose=1"), this.Close(!1)
}), 1e3 * x.group.AutoClose)
}
}
clearAutoClose() {
this.autoCloseTimeout && (clearTimeout(this.autoCloseTimeout), this.autoCloseTimeout = null)
}
},
P = class extends G {
constructor(t) {
super({
name: "interstitial",
closeFormat: "base",
hook: "Interstitial",
closable: !1,
requiredPosition: !0
}, t), h(this, "translation", this.Translation.getTranslation(x.User.CTR)), h(this, "autoCloseTimeout", null)
}
handlePreLoad() {
this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.beforeOpen, [this.tracker.ID]), this.tracker.DisallowOnTarget && (void 0 !== window.frames && window.frames || (window.frames = {}), this.DOM.getByTag("body")[0].appendChild(this.DOM.create("iframe", {
id: "dufr",
src: "about:blank",
title: "iframe"
}, {
width: "5px",
height: "5px",
border: "none"
}))), this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
let t = this.DOM.getViewportHeight() / 1.3,
e = this.DOM.getViewportWidth() / 1.3;
this.tracker.FileW > 0 && this.tracker.FileW < e && (e = this.tracker.FileW), this.tracker.FileH > 0 && this.tracker.FileH < t && (t = this.tracker.FileH), x.User.Mobile && (e = 300, t = 600);
const {
BGCOLOR: i,
FONT_SIZE: s,
FONT: o,
BORDER: r,
BORDER_SPACE: n,
RADIUS: a,
BOX_SHADOW: l,
PUBCOLOR: h,
COLOR: c
} = p, u = this.DOM.create("div", {
id: this.GetId("interstitial"),
className: d.Class
}, {
backgroundColor: i,
fontSize: s,
fontFamily: o,
position: "fixed",
zIndex: String(this.DOM.zIndex(1)),
border: r,
left: "50%",
top: "48%",
width: Number(e) + n + "px",
height: Number(t) + 30 + "px",
borderRadius: a,
boxShadow: l,
textShadow: "none",
padding: "0",
lineHeight: "0px"
}), m = this.DOM.create("div", {
id: this.GetId("interstitial-pub")
}, {
backgroundColor: i,
color: h,
width: "140px",
float: "left",
textAlign: "left",
padding: "4px",
cursor: "pointer",
fontFamily: o
});
u.appendChild(m);
const g = this.DOM.create("div", {
id: this.GetId("interstitial-header")
}, {
height: "15px",
fontSize: s,
backgroundColor: i,
padding: "10px 5px 10px 5px",
color: c,
float: "right",
width: "140px",
textAlign: "right",
cursor: "pointer",
fontFamily: o
});
u.appendChild(g), this.handleEmbed(e, t, u);
const C = this.DOM.getByTag("body");
C[0].appendChild(u);
const b = this.DOM.create("div", {
id: this.GetId("overlay")
}, {
zIndex: this.DOM.zIndex(-1),
opacity: "0.5",
backgroundColor: "#000000",
position: "fixed",
top: "0",
left: "0",
width: "100%",
height: "100%"
});
C[0] && C[0].appendChild(b);
const f = this.DOM.getByID(this.GetId("interstitial-img"));
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const M = this.Net.fetchBaseUrl(this.tracker, {
frominter: 1,
click: 1,
id: this.tracker.ID,
ref: window.btoa(this.Registry.getLocationHref()),
ruri: window.btoa(document.referrer),
cmpId: this.TCF.cmpId
});
return f && this.DOM.bind(f, "click", (() => {
this.Callback.Click(), window.open(M + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), this.Close(!1)
})), this.DOM.css(u, "margin", "-" + (Number(t / 2) - 20) + "px 0 0 -" + Number(e / 2) + "px"), {
openUrlInter: M,
overlay: f,
pub: m,
header: g,
interstitial: u
}
}
handlePostLoad() {
return this.CodeUtils.DoCallback(this.tracker, !0), this.bindBeforeUnloaded(), this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.afterOpen, [this.tracker.ID]), !0
}
setContentAndBindClick(t, e, i, s = !1) {
if (s) {
const e = this.DOM.create("img", {
src: E,
alt: "close"
}, {
position: "absolute",
zIndex: this.DOM.zIndex(5),
top: "-12px",
left: "-15px",
width: "22px",
height: "22px"
}).outerHTML;
this.DOM.setHTML(t, e)
} else this.DOM.setHTML(t, e);
this.DOM.bind(t, "click", i)
}
handleEmbed(t, e, i) {
const {
defaultUrl: s
} = this.getInitialState(), {
RADIUS: o,
FRAMEBGCOLOR: r
} = p, n = this.DOM.create("img", {
id: this.GetId("interstitial-img"),
src: "//static." + x.group.Domain + "/" + this.tracker.File,
alt: "img-clvr"
}, {
width: "100%",
height: "100%",
position: "absolute",
zIndex: this.DOM.zIndex(3),
left: "0",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none"
});
if (this.tracker.File) return void i.appendChild(n);
const a = this.DOM.create("div", {
id: this.GetId("interstitial-div")
}, {
position: "relative",
width: Number(t) + "px",
height: Number(e) + "px"
});
x.User.Platform && "ios" === x.User.Platform.toLowerCase() ? this.DOM.css(a, {
overflow: "auto",
"-webkit-overflow-scrolling": "touch"
}) : this.DOM.css(a, "overflow", "hidden"), n.alt = "img-inter", n.src = H, a.appendChild(n);
const l = this.DOM.create("iframe", {
id: this.GetId("interstitial-iframe"),
title: "Clever-iframe",
className: d.Class,
src: s + "&hei=" + e.toFixed(2) + "&ts=" + this.Registry.TimeSpent,
frameBorder: "0"
}, {
width: "100%",
height: "100%",
backgroundColor: r,
position: "relative",
left: "0",
cursor: "pointer",
border: "none",
margin: "0",
borderRadius: o,
zoom: this.tracker.Zoom,
"-moz-transform": "scale(" + this.tracker.Zoom + ")",
"-moz-transform-origin": "top",
"-o-transform": "scale(" + this.tracker.Zoom + ")",
"-o-transform-origin": "top",
"-webkit-transform": "scale(" + this.tracker.Zoom + ")",
"-webkit-transform-origin": "top"
});
a.appendChild(l);
const h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogoWhite", {}, {
top: "10px",
left: "10px",
zIndex: this.DOM.zIndex(4)
});
if (this.DOM.shortCutCreate("anchorClever"), this.DOM.append(h, c.outerHTML), this.DOM.append(a, h.outerHTML), i.appendChild(a), "interonclose" !== this.tracker.Type) {
const t = this.DOM.create("iframe", {
id: this.GetId("iframe-control"),
name: d.Class,
title: "Clever-iframe",
src: s + "&op=cycle",
frameBorder: "0",
width: "1px",
height: "1px"
}, {
width: "1px",
height: "1px",
position: "absolute",
zIndex: "9",
border: "none"
});
i.appendChild(t)
}
}
handleCommonClick(t, e, i, s, o) {
const {
FONT: r,
PUBCOLOR: n
} = p, {
CLOSE_VISIT_SITE: a
} = this.Translation.getTranslation(x.User.CTR);
if (1 === e) {
t.innerHTML = "";
const e = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: i,
rel: "nofollow"
}, {
color: n,
fontFamily: r
});
e.innerText = a, t.appendChild(e), this.DOM.bind(e, "click", s)
} else this.DOM.setHTML(t, a), this.DOM.bind(t, "click", (() => {
o(), window.open(i + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), s()
}))
}
setupClickHandler(t, e, i) {
this.DOM.bind(t, "click", (() => {
this.Registry.Timeout > 0 ? e() : this.Registry.Timeout <= 0 && i()
}))
}
Close(t = !0) {
this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.afterClose, [this.tracker.ID]);
const {
baseUrl: e
} = this.getInitialState();
this.DOM.clearEvents(), t && this.DOM.customFetch(e + "&closed=1");
const i = this.DOM.getByID(this.GetId("overlay"));
i && this.delete(i);
const s = this.DOM.getByID(this.GetId("interstitial"));
return s && this.delete(s), this.Hooks.Call(this.Hooks.Events.Formats.Interstitial.afterClose, [this.tracker.ID]), !0
}
autoCloseValidation() {
if (x.group.AutoClose > 0) {
const {
baseUrl: t
} = this.getInitialState();
this.autoCloseTimeout = window.setTimeout((() => {
this.DOM.customFetch(t + "&autoclose=1"), this.Close(!1)
}), 1e3 * x.group.AutoClose)
}
}
clearAutoClose() {
this.autoCloseTimeout && (clearTimeout(this.autoCloseTimeout), this.autoCloseTimeout = null)
}
},
N = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
pub: t,
openUrlInter: e,
header: i
} = this.handlePreLoad();
this.handleCommonClick(i, x.group.UseLink, e, (() => this.Close()), (() => this.Callback.Click())), this.setupClickHandler(i, (() => {
this.Callback.Click(), window.open(e + "&ts=" + this.Registry.TimeSpent, "_blank")
}), (() => this.Close())), this.DOM.setHTML(i, this.Registry.Timeout.toString()), this.cleverVerifyCloseInterstitial(i, t, e), this.handlePostLoad()
}
cleverVerifyCloseInterstitial(t, e, i) {
const {
CLOSE_VISIT_SITE: s,
CLOSE: o
} = this.translation, r = e, n = (t, e) => {
this.DOM.setHTML(t, e), this.DOM.bind(t, "click", (() => this.Close()))
}, a = t => {
const e = this.DOM.create("img", {
src: E,
alt: "close",
width: 42,
height: 42
}, {
position: "absolute",
zIndex: this.DOM.zIndex(5),
top: "-20px",
left: "-20px",
width: "42px",
height: "42px"
}).outerHTML;
this.DOM.setHTML(t, e)
};
if (0 === this.Registry.Timeout) {
const t = s + " »";
return 1 === x.group.UseLink ? this.handleLinkBehavior(r, i, n) : n(r, t), x.User.Mobile ? a(r) : this.DOM.setHTML(r, `[${o}]`), void(x.group.AutoClose > 0 && setTimeout((() => this.Close()), 1e3 * x.group.AutoClose))
}
this.DOM.setHTML(r, this.Registry.Timeout.toString()), this.Registry.Timeout--, setTimeout((() => this.cleverVerifyCloseInterstitial(t, e, i)), 1e3)
}
handleLinkBehavior(t, e, i) {
const {
FONT: s,
PUBCOLOR: o
} = p, {
CLOSE_VISIT_SITE: r
} = this.translation, n = this.GetId("link-pub");
let a = this.DOM.getByID(n);
a || (a = this.DOM.create("a", {
id: n,
target: "_blank",
href: e,
rel: "nofollow"
}, {
color: o,
fontFamily: s
}), t.appendChild(a)), i(a, r + " »")
}
},
V = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
openUrlInter: t,
header: e
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: i
} = this.translation, {
PUBCOLOR: s,
FONT: o
} = p;
if (x.group.UseLink) {
let r = this.DOM.getByID(this.GetId("link-pub"));
r ? this.DOM.setHTML(r, i + " »") : (this.DOM.setHTML(e, ""), r = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: t,
rel: "nofollow"
}, {
color: s,
fontFamily: o
}), this.DOM.setHTML(r, i + " »"), e.appendChild(r), this.DOM.bind(r, "click", (() => {
this.Close()
})))
} else this.DOM.setHTML(e, i + " »"), this.DOM.bind(e, "click", (() => {
this.Callback.Click(), window.open(t + "&ts=" + this.Registry.TimeSpent, "_blank"), this.Close()
}));
x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.handlePostLoad()
}
},
W = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
header: t,
pub: e,
openUrlInter: i
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: s
} = this.translation, {
PUBCOLOR: o,
FONT: r
} = p;
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const n = this.Net.fetchBaseUrl(this.tracker, {
id: this.tracker.ID,
ref: window.btoa(this.Registry.getLocationHref()),
ruri: window.btoa(document.referrer),
cmpId: this.TCF.cmpId
});
if (this.DOM.setHTML(t, this.DOM.create("img", {
src: E,
alt: "close",
width: 42,
height: 42
}, {
position: "absolute",
zIndex: this.DOM.zIndex(5),
top: "-20px",
left: "-20px",
width: "42px",
height: "42px"
}).outerHTML), this.DOM.setHTML(e, ""), 1 == x.group.UseLink) {
const e = this.DOM.getByID(this.GetId("link-pub"));
if (e) this.DOM.setHTML(e, s + " »");
else {
this.DOM.setHTML(t, "");
const e = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: i,
rel: "nofollow"
}, {
color: o,
fontFamily: r
});
this.DOM.setHTML(e, s + " »"), t.appendChild(e), this.DOM.bind(e, "click", (() => {
this.Close()
}))
}
} else this.DOM.setHTML(t, s + " »"), this.DOM.bind(t, "click", (() => {
this.Callback.Click(), window.open(n, "_blank"), this.Close()
}));
const a = this.DOM.getByID(this.GetId("overlay"));
a && this.DOM.bind(a, "click", (() => {
this.Callback.Click(), window.open(n, "_blank"), this.Close()
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.handlePostLoad()
}
},
z = class extends P {
constructor(t) {
super(t)
}
Open() {
const {
pub: t,
openUrlInter: e,
header: i
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: s
} = this.translation, {
PUBCOLOR: o,
FONT: r
} = p, n = this.Net.fetchBaseUrl(this.tracker);
if (this.setContentAndBindClick(t, "", (() => {
this.clearAutoClose(), this.Close()
}), !0), 1 == x.group.UseLink) {
let t = this.DOM.getByID(this.GetId("link-pub"));
t || (this.DOM.setHTML(i, ""), t = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: e,
rel: "nofollow"
}, {
color: o,
fontFamily: r
}), i.appendChild(t)), this.setContentAndBindClick(t, s + " »", (() => {
this.clearAutoClose(), this.Close()
}))
} else this.setContentAndBindClick(i, s + " »", (() => {
this.Callback.Click(), window.open(`${n}&ts=${this.Registry.TimeSpent}&skip=1`, "_blank"), this.clearAutoClose(), this.Close(!1)
}));
setTimeout((() => {
if ("interclose" === this.tracker.Type) {
const t = this.DOM.getByID(this.GetId("overlay"));
t && this.DOM.bind(t, "click", (() => {
this.DOM.customFetch(n + "&outside=1"), this.clearAutoClose(), this.Close(!1)
}))
}
}), 2e3), this.autoCloseValidation(), this.handlePostLoad()
}
},
q = class extends G {
constructor(t, e) {
super(t, e), this.config = t
}
bindSponsorClickEvents(t = !1, e = [], i = !1, s = !0) {
s && this.bindBeforeUnloaded();
const o = document.querySelector("#cleverLogoClick");
this.DOM.bind(window, "message", (e => {
if (void 0 !== e.data.cursorLogoSrc) {
if (!x.User.Mobile) {
const t = document.querySelector("#cleverImageCreative");
t.src = "https://lp.cleverwebserver.com/logos_sponsors/logo_" + e.data.cursorLogoSrc + ".png", null == t || t.setAttribute("alt", e.data.cursorLogoSrc)
}
t && (o.src = "https://lp.cleverwebserver.com/logos_sponsors/tap_" + e.data.cursorLogoSrc + ".gif", null == o || o.setAttribute("alt", e.data.cursorLogoSrc))
}
}));
const r = this.Net.fetchBaseUrl(this.tracker, {
sponsored: "1"
}),
n = function(t, e) {
const i = document.getElementById("cleverImageCreative"),
s = i ? i.offsetWidth + 5 : 0;
a >= window.innerWidth - s ? i.style.visibility = "hidden" : (i.style.visibility = "visible", i.style.left = a + 5 + "px", i.style.top = l + -30 + "px")
};
let a = 0,
l = 0,
h = 0,
c = 0;
const d = function(t) {
a = t.pageX, l = t.pageY, n()
},
u = function() {
h != window.scrollX && (a -= h, h = window.scrollX, a += h), c != window.scrollY && (l -= c, c = window.scrollY, l += c), n()
};
x.User.Mobile || (this.DOM.bind(document, "mousemove", d), this.DOM.bind(document, "scroll", u));
let p = !1;
const m = t => {
var e;
p || (x.User.Mobile || null == (e = document.querySelector("#cleverImageCreative")) || e.remove(), this.Callback.Click(), window.open(r + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), this.Close(), p = !0)
};
if (i) {
const t = this.DOM.getByID("cleverLogoClick"),
e = this.DOM.getByClass("clever-core-ads")[0],
i = () => {
const i = this.DOM.height(e);
window.scrollY + 100 >= i ? this.DOM.css(t, "display", "block") : this.DOM.css(t, "display", "none")
};
this.DOM.bind(window, "scroll", i)
}
this.DOM.bind(window, "click", (t => {
const i = t.target;
i && !e.includes(i.id) && (t => {
let e = t;
for (let t = 0; t < 5; t++) {
if ("A" === e.tagName) return !0;
e = e.parentElement
}
return !1
})(i) && m()
})), t && this.DOM.bind(o, "click", m)
}
Close() {
var t, e;
super.Close(!1), null == (t = document.querySelector("#cleverLogoClick")) || t.remove(), x.User.Mobile || null == (e = document.querySelector("#cleverImageCreative")) || e.remove()
}
autoCloseValidation() {
if (x.group.AutoClose > 0) {
const {
baseUrl: t
} = this.getInitialState();
this.autoCloseTimeout = window.setTimeout((() => {
this.DOM.customFetch(t + "&autoclose=1"), this.Close()
}), 1e3 * x.group.AutoClose)
}
}
clearAutoClose() {
this.autoCloseTimeout && (clearTimeout(this.autoCloseTimeout), this.autoCloseTimeout = null)
}
},
$ = {
Banner: class extends G {
constructor(t) {
super({
name: "info-banner",
closeFormat: "base",
hook: "Banner"
}, t), h(this, "cache"), h(this, "interval"), h(this, "Config"), this.Config = {
CleverLogoZIndex: 50,
CloseButtonZIndex: 50
}, this.cache = new S, this.interval = null
}
Open() {
var t, e;
this.Hooks.Call(this.Hooks.Events.Formats.Banner.beforeOpen, [this.tracker.ID]);
const i = (null != (t = this.tracker.FileW) ? t : 300) + "px",
s = (null != (e = this.tracker.FileH) ? e : 600) + "px";
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const {
defaultUrl: o
} = this.getInitialState(), r = this.getBlock(!1);
if (!r) return !1;
let n = null;
this.Hooks.Call(this.Hooks.Events.Formats.Banner.beforeEach, [this.tracker.ID]), this.DOM.css(r, {
position: "relative",
overflow: "hidden",
backgroundColor: "transparent",
display: "block",
visibility: "visible",
margin: "0 auto",
width: i
}), this.DOM.attr(r, {
id: this.GetId("banner-img-enclosure")
}), this.DOM.isDisplayed(r) || (this.Net.ExtraParam += "&nv=1");
const a = r.parentElement;
if (a && !this.DOM.isVisible(a)) {
this.Registry.Debug("Placeholder is not visible"), this.DOM.css(a, {
display: "block",
visibility: "visible"
});
const t = a.parentElement;
t && !this.DOM.isVisible(t) && this.DOM.css(t, {
display: "block",
visibility: "visible"
})
}
x.User.Mobile && a && this.DOM.css(a, {
width: "100%"
});
const l = this.DOM.create("div", {
className: this.GetId(),
id: this.GetId()
}, {
maxWidth: "15px",
height: "15px",
color: "#fff",
padding: "0",
top: "5px",
left: "5px",
zIndex: this.Config.CleverLogoZIndex.toString(),
fontSize: "9px",
position: "absolute",
textShadow: "-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000",
fontFamily: "verdana",
transition: "max-width .5s ease",
overflow: "hidden"
}),
h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogoWhite", {}, {
position: "unset"
});
this.DOM.shortCutCreate("anchorClever"), this.DOM.append(h, c.outerHTML), this.DOM.append(l, h.outerHTML), r.appendChild(l);
const u = this.DOM.create("div", {
id: this.GetId("banner-img-close"),
className: this.GetId("banner-img-close")
});
Object.assign(u.style, d.btnCss), this.DOM.setHTML(u, `<img id="${this.GetId("close-image")}" src="` + E + '" width="25" height="25" style="float: none!important;" alt="Close"/>'), r.appendChild(u), this.DOM.bind(l, "mouseover", (() => {
this.DOM.css(l, {
maxWidth: "150px"
})
})), this.DOM.bind(l, "mouseleave", (() => {
this.DOM.css(l, {
maxWidth: "15px"
})
}));
const p = this.DOM.create("img", {
id: this.GetId("banner-img"),
src: H,
alt: "CLVR"
}, {
width: i,
height: s,
zIndex: (this.Config.CloseButtonZIndex - 2).toString(),
top: "0",
left: "0",
position: "absolute",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none"
});
n = o + "&hei=" + parseInt(s).toFixed(2) + "px&mode=banner";
const m = this.DOM.create("iframe", {
id: this.GetId("banner-iframe"),
name: d.Class,
src: "about:blank",
frameBorder: "0",
scrolling: "no",
title: "Clever-iframe"
}, {
width: "100%",
height: s,
zIndex: "0",
backgroundColor: "#fff",
border: "none",
margin: "0"
});
this.DOM.bind(p, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), r.appendChild(p), r.appendChild(m);
const g = this.DOM.getByID(this.GetId("banner-img-close"));
x.User.Mobile || (this.DOM.bind(p, "mouseover", (() => {
this.DOM.css(g, {
opacity: "100"
})
})), this.DOM.bind(p, "mouseleave", (() => {
this.DOM.css(g, {
opacity: "0"
})
})), this.DOM.bind(g, "mouseover", (() => {
this.DOM.css(g, {
opacity: "100"
}), this.DOM.css(this.GetId("close-image"), {
transform: "scale(1.25)"
})
})), this.DOM.bind(g, "mouseleave", (() => {
this.DOM.css(g, {
opacity: "0"
}), this.DOM.css(this.GetId("close-image"), {
transform: "scale(1)"
})
}))), this.DOM.bind(g, "click", (() => {
const t = this.DOM.getByID(g.id.replace("-close", "") + "-enclosure");
t ? (this.DOM.destroyElement(t), this.Hooks.Call(this.Hooks.Events.Formats.Banner.afterCloseBind, [this.tracker.ID])) : x._debug("Banner to close not found")
})), this.Hooks.Call(this.Hooks.Events.Formats.Banner.afterEach, [this.tracker.ID]);
const C = this.GetId("banner-img-enclosure"),
b = this.DOM.getByID(C);
if (!b) return x._debug("Banner enclosure element not found"), !1;
if (this.DOM.isMinimallyVisible(b) && n) {
x._debug(C + " is visible, change the src");
const t = this.DOM.getByID(this.GetId("banner-iframe"));
if (!t) return x._debug("iframe not found"), !1;
this.DOM.attr(t, "src", n + "&ts=" + this.Registry.TimeSpent), this.CodeUtils.DoCallback(this.tracker, !0)
}
return "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250, !1, (() => r)) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, 250, !1, (() => r)))), this.addScrollListener(!1, 250, (() => r)), this.Hooks.Call(this.Hooks.Events.Formats.Banner.afterAll, [this.tracker.ID]), !0
}
},
BannerApp: class extends G {
constructor(t) {
super({
name: "Banner-App",
closable: !0,
hook: "BannerApp",
closeFormat: "base"
}, t)
}
Open() {
var t, e;
const {
defaultUrl: i,
body: s
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.BannerApp.beforeOpen, [this.tracker.ID]);
const o = null != (t = this.tracker.FileW) ? t : 300,
r = null != (e = this.tracker.FileH) ? e : 250,
n = 1 === o ? "100%" : o + "px",
a = 1 === r ? "100%" : r + "px",
l = I(),
h = this.GetId(),
c = this.DOM.create("div", {
id: h
}, {
width: n,
height: a,
position: "relative",
margin: "0 auto"
}),
d = this.GetId("overlay"),
u = this.DOM.shortCutCreate("overlay", {
id: d
}),
p = this.GetId("close"),
m = this.DOM.shortCutCreate("bannerClose", {
id: p
}, l ? {
right: "30px"
} : {}),
g = this.DOM.shortCutCreate("anchorClever", {}, l ? {
position: "absolute",
top: "0",
left: "0",
height: "30px",
width: "30px"
} : {}, l ? "div" : void 0);
this.DOM.bind(g, "click", (t => {
t.stopImmediatePropagation(), window.open(g.href, "_blank")
}));
const C = this.DOM.shortCutCreate("cleverLogo"),
b = i + "&hei=" + parseInt(a) + "&ts=" + this.Registry.TimeSpent,
f = this.DOM.create("iframe", {
id: this.GetId("iframe"),
src: b,
scrolling: "no"
}, {
width: n,
height: a,
border: "none"
});
this.DOM.append(c, u.outerHTML), this.DOM.append(c, m.outerHTML), this.DOM.append(g, C.outerHTML), this.DOM.append(c, g.outerHTML), this.DOM.append(c, f.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.bind(m, "click", (t => {
t.stopImmediatePropagation(), this.Close()
})), this.DOM.bind(l ? document : u, "click", (t => {
t.stopImmediatePropagation(), this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x._debug("Do Callback: Banner-App"), this.CodeUtils.DoCallback(this.tracker, !0), this.Hooks.Call(this.Hooks.Events.Formats.BannerApp.afterOpen, [this.tracker.ID])
}
},
BannerAppCountdown: class extends G {
constructor(t) {
super({
name: "Banner-App-Countdown",
closeFormat: "base",
hook: "BannerAppCountdown"
}, t)
}
Open() {
const {
defaultUrl: t,
body: e
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.BannerAppCountdown.beforeOpen, [this.tracker.ID]);
const i = I(),
s = this.GetId(""),
o = this.DOM.create("div", {
id: s
}, {
width: "100vw",
height: "100vh",
position: "relative",
margin: "0 auto"
}),
r = this.GetId("overlay"),
n = this.GetId("close"),
a = this.GetId("percentage"),
l = this.DOM.shortCutCreate("overlay", {
id: r
}, {
height: "85%",
top: "iOS" === x.User.Platform ? "30px" : "0"
}),
h = this.DOM.create("div", {
id: a
}, {
position: "absolute",
width: "20px",
height: "20px",
display: "block",
right: "iOS" === x.User.Platform ? "32px" : "3px",
zIndex: "999999",
fontWeight: "bold",
backgroundColor: "white",
borderRadius: "50%",
color: "black",
textAlign: "center",
lineHeight: "20px"
}),
c = this.DOM.shortCutCreate("bannerClose", {
id: n
}, {
right: "iOS" === x.User.Platform ? "32px" : "2px",
transition: "background-color 5s linear",
display: "none"
}),
d = this.DOM.shortCutCreate("anchorClever", {}, i ? {
position: "absolute",
top: "0",
left: "0",
height: "30px",
width: "30px"
} : {}, i ? "div" : void 0);
this.DOM.bind(d, "click", (t => {
t.stopImmediatePropagation(), window.open(d.href, "_blank")
}));
const u = this.GetId("logo"),
p = this.DOM.shortCutCreate("cleverLogo", {
id: u
}),
m = t + "&ts=" + this.Registry.TimeSpent,
g = this.DOM.create("iframe", {
id: this.GetId("iframe"),
scrolling: "no",
src: m
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.append(o, l.outerHTML), this.DOM.append(o, c.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(d, p.outerHTML), this.DOM.append(o, d.outerHTML), this.DOM.append(o, g.outerHTML), this.DOM.append(e, o.outerHTML);
const C = this.DOM.getByID(a),
b = this.DOM.getByID(n);
this.handleFormatClose(C, b), this.DOM.bind(i ? document : l, "click", (t => {
t.stopImmediatePropagation(), this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x._debug("Do Callback: Banner-App Countdown"), this.CodeUtils.DoCallback(this.tracker, !0), this.Hooks.Call(this.Hooks.Events.Formats.BannerAppCountdown.afterOpen, [this.tracker.ID])
}
handleFormatClose(t, e) {
let i = 5e3;
const s = setInterval((() => {
i -= 1e3, t.innerText = "" + i / 1e3, i <= 0 && (clearInterval(s), null == t || t.remove(), e.style.display = "block", this.DOM.bind(e, "click", (t => {
t.stopImmediatePropagation(), this.Close()
})))
}), 1e3)
}
},
BannerAppVideo: class extends G {
constructor(t) {
super({
name: "Banner-App-Video",
closeFormat: "base",
hook: "BannerAppVideo"
}, t)
}
Open() {
var t, e;
const {
defaultUrl: i,
body: s
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.BannerAppVideo.beforeOpen, [this.tracker.ID]);
let o = null != (t = this.tracker.FileW) ? t : 300,
r = null != (e = this.tracker.FileH) ? e : 600;
const n = I();
1 === o && 1 === r && (o = 100, r = 100);
const a = this.GetId(""),
l = this.DOM.create("div", {
id: a
}, {
width: o + (100 === o ? "vw" : "px"),
height: r + (100 === r ? "vh" : "px"),
position: "relative",
margin: "0 auto"
}),
h = this.GetId("overlay"),
c = this.GetId("close"),
d = this.DOM.shortCutCreate("overlay", {
id: h
}, {
height: "85%",
top: "iOS" === x.User.Platform ? "30px" : "0"
}),
u = this.DOM.shortCutCreate("bannerClose", {
id: c
}, {
right: "iOS" === x.User.Platform ? "32px" : "2px"
}),
p = this.DOM.shortCutCreate("anchorClever", {}, n ? {
position: "absolute",
top: "0",
left: "0",
height: "30px",
width: "30px"
} : {}, n ? "div" : void 0);
this.DOM.bind(p, "click", (t => {
t.stopImmediatePropagation(), window.open(p.href, "_blank")
}));
const m = this.GetId("logo"),
g = this.DOM.shortCutCreate("cleverLogo", {
id: m
}),
C = i + "&hei=" + r + "&ts=" + this.Registry.TimeSpent,
b = this.DOM.create("iframe", {
id: this.GetId("iframe"),
scrolling: "no",
src: C
}, {
width: o + (100 === o ? "vw" : "px"),
height: r + (100 === r ? "vh" : "px"),
border: "none"
});
if (this.DOM.append(l, d.outerHTML), this.DOM.append(l, u.outerHTML), this.DOM.append(p, g.outerHTML), this.DOM.append(l, p.outerHTML), this.DOM.append(l, b.outerHTML), this.DOM.append(s, l.outerHTML), 100 === o && 100 === r) {
const t = s.querySelector("#" + c),
e = s.querySelector("#" + m);
e && this.DOM.css(e, {
left: "35px",
top: "15px"
}), t && this.DOM.css(t, {
display: "none"
})
}
this.DOM.bind(u, "click", (t => {
t.stopImmediatePropagation(), this.Close()
})), this.DOM.bind(n ? document : d, "click", (t => {
t.stopImmediatePropagation(), this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x._debug("Do Callback: Banner-App Video"), this.CodeUtils.DoCallback(this.tracker, !0), this.Hooks.Call(this.Hooks.Events.Formats.BannerAppVideo.afterOpen, [this.tracker.ID])
}
},
BannerCube: class extends G {
constructor(t) {
super({
name: "banner-cube",
hook: "BannerCube",
closeFormat: "base"
}, t)
}
Open() {
var t, e, i, s;
this.Hooks.Call(this.Hooks.Events.Formats.BannerCube.beforeOpen, [this.tracker.ID]);
const o = this.getBlock(!1);
if (!o) return !1;
const r = this.GetId(""),
n = this.DOM.create("div", {
id: r
}, {
cursor: "pointer",
width: "300px",
height: "250px",
margin: "auto",
perspective: "800px",
perspectiveOrigin: "50% 225px"
}),
l = this.GetId("overlay"),
h = this.DOM.shortCutCreate("overlay", {
id: l
}, {
zIndex: "14"
}),
c = this.DOM.create("div", {
id: this.GetId("stage")
}, {
transition: "transform 4s",
transformStyle: "preserve-3d",
position: "relative"
}),
d = this.GetId("close"),
u = this.DOM.shortCutCreate("bannerClose", {
id: d
}),
p = this.DOM.shortCutCreate("anchorClever"),
m = this.DOM.shortCutCreate("cleverLogo"),
g = this.DOM.create("div", {
id: this.GetId("shape")
}, {
animation: "spin_Cube 14s infinite linear",
position: "relative",
top: "46px",
margin: "0 auto",
height: "200px",
width: "200px",
transformStyle: "preserve-3d"
}),
C = {
position: "absolute",
height: "200px",
width: "200px",
"box-sizing": "border-box",
"background-color": "rgba(255, 255, 255, 0.6)",
transition: "-webkit-transform 1s ease-in-out",
"backface-visibility": "visible"
},
b = {
width: "100%",
"max-width": "300px",
height: "100%",
"max-height": "250px",
border: "none"
};
let f = -90;
for (let t = 1; t <= 4; t++) {
const e = this.DOM.create("div", {
id: this.GetId("side-" + t)
}, a(a({}, C), {
transform: `rotateY(${f}deg) translateZ(100px)`
}));
f += 90;
const i = this.DOM.create("iframe", {
id: this.GetId("frame-" + t)
}, b);
this.DOM.append(e, i.outerHTML), this.DOM.append(g, e.outerHTML)
}
const M = this.DOM.create("style");
return M.type = "text/css", M.appendChild(document.createTextNode("@keyframes spin_Cube { from {transform: rotateY(0);} to { transform: rotateY(-360deg); } }")), this.DOM.append(c, g.outerHTML), this.DOM.append(n, u.outerHTML), this.DOM.append(p, m.outerHTML), this.DOM.append(n, p.outerHTML), this.DOM.append(n, h.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(o, M.outerHTML), this.DOM.append(o, n.outerHTML), null == (t = o.querySelector("#" + d)) || t.addEventListener("click", (() => {
this.Close()
})), null == (e = o.querySelector("#" + l)) || e.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank");
const t = o.querySelector("#" + r);
t && (t.style.animationPlayState = "running")
})), null == (i = o.querySelector("#" + r)) || i.addEventListener("mouseenter", (function() {
const t = o.querySelector("#" + r);
t && (t.style.animationPlayState = "paused")
})), null == (s = o.querySelector("#" + r)) || s.addEventListener("mouseleave", (function() {
const t = o.querySelector("#" + r);
t && (t.style.animationPlayState = "running")
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250, !0) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, 250, !0))), this.addScrollListener(!0), this.Hooks.Call(this.Hooks.Events.Formats.BannerCube.afterOpen, [this.tracker.ID]), !0
}
},
Box3D: class extends G {
constructor(t) {
super({
name: "3DBox",
closeFormat: "base",
hook: "Box3D"
}, t)
}
Open() {
var t, e;
this.Hooks.Call(this.Hooks.Events.Formats.Box3D.beforeOpen, [this.tracker.ID]);
const i = this.getBlock(!1);
if (!i) return !1;
const s = this.GetId(""),
o = this.DOM.create("div", {
id: s
}, {
width: x.User.Mobile ? "300px" : "970px",
height: "250px",
position: "relative",
margin: "0 auto"
}),
r = this.GetId("overlay"),
n = this.DOM.shortCutCreate("overlay", {
id: r
}, {
zIndex: "14"
}),
a = this.GetId("close"),
l = this.DOM.create("img", {
id: a,
src: E,
alt: "close"
});
Object.assign(l.style, d.btnCss);
const h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
u = this.DOM.create("iframe", {
id: this.GetId("iframe"),
scrolling: "no",
title: "Clever-iframe"
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.append(o, n.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(h, c.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(o, u.outerHTML), this.DOM.append(i, o.outerHTML), null == (t = i.querySelector("#" + a)) || t.addEventListener("click", (() => {
this.Close()
})), null == (e = i.querySelector("#" + r)) || e.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible() : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t))), this.addScrollListener(), this.Hooks.Call(this.Hooks.Events.Formats.Box3D.afterOpen, [this.tracker.ID])
}
},
Cube: class extends G {
constructor(t) {
super({
name: "cube",
hook: "Cube",
closeFormat: "base"
}, t)
}
Open() {
var t, e, i, s;
this.Hooks.Call(this.Hooks.Events.Formats.Cube.beforeOpen, [this.tracker.ID]);
const o = this.getBlock(!1);
if (!o) return !1;
const r = this.GetId(""),
n = this.DOM.create("div", {
id: r
}, {
cursor: "pointer",
width: "300px",
height: "250px",
margin: "auto",
position: "relative"
}),
a = this.GetId("overlay"),
l = this.DOM.shortCutCreate("overlay", {
id: a
}),
h = this.GetId("close"),
c = this.DOM.shortCutCreate("bannerClose", {
id: h
}),
d = this.DOM.shortCutCreate("anchorClever"),
u = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
p = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe"
}, {
width: "100%",
maxWidth: "300px",
height: "100%",
maxHeight: "250px",
minHeight: "200px",
border: "none"
});
this.DOM.append(n, l.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(d, u.outerHTML), this.DOM.append(n, d.outerHTML), this.DOM.append(n, p.outerHTML), this.DOM.append(o, n.outerHTML);
const m = document.getElementById(this.GetId("iframe"));
return null == (t = o.querySelector("#" + h)) || t.addEventListener("click", (() => {
this.Close()
})), null == (e = o.querySelector("#" + a)) || e.addEventListener("mouseenter", (() => {
var t;
null == (t = null == m ? void 0 : m.contentWindow) || t.postMessage({
in: !0
}, "*")
})), null == (i = o.querySelector("#" + a)) || i.addEventListener("mouseleave", (() => {
var t;
null == (t = m.contentWindow) || t.postMessage({
in: !1
}, "*")
})), null == (s = o.querySelector("#" + a)) || s.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible() : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t))), this.addScrollListener(), this.Hooks.Call(this.Hooks.Events.Formats.Cube.afterOpen, [this.tracker.ID]), !0
}
},
ExpandableBannerLeft: class extends G {
constructor(t) {
super({
name: "expandable-banner-left",
hook: "ExpandableBannerLeft",
closeFormat: "banner"
}, t), h(this, "Config", {
CloseButtonZIndex: 50
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerLeft.beforeOpen, []);
const t = this.getBlocks();
if (!t) return;
const {
defaultUrl: e
} = this.getInitialState(), i = (t, e) => () => {
if (!1 === e) return void this.Close();
e = !1;
const i = (t, e) => {
const i = e ? "720px" : "300px",
s = e ? "300px" : "250px",
o = this.DOM.getByID(this.GetId(t, "inner-box"));
o && this.DOM.css(o, {
width: i,
height: s
});
const r = this.DOM.getByID(this.GetId(t, "arrow"));
r && this.DOM.css(r, "display", "none")
},
s = this.DOM.getByID(this.GetId(t, "box"));
s && setTimeout((() => {
s.onmouseout = () => {
i(t, !1)
}, s.onmouseover = () => {
i(t, !0)
}
}), 500), i(t, !1)
};
x._debug("Detected ExpandableBannerLeft ad elements: " + t.length);
for (let e = 0; e < t.length; e++) {
const s = this.DOM.create("div", {
id: this.GetId(e)
}, {
background: "transparent",
width: "300px",
height: "250px"
}),
o = this.DOM.create("div", {
id: this.GetId(e, "box")
}, {
position: "relative",
width: "728px",
height: "300px",
left: "0"
}),
r = this.DOM.shortCutCreate("overlay", {
id: this.GetId(e, "overlay")
}),
n = this.DOM.create("div", {
id: this.GetId(e, "inner-box")
}, {
position: "absolute",
maxWidth: "100%",
zIndex: "5043",
width: "300px",
height: "250px",
left: "0",
top: "0",
transition: "all .2s ease-in-out",
border: "none"
}),
a = this.DOM.create("div", {
id: this.GetId(e, "close")
}, d.btnCss),
l = this.DOM.shortCutCreate("anchorClever"),
h = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId(e, "logo")
}, {
top: "5px"
}),
c = this.DOM.create("img", {
id: this.GetId(e, "arrow"),
alt: "arrow",
src: A
}, {
display: "none",
transition: "all 1s ease-in-out 0s",
right: "10px",
bottom: "45%",
width: "35px",
position: "absolute",
zIndex: "101",
cursor: "pointer",
margin: "5px",
transform: "rotate(90deg)"
}),
u = this.DOM.create("iframe", {
id: this.GetId(e, "iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no"
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.setHTML(n, r.outerHTML), this.DOM.append(n, a.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(n, l.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(n, u.outerHTML), this.DOM.setHTML(o, n.outerHTML), this.DOM.setHTML(s, o.outerHTML), this.DOM.setHTML(t[e], s.outerHTML), setTimeout((() => {
this.DOM.setHTML(a, '<img src="' + E + '" width="20" height="20" style="float: none!important;" alt="close"/>')
}), 2e3), this.DOM.bind(r, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(a, "click", i(e, !1)), this.DOM.bind(c, "click", i(e, !0))
}
let s = !1;
const o = [],
r = i => {
for (let r = 0; r < t.length; r++) {
if (void 0 !== o[r] && o[r]) continue;
const n = this.GetId(r, "iframe"),
a = t[r];
if (this.DOM.isMinimallyVisible(a) || i) {
const t = () => {
const t = this.DOM.getByID(this.GetId(r, "inner-box"));
t && this.DOM.css(t, {
width: "728px",
height: "300px"
});
const e = this.DOM.getByID(this.GetId(r, "close"));
e && this.DOM.css(e, "display", "inherit");
const i = this.DOM.getByID(this.GetId(r, "arrow"));
i && this.DOM.css(i, "display", "inherit"), s || (s = !0)
};
s ? t() : setTimeout((() => {
t()
}), 2e3);
const i = e + "&hei=" + a.style.height,
l = this.DOM.getByID(n);
l && this.DOM.attr(l, "src", i + "&ts=" + this.Registry.TimeSpent), x._debug("Do Callback: ExpandableBannerLeft"), this.CodeUtils.DoCallback(this.tracker, !0), o[r] = !0;
break
}
}
},
n = new IntersectionObserver((t => {
t.some((t => t.isIntersecting)) && r(!0)
})),
a = document.querySelector("." + d.Class);
return null !== a && n.observe(a), this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerLeft.afterOpen, []), !0
}
},
ExpandableBannerRight: class extends G {
constructor(t) {
super({
name: "expandable-banner-right",
hook: "ExpandableBannerRight",
closeFormat: "banner"
}, t), h(this, "Config", {
CloseButtonZIndex: 50
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerRight.beforeOpen, []);
const t = this.getBlocks();
if (!t) return;
const {
defaultUrl: e
} = this.getInitialState(), i = (t, e) => () => {
if (!1 === e) return void this.Close();
e = !1;
const i = (t, e) => {
const i = e ? "720px" : "300px",
s = e ? "300px" : "250px",
o = this.DOM.getByID(this.GetId(t, "inner-box"));
o && this.DOM.css(o, {
width: i,
height: s
});
const r = this.DOM.getByID(this.GetId(t, "arrow"));
r && this.DOM.css(r, "display", "none")
},
s = this.DOM.getByID(this.GetId(t, "box"));
s && setTimeout((() => {
s.onmouseout = () => {
i(t, !1)
}, s.onmouseover = () => {
i(t, !0)
}
}), 500), i(t, !1)
};
x._debug("Detected ExpandableBannerRight ad elements: " + t.length);
for (let e = 0; e < t.length; e++) {
const s = this.DOM.create("div", {
id: this.GetId(e)
}, {
background: "transparent",
width: "300px",
height: "250px"
}),
o = this.DOM.create("div", {
id: this.GetId(e, "box")
}, {
position: "relative",
width: "728px",
height: "300px",
left: "0"
}),
r = this.DOM.shortCutCreate("overlay", {
id: this.GetId(e, "overlay")
}),
n = this.DOM.create("div", {
id: this.GetId(e, "inner-box")
}, {
position: "absolute",
maxWidth: "100%",
zIndex: "5043",
width: "300px",
height: "250px",
right: "0",
top: "0",
transition: "all .2s ease-in-out",
border: "none"
}),
a = this.DOM.create("div", {
id: this.GetId(e, "close")
}, d.btnCss),
l = this.DOM.shortCutCreate("anchorClever"),
h = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId(e, "logo")
}, {
top: "5px"
}),
c = this.DOM.create("img", {
id: this.GetId(e, "arrow"),
alt: "arrow",
src: A
}, {
display: "none",
transition: "all 1s ease-in-out 0s",
left: "10px",
bottom: "45%",
width: "35px",
position: "absolute",
zIndex: "101",
cursor: "pointer",
margin: "5px",
transform: "rotate(-90deg)"
}),
u = this.DOM.create("iframe", {
id: this.GetId(e, "iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no"
}, {
width: "100%",
height: "100%",
border: "none"
});
this.DOM.setHTML(n, r.outerHTML), this.DOM.append(n, a.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(n, l.outerHTML), this.DOM.append(n, c.outerHTML), this.DOM.append(n, u.outerHTML), this.DOM.setHTML(o, n.outerHTML), this.DOM.setHTML(s, o.outerHTML), this.DOM.setHTML(t[e], s.outerHTML), setTimeout((() => {
this.DOM.setHTML(a, `<img src="${E}"\n width="20" height="20" style="float: none!important;" alt="close"/>`)
}), 2e3), this.DOM.bind(r, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(a, "click", i(e, !1)), this.DOM.bind(c, "click", i(e, !0))
}
let s = !1;
const o = [],
r = i => {
for (let r = 0; r < t.length; r++) {
if (void 0 !== o[r] && o[r]) continue;
const n = this.GetId(r, "iframe"),
a = t[r];
if (this.DOM.isMinimallyVisible(a) || i) {
const t = () => {
const t = this.DOM.getByID(this.GetId(r, "inner-box"));
t && this.DOM.css(t, {
width: "728px",
height: "300px"
});
const e = this.DOM.getByID(this.GetId(r, "close"));
e && this.DOM.css(e, "display", "inherit");
const i = this.DOM.getByID(this.GetId(r, "arrow"));
i && this.DOM.css(i, "display", "inherit"), s || (s = !0)
};
!1 === s ? setTimeout((() => {
t()
}), 2e3) : t();
const i = e + "&hei=" + a.style.height,
l = this.DOM.getByID(n);
l && this.DOM.attr(l, "src", i + "&ts=" + this.Registry.TimeSpent), x._debug("Do Callback: ExpandableBannerLeft"), this.CodeUtils.DoCallback(this.tracker, !0), o[r] = !0;
break
}
}
},
n = new IntersectionObserver((function(t) {
t.some((function(t) {
return t.isIntersecting
})) && r(!0)
})),
a = document.querySelector("." + d.Class);
return null !== a && n.observe(a), this.Hooks.Call(this.Hooks.Events.Formats.ExpandableBannerRight.afterOpen, []), !0
}
},
InterScroller: class extends G {
constructor(t) {
super({
name: "inter-scroller",
hook: "InterScroller",
closeFormat: "banner"
}, t), h(this, "cookieAfterIds", [45366, 33249, 49672, 45366, 45004]), h(this, "Config", {
MainElementZIndex: 0
})
}
Open() {
var t, e;
if (this.Hooks.Call(this.Hooks.Events.Formats.InterScroller.beforeOpen, [this.tracker.ID]), !x.User.Mobile) return x._debug("Device or user is not mobile"), !1;
const i = this.getBlock(!1);
if (!i) return !1;
x._debug("Detected InterScroller ad elements");
const {
defaultUrl: s
} = this.getInitialState(), o = null != (t = this.tracker.FileW) ? t : 300, r = null != (e = this.tracker.FileH) ? e : 250, n = o + "px", a = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no",
src: "about:blank",
allowFullscreen: !0
}, {
border: "0 none transparent",
width: n,
height: 600 === r ? r + "px" : "100vh",
backgroundColor: "transparent",
marginTop: "20px",
visibility: "visible",
position: "fixed",
top: "0",
padding: "0",
pointerEvents: "all",
zIndex: "-1",
display: "flex"
}), l = 600 === r ? "566px" : "250px", h = this.DOM.create("div", {
id: this.GetId("child3")
}, {
position: "absolute",
left: "0",
top: "0",
overflow: "hidden",
zIndex: "10",
width: "100%",
height: l,
clipPath: "inset(0 0 0 0)"
}), c = this.DOM.create("div", {
id: this.GetId("child2")
}, {
position: "relative",
width: o + "px",
display: "flex",
justifyContent: "center",
height: l,
minHeight: "250px"
}), u = this.DOM.create("div", {
id: this.GetId("child1")
}, {
position: "relative",
maxWidth: "300px"
}), p = this.DOM.shortCutCreate("overlay", {
id: this.GetId("overlay")
}), m = this.DOM.create("div", {
id: this.GetId()
}, {
height: r + "px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
position: "relative",
zIndex: this.Config.MainElementZIndex.toString(),
textAlign: "justify"
});
this.DOM.setHTML(h, a.outerHTML), this.DOM.setHTML(c, h.outerHTML), this.DOM.setHTML(u, c.outerHTML), this.DOM.setHTML(m, p.outerHTML), this.DOM.append(m, u.outerHTML), this.DOM.setHTML(i, m.outerHTML), this.DOM.css(i, {
display: "block",
visibility: "visible"
}), this.DOM.bind(p, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), -1 !== this.cookieAfterIds.indexOf(x.group.ID) && this.DOM.attr(a, {
src: s + "&hei=" + i.style.height
});
let g = !1;
const C = () => {
if (!g && this.DOM.isMinimallyVisible(i)) {
g = !0;
const t = "height" in i ? i.height : i.clientHeight,
e = this.DOM.getByID(this.GetId("iframe")),
o = s + "&hei=" + i.style.height;
e && (-1 !== this.cookieAfterIds.indexOf(x.group.ID) ? this.DOM.attr(e, {
src: o + "#visible=1"
}) : this.DOM.attr(e, {
src: k({
defaultUrl: s,
ts: this.Registry.TimeSpent,
height: t
})
})), window.removeEventListener("scroll", C), x._debug(`Do Callback: ${this.config.name}`), this.CodeUtils.DoCallback(this.tracker, !0)
}
};
return "loading" !== document.readyState ? C() : document.addEventListener("DOMContentLoaded", C), window.addEventListener("scroll", C), this.Hooks.Call(this.Hooks.Events.Formats.InterScroller.afterOpen, [this.tracker.ID]), !0
}
},
InteractiveBanner: class extends G {
constructor(t) {
super({
name: "interactive-banner",
hook: "InteractiveBanner",
closeFormat: "banner"
}, t)
}
Open() {
var t, e, i;
const {
baseUrl: s
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.InteractiveBanner.beforeOpen, [this.tracker.ID]);
const o = this.getBlock(!0);
if (!o) return !1;
const r = null != (t = this.tracker.FileW) ? t : 300,
n = null != (e = this.tracker.FileH) ? e : 120,
a = this.GetId(""),
l = this.DOM.create("div", {
id: a
}, {
height: n + "px",
width: "300px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
position: "relative",
zIndex: "99",
textAlign: "justify",
maxWidth: "600px",
margin: "0 auto",
cursor: "pointer"
}),
h = this.GetId("overlay"),
c = this.DOM.shortCutCreate("overlay", {
id: h
}),
d = this.GetId("close"),
u = this.DOM.shortCutCreate("bannerClose", {
id: d
}, {
right: "1px",
height: "16px",
width: "16px"
}),
p = this.DOM.shortCutCreate("anchorClever"),
m = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
g = this.DOM.shortCutCreate("iframe", {
id: this.GetId("iframe")
});
this.DOM.append(l, c.outerHTML), this.DOM.append(l, u.outerHTML), this.DOM.append(p, m.outerHTML), this.DOM.append(l, p.outerHTML), this.DOM.append(l, g.outerHTML), this.DOM.append(o[0], l.outerHTML), null == (i = o[0].querySelector("#" + d)) || i.addEventListener("click", (() => {
this.Close()
}));
const C = o[0].querySelector("#" + h);
let b = !1;
return null == C || C.addEventListener("click", (() => {
var t, e;
b ? (this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")) : null == (e = null == (t = o[0].querySelector("iframe")) ? void 0 : t.contentWindow) || e.postMessage({
switchToVideo2: !0,
impression_url: s + "&ts=" + this.Registry.TimeSpent + "&interactive=1"
}, "*"), b = !b
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, r) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, r))), this.addScrollListener(!1, r), this.Hooks.Call(this.Hooks.Events.Formats.InteractiveBanner.afterOpen, [this.tracker.ID]), !0
}
},
InteractiveSticky: class extends G {
constructor(t) {
super({
hook: "InteractiveSticky",
name: "interactive-sticky",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: null
})
}
Open() {
const {
baseUrl: t,
defaultUrl: e
} = this.getInitialState();
let i = null;
if (this.Config.CustomBody) {
const t = document.querySelector(this.Config.CustomBody);
null !== t && (i = t)
} else i = this.DOM.getByTag("body")[0];
this.Hooks.Call(this.Hooks.Events.Formats.InteractiveSticky.beforeOpen, [this.tracker.ID]);
const s = this.GetId(""),
o = this.DOM.create("div", {
id: s
}, {
height: "120px",
width: "300px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
bottom: "0px",
position: "fixed",
zIndex: "5999999",
textAlign: "justify",
maxWidth: "600px",
margin: "0 auto",
cursor: "pointer",
left: "0px",
right: "0px"
}),
r = this.GetId("overlay"),
n = this.DOM.shortCutCreate("overlay", {
id: r
}),
a = this.GetId("close"),
l = this.DOM.shortCutCreate("bannerClose", {
id: a
}, {
right: "1px",
height: "16px",
width: "16px"
}),
h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
d = this.DOM.shortCutCreate("iframe", {
id: this.GetId("iframe")
});
this.DOM.append(o, n.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(h, c.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(o, d.outerHTML), null == i || i.insertBefore(o, i.firstChild);
let u = !1;
null == n || n.addEventListener("click", (() => {
var e;
this.clearAutoClose(), u ? (this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")) : null == (e = null == d ? void 0 : d.contentWindow) || e.postMessage({
switchToVideo2: !0,
impression_url: t + "&ts=" + this.Registry.TimeSpent + "&interactive=1"
}, "*"), u = !u
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.bind(l, "click", (() => {
this.clearAutoClose(), this.Close()
})), this.DOM.attr(d, {
src: e
}), this.Hooks.Call(this.Hooks.Events.Formats.InteractiveSticky.afterOpen, [this.tracker.ID]), this.autoCloseValidation()
}
},
Interstitial: class {
constructor(t) {
this.args = t
}
Open() {
const t = this.args.tracker;
if ("inter" === t.Type) {
return new N(this.args).Open()
}
if ("internotime" == t.Type) {
return new V(this.args).Open()
}
if ("interonclose" == t.Type) {
return new W(this.args).Open()
}
return new z(this.args).Open()
}
},
LayerOver: class extends G {
constructor(t) {
super({
name: "layer-over",
closeFormat: "other",
hook: "unknown"
}, t)
}
Open() {
var t;
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const {
defaultUrl: e,
body: i
} = this.getInitialState();
let s = 300,
o = 600;
this.tracker.FileH > 0 && this.tracker.FileH < o && (o = this.tracker.FileH), this.tracker.FileW > 0 && this.tracker.FileW < s && (s = this.tracker.FileW);
const {
FONT_SIZE: r,
FONT: n,
BGCOLOR: a,
COLOR: l,
RADIUS: h,
BOX_SHADOW: c
} = p, u = this.DOM.create("div", {
id: this.GetId()
}, {
fontSize: r,
fontFamily: n,
backgroundColor: a,
color: l,
position: "fixed",
zIndex: this.DOM.zIndex(0),
width: s + "px",
height: o + "px",
margin: "0",
bottom: "0",
overflow: "hidden",
borderRadius: h,
boxShadow: c,
borderBottomLeftRadius: "0",
borderBottomRightRadius: "0",
textShadow: "none",
padding: "0"
});
x.User.Platform && "ios" === x.User.Platform.toLowerCase() && this.DOM.css(u, {
overflow: "auto",
"-webkit-overflow-scrolling": "touch"
});
const m = "layerleft" === this.tracker.Type;
this.DOM.css(u, m ? "left" : "right", "40px");
const g = this.DOM.create("div", {
id: this.GetId("layer-header")
}, {
width: "15px",
height: "15px",
fontSize: r,
padding: "4px",
color: l,
backgroundColor: a,
float: "right",
textAlign: "right",
cursor: "pointer"
});
let C;
if (u.appendChild(g), this.tracker.File) C = this.DOM.create("img", {
id: this.GetId("layer-img"),
alt: "CLVR",
src: "//static." + x.group.Domain + "/" + (null != (t = this.tracker.File) ? t : "")
}, {
width: s + "px",
height: o - 30 + "px",
position: "absolute",
zIndex: this.DOM.zIndex(3),
top: "0",
left: "0",
cursor: "pointer",
border: "none"
}), u.appendChild(C);
else {
const t = this.DOM.create("div", {
id: this.GetId("interstitial-div")
}, {
width: Number(s) + "px",
height: o - 30 + "px"
});
x.User.Platform && "ios" === x.User.Platform.toLowerCase() && this.DOM.css(t, {
"-webkit-overflow-scrolling": "touch"
}), C = this.DOM.create("img", {
id: this.GetId("layer-img"),
src: H,
alt: "img"
}, {
width: s + "px",
height: o + "px",
position: "absolute",
zIndex: this.DOM.zIndex(4),
top: "0",
left: "0",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none"
}), t.appendChild(C);
const i = this.DOM.shortCutCreate("anchorClever"),
r = this.DOM.shortCutCreate("cleverLogo", {}, {
top: "5px"
});
this.DOM.append(i, r.outerHTML), this.DOM.append(u, i.outerHTML);
const n = this.DOM.create("iframe", {
id: this.GetId("layer-iframe"),
name: d.Class,
title: "Clever-iframe",
src: k({
defaultUrl: e,
ts: this.Registry.TimeSpent,
height: o
}),
frameBorder: "0"
}, {
width: s + "px",
height: o + "px",
backgroundColor: "#fff",
position: "absolute",
zIndex: this.DOM.zIndex(3),
top: "0",
left: "0",
cursor: "pointer",
border: "none",
margin: "0",
zoom: this.tracker.Zoom,
"-moz-transform": "scale(" + this.tracker.Zoom + ")",
"-moz-transform-origin": "0 0",
"-o-transform": "scale(" + this.tracker.Zoom + ")",
"-o-transform-origin": "0 0",
"-webkit-transform": "scale(" + this.tracker.Zoom + ")",
"-webkit-transform-origin": "0 0"
});
t.appendChild(n), u.appendChild(t)
}
i.appendChild(u);
const b = {
position: "fixed",
"z-index": this.DOM.zIndex(5),
bottom: o - 10 + "px",
width: "30px",
height: "30px",
cursor: "pointer",
margin: "0",
left: m ? `${s+20}px` : "auto",
right: m ? "-20px" : s - 270 + "px"
};
i.appendChild(this.DOM.create("img", {
src: E,
alt: "close",
width: 30,
height: 30,
id: this.GetId("close-btn")
}, b));
const f = this.DOM.getByID(this.GetId("layer-img"));
if (f) {
const t = this.Net.fetchBaseUrl(this.tracker, {
id: this.tracker.ID,
frominter: 1,
click: 1,
ref: window.btoa(this.Registry.getLocationHref()),
ruri: window.btoa(document.referrer),
cmpId: this.TCF.cmpId
});
this.DOM.bind(f, "click", (() => {
this.Callback.Click(), window.open(t, "_blank"), this.clearAutoClose(), this.Close(!1)
}))
}
this.DOM.bind(g, "click", (() => {
this.clearAutoClose(), this.Close(!1)
}));
const M = this.DOM.getByID(this.GetId("close-btn"));
return M && this.DOM.bind(M, "click", (() => {
this.clearAutoClose(), this.Close()
})), this.CodeUtils.DoCallback(this.tracker, u && u.offsetWidth > 0 && u.offsetHeight > 0), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.autoCloseValidation(), !0
}
Close(t = !0) {
const {
baseUrl: e
} = this.getInitialState(), i = this.DOM.getByID(this.GetId()), s = this.DOM.getByID(this.GetId("close-btn"));
return t && this.DOM.customFetch(e + "&closed=1"), i && this.partialDelete(i), s && this.partialDelete(s), !0
}
},
LeaderBoard: class extends G {
constructor(t) {
super({
name: "leader-board",
hook: "LeaderBoard",
closeFormat: "banner"
}, t)
}
Open() {
if (this.Hooks.Call(this.Hooks.Events.Formats.LeaderBoard.beforeOpen, [this.tracker.ID]), x.User.Mobile) return x._debug("Device is mobile, skip"), !1;
const t = this.getBlock(!1);
if (!t) return !1;
const e = this.GetId(""),
i = this.DOM.create("div", {
id: e
}, {
width: "728px",
height: "90px",
padding: "",
background: "transparent",
margin: "0 auto",
position: "relative",
zIndex: "100"
}),
s = this.DOM.create("div", {
id: this.GetId("wrap")
}, {
position: "relative",
width: "100%",
height: "90px",
transition: "1s",
transitionDuration: "0.5s",
transitionTimingFunction: "ease-in-out"
}),
o = this.DOM.shortCutCreate("overlay", {
id: this.GetId("overlay")
}),
r = this.DOM.create("div", {
id: this.GetId("header")
}, {
position: "absolute",
top: "0",
left: "0",
width: "100%",
height: "90px",
zIndex: "16",
cursor: "pointer"
}),
n = this.DOM.shortCutCreate("overlay", {
id: this.GetId("header-overlay")
}),
a = this.DOM.create("img", {
id: this.GetId("close"),
src: E,
alt: "close"
}, d.btnCss),
l = this.DOM.shortCutCreate("anchorClever"),
h = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}, {
top: "5px"
}),
c = this.DOM.create("img", {
id: this.GetId("arrow"),
alt: "arrow",
src: A
}, {
transition: "all 1s ease-in-out 0s",
right: "50%",
bottom: "10px",
width: "35px",
position: "absolute",
zIndex: "101",
cursor: "pointer",
margin: "5px"
}),
u = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no"
}, {
width: "100%",
height: "100%",
position: "absolute",
top: "0",
left: "0",
border: "none"
});
this.DOM.setHTML(r, n.outerHTML), this.DOM.setHTML(s, c.outerHTML), this.DOM.append(s, o.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(i, l.outerHTML), this.DOM.append(s, u.outerHTML), this.DOM.append(s, a.outerHTML), this.DOM.append(i, r.outerHTML), this.DOM.append(i, s.outerHTML);
const p = (t, e) => {
const i = t ? 300 : 90,
o = t ? "inherit" : "none",
r = t ? 180 : 0,
n = t ? "-50%" : "50%";
this.DOM.css(s, "height", i + "px"), this.DOM.css(c, {
transform: "rotate(" + r + "deg) translateX(" + n + ")",
display: e ? o : "none"
})
};
this.DOM.setHTML(t, i.outerHTML), this.DOM.bind(o, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(n, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
}));
let m = !1;
return this.DOM.bind(r, "mouseover", (() => {
p(!0, !m)
})), this.DOM.bind(c, "click", (() => {
p(!1, !1), this.DOM.bind(r, "mouseout", (() => {
p(!1, !1)
})), m = !0
})), this.DOM.bind(a, "click", (() => {
this.Close()
})), "loading" !== document.readyState ? (this.isMinimallyVisible(void 0, 250), p(!0, !0)) : document.addEventListener("DOMContentLoaded", (t => {
this.isMinimallyVisible(t, 250), p(!0, !0)
})), this.addScrollListener(!1, 250, void 0, (() => p(!0, !0))), this.Hooks.Call(this.Hooks.Events.Formats.LeaderBoard.afterOpen, [this.tracker.ID]), !0
}
},
MiniScroller: class extends G {
constructor(t) {
super({
name: "mini-scroller",
hook: "MiniScroller",
closeFormat: "banner"
}, t)
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.MiniScroller.beforeOpen, [this.tracker.ID]);
const t = this.getBlock(!1);
if (!t) return !1;
const e = this.GetId(""),
i = this.DOM.create("div", {
id: e
}, {
position: "relative",
width: "100%",
height: "30vh",
justifyContent: "center",
overflowX: "hidden",
cursor: "pointer"
}),
s = this.DOM.shortCutCreate("overlay"),
o = this.DOM.create("div", {}, {
position: "relative"
}),
r = this.DOM.create("div", {}, {
position: "absolute",
clip: "rect(0, 100vw, 30vh, 0)"
}),
n = this.DOM.create("iframe", this.DOM.shortCuts.iframe.attr, {
border: "0 none",
width: "100%",
height: "100%",
position: "fixed",
top: "0"
});
return this.DOM.setHTML(r, n.outerHTML), this.DOM.setHTML(o, r.outerHTML), this.DOM.setHTML(i, s.outerHTML), this.DOM.append(i, o.outerHTML), this.DOM.setHTML(t, i.outerHTML), this.DOM.bind(t, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250) : document.addEventListener("DOMContentLoaded", (() => this.isMinimallyVisible(void 0, 250))), this.addScrollListener(!0, 250), this.Hooks.Call(this.Hooks.Events.Formats.MiniScroller.afterOpen, [this.tracker.ID]), !0
}
},
MobilePull: class extends G {
constructor(t) {
super({
hook: "MobilePull",
name: "mobile-pull",
requiredPosition: !0,
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
}), h(this, "startTime"), h(this, "userClickedClose2", !1), h(this, "interval")
}
Open() {
const {
defaultUrl: t,
body: e
} = this.getInitialState(this.Config.CustomBody);
this.Hooks.Call(this.Hooks.Events.Formats.MobilePull.beforeOpen, [this.tracker.ID]);
const i = this.GetId(""),
s = this.DOM.create("div", {
id: i
}, {
position: "fixed",
width: "100%",
height: "100%",
zIndex: "auto",
left: "0px",
top: "100%"
}),
o = this.GetId("overlay"),
r = this.DOM.shortCutCreate("overlay", {
id: o
}),
n = this.GetId("close"),
a = this.DOM.create("img", {
id: n,
src: R,
alt: "close"
}, {
position: "fixed",
right: "4px",
bottom: "93px",
width: "22px",
zIndex: "15",
height: "22px",
margin: "0",
cursor: "pointer",
transition: "opacity 1s ease, height 0.5s ease"
}),
l = this.GetId("close2"),
h = this.DOM.create("img", {
id: l,
src: R,
alt: "close"
}, {
height: "20px",
width: "20px",
position: "absolute",
right: "4px",
top: "4px"
}),
c = this.DOM.shortCutCreate("anchorClever"),
d = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}, {
left: "5px",
top: "5px"
});
this.GetId("iframe");
const u = this.DOM.shortCutCreate("iframe", {}, {
position: "fixed",
display: "block",
padding: "0",
border: "none",
margin: "0px auto",
pointerEvents: "auto",
width: "100%",
height: "120px",
bottom: "0",
left: "50%",
transition: "opacity 1s ease, height 0.5s ease",
transform: "translateX(-50%)"
});
this.DOM.append(s, r.outerHTML), this.DOM.append(c, d.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.append(s, a.outerHTML), this.DOM.append(s, h.outerHTML), this.DOM.append(s, u.outerHTML), e.insertBefore(s, e.firstChild);
this.interval = setInterval((() => {
requestAnimationFrame((() => this.animate({
direction: 10,
mobilePullImg: u,
amplitude: 10,
duration: 1e3,
mobilePullClose: a,
timestamp: performance.now(),
startTime: performance.now()
})))
}), 1500), this.dragElement(r), this.DOM.bind(a, "click", (() => {
this.Close()
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.attr(u, {
src: t
});
const p = {
display: "block",
position: "fixed",
padding: "0",
border: "none",
margin: "0px auto",
pointerEvents: "auto",
width: "100%",
height: "120px",
bottom: "0",
left: "50%",
top: "unset",
transform: "translateX(-50%)",
opacity: "unset",
overflow: "unset"
},
m = {
display: "block",
right: "4px",
bottom: "93px",
width: "22px",
position: "fixed",
zIndex: "15",
height: "22px",
margin: "0",
cursor: "pointer",
top: "unset",
opacity: "unset",
overflow: "unset"
};
h.addEventListener("click", (() => {
this.clearAutoClose(), s.style.top = "100%", this.DOM.css(r, p), this.DOM.css(u, p), this.DOM.css(a, m)
})), r.addEventListener("touchstart", (t => {
this.clearAutoClose(), r.clientHeight > 120 && (this.Callback.Click(), window.open(this.handleFormatClick(), "_blank"), this.DOM.css(r, p), this.DOM.css(u, p), this.DOM.css(a, m), s.style.top = "100%")
})), this.Hooks.Call(this.Hooks.Events.Formats.MobilePull.afterOpen, [this.tracker.ID]), this.autoCloseValidation()
}
animate(t) {
const {
timestamp: e,
mobilePullImg: i,
mobilePullClose: s,
duration: o,
amplitude: r
} = t;
if (i.clientHeight < window.innerHeight) {
this.startTime || (this.startTime = e);
const n = e - this.startTime,
a = Math.max(1 - n / o, 0);
i.style.bottom = r * a + "px", s.style.bottom = 93 + r * a + "px", n < o || (this.startTime = void 0), requestAnimationFrame((() => this.animate(t)))
} else this.interval && clearInterval(this.interval)
}
dragElement(t) {
let e = 0,
i = !1;
const s = t => {
const s = (t = t || window.event).touches[0].clientY - e;
Math.abs(s) > 50 && (i = !0, this.DOM.css(this.GetId("iframe"), {
height: "100%"
}), this.DOM.css(this.GetId("overlay"), {
height: "100%"
}), this.DOM.css(this.GetId("close2"), {
zIndex: "15"
}))
},
o = () => {
i && this.animateElementRelease(s, t), i = !1, t.removeEventListener("touchmove", s), t.removeEventListener("touchend", o)
};
t.addEventListener("touchstart", (r => {
(r = r || window.event).preventDefault(), e = r.touches[0].clientY, i = !1, t.addEventListener("touchmove", s, {
passive: !1
}), t.addEventListener("touchend", o, {
passive: !1
})
}), {
passive: !1
})
}
animateElementRelease(t, e) {
const i = this.DOM.getByID(this.GetId(""));
if (!i) return;
const s = this.DOM.getByID(this.GetId("close"));
if (!s) return;
let o = parseFloat(i.style.top);
const r = () => {
if (this.userClickedClose2) return void(this.userClickedClose2 = !1);
const n = 0 - o;
o += .14 * n, i.style.top = o + "%", Math.abs(n) > .1 ? (requestAnimationFrame(r), s.style.display = "none") : (s.style.display = "none", i.style.top = "0", e.removeEventListener("touchmove", t))
};
requestAnimationFrame(r)
}
},
Mosaic: class extends G {
constructor(t) {
super({
name: "mosaic",
closeFormat: "base",
hook: "Mosaic"
}, t)
}
Open() {
var t, e, i;
const s = null != (t = this.tracker.FileW) ? t : 200,
o = null != (e = this.tracker.FileH) ? e : 420;
if (0 !== x.User.Mobile) {
if (420 === s && 420 === o) return void x._debug("Full layout is not allowed in mobile devices");
if (420 === s && 200 === o) return void x._debug("Vertical layout is not allowed in mobile devices")
}
const {
defaultUrl: r
} = this.getInitialState();
this.Hooks.Call(this.Hooks.Events.Formats.Mosaic.beforeOpen, [this.tracker.ID]);
const n = this.getBlock(!1);
if (!n) return !1;
const a = this.GetId("overlay"),
l = this.GetId("close"),
h = this.GetId(""),
c = this.GetId("overlay-single"),
d = this.DOM.create("div", {
id: h
}, {
width: s + "px",
height: o + "px",
margin: "auto",
position: "relative"
}),
u = this.DOM.shortCutCreate("overlay", {
id: a
}),
p = this.DOM.shortCutCreate("bannerClose", {
id: l
}),
m = this.DOM.shortCutCreate("anchorClever"),
g = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
C = this.DOM.create("iframe", {
id: this.GetId("iframe"),
title: "Clever-iframe",
scrolling: "no"
}, {
width: "100%",
height: "100%",
minHeight: "200px",
border: "none"
}),
b = this.DOM.shortCutCreate("overlay", {
className: c,
alt: "overlay-single-clever"
}, {
top: "220px",
display: "inline-block",
verticalAlign: "top"
});
if (200 === s)
for (let t = 0; t < 2; t++) {
const e = t % 2;
b.style.top = 220 * e + "px", this.DOM.append(u, b.outerHTML)
} else if (420 === s && 420 === o)
for (let t = 0; t < 4; t++) {
const e = t % 2,
i = t > 1 ? "220px" : "0";
b.style.top = 220 * e + "px", b.style.left = i, this.DOM.append(u, b.outerHTML)
} else
for (let t = 0; t < 2; t++) {
const e = t % 2;
b.style.left = 220 * e + "px", b.style.top = "0px", this.DOM.append(u, b.outerHTML)
}
this.DOM.append(d, u.outerHTML), this.DOM.append(d, p.outerHTML), this.DOM.append(m, g.outerHTML), this.DOM.append(d, m.outerHTML), this.DOM.append(d, C.outerHTML), this.DOM.append(n, d.outerHTML);
const f = n.querySelectorAll("." + c);
null == (i = n.querySelector("#" + l)) || i.addEventListener("click", (() => {
this.Close()
})), f.forEach((t => {
t.addEventListener("click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
}))
}));
let M = !1;
const D = () => {
const t = document.getElementById(h);
if (null !== t && !1 === M && this.DOM.isMinimallyVisible(t)) {
M = !0;
const e = t.querySelector("iframe");
this.DOM.attr(e, {
src: r + "&ts=" + this.Registry.TimeSpent
}), x._debug("Do Callback: Mosaic"), this.CodeUtils.DoCallback(this.tracker, !0), window.removeEventListener("scroll", D)
}
};
return "loading" !== document.readyState ? D() : document.addEventListener("DOMContentLoaded", D), window.addEventListener("scroll", D), this.Hooks.Call(this.Hooks.Events.Formats.Mosaic.afterOpen, [this.tracker.ID]), !0
}
},
PopUnder: class extends G {
constructor(t) {
super({
name: "pop-under",
closeFormat: "base",
hook: "unknown"
}, t), h(this, "lastWin", null), h(this, "lastTarget", null), h(this, "flipPop", null), h(this, "openURL", "")
}
Open() {
this.Net.ExtraParam += "&wn=" + encodeURI(this.DOM.wName());
const t = `${this.Net.getDefaultUrl(this.tracker)}ts=${this.Registry.TimeSpent}`;
this.open(this.tracker, t, !0), this.sendToBackground(!1).setPopURL(!1), !this.flipPop && x.User.Browser && "chrome" !== x.User.Browser.toLowerCase() && this.sendToBackground(!1)
}
bindUpHook() {
x._debug("bindUpHook");
const t = this.DOM.getByID("clever_hook_" + x.group.ID + "overclick");
t && (this.DOM.css("clever_hook_" + x.group.ID + "overclick", {
width: "5px",
height: "5px",
left: "0",
top: "0"
}), "focus" in t && t.focus())
}
sendToBackground(t) {
var e, i;
return this.lastWin && this.lastTarget && !t && (this.flipPop = this.lastWin.window.open("about:blank"), this.flipPop && this.flipPop.close(), null == (i = null == (e = this.lastWin.opener) ? void 0 : e.window) || i.focus()), this
}
setPopURL(t) {
if (t && this.lastTarget && this.lastWin && "about:blank" !== this.lastTarget && this.lastTarget !== this.openURL)
if (x.User.Browser && "chrome" === x.User.Browser.toLowerCase()) {
const t = this.lastWin.document;
t.open(), t.write(`\n <html>\n <head>\n <title>Document Title</title>\n <script type="text/javascript">\n window.location = ${this.lastTarget};\n <\/script>\n </head>\n <body></body>\n </html>\n `), t.close()
} else this.lastWin.document.location.href = this.lastTarget;
return !0
}
getWindowPosition() {
let t = this.DOM.getViewportWidth() / 1.3,
e = this.DOM.getViewportHeight() / 1.3;
const i = Number(screen.width / 2 - t / 2),
s = Number(screen.height / 2 - e / 2);
t < 800 && (t = 800), e < 600 && (e = 600);
const o = {
toolbar: 0,
scrollbars: 1,
location: 0,
statusbar: 0,
menubar: 0,
resizable: 1,
width: t,
height: e,
screenX: i,
screenY: s,
x: i,
y: s,
left: i,
top: s
};
return Object.entries(o).map((([t, e]) => `${t}=${e}`)).join(",")
}
open(t, e, i) {
var s;
let o = window.self;
if (this.openURL = e, top && top !== window.self && (null == (s = window.top) ? void 0 : s.document.location.toString()) && (o = top), x.User.Browser && "chrome" === x.User.Browser.toLowerCase() && window.open("javascript:window.focus()", "_self", ""), "hammer" !== e) {
if (this.lastTarget = e, x.User.Browser && "chrome" === x.User.Browser.toLowerCase()) {
this.lastWin = window;
const e = document.createElement("a"),
i = document.createEvent("MouseEvents");
e.href = this.openURL, document.getElementsByTagName("body")[0].appendChild(e), i.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !0, !1, !1, !0, 0, null), e.dispatchEvent(i), this.DOM.remove(e), this.CodeUtils.DoCallback(t, !0)
} else this.lastWin = o.window.open(this.openURL, "pcyc" + Math.floor(917902221 * Math.random() + 1e7), this.getWindowPosition()) || this.lastWin, this.CodeUtils.DoCallback(t, !(!this.lastWin || this.lastWin.closed || void 0 === this.lastWin.closed));
x.User.Browser && "firefox" === x.User.Browser.toLowerCase() && this.sendToBackground(!1), this.setPopURL(i)
}
return !0
}
},
PushDown: class extends G {
constructor(t) {
super({
hook: "PushDown",
name: "pushdown",
closeFormat: "other"
}, t)
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.PushDown.beforeOpen, [this.tracker.ID]);
const t = .3 * this.DOM.getViewportHeight() + "px",
{
defaultUrl: e,
body: i
} = this.getInitialState();
let s = "100%";
this.tracker.FileW && this.tracker.FileW > 0 && (s = this.tracker.FileW + "px");
const o = x.group.AnimationTimer,
r = this.DOM.create("div", {
className: this.GetId(),
id: this.GetId()
}, {
position: "relative",
display: "block",
minHeight: "250px",
height: "1px",
overflow: "hidden",
boxSizing: "unset",
top: "0",
transition: "margin " + o + "ms ease, height " + o + "ms ease, opacity " + o + "ms ease, padding " + o + "ms ease",
zIndex: "10",
textAlign: "left",
flex: "none"
}),
n = this.DOM.create("div", {
className: this.GetId("info-pushdown"),
id: this.GetId("info-pushdown")
}, {
width: "150px",
height: "30px",
color: "#fff",
padding: "0",
boxSizing: "unset",
top: "5px",
left: "5px",
fontSize: "9px",
position: "relative",
zIndex: "20",
textShadow: "-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000",
marginBottom: "-40px",
fontFamily: "verdana"
}),
h = this.DOM.shortCutCreate("anchorClever"),
c = this.DOM.shortCutCreate("cleverLogoWhite", {}, {
position: "unset"
});
let u;
if (this.DOM.shortCutCreate("anchorClever"), this.DOM.append(h, c.outerHTML), this.DOM.append(n, h.outerHTML), x.User.Mobile) {
const t = this.DOM.create("div", {
id: this.GetId("pushdown-close")
});
u = this.DOM.setHTML(t, this.DOM.create("img", {
src: E,
alt: "close"
}, {
width: "25px",
height: "25px"
}).outerHTML)
} else u = this.DOM.create("img", {
id: this.GetId("pushdown-close"),
src: E,
alt: "close"
});
Object.assign(u.style, d.btnCss);
const p = this.DOM.shortCutCreate("overlay", {
id: this.GetId("pushdown-img")
}, {
position: "relative"
});
let m = {
width: s,
height: "100%",
backgroundColor: "#fff",
top: "0",
left: "0",
cursor: "pointer",
frameBorder: "0",
border: "none",
boxSizing: "unset",
zIndex: "-1",
position: "absolute",
margin: "0 auto",
display: "block"
};
1 !== this.tracker.Zoom && (m = l(a({}, m), {
zoom: this.tracker.Zoom,
"-moz-transform": "scale(" + this.tracker.Zoom + ")",
"-moz-transform-origin": "top",
"-o-transform": "scale(" + this.tracker.Zoom + ")",
"-o-transform-origin": "top",
"-webkit-transform": "scale(" + this.tracker.Zoom + ")",
"-webkit-transform-origin": "top"
})), x.User.Mobile && (m = l(a({}, m), {
minHeight: "250px"
}));
const C = this.DOM.create("iframe", {
className: this.GetId("push-frame"),
id: this.GetId("push-frame"),
title: "Clever-iframe",
name: d.Class,
src: e + "&hei=" + (.3 * this.DOM.getViewportHeight()).toFixed(2) + "px&ts=" + this.Registry.TimeSpent,
scrolling: "no"
}, m);
C.addEventListener("load", (() => {
this.DOM.css(r, "height", t), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose)
})), r.appendChild(n), r.appendChild(p), r.appendChild(u), r.appendChild(C), i.insertBefore(r, i.firstChild);
const b = [247, 417, 410];
let f = !1;
for (let t = 0; t < this.Registry.Trackers.length; t++) {
const e = this.Registry.Trackers[t];
if ("RoomID" in e && "ID" in e && (this.Registry.Trackers[t].ID === e.ID && -1 !== b.indexOf(this.Registry.Trackers[t].RoomID))) {
f = !0;
break
}
}
if (x.User.CTR && -1 !== ["PT", "GR", "ES"].indexOf(x.User.CTR) || !0 === f) {
const t = this.DOM.getByID(this.GetId("disclaimer"));
t && this.DOM.attr(t, "style", "display: none;")
}
if (x.User.CTR && -1 !== ["ES"].indexOf(x.User.CTR)) {
const t = this.DOM.getByID(this.GetId(`disclaimer-${x.User.CTR}`));
t && this.DOM.attr(t, "style", "float: right; padding-right: 15px; display: inline-block!important;")
}
if (p) {
const t = this.Net.fetchBaseUrl(this.tracker, {
id: this.tracker.ID,
frominter: 1,
click: 1,
ref: D(this.Registry.getLocationHref()),
ruri: D(document.referrer),
cmpId: this.TCF.cmpId
});
g(0, 0, 500), "loading" !== document.readyState ? g() : document.addEventListener("DOMContentLoaded", (() => g())), this.DOM.bind(p, "click", (() => {
this.Callback.Click(), window.open(t + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), this.Close(!1)
}))
}
return this.DOM.bind(u, "click", (() => {
this.clearAutoClose(), this.Close()
})), x._debug("Docall:"), this.CodeUtils.DoCallback(this.tracker, r && r.offsetWidth > 0 && r.offsetHeight > 0), window.onresize = () => {
this.DOM.css(r, "height", .3 * this.DOM.getViewportHeight() + "px")
}, x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.Hooks.Call(this.Hooks.Events.Formats.PushDown.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
},
PushdownSponsorClick: class extends q {
constructor(t) {
super({
hook: "PushDownSponsorClick",
name: "pushdownSponsorClick",
closeFormat: "other"
}, t)
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.PushDownSponsorClick.beforeOpen, [this.tracker.ID]);
const t = .3 * this.DOM.getViewportHeight() + "px",
{
defaultUrl: e,
body: i,
baseUrl: s
} = this.getInitialState(),
o = "100%",
r = x.group.AnimationTimer,
n = this.DOM.create("div", {
className: this.GetId(),
id: this.GetId()
}, {
position: "relative",
display: "block",
minHeight: "250px",
overflow: "hidden",
boxSizing: "unset",
height: .3 * this.DOM.getViewportHeight() + "px",
width: o,
top: "0",
transition: "margin " + r + "ms ease, height " + r + "ms ease, opacity " + r + "ms ease, padding " + r + "ms ease",
zIndex: "10",
textAlign: "left",
flex: "none"
}),
h = this.DOM.create("div", {
className: this.GetId("info-pushdownSponsorClick"),
id: this.GetId("info-pushdownSponsorClick")
}, {
width: "150px",
height: "30px",
color: "#fff",
padding: "0",
boxSizing: "unset",
top: "5px",
left: "5px",
fontSize: "9px",
position: "relative",
zIndex: "20",
textShadow: "-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000",
marginBottom: "-40px",
fontFamily: "verdana"
}),
c = this.DOM.shortCutCreate("anchorClever"),
u = this.DOM.shortCutCreate("cleverLogoWhite", {
id: this.GetId("logo")
}, {
position: "unset"
});
let p;
if (this.DOM.shortCutCreate("anchorClever"), this.DOM.append(c, u.outerHTML), this.DOM.append(h, c.outerHTML), x.User.Mobile) {
const t = this.DOM.create("div", {
id: this.GetId("pushdownSponsorClick-close")
});
p = this.DOM.setHTML(t, this.DOM.create("img", {
src: E,
alt: "close"
}, {
width: "25px",
height: "25px"
}).outerHTML)
} else p = this.DOM.create("img", {
id: this.GetId("pushdownSponsorClick-close"),
src: E,
alt: "close"
});
Object.assign(p.style, d.btnCss);
const m = this.DOM.shortCutCreate("overlay", {
id: this.GetId("pushdownSponsorClick-img")
}, {
position: "relative"
});
let C = {
width: o,
height: "100%",
backgroundColor: "#fff",
top: "0",
left: "0",
cursor: "pointer",
frameBorder: "0",
border: "none",
boxSizing: "unset",
zIndex: "-1",
position: "absolute",
margin: "0 auto",
display: "block"
};
1 !== this.tracker.Zoom && (C = l(a({}, C), {
zoom: this.tracker.Zoom,
"-moz-transform": "scale(" + this.tracker.Zoom + ")",
"-moz-transform-origin": "top",
"-o-transform": "scale(" + this.tracker.Zoom + ")",
"-o-transform-origin": "top",
"-webkit-transform": "scale(" + this.tracker.Zoom + ")",
"-webkit-transform-origin": "top"
})), x.User.Mobile && (C = l(a({}, C), {
minHeight: "250px"
}));
const b = this.DOM.create("iframe", {
className: d.Class,
id: this.GetId("push-frame"),
title: "Clever-iframe",
name: d.Class,
src: e + "&hei=" + (.3 * this.DOM.getViewportHeight()).toFixed(2) + "px&ts=" + this.Registry.TimeSpent,
scrolling: "no"
}, C);
if (b.addEventListener("load", (() => {
this.DOM.css(n, "height", t), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose)
})), n.appendChild(h), n.appendChild(m), n.appendChild(p), n.appendChild(b), i.insertBefore(n, i.firstChild), !x.User.Mobile) {
const t = this.DOM.create("img", {
id: "cleverImageCreative"
}, {
position: "absolute",
height: "60px",
width: "60px",
zIndex: "999999",
visibility: "hidden"
});
i.insertBefore(t, i.firstChild)
}
const f = this.DOM.create("img", {
id: "cleverLogoClick"
}, {
width: "135px",
height: "65px",
position: "fixed",
display: "none",
zIndex: "99999999",
left: "0",
top: "50%",
transform: "translateY(-50%)",
cursor: "pointer"
});
i.insertBefore(f, i.firstChild), this.bindSponsorClickEvents(!0, [p.id, this.GetId("logo"), m.id], !0);
const M = this.isDisabledDisclaimerByRoom();
if (x.User.CTR && -1 !== ["PT", "GR", "ES"].indexOf(x.User.CTR) || M) {
const t = this.DOM.getByID(this.GetId("disclaimer"));
t && this.DOM.attr(t, "style", "display: none;")
}
if (x.User.CTR && -1 !== ["ES"].indexOf(x.User.CTR)) {
const t = this.DOM.getByID(this.GetId(`disclaimer-${x.User.CTR}`));
t && this.DOM.attr(t, "style", "float: right; padding-right: 15px; display: inline-block!important;")
}
if (m) {
const t = this.Net.fetchBaseUrl(this.tracker, {
id: this.tracker.ID,
frominter: 1,
click: 1,
ref: D(this.Registry.getLocationHref()),
ruri: D(document.referrer),
cmpId: this.TCF.cmpId
});
g(0, 0, 500), "loading" !== document.readyState ? g() : document.addEventListener("DOMContentLoaded", (() => g())), this.DOM.bind(m, "click", (() => {
this.Callback.Click(), window.open(t + "&ts=" + this.Registry.TimeSpent, "_blank"), this.clearAutoClose(), this.Close()
}))
}
return this.DOM.bind(p, "click", (() => {
this.DOM.customFetch(s + "&closed=1"), this.clearAutoClose(), this.Close()
})), this.CodeUtils.DoCallback(this.tracker, n && n.offsetWidth > 0 && n.offsetHeight > 0), this.DOM.bind(window, "resize", (() => {
this.DOM.css(n, "height", .3 * this.DOM.getViewportHeight() + "px")
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.Hooks.Call(this.Hooks.Events.Formats.PushDownSponsorClick.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
isDisabledDisclaimerByRoom() {
const t = [247, 417, 410];
for (let e = 0; e < this.Registry.Trackers.length; e++) {
const i = this.Registry.Trackers[e];
if ("RoomID" in i && "ID" in i && (this.Registry.Trackers[e].ID === i.ID && -1 !== t.indexOf(this.Registry.Trackers[e].RoomID))) return !1
}
return !0
}
},
ScratchBanner: class extends G {
constructor(t) {
super({
name: "scratchBanner",
hook: "ScratchBanner",
requiredPosition: !1,
closeFormat: "banner"
}, t)
}
Open() {
var t, e, i;
this.Hooks.Call(this.Hooks.Events.Formats.ScratchBanner.beforeOpen, [this.tracker.ID]);
const {
baseUrl: s
} = this.getInitialState(), o = this.getBlock(!0);
if (!o) return !1;
const r = null != (t = this.tracker.FileW) ? t : 300,
n = null != (e = this.tracker.FileH) ? e : 600,
a = this.GetId(""),
l = this.DOM.create("div", {
id: a
}, {
height: n + "px",
width: "300px",
display: "flex",
justifyContent: "center",
overflowX: "hidden",
position: "relative",
zIndex: "99",
textAlign: "justify",
maxWidth: "600px",
margin: "0 auto",
cursor: "pointer"
}),
h = this.GetId("overlay"),
c = this.DOM.shortCutCreate("overlay", {
id: h
}),
d = this.GetId("close"),
u = this.DOM.shortCutCreate("bannerClose", {
id: d
}, {
right: "1px",
height: "16px",
width: "16px"
}),
p = this.DOM.shortCutCreate("anchorClever"),
m = this.DOM.shortCutCreate("cleverLogo", {
id: this.GetId("logo")
}),
g = this.DOM.shortCutCreate("iframe", {
id: this.GetId("iframe")
});
return this.DOM.append(l, c.outerHTML), this.DOM.append(l, u.outerHTML), this.DOM.append(p, m.outerHTML), this.DOM.append(l, p.outerHTML), this.DOM.append(l, g.outerHTML), this.DOM.append(o[0], l.outerHTML), null == (i = o[0].querySelector("#" + d)) || i.addEventListener("click", (() => {
this.Close()
})), window.addEventListener("message", (t => {
var e, i;
if ("https://lp.cleverwebserver.com" !== t.origin) return;
const r = 100 * t.data.scratchedSize / n - 2;
this.DOM.css(c, "height", r + "%"), t.data.scratched && (null == (i = null == (e = o[0].querySelector("iframe")) ? void 0 : e.contentWindow) || i.postMessage({
impression_url: s + "&ts=" + this.Registry.TimeSpent + "&interactive=1"
}, "*"), this.DOM.css(c, "height", "100%"))
})), this.DOM.bind(c, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, r) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, r))), this.addScrollListener(!1, r), this.Hooks.Call(this.Hooks.Events.Formats.ScratchBanner.afterOpen, [this.tracker.ID]), !0
}
},
ScratchInterstitial: class extends P {
constructor(t) {
super(t)
}
Open() {
var t;
const {
pub: e,
openUrlInter: i,
header: s,
overlay: o,
interstitial: r
} = this.handlePreLoad(), {
CLOSE_VISIT_SITE: n
} = this.translation, {
PUBCOLOR: a,
FONT: l
} = p, h = this.Net.fetchBaseUrl(this.tracker);
if (this.setContentAndBindClick(e, "", (() => {
this.clearAutoClose(), this.Close()
}), !0), 1 == x.group.UseLink) {
let t = this.DOM.getByID(this.GetId("link-pub"));
t || (this.DOM.setHTML(s, ""), t = this.DOM.create("a", {
id: this.GetId("link-pub"),
target: "_blank",
href: i,
rel: "nofollow"
}, {
color: a,
fontFamily: l
}), s.appendChild(t)), this.setContentAndBindClick(t, n + " »", (() => this.Close(!1)))
} else this.setContentAndBindClick(s, n + " »", (() => {
this.Callback.Click(), window.open(`${h}&ts=${this.Registry.TimeSpent}&skip=1`, "_blank"), this.clearAutoClose(), this.Close(!1)
}));
const c = null != (t = this.tracker.FileH) ? t : 600;
window.addEventListener("message", (t => {
var e, i;
if ("https://lp.cleverwebserver.com" !== t.origin) return;
const s = 100 * t.data.scratchedSize / c - 2;
this.DOM.css(o, "height", s + "%"), t.data.scratched && (null == (i = null == (e = r.querySelector("iframe")) ? void 0 : e.contentWindow) || i.postMessage({
impression_url: h + "&ts=" + this.Registry.TimeSpent + "&interactive=1"
}, "*"), this.DOM.css(o, "height", "100%"))
})), setTimeout((() => {
if ("scratchinterstitial" === this.tracker.Type) {
const t = this.DOM.getByID(this.GetId("overlay"));
t && this.DOM.bind(t, "click", (() => {
this.DOM.customFetch(h + "&outside=1"), this.clearAutoClose(), this.Close(!1)
}))
}
}), 2e3), this.autoCloseValidation(), this.handlePostLoad()
}
},
StickyFooter: class extends G {
constructor(t) {
super({
hook: "StickyFooter",
name: "sticky-footer",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.StickyFooter.beforeOpen, [this.tracker.ID]);
const {
defaultUrl: t,
body: e
} = this.getInitialState(this.Config.CustomBody), i = .3 * this.DOM.getViewportHeight(), s = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "fixed",
display: "flex",
width: "100%",
height: "30vh",
justifyContent: "center",
background: "rgba(30, 30, 30, 0.9)",
bottom: "0",
zIndex: "100000",
transition: "1s",
left: "0"
}), o = this.DOM.create("img", {
id: this.GetId("logo"),
src: U,
alt: "Close"
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), r = this.DOM.create("img", {
id: this.GetId("stickyfooter-close"),
src: E,
alt: "close"
}, d.btnCss), n = this.DOM.create("div", {
id: this.GetId("arrow")
}, {
position: "absolute",
display: "flex",
justifyContent: "center",
top: "0px",
zIndex: "15",
width: "30vw",
minWidth: "auto",
height: "5vh",
maxHeight: x.User.Mobile ? "auto" : "5vh"
}), a = this.DOM.create("img", {
src: F,
alt: "arrow",
id: this.GetId("arrowimg")
}, {
top: "5px",
height: x.User.Mobile ? "1.6vh" : "1.8vh",
maxHeight: x.User.Mobile ? "auto" : "1.8vh",
width: "auto",
minWidth: "auto",
position: "absolute",
zIndex: "40",
transition: "1s"
}), l = this.DOM.shortCutCreate("anchorClever"), h = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
boxShadow: "rgba(0, 0, 0, 0.3) 0 -180px 100px -110px inset",
zIndex: "9"
}), c = this.DOM.create("iframe", {
id: this.GetId("iframe"),
name: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
bottom: "0",
left: "0",
width: "100%",
position: "relative",
height: "100%",
transition: "1s",
border: "none"
});
this.DOM.append(s, r.outerHTML), this.DOM.append(s, h.outerHTML), this.DOM.append(n, a.outerHTML), this.DOM.append(s, n.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.append(l, o.outerHTML), this.DOM.append(s, l.outerHTML), e.insertBefore(s, e.firstChild);
const u = t => {
const e = t ? "30vh" : "100px",
i = t ? 0 : 180;
this.DOM.css(s, "height", e), this.DOM.css(a, "transform", "rotate(" + i + "deg)")
};
let p = !0;
this.DOM.bind(n, "click", (() => {
p = !p, u(p)
}));
const m = () => {
p = !1, this.DOM.css(s, "height", "100px"), this.DOM.css(c, "height", "100%"), this.DOM.css(a, "transform", "rotate(180deg)")
};
window.addEventListener("scroll", (() => m())), x._debug("Do Callback: StickyFooter"), this.CodeUtils.DoCallback(this.tracker, !0);
const g = t + "&hei=" + i.toFixed(2);
return this.DOM.attr(c, {
src: g
}), this.DOM.bind(h, "click", (() => {
this.clearAutoClose(), this.Callback.Click(), this.Close(!1), window.open(this.handleFormatClick(), "_blank")
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.bind(r, "click", (() => {
this.clearAutoClose(), this.Close(), window.removeEventListener("scroll", m)
})), this.Hooks.Call(this.Hooks.Events.Formats.StickyFooter.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
},
StickyPop: class extends G {
constructor(t) {
super({
hook: "StickyPop",
name: "sticky-pop",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
})
}
Open() {
if (this.Hooks.Call(this.Hooks.Events.Formats.StickyPop.beforeOpen, [this.tracker.ID]), !this.Registry.User.Mobile) return this.Registry.Debug("StickyPop is not available for desktop"), !1;
const {
defaultUrl: t,
body: e
} = this.getInitialState(this.Config.CustomBody), i = .3 * this.DOM.getViewportHeight(), s = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "fixed",
display: "flex",
width: "390px",
height: "150px",
justifyContent: "center",
alignItems: "center",
bottom: "0",
left: "50%",
transform: "translateX(-50%)",
zIndex: "100000",
transition: "1s",
backgroundColor: "transparent",
borderRadius: "-15px -15px 0 0"
}), o = this.DOM.create("img", {
id: this.GetId("logo"),
src: B,
alt: "Close"
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), r = l(a({}, d.btnCss), {
width: "20px",
height: "20px",
right: "2%",
top: "1%"
}), n = this.DOM.create("img", {
id: this.GetId("stickypop-close"),
src: "https://assets.cleverwebserver.com/CloseWhite.png",
alt: "close"
}, r), h = this.DOM.shortCutCreate("anchorClever"), c = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
zIndex: "9"
}), u = this.DOM.create("iframe", {
id: this.GetId("iframe"),
name: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
bottom: "0",
left: "0",
width: "100%",
position: "relative",
height: "100%",
transition: "1s",
backgroundColor: "transparent",
borderRadius: "-15px -15px 0 0"
});
this.DOM.append(s, n.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.append(s, u.outerHTML), this.DOM.append(h, o.outerHTML), this.DOM.append(s, h.outerHTML), e.insertBefore(s, e.firstChild), x._debug("Do Callback: StickyPop"), this.CodeUtils.DoCallback(this.tracker, !0);
const p = t + "&hei=" + i.toFixed(2);
return this.DOM.attr(u, {
src: p
}), this.DOM.bind(c, "click", (() => {
this.clearAutoClose(), this.Callback.Click(), this.Close(!1), window.open(this.handleFormatClick(), "_blank")
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.bind(n, "click", (() => {
this.clearAutoClose(), this.Close()
})), this.Hooks.Call(this.Hooks.Events.Formats.StickyPop.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), this.bindBeforeUnloaded(), !0
}
},
StickySponsorClick: class extends q {
constructor(t) {
super({
hook: "StickySponsorClick",
name: "stickySponsorClick",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.StickySponsorClick.beforeOpen, [this.tracker.ID]);
const {
defaultUrl: t,
body: e,
baseUrl: i
} = this.getInitialState(this.Config.CustomBody), s = .3 * this.DOM.getViewportHeight(), o = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "fixed",
display: "flex",
width: "100%",
height: "150px",
justifyContent: "center",
background: "rgba(30, 30, 30, 0.9)",
bottom: "0",
zIndex: "100000",
transition: "1s",
left: "0"
}), r = this.DOM.create("img", {
id: this.GetId("logo"),
src: U
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), n = this.DOM.shortCutCreate("anchorClever"), a = this.DOM.shortCutCreate("bannerClose", {
id: this.GetId("close")
}), l = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
boxShadow: "rgba(0, 0, 0, 0.3) 0 -180px 100px -110px inset",
zIndex: "9"
}), h = this.DOM.create("iframe", {
id: this.GetId("iframe"),
className: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
bottom: "0",
left: "0",
width: "100%",
position: "relative",
height: "100%",
transition: "1s",
border: "none"
});
if (this.DOM.append(o, a.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(n, r.outerHTML), this.DOM.append(o, n.outerHTML), e.insertBefore(o, e.firstChild), x._debug("Do Callback: StickySponsorClick"), this.CodeUtils.DoCallback(this.tracker, !0), !x.User.Mobile) {
const t = this.DOM.create("img", {
id: "cleverImageCreative",
alt: "close"
}, {
position: "absolute",
height: "60px",
width: "60px",
zIndex: "999999",
visibility: "hidden"
});
e.insertBefore(t, e.firstChild)
}
this.bindSponsorClickEvents(!1, [a.id, l.id, r.id]);
const c = t + "&hei=" + s.toFixed(2);
return this.DOM.attr(h, {
src: c
}), this.DOM.bind(l, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank"), this.clearAutoClose(), this.Close()
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.DOM.bind(a, "click", (() => {
this.DOM.customFetch(i + "&closed=1"), this.clearAutoClose(), this.Close()
})), this.Hooks.Call(this.Hooks.Events.Formats.StickySponsorClick.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
},
StickySponsorClickTop: class extends q {
constructor(t) {
super({
hook: "StickySponsorClickTop",
name: "stickySponsorClickTop",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.StickySponsorClickTop.beforeOpen, [this.tracker.ID]);
const {
defaultUrl: t,
body: e,
baseUrl: i
} = this.getInitialState(this.Config.CustomBody), s = .3 * this.DOM.getViewportHeight(), o = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "fixed",
display: "flex",
width: "100%",
height: "150px",
justifyContent: "center",
background: "rgba(30, 30, 30, 0.9)",
top: "0",
zIndex: "100000",
transition: "1s",
left: "0"
}), r = this.DOM.create("img", {
id: this.GetId("logo"),
src: U,
alt: "Close"
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), n = this.DOM.shortCutCreate("anchorClever"), a = this.DOM.shortCutCreate("bannerClose", {
id: this.GetId("close")
}), l = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
boxShadow: "rgba(0, 0, 0, 0.3) 0 -180px 100px -110px inset",
zIndex: "9"
}), h = this.DOM.create("iframe", {
id: this.GetId("iframe"),
className: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
bottom: "0",
left: "0",
width: "100%",
position: "relative",
height: "100%",
transition: "1s",
border: "none"
});
if (this.DOM.append(o, a.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(o, h.outerHTML), this.DOM.append(n, r.outerHTML), this.DOM.append(o, n.outerHTML), e.insertBefore(o, e.firstChild), x._debug("Do Callback: StickySponsorClickTop"), this.CodeUtils.DoCallback(this.tracker, !0), !x.User.Mobile) {
const t = this.DOM.create("img", {
id: "cleverImageCreative"
}, {
position: "absolute",
height: "60px",
width: "60px",
zIndex: "999999",
visibility: "hidden"
});
e.insertBefore(t, e.firstChild)
}
this.bindSponsorClickEvents(!1, [a.id, l.id, r.id]);
const c = t + "&hei=" + s.toFixed(2);
return this.DOM.attr(h, {
src: c
}), this.DOM.bind(l, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank"), this.clearAutoClose(), this.Close()
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.DOM.bind(a, "click", (() => {
this.DOM.customFetch(i + "&closed=1"), this.clearAutoClose(), this.Close()
})), this.Hooks.Call(this.Hooks.Events.Formats.StickySponsorClickTop.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
},
StickyTest: class extends G {
constructor(t) {
super({
hook: "StickyTest",
name: "sticky-test",
closeFormat: "other"
}, t), h(this, "Config", {
CustomBody: void 0
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.StickyTest.beforeOpen, [this.tracker.ID]);
const {
defaultUrl: t,
body: e
} = this.getInitialState(this.Config.CustomBody), i = .3 * this.DOM.getViewportHeight(), s = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "fixed",
display: "flex",
width: "100%",
height: "100px",
justifyContent: "center",
background: "rgba(30, 30, 30, 0.9)",
bottom: "0",
zIndex: "100000",
transition: "1s",
left: "0"
}), o = this.DOM.create("img", {
id: this.GetId("logo"),
src: U,
alt: "Close"
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), r = this.DOM.create("img", {
id: this.GetId("stickytest-close"),
src: E,
alt: "close"
}), n = this.DOM.create("div", {
id: this.GetId("arrow")
}, {
position: "absolute",
display: "flex",
justifyContent: "center",
top: "0px",
zIndex: "20",
width: "20vw",
minWidth: "auto",
height: "5vh",
maxHeight: x.User.Mobile ? "auto" : "5vh"
}), a = this.DOM.create("img", {
src: F,
alt: "arrow",
id: this.GetId("arrowimg")
}, {
top: "5px",
height: x.User.Mobile ? "1.6vh" : "1.8vh",
maxHeight: x.User.Mobile ? "auto" : "1.8vh",
width: "auto",
minWidth: "auto",
position: "absolute",
zIndex: "40",
transition: "1s",
transform: "rotate(180deg)"
}), l = this.DOM.create("div", {
id: this.GetId("hide")
}, {
position: "absolute",
display: "none",
justifyContent: "right",
top: "5px",
zIndex: "15",
width: x.User.Mobile ? "22vw" : "13vw",
height: x.User.Mobile ? "2vh" : "3vh",
right: x.User.Mobile ? "15vw" : "13vw"
}), h = this.DOM.create("img", {
src: "https://assets.cleverwebserver.com/HideMinimal.png",
alt: "hide",
id: this.GetId("hideimg")
}, {
top: x.User.Mobile ? "0px" : "5px",
height: x.User.Mobile ? "100%" : "1.6vh",
width: x.User.Mobile ? "100%" : "auto",
minWidth: "auto",
position: x.User.Mobile ? "relative" : "absolute",
zIndex: x.User.Mobile ? "999999999" : "40",
transition: "1s",
right: x.User.Mobile ? "0" : "50px"
}), c = this.DOM.shortCutCreate("anchorClever"), u = this.DOM.shortCutCreate("anchorClever", {
href: "https://joga.solverde.pt/redirect.aspx?pid=3694&bid=1980"
}), p = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
boxShadow: "rgba(0, 0, 0, 0.3) 0 -180px 100px -110px inset",
zIndex: "9"
}), m = this.DOM.create("iframe", {
id: this.GetId("iframe"),
name: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
bottom: "0",
left: "0",
width: "100%",
position: "relative",
height: "100%",
transition: "1s",
border: "none"
});
this.DOM.append(s, r.outerHTML), this.DOM.append(s, p.outerHTML), this.DOM.append(n, a.outerHTML), this.DOM.append(s, n.outerHTML), this.DOM.append(l, h.outerHTML), this.DOM.append(s, l.outerHTML), this.DOM.append(s, m.outerHTML), this.DOM.append(c, o.outerHTML), this.DOM.append(u, a.outerHTML), this.DOM.append(s, c.outerHTML), this.DOM.append(s, u.outerHTML), e.insertBefore(s, e.firstChild);
const g = t => {
const e = t ? "100px" : "30vh",
i = t ? 180 : 0,
o = t ? "none" : "flex";
this.DOM.css(s, "height", e), this.DOM.css(l, "display", o), this.DOM.css(a, {
transform: "rotate(" + i + "deg)"
})
};
let C = !0;
this.DOM.bind(n, "click", (() => {
clearTimeout(b), C = !C, g(C)
})), this.DOM.bind(l, "click", (() => {
C = !C, g(C), window.open(u.href, "_blank")
}));
const b = setTimeout((function() {
g(!C), C = !C
}), 3e3),
f = function() {
C = !1, s.style.height = "30vh", m.style.height = "100%", a.style.transform = "rotate(180deg)"
};
x._debug("Do Callback: StickyTest"), this.CodeUtils.DoCallback(this.tracker, !0);
const M = t + "&hei=" + i.toFixed(2);
return this.DOM.attr(m, {
src: M
}), this.DOM.bind(p, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.DOM.bind(r, "click", (() => {
this.Close(), window.removeEventListener("click", f)
})), this.Hooks.Call(this.Hooks.Events.Formats.StickyTest.afterOpen, [this.tracker.ID]), !0
}
},
SuperTopBoardScroll: class extends G {
constructor(t) {
super({
name: "super-topboard-scroll",
hook: "SuperTopBoardScroll",
closeFormat: "banner"
}, t), h(this, "Config", {
ResizeEvent: !0
})
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.SuperTopBoardScroll.beforeOpen, []);
const t = this.getBlock(!1);
if (!t) return !1;
let e = "1490px";
x.User.Mobile && (e = "100%");
const i = this.DOM.create("div", {
id: this.GetId(),
className: "clever-core-super-top-board-scroll"
}, {
position: "relative",
width: "100%",
maxWidth: e,
height: "250px",
justifyContent: "center",
overflowX: "hidden",
cursor: "pointer",
margin: "auto"
}),
s = this.DOM.shortCutCreate("overlay", {
id: this.GetId("overlay")
}),
o = this.DOM.create("img", {
src: U,
alt: "Logo",
id: this.GetId("logo")
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}),
r = this.DOM.create("img", {
id: this.GetId("supertopboardscroll-close"),
src: E,
alt: "close"
}, a({}, d.btnCss)),
n = this.DOM.shortCutCreate("anchorClever"),
l = this.DOM.create("div", {}, {
position: "relative"
}),
h = this.DOM.create("div", {}, {
position: "absolute",
clip: "rect(0, 100vw, 250px, 0)"
}),
c = this.DOM.create("iframe", {
name: d.Class,
id: this.GetId("iframe"),
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no",
src: "about:blank",
allowFullscreen: !0
}, {
border: "0 none",
width: "100%",
maxWidth: e,
height: "250px",
position: "fixed",
margin: "0",
left: "0"
});
this.DOM.setHTML(h, c.outerHTML), this.DOM.setHTML(l, h.outerHTML), this.DOM.setHTML(i, s.outerHTML), this.DOM.append(n, o.outerHTML), this.DOM.append(i, n.outerHTML), this.DOM.append(l, r.outerHTML), this.DOM.append(i, l.outerHTML);
const u = () => {
const t = document.querySelector(".clever-core-super-top-board-scroll iframe");
if (null === t) return;
const e = document.body.clientWidth <= 1490 ? 0 : (document.body.clientWidth - 1490) / 2;
this.DOM.css(t, "margin-left", e + "px")
};
if (x._debug("Detected SuperTopBoardScroll ad element"), this.DOM.setHTML(t, i.outerHTML), !0 === this.Config.ResizeEvent && (u(), window.addEventListener("resize", u)), this.DOM.bind(s, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank")
})), this.DOM.bind(r, "click", (() => {
this.Close()
})), window.self !== window.top) {
window.addEventListener("message", (function(t) {
const e = t.data.block,
i = window.parent.document.querySelector("iframe");
e && null !== i && (i.height = e.height)
})), window.parent.postMessage({
block: {
height: "250"
}
}, "*");
t && (t.style.height = "2000px"), window.addEventListener("message", (t => {
const e = t.data;
window.scrollTo(0, 2 * e.scrollY)
}));
const e = document.querySelector("iframe");
if (null !== e) {
const t = function() {
window.postMessage({
scrollY: window.parent.scrollY,
rectIframe: e.getBoundingClientRect(),
window: {
height: window.parent.innerHeight,
width: window.parent.innerWidth
}
}, "*")
};
window.onload = t, window.parent.document.addEventListener("scroll", t)
}
} else document.addEventListener("scroll", (() => {
const e = t.getBoundingClientRect();
let i = `${e.top<22?22:e.top}px`;
0 === window.scrollY && (i = void 0), this.DOM.css(c, {
top: i
})
})), "loading" !== document.readyState ? this.isMinimallyVisible(void 0, 250) : document.addEventListener("DOMContentLoaded", (t => this.isMinimallyVisible(t, 250))), this.addScrollListener(!0, 250);
return this.Hooks.Call(this.Hooks.Events.Formats.SuperTopBoardScroll.afterOpen, []), !0
}
},
TopScroll: class extends G {
constructor(t) {
super({
hook: "TopScroll",
name: "top-scroll",
closeFormat: "other"
}, t)
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.TopScroll.beforeOpen, [this.tracker.ID]);
const {
defaultUrl: t,
body: e
} = this.getInitialState(), i = .3 * this.DOM.getViewportHeight(), s = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "relative",
width: "100%",
height: this.AMP.exists() ? "100vh" : i + "px",
minHeight: "250px",
overflow: "hidden",
zIndex: "5",
clipPath: "inset(0)",
transition: "0.5s height"
}), o = this.DOM.create("img", {
id: this.GetId("logo"),
src: U,
alt: "Logo"
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), r = this.DOM.create("img", {
id: this.GetId("topscroll-close"),
src: E,
alt: "close"
});
Object.assign(r.style, d.btnCss);
const n = this.DOM.shortCutCreate("anchorClever"),
a = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
boxShadow: "rgba(0, 0, 0, 0.3) 0 -180px 100px -110px inset",
zIndex: "9"
}),
l = this.DOM.create("iframe", {
id: this.GetId("top-scroll-iframe"),
className: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
top: "0",
left: "0",
width: "100%",
position: "fixed",
height: this.AMP.exists() ? "100vh" : "30vh",
minHeight: this.AMP.exists() ? "0px" : "250px",
border: "none"
});
this.AMP.isAMP || this.DOM.append(s, r.outerHTML), this.DOM.append(s, a.outerHTML), this.DOM.append(s, o.outerHTML), this.DOM.append(n, o.outerHTML), this.DOM.append(s, n.outerHTML), this.DOM.append(s, l.outerHTML), e.insertBefore(s, e.firstChild), x._debug("Do Callback: TopScroll"), this.CodeUtils.DoCallback(this.tracker, !0);
const h = t + "&hei=" + i.toFixed(2);
this.DOM.attr(l, {
src: h + "&ts=" + this.Registry.TimeSpent
}), this.DOM.bind(a, "click", (() => {
this.Callback.Click(), this.clearAutoClose(), window.open(this.handleFormatClick(), "_blank"), this.Close(!1)
})), this.DOM.bind(window, "resize", (() => {
this.DOM.css(s, "height", .3 * this.DOM.getViewportHeight() + "px")
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close(!1)
}), 1e3 * x.group.AutoClose), this.AMP.isAMP || this.DOM.bind(r, "click", (() => {
this.clearAutoClose(), p.disconnect(), c && this.DOM.unbind(window, "scroll", (() => this.handleIframeTopPosition(s, l))), this.Close()
})), g(0, 0, 500);
let c = document.body.firstElementChild !== s;
"loading" !== document.readyState ? (g(), c && this.handleIframeTopPosition(s, l)) : document.addEventListener("DOMContentLoaded", (() => {
g(), c && this.handleIframeTopPosition(s, l)
}));
let u = !1;
const p = new MutationObserver((t => {
for (const e of t) "childList" !== e.type && "attributes" !== e.type || (this.handleIframeTopPosition(s, l), c = document.body.firstElementChild !== s, !u && c && (u = !0, this.DOM.bind(window, "scroll", (() => this.handleIframeTopPosition(s, l)))))
}));
return p.observe(document.body, {
attributes: !0,
childList: !0,
subtree: !0
}), c && this.DOM.bind(window, "scroll", (() => this.handleIframeTopPosition(s, l))), this.Hooks.Call(this.Hooks.Events.Formats.TopScroll.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
handleIframeTopPosition(t, e) {
const i = t.getBoundingClientRect().top;
i >= 0 && i <= this.DOM.getViewportHeight() ? this.DOM.css(e, "top", `${i}px`) : this.DOM.css(e, "top", "0")
}
},
TopScrollSponsorClick: class extends q {
constructor(t) {
super({
hook: "TopScrollSponsorClick",
name: "topscrollSponsorClick",
closeFormat: "other"
}, t)
}
Open() {
this.Hooks.Call(this.Hooks.Events.Formats.TopScrollSponsorClick.beforeOpen, [this.tracker.ID]);
const {
defaultUrl: t,
body: e,
baseUrl: i
} = this.getInitialState(), s = .3 * this.DOM.getViewportHeight(), o = this.DOM.create("div", {
id: this.GetId()
}, {
cursor: "pointer",
position: "relative",
width: "100%",
height: this.AMP.exists() ? "100vh" : s + "px",
minHeight: "250px",
overflow: "hidden",
zIndex: "5",
clipPath: "inset(0)",
transition: "0.5s height"
}), r = this.DOM.create("img", {
id: this.GetId("logo"),
src: U,
alt: "Logo"
}, {
left: "10px",
top: "10px",
width: "15px",
minWidth: "auto",
position: "absolute",
zIndex: "4500",
margin: "0"
}), n = this.DOM.create("img", {
id: this.GetId("topscroll-close"),
src: E,
alt: "close"
});
Object.assign(n.style, d.btnCss);
const a = this.DOM.shortCutCreate("anchorClever"),
l = this.DOM.create("div", {
id: this.GetId("shadow")
}, {
position: "absolute",
width: "100%",
height: "100%",
boxShadow: "rgba(0, 0, 0, 0.3) 0 -180px 100px -110px inset",
zIndex: "9"
}),
h = this.DOM.create("iframe", {
id: this.GetId("top-scroll-iframe"),
className: d.Class,
name: d.Class,
src: "about:blank",
title: "Clever-iframe",
frameBorder: "0",
scrolling: "no"
}, {
top: "0",
left: "0",
width: "100%",
position: "fixed",
height: this.AMP.exists() ? "100vh" : "30vh",
minHeight: this.AMP.exists() ? "0px" : "250px",
border: "none"
});
if (this.AMP.isAMP || this.DOM.append(o, n.outerHTML), this.DOM.append(o, l.outerHTML), this.DOM.append(o, r.outerHTML), this.DOM.append(a, r.outerHTML), this.DOM.append(o, a.outerHTML), this.DOM.append(o, h.outerHTML), e.insertBefore(o, e.firstChild), !x.User.Mobile) {
const t = this.DOM.create("img", {
id: "cleverImageCreative"
}, {
position: "absolute",
height: "60px",
width: "60px",
zIndex: "999999",
visibility: "hidden"
});
e.insertBefore(t, e.firstChild)
}
const c = this.DOM.create("img", {
id: "cleverLogoClick"
}, {
width: "135px",
height: "65px",
position: "fixed",
display: "none",
zIndex: "99999999",
left: "0",
top: "50%",
transform: "translateY(-50%)",
cursor: "pointer"
});
e.insertBefore(c, e.firstChild), this.bindSponsorClickEvents(!0, [n.id, this.GetId("logo"), l.id], !0), x._debug("Do Callback: TopScroll Sponsor Click"), this.CodeUtils.DoCallback(this.tracker, !0);
const u = t + "&hei=" + s.toFixed(2);
return this.DOM.attr(h, {
src: u + "&ts=" + this.Registry.TimeSpent
}), this.DOM.bind(l, "click", (() => {
this.Callback.Click(), window.open(this.handleFormatClick(), "_blank"), this.clearAutoClose(), this.Close()
})), this.DOM.bind(window, "resize", (() => {
this.DOM.css(o, "height", .3 * this.DOM.getViewportHeight() + "px")
})), x.group.AutoClose > 0 && setTimeout((() => {
this.Close()
}), 1e3 * x.group.AutoClose), this.AMP.isAMP || this.DOM.bind(n, "click", (() => {
this.DOM.customFetch(i + "&closed=1"), this.clearAutoClose(), this.Close()
})), g(0, 0, 500), "loading" !== document.readyState ? g() : document.addEventListener("DOMContentLoaded", (() => g())), this.Hooks.Call(this.Hooks.Events.Formats.TopScrollSponsorClick.afterOpen, [this.tracker.ID]), this.autoCloseValidation(), !0
}
},
IframeInterScroller: class extends G {
constructor(t) {
super({
name: "iframe-inter-scroller",
hook: "InterScroller",
closeFormat: "banner"
}, t)
}
Open(t) {
if (x.MinimalVisibility = .1, this.Hooks.Call(this.Hooks.Events.Formats.InterScroller.beforeOpen, [this.tracker.ID]), !x.User.Mobile) return x._debug("Device or user is not mobile"), !1;
const e = this.DOM.Meta("target");
if (!e) return x._debug("Target was not found"), !1;
const i = document.getElementById(e);
if (null === i) return x._debug("Iframe was not found"), !1;
const s = t.FileW ? Number(t.FileW) : 300,
o = t.FileH ? Number(t.FileH) : 250;
if (this.DOM.css(i, {
height: "600px"
}), !i.parentElement) return x._debug("Iframe parent element was not found"), !1;
if (this.DOM.css(i.parentElement, {
width: s + "px",
height: "100%",
transform: "translate(-50%, 0)",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
minHeight: "1px",
position: "fixed",
left: "50%",
top: "0",
textAlign: "center"
}), !i.parentElement.parentElement) return x._debug("Iframe parent parent element was not found"), !1;
this.DOM.css(i.parentElement.parentElement, {
width: "100%",
height: o + "px",
border: "0",
margin: "0",
padding: "0",
clipPath: "inset(0 0 0 0)"
});
const r = i.contentWindow,
n = this.Net.getDefaultUrl(t),
a = this.DOM.create("iframe", {
id: this.GetId(0, "iframe"),
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no",
src: "about:blank",
allowFullscreen: !0,
mozallowfullscreen: "true"
}, {
border: "0 none transparent",
width: s + "px",
height: "600px",
visibility: "visible",
margin: "0",
padding: "0",
"pointer-events": "all",
"z-index": "-1"
}),
l = this.DOM.create("img", {
id: this.GetId(0, "overlay"),
src: H,
alt: "overlay-clever"
}, {
width: "100%",
height: "100%",
zIndex: "9999",
top: "0",
left: "0",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none",
position: "absolute",
margin: "0",
padding: "0"
}),
h = this.DOM.create("div", {
id: this.GetId(0)
}, {
height: o + "px"
});
this.DOM.setHTML(h, l.outerHTML), this.DOM.append(h, a.outerHTML);
const c = this.GetId(0, "overlay"),
u = this.GetId(0, "iframe"),
p = this.DOM.create("base", {
target: "_blank"
});
r && this.DOM.append(r.document.head, p.outerHTML);
const m = setInterval((() => {
var e;
const i = (null == r ? void 0 : r.document.body.querySelector(".GoogleActiveViewElement")) || (null == r ? void 0 : r.document.body.querySelector(".GoogleActiveViewInnerContainer"));
i && (this.DOM.css(i, "pointer-events", "auto"), i.append(h), null == (e = i.querySelector("#" + c)) || e.addEventListener("click", (() => {
this.Callback.Click(), parent.window.open(this.Net.fetchBaseUrl(t, {
ts: this.Registry.TimeSpent,
frominter: "1",
click: "1"
}), "_blank")
})), clearInterval(m))
}), 100);
let g = !1;
const C = () => {
var e, s;
if (g) return;
const r = this.DOM.Meta("target");
if (!r) return;
if (!document.getElementById(r)) return;
const a = n + "&hei=" + o,
l = document.getElementById(r),
h = null == (e = null == l ? void 0 : l.contentWindow) ? void 0 : e.document.getElementById(u);
h && (null == (s = i.parentElement) ? void 0 : s.parentElement) && this.DOM.isMinimallyVisible(i.parentElement.parentElement) && (this.DOM.attr(h, {
src: a + "&ts=" + this.Registry.TimeSpent
}), x._debug("Do Callback: InterScroller iframe"), this.CodeUtils.DoCallback(t, !0), g = !0)
};
return "loading" !== document.readyState ? C() : document.addEventListener("DOMContentLoaded", C), window.addEventListener("scroll", C), this.Hooks.Call(this.Hooks.Events.Formats.InterScroller.afterOpen, [this.tracker.ID]), !0
}
}
},
j = class {
constructor(t, e, i, s, o, r, n, a, l, c, d, u, p) {
this.Registry = t, this.DOM = e, this.AMP = i, this.Net = s, this.CodeUtils = o, this.SafeFrame = r, this.Cookie = n, this.Tracker = a, this.Hooks = l, h(this, "trackerFormats", new Map), h(this, "args"), h(this, "isForbiddenURL"), this.isForbiddenURL = d.IsForbiddenURL(s.currentLocation()), this.args = {
Registry: t,
DOM: e,
AMP: i,
Net: s,
CodeUtils: o,
Hooks: l,
Callback: c,
URL: d,
TCF: u,
Translation: p,
Tracker: a
}
}
Exec() {
var t;
this.Tracker.current = null;
const e = this.Registry.InternalReferenceList;
this.Net.ExtraParam += "&ctr=" + x.User.CTR;
const i = null != (t = this.DOM.Meta("reference")) ? t : window.CLEVER_REF;
if (i) {
x._debug("Have Reference");
for (const t of e) t.InternalReference == i && (this.Registry.InternalReference = t.ID)
}
if (this.SafeFrame.isEnabled()) {
const t = "SafeFrame is enabled in configurations";
w.exists() ? x._debug(t + ", executing inside SafeFrame") : x._debug(t + " but not inside SafeFrame")
}
if (this.AMP.exists()) {
if (x._debug("AMP detected"), !this.AMP.isEnabled()) return x._debug("AMP is disabled in configurations"), !1;
x._debug("Executing via AMP")
}
this.Net.ExtraParam += "&sz=" + this.DOM.getViewportHeight();
if (1 === x.group.DisableMobile && x.User.Mobile || 1 === x.User.bot) return x._debug("Bot"), !1;
if ("file:" === document.location.protocol) return x._debug("Try to access local"), !1;
let s = this.Tracker.getNextTracker();
if (s && this.bindEvents(s), (null == s ? void 0 : s.multiproduct) && this.Registry.isMultiProduct) {
const t = this.Registry.Trackers.filter((t => 1 === t.multiproduct && t.ID !== s.ID));
s = this.Tracker.getNextTracker(t), s && (this.trackerFormats.has(s.ID) || this.bindEvents(s))
}
const o = this.Cookie.checkExpire();
if (!s) return o && this.CodeUtils.handleCalbackWithValidation("alternative", (t => c(this, null, (function*() {
(yield this.Net.inject(t).catch((() => (x._debug("Alternative " + t + " Url"), !1)))) && x._debug("Alternative " + t + " Url")
}))), s), !1;
o || this.isForbiddenURL || (x.User.lastTracker = s.Sort, this.Cookie.saveLastTracker(s.Sort));
return this.Tracker.getNextTracker(void 0, !0) || (s && (o || this.Cookie.saveCounter(0, 1)), this.Cookie.deleteLastTracker()), this.addGarbageListener(), s.ID
}
addGarbageListener() {
window.addEventListener("message", (t => {
var e;
if ("string" != typeof t.data || -1 === this.Registry.postMessageSources.indexOf(t.origin)) return;
if (!t.data.startsWith("garbage-clever")) return;
x._debug("Garbage: " + t.data.replace("garbage-clever|", ""));
const i = x.group.ID,
s = [`div[class="${d.Class}"]`, `div[class="${d.MultiClass}"]`, `div[id^="clever-${i}-"]`];
this.DOM.clearEvents();
for (const t of s) null == (e = document.querySelector(t)) || e.remove();
this.Hooks.Call(this.Hooks.Events.Garbage.afterRemove, [])
}))
}
bindEvents(t) {
if (this.Cookie.checkExpire() && !this.DOM.Meta("alternative") && t.cap && this.Cookie.readTrackerCap(t.ID)) return;
const e = {
popunder: "popUnder",
banner: "banner",
interscroller: "interScroller",
miniscroller: "miniScroller",
leaderboard: "leaderBoard",
expandablebannerleft: "expandableBannerLeft",
expandablebannerright: "expandableBannerRight",
supertopboardscroll: "superTopBoardScroll",
bannercube: "bannerCube",
cube: "cube",
box3d: "box3d",
mosaic: "mosaic",
interactivebanner: "interactiveBanner",
scratchbanner: "scratchBanner"
},
i = {},
s = t.Type;
e[s] && (x._debug(`${s} format detected`), i[e[s]] = !0);
if (Object.values(i).every((t => !t))) {
const t = this.DOM.getByClass(d.Class);
for (const e of t) this.DOM.remove(e)
}
this.ExecTracker(t)
}
ExecTracker(t) {
x._debug(`Format '${t.Type}' will try to execute`);
const e = t.Type;
if (!e) return void x._debug("No format was detected");
if (!this.Cookie.checkExpire() || t.cap && !this.Cookie.readTrackerCap(t.ID)) {
if (["scratchinterstitial", "inter", "interclose", "interonclose", "internotime", "layerleft", "layerright", "pushdown"].includes(e) && x.group.DisableIframes && top !== self) return this.CodeUtils.handleDisabledIframe();
if (("layerleft" === e || "layerright" === e) && (!x.User.Mobile || t.FileW > 0 && this.DOM.getViewportWidth() > t.FileW)) return this.getOrCreateFormat(t, $.LayerOver).Open();
const i = this.findFormatByTrackerType(e);
return i ? this.getOrCreateFormat(t, i).Open() : x._debug("No tracker was loaded")
}
x._debug("CAP")
}
getOrCreateFormat(t, e) {
const i = this.trackerFormats.get(t.ID);
if (i) return i;
const s = new e(a({
tracker: t
}, this.args));
return this.trackerFormats.set(t.ID, s), this.isForbiddenURL || this.Tracker.saveTrackerCap(t), s
}
findFormatByTrackerType(t) {
var e;
const i = {
"interScroller-iframe": {
className: "IframeInterScroller"
},
"banner-app": {
className: "BannerApp"
},
"banner-app-video": {
className: "BannerAppVideo"
},
"banner-app-countdown": {
className: "BannerAppCountdown"
},
scratchinterstitial: {
className: "ScratchInterstitial"
},
inter: {
className: "Interstitial"
},
interclose: {
className: "Interstitial"
},
interonclose: {
className: "Interstitial"
},
internotime: {
className: "Interstitial"
},
layerleft: {
className: "Interstitial"
},
layerright: {
className: "Interstitial"
}
};
if (["interScroller", "interScroller-iframe", "topScroll", "topScrollSponsorClick", "miniScroller", "superTopBoardScroll", "leaderBoard", "expandableBannerLeft", "expandableBannerRight", "bannerCube", "cube", "scratchBanner", "stickyFooter", "stickyPop", "stickySponsorClick", "stickySponsorClickTop", "stickyTest", "mosaic", "box3D", "banner-app", "banner-app-video", "banner-app-countdown", "interactiveBanner", "interactiveSticky", "mobilePull", "pushDown", "pushdownSponsorClick", "inter", "interclose", "interonclose", "internotime", "scratchinterstitial", "layerleft", "layerright", "banner"].find((e => e.toLowerCase() === t.toLocaleLowerCase()))) {
const s = i[t.toLowerCase()],
o = null != (e = null == s ? void 0 : s.className) ? e : t,
r = Object.keys($).find((t => t.toLowerCase() === o.toLowerCase()));
if (!r) return;
return x._debug(`Format ${r} found`), $[r]
}
}
},
Z = class {
constructor(t, e, i) {
this.DOM = t, this.Callback = e, this.URL = i, h(this, "multiProductDivs", [])
}
getMultiProductDiv(t) {
if (0 === this.multiProductDivs.length) {
const t = this.DOM.getByClass(d.MultiClass);
if (0 === t.length) return x._debug("No multi product divs found"), !1;
const e = this.DOM.getByClass(d.Class)[0];
e && this.multiProductDivs.push({
div: e,
isMain: !0
});
for (const e of t) this.multiProductDivs.push({
div: e
})
}
const e = this.multiProductDivs.findIndex((e => !(e.isMain || e.trackerId && e.trackerId !== t.ID)));
return !!this.multiProductDivs[e] && (this.multiProductDivs[e].trackerId = t.ID, this.multiProductDivs[e])
}
handleCalbackWithValidation(t, e, i) {
const s = this.DOM.Meta(t);
if (!s) return;
if (x._debug("Type: " + typeof s), this.URL.validateUrl(s)) return x._debug(`${s} is Url`), s.replace("{hstpuser}", D(JSON.stringify(x.User))), s.replace("{hstpurl}", D(JSON.stringify(i))), void e(s);
if ("function" == typeof s) return x._debug(`Callback ${s} is function`), o = x.User, void s(o, i);
var o;
if (!s || "string" != typeof s) return;
if ("function" == typeof window[s]) return x._debug("Callback " + s + " is in main window"), void
function(t, e, i) {
(0, t[s])(e, i)
}(window, x.User, i);
x._debug("Callback " + s + " try to eval"),
function(t, e) {
try {
const i = (0, eval)(s);
"function" == typeof i && i(t, e)
} catch (t) {}
}(x.User, i)
}
DoCallback(t, e) {
this.Callback.View(), e && this.handleCalbackWithValidation("callback", (t => {
const e = new Image(1, 1);
e.style.display = "none", setTimeout((() => {
e.src = t
}), 0)
}), t), t.IframeTraffic && this.URL.validateUrl(t.IframeTraffic) && this.DOM.getByTag("body")[0].appendChild(this.DOM.create("iframe", {
id: "iftr",
src: t.IframeTraffic
}, {
width: "1px",
height: "1px",
position: "fixed",
bottom: "0",
left: "0"
}))
}
handleDisabledIframe() {
const t = window.location.href + "?wn=" + encodeURIComponent(window.name) + "&r1=" + encodeURIComponent(document.referrer);
try {
setTimeout((function() {
top && (top.location.href = t)
}), 1e3), x._debug("Iframe Acess")
} catch (e) {
setTimeout((function() {
parent.location.href = t
}), 1e3)
}
return !1
}
},
Y = class {
constructor(t) {
this.Registry = t, h(this, "cookieKeys"), this.cookieKeys = {
counter: d.CookieCounterPrefix + t.Group.ID,
lastTracker: d.CookieLastTrackerPrefix + t.Group.ID
}
}
Get(t) {
const e = new RegExp(`(^| )${t}=([^;]+)`).exec(document.cookie);
return e ? e[2] : null
}
Set(t, e, i) {
if (!i) return;
const s = new Date;
s.setTime(s.getTime());
const o = new Date(s.getTime() + 1e3 * i);
let r = t + "=" + escape(e) + ";expires=" + o.toUTCString() + ";path=/;";
this.Registry.SSL() && (r += " SameSite=None; Secure;"), document.cookie = r
}
saveCookie(t, e, i) {
const s = 60 * i * 60;
return this.Set(this.cookieKeys[t], e, s)
}
deleteCookie(t) {
return this.Set(this.cookieKeys[t], "", -1)
}
readCookie(t) {
return this.Get(this.cookieKeys[t])
}
checkExpire() {
const t = this.readCookie("counter");
return !(!t && this.Registry.getExpireTime() > 0) && null != t
}
readCounter() {
const t = this.readCookie("counter");
if (t) {
const [e, i] = t.split("-");
return {
click: Number(e),
counter: Number(i)
}
}
return {
click: 0,
counter: 0
}
}
saveCounter(t, e) {
const i = this.Registry.getExpireTime(),
s = t + "-" + e;
this.saveCookie("counter", s, i)
}
saveLastTracker(t) {
const e = this.Registry.getExpireTime(),
i = e > 0 ? e : d.CookieLifeTime;
this.saveCookie("lastTracker", String(t), i)
}
deleteLastTracker() {
this.deleteCookie("lastTracker")
}
readTrackerCap(t) {
return this.Get(`clever-cap-${t}`)
}
saveTrackerCap(t, e, i) {
this.Set(`clever-cap-${t}`, String(e), 60 * i * 60)
}
},
X = class {
constructor(t) {
this.group = t, h(this, "events", new Map), h(this, "shortCuts", {
overlay: {
type: "img",
attr: {
src: H,
alt: "overlay-clever"
},
style: {
width: "100%",
height: "100%",
zIndex: "15",
top: "0",
left: "0",
cursor: "pointer",
border: "none",
borderRadius: "none",
backgroundColor: "transparent",
boxShadow: "none",
position: "absolute",
margin: "0",
padding: "0"
}
},
bannerClose: {
type: "img",
attr: {
src: E,
alt: "close"
},
style: {
right: "2px",
top: "0",
width: "22px",
position: "absolute",
zIndex: "15",
height: "22px",
margin: "0",
cursor: "pointer"
}
},
anchorClever: {
type: "a",
attr: {
href: "https://cleveradvertising.com",
target: "_blank",
rel: "nofollow"
},
style: {
color: "#fff",
textDecoration: "none",
height: "15px",
padding: "0",
background: "unset",
overflow: "unset"
}
},
cleverLogo: {
type: "img",
attr: {
src: B,
alt: "Logo"
},
style: {
left: "2px",
top: "0",
width: "22px",
position: "absolute",
zIndex: "15",
height: "22px",
margin: "0"
}
},
cleverLogoWhite: {
type: "img",
attr: {
src: U,
alt: "Logo"
},
style: {
left: "2px",
top: "0",
width: "15px",
position: "absolute",
zIndex: "15",
height: "15px",
margin: "0"
}
},
iframe: {
type: "iframe",
attr: {
title: "Clever-iframe",
name: d.Class,
frameBorder: "0",
scrolling: "no",
src: "about:blank",
allowFullscreen: !0
},
style: {
width: "100%",
height: "100%",
backgroundColor: "transparent",
visibility: "visible",
position: "absolute",
top: "0",
padding: "0",
pointerEvents: "all",
zIndex: "-1",
display: "flex"
}
}
})
}
getByTag(t) {
return document.getElementsByTagName(t)
}
clearEvents() {
for (const [t, {
element: e,
event: i,
callback: s
}] of this.events) this.unbind(e, i, s)
}
wName() {
return window.name ? window.name : ""
}
getByClass(t) {
return document.getElementsByClassName(t)
}
getByID(t) {
var e, i, s;
let o = null;
return document.getElementById ? o = null != (e = document.getElementById(t)) ? e : null : document.all ? o = null != (i = document.all[Number(t)]) ? i : null : document.layers && (o = document.layers[t]), o || (parent.document.getElementById ? o = null != (s = parent.document.getElementById(t)) ? s : null : parent.document.all ? o = parent.document.all[Number(t)] : parent.document.layers && (o = parent.document.layers[t])), o
}
getElement(t) {
return t === document || t instanceof Document ? document : t === window || t instanceof Window ? window : t.id ? document.querySelector(`#${t.id}`) : void 0
}
bind(t, e, i) {
const s = this.getElement(t);
(t = null != s ? s : t).addEventListener ? t.addEventListener(e, i, !1) : "attachEvent" in t && t.attachEvent("on" + e, (function() {
i.apply(this)
})), this.events.set(this.events.size + 1, {
element: t,
callback: i,
event: e
})
}
unbind(t, e, i) {
t.removeEventListener && t.removeEventListener(e, i), "detachEvent" in t && t.detachEvent("on" + e, i)
}
remove(t) {
var e;
null == (e = t.parentNode) || e.removeChild(t)
}
destroyElement(t) {
this.setHTML(t, ""), this.css(t, "display", "none"), this.remove(t)
}
css(t, e, i) {
let s;
if (i = i ? String(i) : void 0, t) {
if ("string" == typeof t) {
if (s = document.getElementById(t), !s) return
} else {
if ("id" in t && t.id) {
const e = document.getElementById(t.id);
e && (s = e)
}
s || (s = t)
}
if ("object" != typeof e) {
if (void 0 !== i)
if (i.includes("!important")) {
const t = i.replace("!important", "").trim(),
o = v(e);
s.style.setProperty(o, t, "important")
} else {
const t = v(e);
s.style.setProperty(t, i)
}
} else Object.keys(e).forEach((t => {
this.css(s, t, e[t])
}))
}
}
attr(t, e, i) {
const s = t.id ? document.getElementById(t.id) : void 0;
if (s && (t = s), "object" == typeof e)
for (const i in e) i in e && this.attr(t, i, e[i]);
else "id" === e ? t.id = null != i ? i : "" : "innerHTML" === e ? t.innerHTML = null != i ? i : "" : "src" === e ? ("iframe" === t.nodeName.toLowerCase() && void 0 !== t.location && (t.location = i), "src" in t && (t.src = null != i ? i : "")) : "className" === e ? t.setAttribute("class", null != i ? i : "") : t.setAttribute(e, null != i ? i : "");
return t
}
append(t, e) {
try {
return t.innerHTML += e, t
} catch (t) {
return !1
}
}
setHTML(t, e) {
if (!e) return t.innerHTML;
const i = t.id ? document.getElementById(t.id) : void 0;
return i ? (i.innerHTML = e, i) : (t.innerHTML = e, t)
}
getViewportWidth() {
return window.innerWidth || document.documentElement.clientWidth || screen.availWidth || this.getByTag("body")[0].clientWidth
}
getViewportHeight() {
return window.innerHeight || document.documentElement.clientHeight || screen.availHeight || this.getByTag("body")[0].clientHeight
}
height(t) {
return t.clientHeight || t.scrollHeight || t.offsetHeight || 0
}
width(t) {
return t.clientWidth || t.scrollWidth || t.offsetWidth || 0
}
create(t, e, i) {
const s = document.createElement(t);
return e && this.attr(s, e), i && this.css(s, i), s
}
shortCutCreate(t, e, i, s) {
return this.create(null != s ? s : this.shortCuts[t].type, a(a({}, this.shortCuts[t].attr), null != e ? e : {}), a(a({}, this.shortCuts[t].style), null != i ? i : {}))
}
clone(t, e) {
const i = {};
for (let e = 0; e < t.attributes.length; e++) {
const s = t.attributes[e];
s && (i[s.name] = s.value)
}
return this.create(e, i)
}
replace(t, e) {
var i;
null == (i = t.parentNode) || i.replaceChild(e, t)
}
zIndex(t = 0) {
let e = 2147483647;
return x.User.Browser && "safari" === x.User.Browser.toLowerCase() && (e = 16777271), e -= 7, String(Math.floor(e + t))
}
isVisible(t) {
const e = getComputedStyle(t);
if ("none" === e.display || "visible" !== e.visibility || Number(e.opacity) < .1) return !1;
if (t.offsetWidth + t.offsetHeight + t.getBoundingClientRect().height + t.getBoundingClientRect().width === 0) return !1;
const i = t.getBoundingClientRect().left + t.offsetWidth / 2;
if (i < 0 || i > (document.documentElement.clientWidth || window.innerWidth)) return !1;
const s = t.getBoundingClientRect().top + t.offsetHeight / 2;
if (s < 0 || s > (document.documentElement.clientHeight || window.innerHeight)) return !1;
let o = document.elementFromPoint(i, s);
if (o === t) return !0;
for (; null !== o && void 0 !== o.parentNode;) {
if (o.parentNode === t) return !0;
o = o.parentNode
}
return !1
}
isDisplayed(t) {
if (!t) return !1;
const e = t.getBoundingClientRect(),
i = document.documentElement,
s = window.innerWidth || i.clientWidth,
o = window.innerHeight || i.clientHeight;
if ("style" in t) {
const i = .2 * parseInt(t.style.height, 10);
return e.top >= 0 && e.left >= 0 && e.bottom - i <= o && e.right <= s
}
return e.top >= 0 && e.left >= 0 && e.right <= s
}
isMinimallyVisible(t, e, i) {
var s;
if (1 === this.group.AMP) return !0;
if (w.exists()) return !0;
if (!t) return x._debug("Visibility element not defined"), !1;
if ("object" != typeof t) return x._debug("Visibility element must be object"), !1;
if ("frameElement" in t && (t = t.frameElement), "offsetHeight" in t && !t.offsetHeight && !t.offsetWidth) return x._debug("Visibility element must have offset"), !1;
const o = window.getComputedStyle(t);
if ("hidden" === o.visibility || !Number(o.opacity)) return x._debug("Element is hidden or without opacity"), !1;
let r;
const n = e || t.getBoundingClientRect();
let a, l;
"style" in t && (r = t.style.height ? parseInt(t.style.height, 10) : t.hasAttribute("height") ? parseInt(null != (s = t.getAttribute("height")) ? s : "", 10) : t.getBoundingClientRect().height), r && (r *= x.MinimalVisibility), r = r || 10, i ? (a = i.width, l = i.height) : (a = window.innerWidth, l = window.innerHeight);
const h = n.bottom - r <= 0,
c = n.top - l + r >= 0,
d = n.right - r < 0,
u = n.left - a + r >= 0;
return !(h || c || d || u)
}
Meta(t) {
const e = this.getByID("CleverCoreLoader" + x.group.ID);
return e ? e.getAttribute("data-" + t) : null
}
customFetch(t) {
const e = new Image;
e.style.display = "none", e.src = t
}
},
K = {
open: ["beforeOpen", "afterOpen"],
close: ["beforeClose", "afterClose"],
openClose: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"]
},
Q = class {
constructor() {
h(this, "Queue", {}), h(this, "Events"), this.Events = {
Generic: a({}, this.generateEvents(["generic:beforeRun", "generic:afterRun", "generic:afterUI"]).Generic),
Formats: this.generateEvents(["interstitial:openClose", "banner:beforeOpen", "banner:beforeEach", "banner:afterOpen", "banner:afterCloseBind", "banner:afterEach", "banner:afterAll", "interScroller:openClose", "pushDown:openClose", "pushDownSponsorClick:openClose", "topScroll:openClose", "topScrollSponsorClick:openClose", "miniScroller:openClose", "superTopBoardScroll:openClose", "leaderBoard:openClose", "expandableBannerLeft:openClose", "expandableBannerRight:openClose", "bannerCube:openClose", "cube:openClose", "stickyFooter:openClose", "stickyPop:openClose", "stickySponsorClick:openClose", "stickySponsorClickTop:openClose", "stickyTest:openClose", "mosaic:openClose", "box3D:openClose", "bannerApp:openClose", "bannerAppVideo:openClose", "bannerAppCountdown:openClose", "interactiveBanner:openClose", "interactiveSticky:openClose", "mobilePull:openClose", "scratchBanner:openClose"]),
Garbage: a({}, this.generateEvents(["garbage:afterRemove"]).Garbage)
}, this.Queue = {}
}
Add(t, e) {
this.Queue[t] = e
}
Call(t, e) {
if (this.Queue[t]) {
const i = this.Queue[t];
e = [x.group.ID, ...e];
try {
return i(...e)
} catch (t) {
return console.error(t), !1
}
}
}
generateEvents(t) {
return t.reduce(((t, e) => {
const [i, s] = e.split(":");
return K[s] ? (K[s].forEach((e => {
t[C(i)] = l(a({}, t[C(i)]), {
[e]: `${i}:${e}`
})
})), t) : (t[C(i)] = l(a({}, t[C(i)]), {
[s]: e
}), t)
}), {})
}
},
J = class {
constructor(t, e, i, s, o, r) {
this.Version = t, this.DOM = e, this.Registry = i, this.URL = s, this.AMP = o, this.TCF = r, h(this, "ExtraParam", "")
}
buildURI(t, e) {
const i = [];
e.iv = "-1";
for (const t in e) Object.prototype.hasOwnProperty.call(e, t) && i.push(`${t}=${encodeURIComponent(e[t])}`);
return `${t}?${i.join("&")}${this.ExtraParam}`
}
inject(t) {
return new Promise(((e, i) => {
const s = this.DOM.create("script", {
type: "text/javascript",
src: t,
async: !1
});
s.onerror = function(e, s, o, r, n) {
return i({
errorMessage: e,
injectUrl: s,
url: t,
lineNumber: o,
column: r,
errorObject: n
})
}, s.onload = t => (console.log("scriptTag.onload"), e(!0));
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(s)
}))
}
getDefaultUrl(t) {
let e = this.fetchBaseUrl(t);
return t.Landing && "" != t.Landing && (e += "&landing=1"), e
}
currentLocation() {
let t;
if (this.AMP.exists()) {
const e = new URL(JSON.parse(window.name).attributes._context.location.href);
t = e.hostname + e.pathname
} else t = w.exists() ? document.referrer : window.location.host + window.location.pathname;
return decodeURI(t)
}
getForbiddenUrlParam(t) {
return 0 === t.is_forbidden_enabled ? 0 : this.URL.forbiddenURLs.length > 0 && this.URL.IsForbiddenURL(this.currentLocation()) ? 1 : 0
}
fetchBaseUrl(t, e) {
var i, s, o, r, n, l, h, c, d, u;
let p = {
id: t.ID,
ref: window.btoa(null != (i = this.Registry.getLocationHref()) ? i : ""),
ruri: window.btoa(this.URL.GetExternalReferer()),
t: x.User.t,
cmpId: this.TCF.cmpId,
fb: "Facebook App" === x.User.Browser ? 1 : 0,
wl: this.Registry.IsWhitelist() ? 1 : 0,
furl: this.getForbiddenUrlParam(t),
sf: w.exists() ? 1 : 0,
bw: window.btoa(null != (s = x.User.Browser) ? s : "").replace(/=+$/, ""),
b: null != (o = x.User.bot) ? o : 0,
m: null != (r = x.User.Mobile) ? r : 0,
p: window.btoa(null != (n = x.User.Platform) ? n : "").replace(/=+$/, ""),
res: this.DOM.getViewportWidth() + "x" + this.DOM.getViewportHeight(),
app: this.Registry.CurrentApp,
v: this.Version,
s: null != (l = x.User.s) ? l : "",
bv: null != (h = x.User.bv) ? h : "",
cont: null != (c = x.User.cont) ? c : "",
st: null != (d = x.group.ads_script_type) ? d : "",
sdk: null != (u = this.Registry.SDK) ? u : "",
mng: I() ? "GAM" : ""
};
return e && (p = a(a({}, p), e)), this.buildURI(this.URL.BaseUrl(), p)
}
},
tt = class {
constructor(t) {
this.Registry = t, h(this, "TCFVendorId", 1070), h(this, "version", 2), h(this, "requiredCountries", ["PT"]), h(this, "requiredRooms", [298]), h(this, "cmpId", "")
}
exists() {
return "function" == typeof __tcfapi
}
isRequired() {
if (!x.User.CTR) return !1;
if (57055 === x.group.ID) {
let t = !1;
for (let e = 0; e < this.Registry.Trackers.length; e++)
if (this.requiredCountries.includes(this.Registry.Trackers[e].RoomID.toString())) {
t = !0;
break
} return t && this.requiredCountries.includes(x.User.CTR)
}
return this.requiredCountries.includes(x.User.CTR)
}
isEnabled() {
return void 0 !== x.group.TCF && 1 === x.group.TCF
}
isValidConsents(t) {
const e = this.TCFVendorId;
return "boolean" != typeof t.gdprApplies ? console.log("GDPR applies: Unknown") : console.log((t.gdprApplies, "Yes")), t.purpose.consents[1] ? t.purpose.consents[2] ? t.vendor.consents[this.TCFVendorId] ? !!t.vendor.legitimateInterests[this.TCFVendorId] || (console.log("No " + e + " legitimateInterests vendor ID"), !1) : (console.log("No " + e + " vendor ID"), !1) : (console.log("No #2 consent"), !1) : (console.log("No #1 consent"), !1)
}
registerEventListeners(t) {
const e = (e, i) => i ? "tcloaded" === e.eventStatus && (!!this.isValidConsents(e) && (this.cmpId = e.cmpId, t && t(), !0)) : (x._debug("TCF: Failed on page load"), !1),
i = (e, i) => i ? "useractioncomplete" === e.eventStatus && (!!this.isValidConsents(e) && (this.cmpId = e.cmpId, t && t(), __tcfapi("removeEventListener", this.version, (function(t) {}), e.listenerId), !0)) : (x._debug("TCF: Failed on UI load"), !1);
__tcfapi("addEventListener", this.version, ((t, s) => {
e(t, s) || i(t, s)
}))
}
},
et = class {
constructor(t, e, i) {
this.Registry = t, this.TCF = e, this.Cookie = i, h(this, "current", null)
}
isBlockedByMobileOnly(t) {
return !(null === x.group.ads_currency_code || !x.User.Mobile || 0 !== t.OnlyMobile) && (x._debug("Tracker is desktop only"), !0)
}
isBlockedByRegion(t) {
const e = this.Registry.BlockedRoomsByRegion[t.RoomID];
return !(!e || !(!e.length || x.User.Region && e.includes(x.User.Region))) && (x._debug(`Blocked Room: ${t.RoomID} for Region: ${x.User.Region}`), !0)
}
adjustTrackerForItaly(t) {
if ("IT" === t.CTR && "cube" === t.Type && "888" !== t.Landing) {
let e = "bannercube";
"snai" == t.Landing && "casino" == t.Vertical && (e = "cube"), t.Type = e
}
}
isBlockedByTCF(t) {
return !(!this.TCF.requiredRooms.includes(t.RoomID) || !this.TCF.isRequired() || this.TCF.exists()) && (x._debug("Room ID: " + t.RoomID + " can be shown only via TCF"), !0)
}
isTrackerOnCap(t) {
return this.Cookie.checkExpire() ? !(t.cap && !this.Cookie.readTrackerCap(t.ID)) : !(!t.cap || !this.Cookie.readTrackerCap(t.ID)) && (x._debug(`Tracker ${t.ID} on cap`), !0)
}
isTrackerFromUserRegion(t = this.Registry.Trackers) {
return this.Registry.isMultiProduct || (t = this.Registry.Trackers), t.some((t => t.Region && t.Region === x.User.Region && t.CTR === x.User.CTR && t.OnlyMobile === x.User.Mobile))
}
getTracker(t = this.Registry.Trackers) {
if (0 === this.Registry.Trackers.length) return;
const e = !!x.User.Mobile && x.User.Mobile > 0,
i = "A" === x.group.ads_script_type,
s = e && 2 === x.group.DisableMobile,
o = t.length !== this.Registry.Trackers.length,
r = x.User.lastTracker;
t = t.filter((t => void 0 === r || t.Sort > r));
for (const n of t) {
if (i && (x.User.Platform !== n.script_type || this.Registry.CurrentApp && this.Registry.CurrentApp !== n.bundleId)) continue;
if (this.isBlockedByMobileOnly(n) || this.isBlockedByRegion(n) || this.isBlockedByTCF(n) || this.isTrackerOnCap(n)) continue;
if (this.adjustTrackerForItaly(n), !o && void 0 !== r && n.Sort <= r) continue;
const a = n.CTR === x.User.CTR;
if (n.OnlyMobile) {
if (e) {
if (a)
if (n.Region) {
if (n.Region === x.User.Region) return n
} else if (!this.isTrackerFromUserRegion(t)) return n;
if ("AA" === n.CTR) return n
}
} else {
if (a)
if (n.Region) {
if (n.Region === x.User.Region) return n
} else if (!this.isTrackerFromUserRegion(t)) return n;
if (!s) {
if (a && n.Region && n.Region === x.User.Region) return n;
if ("AA" === n.CTR) return n
}
if (a && !n.Region && !this.isTrackerFromUserRegion(t)) return n
}
}
}
getNextTracker(t, e = !1) {
const i = this.Cookie.readCookie("lastTracker");
x.User.lastTracker = i ? Number(i) : void 0;
const s = this.getTracker(t);
if (s) return e || (this.current = s), s
}
saveTrackerCap(t) {
t.cap && this.Cookie.saveTrackerCap(t.ID, t.Sort, t.cap)
}
},
it = class {
constructor(t, e) {
this.DOM = e, h(this, "forbiddenURLs", []), h(this, "urlRegex", /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i), this.forbiddenURLs = t
}
IsForbiddenURL(t) {
return this.forbiddenURLs.some((e => {
try {
const i = decodeURIComponent(decodeURIComponent(e));
return t.startsWith(i) || t.startsWith("www." + i) || t.includes(i)
} catch (t) {
console.log("Forbidden URL is incorrect")
}
return !1
}))
}
FetchDomain(t) {
return t.replace("http://", "").replace("https://", "").replace("www.", "").split(/[/?#]/)[0].replace(new RegExp("^[./ ]+", "g"), "").replace(new RegExp("[./ ]+$", "g"), "")
}
CurrentDomain() {
return this.FetchDomain(b())
}
BaseUrl() {
return "https://sender.cleverwebserver.com/group/" + x.group.ID
}
validateUrl(t) {
return this.urlRegex.test(t)
}
IsValid(t) {
try {
return new URL(t), !0
} catch (t) {
return !1
}
}
GetExternalReferer() {
var t;
let e;
return this.DOM.Meta("gam-ref-url") && (e = null == (t = this.DOM.Meta("gam-ref-url")) ? void 0 : t.replace("%%REFERRER_URL_UNESC%%", "")), e || (e = document.referrer), e
}
},
st = {
IT: {
CLOSE: "Chiudi",
CLOSE_AD: "Chiudi l'annuncio",
CLOSE_VISIT_SITE: "Chiudi e torna al sito",
VISIT_SITE: "Visita il sito",
CONTINUE: "Continue"
},
EN: {
CLOSE: "Close",
CLOSE_AD: "Close the Ad",
CLOSE_VISIT_SITE: "Skip and Visit Site",
VISIT_SITE: "Visit Site",
CONTINUE: "Continue"
},
CN: {
CLOSE: unescape("%u5173%u95ED"),
CLOSE_AD: unescape("%u5173%u95ED%u5E7F%u544A"),
CLOSE_VISIT_SITE: unescape("%u8DF3%u8FC7%uFF0C%u8BBF%u95EE%u7F51%u7AD9"),
VISIT_SITE: unescape("%u8BBF%u95EE%u7F51%u7AD9"),
CONTINUE: "Continue"
},
ES: {
CLOSE: "Cerrar",
CLOSE_AD: "Cerrar el anuncio",
CLOSE_VISIT_SITE: "Visitar Anunciante",
VISIT_SITE: "Visitar la web",
CONTINUE: "Continue"
},
MX: {
CLOSE: "Cerrar",
CLOSE_AD: "Cerrar el anuncio",
CLOSE_VISIT_SITE: "Visitar Anunciante",
VISIT_SITE: "Visitar la web",
CONTINUE: "Continue"
},
PT: {
CLOSE: "Fechar",
CLOSE_AD: "Fechar Anúncio",
CLOSE_VISIT_SITE: "Fechar e visitar",
VISIT_SITE: "Visitar pagina",
CONTINUE: "Continue"
},
BR: {
CLOSE: "Fechar",
CLOSE_AD: "Fechar Pub",
CLOSE_VISIT_SITE: "Fechar e visitar",
VISIT_SITE: "Visitar pagina",
CONTINUE: "Continue"
},
HU: {
CLOSE: "Bezár",
CLOSE_AD: "Zárja be a hirdetést",
CLOSE_VISIT_SITE: "Tovább az oldalra",
VISIT_SITE: "Oldal megtekintése",
CONTINUE: "Continue"
},
TR: {
CLOSE: "kapat",
CLOSE_AD: "Reklamı Kapat",
CLOSE_VISIT_SITE: "Kapa ve siteye git",
VISIT_SITE: "Bu siteyi ziyaret et",
CONTINUE: "Continue"
},
PL: {
CLOSE: "Zamknij",
CLOSE_AD: "Zamknij ogłoszenie",
CLOSE_VISIT_SITE: "Pomiń i odwiedź stronę",
VISIT_SITE: "Zobacz portal",
CONTINUE: "Continue"
},
SE: {
CLOSE: "Close",
CLOSE_AD: "Stäng annonsen",
CLOSE_VISIT_SITE: "Skip and visit Advertiser",
VISIT_SITE: "Visit Site",
CONTINUE: "Continue"
},
FR: {
CLOSE: "Fermer",
CLOSE_AD: "Fermez l'annonce",
CLOSE_VISIT_SITE: "Accèder directement à la publicité",
VISIT_SITE: "Accéder au site",
CONTINUE: "Continue"
},
BE: {
CLOSE: "Fermer",
CLOSE_AD: "Fermez l'annonce",
CLOSE_VISIT_SITE: "Accéder directement au site",
VISIT_SITE: "Accéder au site",
CONTINUE: "Continue"
},
CZ: {
CLOSE: unescape("Zav%u0159%EDt"),
CLOSE_AD: unescape("Zav%u0159ete%20reklamu"),
CLOSE_VISIT_SITE: unescape("P%u0159esko%u010Dit%20a%20nav%u0161t%EDvit%20str%E1nku"),
VISIT_SITE: unescape("Nav%u0161t%EDvit%20str%E1nku"),
CONTINUE: "Continue"
},
RU: {
CLOSE: "Закрыть",
CLOSE_AD: "Закрыть рекламу",
CLOSE_VISIT_SITE: "ПропуÑтить и зайти на Ñайт",
VISIT_SITE: "Зайти на Ñайт",
CONTINUE: "Продолжить"
}
},
ot = class {
constructor() {}
Get(t, e = "EN") {
return st[e] ? st[e][t] : st.EN[t]
}
getTranslation(t) {
return st[t] ? st[t] : st.EN
}
};
return class t {
constructor(t) {
h(this, "Version", "2.7.2"), h(this, "Registry"), h(this, "Hooks"), h(this, "SafeFrame"), h(this, "AMP"), h(this, "URL"), h(this, "DOM"), h(this, "TCF"), h(this, "Net"), h(this, "Tracker"), h(this, "Code"), h(this, "CodeUtils"), h(this, "Translation"), h(this, "Cookie"), h(this, "Callback"), "object" == typeof t.trackers && (t.trackers = Object.values(t.trackers));
const e = t,
{
forbiddenUrls: i
} = e,
n = ((t, e) => {
var i = {};
for (var n in t) o.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
if (null != t && s)
for (var n of s(t)) e.indexOf(n) < 0 && r.call(t, n) && (i[n] = t[n]);
return i
})(e, ["forbiddenUrls"]);
this.DOM = new X(n.group), this.URL = new it(i, this.DOM), this.AMP = new T(this.URL, this.DOM), this.Callback = new L(this.DOM, this.URL), this.SafeFrame = new w(this.URL), this.Registry = new x(n, this.SafeFrame, this.AMP, this.URL, this.DOM), this.TCF = new tt(this.Registry), this.Net = new J(this.Version, this.DOM, this.Registry, this.URL, this.AMP, this.TCF), this.Hooks = new Q, this.Translation = new ot, this.Cookie = new Y(this.Registry), this.Tracker = new et(this.Registry, this.TCF, this.Cookie), this.CodeUtils = new Z(this.DOM, this.Callback, this.URL), this.Code = new j(this.Registry, this.DOM, this.AMP, this.Net, this.CodeUtils, this.SafeFrame, this.Cookie, this.Tracker, this.Hooks, this.Callback, this.URL, this.TCF, this.Translation), this.dynamicUrl()
}
static get Init() {
return class extends t {
constructor(...t) {
var e;
13 === t.length && (t.splice(11, 1), t.splice(10, 1), t.splice(3, 1), t.splice(3, 1));
super({
hosts: null != (e = t[0]) ? e : [],
trackers: t[1],
group: t[2],
timeout: t[3],
internalRef: t[4],
whitelistDomains: t[5],
whitelistApps: t[6],
forbiddenUrls: t[7],
callbackUrl: t[8]
})
}
}
}
dynamicUrl() {
if ("undefined" != typeof window) {
const t = window.location.hostname;
for (const e of u) e.test(t) && (this.Registry.Whitelist = this.Registry.Whitelist.concat(t))
}
}
exec() {
return c(this, null, (function*() {
if (this.Hooks.Call(this.Hooks.Events.Generic.beforeRun, []), this.Registry.Latency.Start = new Date, !this.Registry.CallbackUrl) return this.Hooks.Call(this.Hooks.Events.Generic.afterRun, []), !1;
if (!(yield this.Net.inject(this.Registry.CallbackUrl))) return void x._debug("Callback URL not injected");
if (x._debug("UI Loaded"), this.Registry.Latency.End = new Date, this.Hooks.Call(this.Hooks.Events.Generic.afterUI, []), this.AMP.isEnabled() && this.AMP.exists()) return x._debug("Loading via AMP observer"), this.AMP.registerViewObserver((() => this.LoaderCode())), !0;
const t = (this.TCF.isRequired() || this.TCF.isEnabled()) && this.TCF.exists();
return x.group.DOMLoad ? t ? (x._debug("Loading via event TCF"), O((() => this.TCF.registerEventListeners())), !0) : (x._debug("Loading via listener"), O((() => this.LoaderCode())), !0) : t ? (x._debug("Loading via TCF"), this.TCF.registerEventListeners((() => this.LoaderCode())), !0) : (x._debug("Load normally"), this.Hooks.Call(this.Hooks.Events.Generic.afterRun, []), this.LoaderCode())
}))
}
LoaderCode() {
return c(this, null, (function*() {
var t, e, i, s, o, r, n, a;
const l = window.CLEVER_CALLBACK_LOAD;
l && ("string" == typeof l && this.URL.validateUrl(l) ? yield this.Net.inject(l): "function" == typeof l && l());
const h = this.Net.buildURI("https://call.cleverwebserver.com", {
id: x.group.ID,
c: null != (t = x.User.CTR) ? t : "",
r: null != (e = x.User.Region) ? e : "",
l: this.Registry.Latency.End.getTime() - this.Registry.Latency.Start.getTime(),
b: null != (i = x.User.Browser) ? i : "",
os: null != (s = x.User.Platform) ? s : "",
mob: null != (o = x.User.Mobile) ? o : 0,
v: this.Version,
lg: navigator.language,
ref: window.btoa(null != (r = this.Registry.getLocationHref()) ? r : ""),
ruri: window.btoa(this.URL.GetExternalReferer()),
s: null != (n = x.User.s) ? n : "",
st: null != (a = x.group.ads_script_type) ? a : ""
});
this.DOM.customFetch(h);
return !!this.Code.Exec() || (console.warn("Tracker ID not found"), !1)
}))
}
}
})().Init)(null, [{
Expires: 20,
ID: 1055266,
Type: "pushdownSponsorClick",
Simultaneity: 1,
SimultaneityGap: 0,
File: null,
FileW: null,
FileH: null,
script_type: null,
OnlyMasterDomain: 1,
Iframe: null,
Sort: 2,
TrackerID: 750712,
CTR: "IN",
Region: "",
Landing: "stake",
Vertical: "sports",
AllowMobile: 1,
Tracker: "https://stake.com/?c=YSBAPKFACCDAAIN",
DisableCountry: "TR",
Wait: 0,
Theme: "LIGHT",
DOMLoad: 0,
TargetURL: null,
OnlyMobile: 0,
GroupID: 84071,
Platform: null,
IframeTraffic: null,
Zoom: "1.00",
RoomID: 447,
ClientID: 1,
multiproduct: 0,
cap: null,
is_forbidden_enabled: 1,
publisher_app_id: null,
bundleId: null
}, {
Expires: 20,
ID: 1055267,
Type: "pushdownSponsorClick",
Simultaneity: 1,
SimultaneityGap: 0,
File: null,
FileW: null,
FileH: null,
script_type: null,
OnlyMasterDomain: 1,
Iframe: null,
Sort: 3,
TrackerID: 750713,
CTR: "IN",
Region: "",
Landing: "stake",
Vertical: "sports",
AllowMobile: 1,
Tracker: "https://stake.com/?c=YSBAPKFACCMAAIN",
DisableCountry: "TR",
Wait: 0,
Theme: "LIGHT",
DOMLoad: 0,
TargetURL: null,
OnlyMobile: 1,
GroupID: 84071,
Platform: null,
IframeTraffic: null,
Zoom: "1.00",
RoomID: 447,
ClientID: 1,
multiproduct: 0,
cap: null,
is_forbidden_enabled: 1,
publisher_app_id: null,
bundleId: null
}], {
ID: 84071,
UniqueID: "ee0ec0f6-5568-11ef-ad2b-06f0639468d1",
Expire: 20,
ExpireMobile: 20,
Wait: 0,
AutoClose: 0,
Name: "CleverADS Integration",
Alias: null,
Obs: "AP_08.08.2024: Tier 4",
Obs2: "career-shiksha.com",
IframeTraffic: null,
DisableCountry: "AF,IQ,KP,LR,LY,SD,SY,RU,FI,ES,NL,EE,HU,TR",
LastDayHits: 0,
LastDayGarbageHits: 0,
TopGarbage: null,
Subdomains: 0,
ParentID: 301,
DisableMobile: 0,
Version: "2024-08-08 09:35:02",
Active: 1,
DOMLoad: 0,
SellerID: 0,
Theme: "LIGHT",
Price: null,
Type: 0,
DisableIframes: 0,
UseOverlay: 1,
UseLink: 0,
Top: null,
Category: "n/d",
NoFilter: 0,
PayPerUnique: 0,
DisableRequestVerification: 0,
GarbageTracker: null,
Domain: "clevernt.com",
TriggerTimer: 0,
AnimationTimer: 0,
FirstHit: null,
GlobalTriggerTimer: 0,
IsCustomer: 0,
Disabled: 0,
WhitelistGB: 0,
WhitelistGR: 0,
WhitelistGI: 0,
WhitelistMT: 0,
WhitelistAU: 0,
WhitelistRU: 0,
WhitelistNL: 0,
WhitelistIT: 0,
WhitelistCA_ON: 0,
WhitelistUS: 0,
WhitelistWW: 0,
WhitelistSkybetGB: 0,
WhitelistCleverGR: 0,
WhitelistCleverWW: 1,
WhitelistUnibetGB: 0,
WhitelistSportiumES: 0,
BlockFacebookApp: 1,
CleverCore: 1,
Builder: 1,
DailyReport: 0,
TCF: 0,
AMP: 0,
SafeFrame: 0,
CoreSender: 1,
TS: 1,
last_build_date: "2024-08-08 09:35:02",
ads_deal_type: "CPM",
ads_amount: "0.00",
ads_currency_code: "USD",
ads_script_type: "W",
multiproduct: 0,
dynamic_formats: 0
}, 0, null, ["career-shiksha.com"], [], [], "https://ui.cleverwebserver.com"), window.CleverCore = t, window.CleverCore.Registry.Debug("v" + window.CleverCore.Version), window.CleverCore.Registry.Debug(window.CleverCore.Registry.Group.ID), window.CleverCore.Registry.Debug("2024-08-08 09:35:03"), window.CleverCore.Registry.Group.Disabled ? window.CleverCore.Registry.Debug("Script disabled") : window.CleverCore.Registry.Group.TriggerTimer > 0 ? (window.CleverCore.Registry.Debug("Waiting for " + window.CleverCore.Registry.Group.TriggerTimer + " millisecond(s)..."), setTimeout((function() {
window.CleverCore.exec()
}), window.CleverCore.Registry.Group.TriggerTimer)) : window.CleverCore.exec())
}();
7
1
50KB
206KB
132.0ms
185.0ms
191.0ms