powered-ad-config 0.1.99 → 0.1.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/powered-ad-config.es.js +291 -270
- package/dist/powered-ad-config.umd.js +19 -6
- package/package.json +1 -1
|
@@ -29,14 +29,40 @@ var e = (e, t, n) => {
|
|
|
29
29
|
return n?.tagName?.toLowerCase() === t.toLowerCase() ? n : null;
|
|
30
30
|
}, c = (e, t) => {
|
|
31
31
|
e && t && e.setAttribute("poweredAC", t);
|
|
32
|
-
}, l =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
}, l = (e, t = window) => {
|
|
33
|
+
if (!e || !t) return null;
|
|
34
|
+
for (let n of e.querySelectorAll("iframe")) try {
|
|
35
|
+
if (n.contentWindow === t) return n;
|
|
36
|
+
} catch {}
|
|
37
|
+
return null;
|
|
38
|
+
}, u = (e) => !!(e?.body && (e.querySelector("#app") || e.querySelector("main") || e.querySelector("[id^=\"adspot-mobile-mbanner\"]") || e.querySelector("[data-ad-target=\"page-container\"]"))), d = (e = window) => {
|
|
39
|
+
let t = e, n = e.frameElement ?? null;
|
|
40
|
+
for (; t !== t.parent;) {
|
|
41
|
+
let e = t.parent, r;
|
|
42
|
+
try {
|
|
43
|
+
r = e.document, r.location.href;
|
|
44
|
+
} catch {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
if (u(r)) {
|
|
48
|
+
let i = n;
|
|
49
|
+
return (!i || i.ownerDocument !== r) && (i = l(r, t)), {
|
|
50
|
+
win: e,
|
|
51
|
+
doc: r,
|
|
52
|
+
iframe: i
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
n = l(r, t), t = e;
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}, f = "1300px", p = "#ffffff", m = (l) => {
|
|
59
|
+
let u = window.frameElement ? window.frameElement : null;
|
|
60
|
+
if (!u) return () => {};
|
|
61
|
+
let d = window.parent;
|
|
62
|
+
if (!d || d === window) return () => {};
|
|
37
63
|
let m = null;
|
|
38
64
|
try {
|
|
39
|
-
m =
|
|
65
|
+
m = d.document, d.location.href;
|
|
40
66
|
} catch {
|
|
41
67
|
return () => {};
|
|
42
68
|
}
|
|
@@ -94,7 +120,7 @@ var e = (e, t, n) => {
|
|
|
94
120
|
adNodeMarginTop: 0,
|
|
95
121
|
adNodeMarginBottom: 0,
|
|
96
122
|
iframeWidth: "100vw",
|
|
97
|
-
iframeHeight:
|
|
123
|
+
iframeHeight: f,
|
|
98
124
|
iframeTop: "0",
|
|
99
125
|
responsiveScroll: -120,
|
|
100
126
|
xPosHalfpage: 722,
|
|
@@ -110,7 +136,7 @@ var e = (e, t, n) => {
|
|
|
110
136
|
adNodeMarginTop: 0,
|
|
111
137
|
adNodeMarginBottom: 0,
|
|
112
138
|
iframeWidth: "100vw",
|
|
113
|
-
iframeHeight:
|
|
139
|
+
iframeHeight: f,
|
|
114
140
|
responsiveScroll: -124,
|
|
115
141
|
xPosHalfpage: 720,
|
|
116
142
|
yPosHalfpage: 32,
|
|
@@ -164,9 +190,9 @@ var e = (e, t, n) => {
|
|
|
164
190
|
}
|
|
165
191
|
], O = () => {
|
|
166
192
|
let e = window.document.getElementById("nineContent");
|
|
167
|
-
if (e && (e.style.backgroundColor = L.siteBackgroundColor), N(), M(), j(),
|
|
193
|
+
if (e && (e.style.backgroundColor = L.siteBackgroundColor), N(), M(), j(), d.addEventListener("scroll", I), R = setTimeout(I, 50), L === T || L === E) {
|
|
168
194
|
let e = L === T || L === E ? x() : null, t = e?.appRoot || S() || m.body, n = e?.desktopHeaderAds || m.querySelector("#desktop-header-ads");
|
|
169
|
-
t &&
|
|
195
|
+
t && d.MutationObserver && (g = new d.MutationObserver(() => {
|
|
170
196
|
F();
|
|
171
197
|
}), g.observe(t, {
|
|
172
198
|
childList: !0,
|
|
@@ -176,13 +202,13 @@ var e = (e, t, n) => {
|
|
|
176
202
|
subtree: !0,
|
|
177
203
|
attributes: !0,
|
|
178
204
|
attributeFilter: ["class"]
|
|
179
|
-
})),
|
|
205
|
+
})), d.addEventListener("resize", F), F();
|
|
180
206
|
}
|
|
181
207
|
}, k = () => {
|
|
182
208
|
let e = null;
|
|
183
209
|
return e = m.querySelector("div[id*=\"billboard\"][id*=\"above\"]"), e;
|
|
184
210
|
}, A = () => {
|
|
185
|
-
let e =
|
|
211
|
+
let e = d.location.href;
|
|
186
212
|
for (let t = 0; t < D.length; t += 1) if (e.indexOf(D[t].site) >= 0) return D[t].config;
|
|
187
213
|
try {
|
|
188
214
|
let t = new URL(e), n = t.hostname.toLowerCase(), r = t.pathname.toLowerCase();
|
|
@@ -197,30 +223,30 @@ var e = (e, t, n) => {
|
|
|
197
223
|
let e = m.querySelector("div[id*=\"halfpage\"][id*=\"above\"]");
|
|
198
224
|
if (!e) return;
|
|
199
225
|
let t = e;
|
|
200
|
-
for (let e = 0; e < 6; e++) if (t = t.parentNode, t &&
|
|
226
|
+
for (let e = 0; e < 6; e++) if (t = t.parentNode, t && d.getComputedStyle(t).position === "sticky") {
|
|
201
227
|
t.style.top = `${L.stickyMargin.offset}px`;
|
|
202
228
|
break;
|
|
203
229
|
}
|
|
204
230
|
}, M = () => {
|
|
205
|
-
if (!
|
|
206
|
-
let e =
|
|
207
|
-
e.width = L.iframeWidth || "100%", e.height = L.iframeHeight ||
|
|
208
|
-
let t =
|
|
231
|
+
if (!u) return;
|
|
232
|
+
let e = u.style;
|
|
233
|
+
e.width = L.iframeWidth || "100%", e.height = L.iframeHeight || f, e.backgroundColor = L.iframeBackgroundColor || p, e.position = "fixed", L.iframeTop == null ? e.removeProperty("top") : e.top = L.iframeTop, e.left = "50%", e.transform = "translate(-50%, 0)";
|
|
234
|
+
let t = u.parentElement;
|
|
209
235
|
for (; t && t !== m.body && t !== m.documentElement;) {
|
|
210
|
-
let e =
|
|
236
|
+
let e = d.getComputedStyle(t);
|
|
211
237
|
e.transform && e.transform !== "none" && (t.style.transform = "none"), e.willChange && e.willChange !== "auto" && (t.style.willChange = "auto"), e.contain && e.contain !== "none" && (t.style.contain = "none"), e.filter && e.filter !== "none" && (t.style.filter = "none"), e.perspective && e.perspective !== "none" && (t.style.perspective = "none"), e.overflow !== "visible" && (t.style.overflow = "visible"), t = t.parentElement;
|
|
212
238
|
}
|
|
213
239
|
}, N = () => {
|
|
214
240
|
let e = k();
|
|
215
241
|
if (!e) return;
|
|
216
|
-
c(e, "0.1.
|
|
242
|
+
c(e, "0.1.101");
|
|
217
243
|
let t = e.style;
|
|
218
244
|
e.className &&= "", t.minHeight = "250px", t.marginTop = L.adNodeMarginTop + "px", t.marginBottom = L.adNodeMarginBottom + "px", t.position = "static", t.display = "block", L.zIndex && L.zIndex();
|
|
219
245
|
}, P = () => {
|
|
220
|
-
let e =
|
|
246
|
+
let e = d.scrollY, t = u.style, n = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
221
247
|
e >= 0 && e <= z ? (t.transform = `translate(-50%, ${-e}px)`, n.transform = "translateY(0)") : e > z && e <= B ? (t.transform = `translate(-50%, ${-z}px)`, n.transform = `translateY(${z - e}px)`) : e > B && (t.transform = `translate(-50%, ${-z}px)`, n.transform = "translateY(-250px)");
|
|
222
248
|
}, F = () => {
|
|
223
|
-
L !== T && L !== E || h || (h =
|
|
249
|
+
L !== T && L !== E || h || (h = d.requestAnimationFrame(() => {
|
|
224
250
|
h = null, M(), N(), j(), P();
|
|
225
251
|
}));
|
|
226
252
|
}, I = () => {
|
|
@@ -229,11 +255,11 @@ var e = (e, t, n) => {
|
|
|
229
255
|
k();
|
|
230
256
|
let L = A();
|
|
231
257
|
if (!L) return () => {};
|
|
232
|
-
let R = null, z =
|
|
258
|
+
let R = null, z = l, B = z + 250;
|
|
233
259
|
return O(), () => {
|
|
234
|
-
|
|
260
|
+
d.removeEventListener("scroll", I), d.removeEventListener("resize", F), g &&= (g.disconnect(), null), h &&= (d.cancelAnimationFrame(h), null), R &&= (clearTimeout(R), null);
|
|
235
261
|
};
|
|
236
|
-
},
|
|
262
|
+
}, h = (o) => {
|
|
237
263
|
let c = window.frameElement ? window.frameElement : null;
|
|
238
264
|
if (!c) return () => {};
|
|
239
265
|
let l = window.parent;
|
|
@@ -396,39 +422,39 @@ var e = (e, t, n) => {
|
|
|
396
422
|
return C(), () => {
|
|
397
423
|
l.removeEventListener("scroll", N), I &&= (clearTimeout(I), null);
|
|
398
424
|
};
|
|
399
|
-
},
|
|
425
|
+
}, g = 866, _ = 68, v = 16, y = ":scope > header h1, :scope > header h2, :scope > header h3", b = "h1, h2, h3", x = "#app main header h1, #app main header h2, #app main header h3, #app h1, #app h2, #app h3", S = "adspot-desktop-takeover-2-above", C = -24, w = -24, T = [
|
|
400
426
|
"www.nine.com.au",
|
|
401
427
|
"staging.nine.com.au",
|
|
402
428
|
"preview.nine.com.au",
|
|
403
429
|
"render-web-nine-staging-v1.ffxblue.com.au",
|
|
404
430
|
"render-web-nine-production-v1.ffxblue.com.au"
|
|
405
|
-
],
|
|
406
|
-
hostnames:
|
|
431
|
+
], E = [{
|
|
432
|
+
hostnames: T,
|
|
407
433
|
path: "/sport",
|
|
408
434
|
headingText: "Sport",
|
|
409
|
-
slotId:
|
|
410
|
-
}],
|
|
435
|
+
slotId: S
|
|
436
|
+
}], D = new Set(["localhost", "127.0.0.1"]), O = "__poweredAdConfigDynamicHeadingActive", k = "data-pac-dynamicheading-owner", A = "data-pac-reparented", j = (e, t) => {
|
|
411
437
|
if (typeof e == "number" && Number.isFinite(e)) return `${e}px`;
|
|
412
438
|
if (typeof e == "string") {
|
|
413
439
|
let n = e.trim();
|
|
414
440
|
return n ? /^-?\d+(\.\d+)?$/.test(n) ? `${n}px` : n : `${t}px`;
|
|
415
441
|
}
|
|
416
442
|
return `${t}px`;
|
|
417
|
-
},
|
|
443
|
+
}, M = (e) => {
|
|
418
444
|
if (!e || typeof e != "object") return null;
|
|
419
445
|
let t = typeof e.headingText == "string" ? e.headingText.trim() : "", n = typeof e.path == "string" ? e.path.trim().toLowerCase() : "", r = typeof e.pathPrefix == "string" ? e.pathPrefix.trim().toLowerCase() : "", i = Array.isArray(e.hostnames) ? e.hostnames.map((e) => String(e).trim().toLowerCase()).filter(Boolean) : [];
|
|
420
446
|
return !t || !n && !r ? null : {
|
|
421
447
|
headingText: t,
|
|
422
448
|
path: n || null,
|
|
423
449
|
pathPrefix: r || null,
|
|
424
|
-
slotId: typeof e.slotId == "string" && e.slotId.trim() ? e.slotId.trim() :
|
|
425
|
-
hostnames: i.length ? i :
|
|
450
|
+
slotId: typeof e.slotId == "string" && e.slotId.trim() ? e.slotId.trim() : S,
|
|
451
|
+
hostnames: i.length ? i : T
|
|
426
452
|
};
|
|
427
|
-
},
|
|
428
|
-
if (!Array.isArray(e) || e.length === 0) return
|
|
429
|
-
let t = e.map(
|
|
430
|
-
return t.length ? t :
|
|
431
|
-
},
|
|
453
|
+
}, N = (e) => {
|
|
454
|
+
if (!Array.isArray(e) || e.length === 0) return E;
|
|
455
|
+
let t = e.map(M).filter(Boolean);
|
|
456
|
+
return t.length ? t : E;
|
|
457
|
+
}, P = ({ offsetTop: e = C, offsetLeft: t = w, width: n = g, height: i = _, pageTargets: a = E } = {}) => {
|
|
432
458
|
let o = window.frameElement || null;
|
|
433
459
|
if (!o) return () => {};
|
|
434
460
|
let s = window.parent;
|
|
@@ -439,7 +465,7 @@ var e = (e, t, n) => {
|
|
|
439
465
|
} catch {
|
|
440
466
|
return () => {};
|
|
441
467
|
}
|
|
442
|
-
let l = s[
|
|
468
|
+
let l = s[O];
|
|
443
469
|
if (l?.iframe === o && typeof l.cleanup == "function") return l.cleanup;
|
|
444
470
|
if (l?.iframe?.isConnected && typeof l?.cleanup == "function") return () => {};
|
|
445
471
|
typeof l?.cleanup == "function" && l.cleanup();
|
|
@@ -448,11 +474,11 @@ var e = (e, t, n) => {
|
|
|
448
474
|
}, f = () => {
|
|
449
475
|
try {
|
|
450
476
|
let e = window.location.hostname.toLowerCase();
|
|
451
|
-
return
|
|
477
|
+
return D.has(e) ? !0 : new URLSearchParams(window.location.search).get("keepDynamicHeadingVisible") === "1";
|
|
452
478
|
} catch {
|
|
453
479
|
return !1;
|
|
454
480
|
}
|
|
455
|
-
},
|
|
481
|
+
}, p = (e = o.parentElement) => {
|
|
456
482
|
let t = e;
|
|
457
483
|
for (; t && t !== c.body;) {
|
|
458
484
|
let e = t.id || "", n = t.getAttribute?.("data-testid") || "", r = t.getAttribute?.("type") || "";
|
|
@@ -460,7 +486,7 @@ var e = (e, t, n) => {
|
|
|
460
486
|
t = t.parentElement;
|
|
461
487
|
}
|
|
462
488
|
return o.parentElement;
|
|
463
|
-
},
|
|
489
|
+
}, m = () => {
|
|
464
490
|
try {
|
|
465
491
|
let e = new URL(s.location.href), t = e.hostname.toLowerCase(), n = e.pathname.toLowerCase();
|
|
466
492
|
return B.find((e) => {
|
|
@@ -471,20 +497,20 @@ var e = (e, t, n) => {
|
|
|
471
497
|
return null;
|
|
472
498
|
}
|
|
473
499
|
return null;
|
|
474
|
-
},
|
|
500
|
+
}, h = () => {
|
|
475
501
|
let e = r(c, "app") || c.getElementById("app") || c, t = r(e, "page-container") || e;
|
|
476
502
|
return r(r(t, "container") || t, "main") || r(e, "main") || c.querySelector("#app main") || null;
|
|
477
|
-
},
|
|
503
|
+
}, S = (e) => {
|
|
478
504
|
if (!e || !e.isConnected) return !1;
|
|
479
505
|
let t = e.getBoundingClientRect();
|
|
480
506
|
if (t.width <= 0 || t.height <= 0) return !1;
|
|
481
507
|
let n = s.getComputedStyle(e);
|
|
482
508
|
return n.display !== "none" && n.visibility !== "hidden";
|
|
483
|
-
},
|
|
484
|
-
let e =
|
|
485
|
-
return Array.from(new Set([...t, ...n])).filter(
|
|
486
|
-
},
|
|
487
|
-
let t =
|
|
509
|
+
}, T = () => {
|
|
510
|
+
let e = h(), t = e ? [...e.querySelectorAll(y), ...e.querySelectorAll(b)] : [], n = t.length ? [] : Array.from(c.querySelectorAll(x));
|
|
511
|
+
return Array.from(new Set([...t, ...n])).filter(S);
|
|
512
|
+
}, M = (e) => {
|
|
513
|
+
let t = T();
|
|
488
514
|
if (!t.length) return null;
|
|
489
515
|
let n = typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
490
516
|
if (n) {
|
|
@@ -494,13 +520,13 @@ var e = (e, t, n) => {
|
|
|
494
520
|
return t.find((e) => e.tagName === "H1") || t[0] || null;
|
|
495
521
|
}, P = null, F = null;
|
|
496
522
|
f();
|
|
497
|
-
let I =
|
|
523
|
+
let I = j(e, C), L = j(t, w), R = j(n, g), z = j(i, _), B = N(a), V = m();
|
|
498
524
|
if (!V) return () => {};
|
|
499
|
-
let H =
|
|
525
|
+
let H = p((V.slotId ? c.getElementById(V.slotId) : null) || o.parentElement);
|
|
500
526
|
if (!H) return () => {};
|
|
501
|
-
let U = H.getAttribute(
|
|
527
|
+
let U = H.getAttribute(k);
|
|
502
528
|
if (U && U !== u) return () => {};
|
|
503
|
-
let
|
|
529
|
+
let W = {
|
|
504
530
|
width: H.style.width,
|
|
505
531
|
maxWidth: H.style.maxWidth,
|
|
506
532
|
minWidth: H.style.minWidth,
|
|
@@ -521,28 +547,28 @@ var e = (e, t, n) => {
|
|
|
521
547
|
pointerEvents: H.style.pointerEvents,
|
|
522
548
|
zIndex: H.style.zIndex,
|
|
523
549
|
overflow: H.style.overflow
|
|
524
|
-
},
|
|
550
|
+
}, ee = {
|
|
525
551
|
width: o.style.width,
|
|
526
552
|
height: o.style.height,
|
|
527
553
|
display: o.style.display,
|
|
528
554
|
border: o.style.border,
|
|
529
555
|
position: o.style.position,
|
|
530
556
|
pointerEvents: o.style.pointerEvents
|
|
531
|
-
}, G = [], K = parseFloat(z) ||
|
|
557
|
+
}, G = [], K = parseFloat(z) || _, te = parseFloat(I) || 0, q = parseFloat(L) || 0, J = () => {
|
|
532
558
|
let e = H.parentElement;
|
|
533
559
|
for (; e && e !== c.body;) G.push({
|
|
534
560
|
element: e,
|
|
535
561
|
overflow: e.style.overflow
|
|
536
562
|
}), d(e, "overflow", "visible"), e = e.parentElement;
|
|
537
|
-
},
|
|
538
|
-
d(H, "width", R), d(H, "maxWidth", R), d(H, "minWidth", R), d(H, "height", z), d(H, "minHeight", z), d(H, "display", "block"), d(H, "overflow", "hidden"), d(H, "pointerEvents", "none"), d(H, "zIndex", "1080"), H.setAttribute(
|
|
539
|
-
},
|
|
563
|
+
}, ne = () => {
|
|
564
|
+
d(H, "width", R), d(H, "maxWidth", R), d(H, "minWidth", R), d(H, "height", z), d(H, "minHeight", z), d(H, "display", "block"), d(H, "overflow", "hidden"), d(H, "pointerEvents", "none"), d(H, "zIndex", "1080"), H.setAttribute(k, u), d(o, "width", R), d(o, "height", z), d(o, "display", "block"), d(o, "border", "0"), d(o, "position", "relative"), d(o, "pointerEvents", "auto");
|
|
565
|
+
}, re = {
|
|
540
566
|
element: null,
|
|
541
567
|
position: ""
|
|
542
|
-
},
|
|
568
|
+
}, Y = () => {
|
|
543
569
|
let e = H.parentElement;
|
|
544
|
-
e && s.getComputedStyle(e).position === "static" && (
|
|
545
|
-
},
|
|
570
|
+
e && s.getComputedStyle(e).position === "static" && (re.element = e, re.position = e.style.position, d(e, "position", "relative")), d(H, "position", "absolute"), d(H, "top", `${te}px`), d(H, "left", `${q}px`), d(H, "right", "auto"), d(H, "marginTop", "0px"), d(H, "marginBottom", `${v}px`), d(H, "marginLeft", "0px"), d(H, "marginRight", "0px"), d(H, "transform", "");
|
|
571
|
+
}, ie = (e) => {
|
|
546
572
|
let t = null;
|
|
547
573
|
try {
|
|
548
574
|
let e = o.contentDocument;
|
|
@@ -558,54 +584,54 @@ var e = (e, t, n) => {
|
|
|
558
584
|
return !1;
|
|
559
585
|
}
|
|
560
586
|
if (!t) return !1;
|
|
561
|
-
o.setAttribute(
|
|
587
|
+
o.setAttribute(A, "1");
|
|
562
588
|
try {
|
|
563
589
|
e.parentNode?.insertBefore(H, e);
|
|
564
590
|
} catch {
|
|
565
|
-
return o.removeAttribute(
|
|
591
|
+
return o.removeAttribute(A), !1;
|
|
566
592
|
}
|
|
567
|
-
|
|
593
|
+
J(), ne(), Y();
|
|
568
594
|
try {
|
|
569
595
|
o.srcdoc = t;
|
|
570
596
|
} catch {
|
|
571
597
|
return !1;
|
|
572
598
|
}
|
|
573
599
|
return !0;
|
|
574
|
-
},
|
|
600
|
+
}, ae = () => {
|
|
575
601
|
d(H, "position", "fixed"), d(H, "marginTop", "0px"), d(H, "marginBottom", "0px"), d(H, "marginLeft", "0px"), d(H, "marginRight", "0px"), d(H, "transform", "");
|
|
576
|
-
},
|
|
602
|
+
}, oe = () => {
|
|
577
603
|
d(H, "display", "none");
|
|
578
|
-
},
|
|
604
|
+
}, se = () => {
|
|
579
605
|
d(H, "display", "block"), d(H, "overflow", "hidden");
|
|
580
|
-
},
|
|
581
|
-
if ((!
|
|
582
|
-
let e =
|
|
606
|
+
}, X = null, Z = () => {
|
|
607
|
+
if ((!X || !X.isConnected) && (X = M(V.headingText)), !X) return;
|
|
608
|
+
let e = X.getBoundingClientRect(), t = e.top - K - v + te, n = e.left + q;
|
|
583
609
|
d(H, "top", `${t}px`), d(H, "left", `${n}px`), d(H, "right", "auto");
|
|
584
|
-
},
|
|
585
|
-
if (
|
|
586
|
-
e > 1 && (F = s.setTimeout(() =>
|
|
610
|
+
}, Q = null, $ = null, ce = !1, le = (e = 12) => {
|
|
611
|
+
if (X = M(V.headingText), !X) {
|
|
612
|
+
e > 1 && (F = s.setTimeout(() => le(e - 1), 250));
|
|
587
613
|
return;
|
|
588
614
|
}
|
|
589
|
-
|
|
615
|
+
ie(X) || (ce = !0, J(), ne(), ae(), Z(), Q = () => Z(), $ = () => Z(), s.addEventListener("scroll", Q, { passive: !0 }), s.addEventListener("resize", $));
|
|
590
616
|
};
|
|
591
|
-
|
|
592
|
-
let
|
|
593
|
-
F &&= (s.clearTimeout(F), null), P &&= (s.clearTimeout(P), null),
|
|
617
|
+
le();
|
|
618
|
+
let ue = () => {
|
|
619
|
+
F &&= (s.clearTimeout(F), null), P &&= (s.clearTimeout(P), null), Q &&= (s.removeEventListener("scroll", Q), null), $ &&= (s.removeEventListener("resize", $), null), H.getAttribute(k) === u && H.removeAttribute(k), ce && (Object.entries(W).forEach(([e, t]) => {
|
|
594
620
|
H.style[e] = t;
|
|
595
|
-
}), Object.entries(
|
|
621
|
+
}), Object.entries(ee).forEach(([e, t]) => {
|
|
596
622
|
o.style[e] = t;
|
|
597
623
|
}), G.forEach(({ element: e, overflow: t }) => {
|
|
598
624
|
e.style.overflow = t;
|
|
599
|
-
})), s[
|
|
625
|
+
})), s[O]?.instanceId === u && delete s[O];
|
|
600
626
|
};
|
|
601
|
-
return s[
|
|
627
|
+
return s[O] = {
|
|
602
628
|
instanceId: u,
|
|
603
629
|
iframe: o,
|
|
604
|
-
cleanup:
|
|
605
|
-
show:
|
|
606
|
-
hide:
|
|
607
|
-
},
|
|
608
|
-
},
|
|
630
|
+
cleanup: ue,
|
|
631
|
+
show: se,
|
|
632
|
+
hide: oe
|
|
633
|
+
}, ue;
|
|
634
|
+
}, F = (e, t, n) => {
|
|
609
635
|
let r = window.frameElement ? window.frameElement : null;
|
|
610
636
|
if (!r) return () => {};
|
|
611
637
|
let i = window.parent;
|
|
@@ -850,11 +876,11 @@ var e = (e, t, n) => {
|
|
|
850
876
|
return p(), () => {
|
|
851
877
|
i.removeEventListener("scroll", y), w &&= (clearTimeout(w), null);
|
|
852
878
|
};
|
|
853
|
-
},
|
|
879
|
+
}, I = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
|
|
854
880
|
if (e === 0 || e === 1) return e;
|
|
855
881
|
let t = 2 * Math.PI / 3;
|
|
856
882
|
return 2 ** (-10 * e) * Math.sin((e * 10 - .75) * t) + 1;
|
|
857
|
-
}),
|
|
883
|
+
}), L = (e = {}) => {
|
|
858
884
|
let t = {
|
|
859
885
|
adScrollHeight: "300vh",
|
|
860
886
|
bandHeight: 24,
|
|
@@ -877,7 +903,7 @@ var e = (e, t, n) => {
|
|
|
877
903
|
snapOverlap: 2,
|
|
878
904
|
stretchOverlap: 20,
|
|
879
905
|
snapDuration: .9,
|
|
880
|
-
snapEase:
|
|
906
|
+
snapEase: I,
|
|
881
907
|
onEnter: null,
|
|
882
908
|
onExit: null,
|
|
883
909
|
onProgress: null,
|
|
@@ -921,7 +947,7 @@ var e = (e, t, n) => {
|
|
|
921
947
|
};
|
|
922
948
|
(() => {
|
|
923
949
|
let e = a.style;
|
|
924
|
-
e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.
|
|
950
|
+
e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.101"), e.clipPath = `inset(-${t.bandHeight - 1}px 0 0 0)`, e.overflow = "visible", e.width = "100vw", e.maxWidth = "100vw", e.marginLeft = "calc(50% - 50vw)", e.marginRight = "0", e.marginTop = "0", e.marginBottom = "0", e.padding = "0";
|
|
925
951
|
let o = a.parentElement;
|
|
926
952
|
for (let e = 0; e < 6 && o && o !== i.body; e++) {
|
|
927
953
|
let t = r.getComputedStyle(o), n = !1;
|
|
@@ -1026,7 +1052,7 @@ var e = (e, t, n) => {
|
|
|
1026
1052
|
e.style[t] = n || "";
|
|
1027
1053
|
});
|
|
1028
1054
|
};
|
|
1029
|
-
},
|
|
1055
|
+
}, R = (e = {}) => {
|
|
1030
1056
|
let t = {
|
|
1031
1057
|
adaptToWidth: "100%",
|
|
1032
1058
|
maxWidth: "400px",
|
|
@@ -1059,7 +1085,7 @@ var e = (e, t, n) => {
|
|
|
1059
1085
|
let o = a.getAttribute("style"), s = n.getAttribute("style"), c = n.parentElement === a ? null : n.parentElement, l = c ? c.getAttribute("style") : null, u = a.parentElement, d = u ? r.getComputedStyle(u).paddingTop : null, f = null, p = parseInt(n.getAttribute("width"), 10) || 320, m = parseInt(n.getAttribute("height"), 10) || 50;
|
|
1060
1086
|
return (() => {
|
|
1061
1087
|
let e = a.style;
|
|
1062
|
-
if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.
|
|
1088
|
+
if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.101"), c) {
|
|
1063
1089
|
let e = c.style;
|
|
1064
1090
|
e.width = "100%", e.height = "100%", e.margin = "0", e.textAlign = "left";
|
|
1065
1091
|
}
|
|
@@ -1074,7 +1100,7 @@ var e = (e, t, n) => {
|
|
|
1074
1100
|
})(), () => {
|
|
1075
1101
|
f &&= (f.disconnect(), null), o ? a.setAttribute("style", o) : a.removeAttribute("style"), s ? n.setAttribute("style", s) : n.removeAttribute("style"), c && (l ? c.setAttribute("style", l) : c.removeAttribute("style")), u && d && d !== "0px" && (u.style.paddingTop = d);
|
|
1076
1102
|
};
|
|
1077
|
-
},
|
|
1103
|
+
}, z = (e = {}) => {
|
|
1078
1104
|
let t = {
|
|
1079
1105
|
billboardHeight: 150,
|
|
1080
1106
|
sideStripWidth: 10,
|
|
@@ -1252,7 +1278,7 @@ var e = (e, t, n) => {
|
|
|
1252
1278
|
})(), p = f === u.smh || f === u.theage, m = n.getAttribute("style"), h = n.hasAttribute("data-mf-wallpaper-iframe"), g = a.getAttribute("style"), _ = n.parentElement === a ? null : n.parentElement, v = _ ? _.getAttribute("style") : null, y = a.parentElement, b = a.closest("[data-ad-target=\"header-ad-mobile\"]"), x = !!(y && b && y === b), S = x ? r.getComputedStyle(y).marginTop : "", C = y ? y.getAttribute("style") : null, w = s ? s.getAttribute("style") : null, T = o ? o.getAttribute("style") : null, E = o ? o.querySelector("header") : null, D = E ? E.getAttribute("style") : null, O = E ? E.querySelector(".sc-5cbbddda-1") : null, k = O ? O.getAttribute("style") : null, A = i.querySelector("footer"), j = A ? A.getAttribute("style") : null, M = o ? Array.from(o.children).map((e) => ({
|
|
1253
1279
|
el: e,
|
|
1254
1280
|
orig: e.getAttribute("style")
|
|
1255
|
-
})) : [], N = null, P = null, F = null, I = null, L = null, R = null, z = null, B = null, V = [], H = null, U = null,
|
|
1281
|
+
})) : [], N = null, P = null, F = null, I = null, L = null, R = null, z = null, B = null, V = [], H = null, U = null, W = null, ee = null, G = null, K = null, te = null, q = [], J = Number.isFinite(t.stickyDurationMs) && t.stickyDurationMs > 0, ne = Number.isFinite(t.stickyScrollDistance) && t.stickyScrollDistance > 0, re = !!(t.sticky && (J || ne)), Y = "pending", ie = 0, ae = 0, oe = null, se = null, X = null, Z = null, Q = null, $ = null, ce = [], le = Number.isFinite(t.stickyHeaderFallbackHeight) ? Math.max(0, t.stickyHeaderFallbackHeight) : null, ue = {
|
|
1256
1282
|
FLOW_SYNCED_BODY: "flowSyncedBody",
|
|
1257
1283
|
SPLIT_IN_FLOW: "splitInFlow",
|
|
1258
1284
|
IN_FLOW: "inFlow"
|
|
@@ -1266,24 +1292,24 @@ var e = (e, t, n) => {
|
|
|
1266
1292
|
}
|
|
1267
1293
|
return null;
|
|
1268
1294
|
})(), te = K ? K.getAttribute("style") : null;
|
|
1269
|
-
let
|
|
1270
|
-
if (!e || e ===
|
|
1295
|
+
let de = !!(o && f !== u.afr && (K || p)), fe = f === u.afr || x ? ue.FLOW_SYNCED_BODY : de ? ue.SPLIT_IN_FLOW : ue.IN_FLOW, pe = fe === ue.FLOW_SYNCED_BODY, me = (e) => {
|
|
1296
|
+
if (!e || e === W || e === y || e === a) return !1;
|
|
1271
1297
|
let t = e.firstElementChild;
|
|
1272
1298
|
if (!t || t !== e.lastElementChild || !t.classList.contains("container") || t.children.length > 0 || t.textContent && t.textContent.trim() || e.querySelector("[id^=\"adspot-mobile-mbanner-\"], iframe, [data-mf-slot], .adWrapper")) return !1;
|
|
1273
1299
|
let n = r.getComputedStyle(e);
|
|
1274
1300
|
return n.position === "fixed" || n.position === "sticky";
|
|
1275
|
-
},
|
|
1276
|
-
!e?.parentElement ||
|
|
1301
|
+
}, he = (e) => {
|
|
1302
|
+
!e?.parentElement || q.some((t) => t.shell === e) || (q.push({
|
|
1277
1303
|
shell: e,
|
|
1278
1304
|
parent: e.parentElement,
|
|
1279
1305
|
nextSibling: e.nextSibling
|
|
1280
1306
|
}), e.remove());
|
|
1281
|
-
},
|
|
1307
|
+
}, ge = () => {
|
|
1282
1308
|
for (let e of i.querySelectorAll(".container")) {
|
|
1283
1309
|
let t = e.parentElement;
|
|
1284
|
-
|
|
1310
|
+
me(t) && he(t);
|
|
1285
1311
|
}
|
|
1286
|
-
},
|
|
1312
|
+
}, _e = (e) => {
|
|
1287
1313
|
let t = e?.parentElement;
|
|
1288
1314
|
for (; t && t !== i.body && t !== i.documentElement;) {
|
|
1289
1315
|
let e = r.getComputedStyle(t);
|
|
@@ -1292,10 +1318,10 @@ var e = (e, t, n) => {
|
|
|
1292
1318
|
orig: t.getAttribute("style")
|
|
1293
1319
|
}), t.style.transform = "none", t.style.willChange = "auto", t.style.contain = "none", t.style.filter = "none", t.style.perspective = "none"), t = t.parentElement;
|
|
1294
1320
|
}
|
|
1295
|
-
},
|
|
1321
|
+
}, ve = () => {
|
|
1296
1322
|
let e = i.createElement("div");
|
|
1297
1323
|
return e.setAttribute("data-mf-billboard-mount", ""), e.style.height = `${t.billboardHeight}px`, e.style.minHeight = `${t.billboardHeight}px`, e.style.maxHeight = `${t.billboardHeight}px`, e.style.background = "transparent", e.style.overflow = "visible", e.style.position = "relative", e.style.width = "100%", e.style.padding = "0", e.style.margin = "0", e;
|
|
1298
|
-
},
|
|
1324
|
+
}, ye = () => {
|
|
1299
1325
|
if (!s || f !== u.wwos) return null;
|
|
1300
1326
|
let e = a.getBoundingClientRect().bottom, t = Array.from(s.querySelectorAll("div")).map((e) => {
|
|
1301
1327
|
let t = e.getBoundingClientRect(), n = r.getComputedStyle(e), i = e.querySelector("ul");
|
|
@@ -1308,7 +1334,7 @@ var e = (e, t, n) => {
|
|
|
1308
1334
|
};
|
|
1309
1335
|
}).filter(({ rect: t, styles: n, list: r, listStyles: i }) => !r || !i || t.top < e - 4 || t.top > e + 120 || n.overflow !== "hidden" || parseFloat(n.borderTopLeftRadius) < 4 ? !1 : i.overflow === "auto" || i.overflowX === "auto");
|
|
1310
1336
|
return t.length ? (t.sort((t, n) => Math.abs(t.rect.top - e) - Math.abs(n.rect.top - e)), t[0]) : null;
|
|
1311
|
-
},
|
|
1337
|
+
}, be = () => B || a, xe = () => !t.stickyRespectHeader || !t.stickyHeaderSelector ? [] : Array.from(i.querySelectorAll(t.stickyHeaderSelector)).map((e) => {
|
|
1312
1338
|
let t = e.getBoundingClientRect(), n = r.getComputedStyle(e), i = Number.parseInt(n.zIndex, 10);
|
|
1313
1339
|
return {
|
|
1314
1340
|
el: e,
|
|
@@ -1321,7 +1347,7 @@ var e = (e, t, n) => {
|
|
|
1321
1347
|
return e.length ? (e.sort((e, t) => t.rect.bottom - e.rect.bottom), e[0]) : null;
|
|
1322
1348
|
}, Ce = () => {
|
|
1323
1349
|
let e = Se();
|
|
1324
|
-
return e ? Math.max(t.stickyTop, Math.round(e.rect.bottom)) : Math.max(t.stickyTop,
|
|
1350
|
+
return e ? Math.max(t.stickyTop, Math.round(e.rect.bottom)) : Math.max(t.stickyTop, le || t.stickyTop);
|
|
1325
1351
|
}, we = () => {
|
|
1326
1352
|
let e = Se();
|
|
1327
1353
|
return e?.zIndex && e.zIndex > 2 ? Math.max(1, Math.min(t.stickyZIndex, e.zIndex - 1)) : t.stickyZIndex;
|
|
@@ -1333,92 +1359,92 @@ var e = (e, t, n) => {
|
|
|
1333
1359
|
remainingMs: Math.max(0, Math.round(n))
|
|
1334
1360
|
}, "*");
|
|
1335
1361
|
}, Ee = (e) => {
|
|
1336
|
-
!e ||
|
|
1362
|
+
!e || ce.some((t) => t.el === e) || ce.push({
|
|
1337
1363
|
el: e,
|
|
1338
1364
|
value: e.style.getPropertyValue("z-index"),
|
|
1339
1365
|
priority: e.style.getPropertyPriority("z-index")
|
|
1340
1366
|
});
|
|
1341
1367
|
}, De = (e) => {
|
|
1342
|
-
let t = new Set([
|
|
1368
|
+
let t = new Set([be()].filter(Boolean));
|
|
1343
1369
|
if (f === u.afr || K || p) {
|
|
1344
1370
|
[
|
|
1345
1371
|
a,
|
|
1346
1372
|
y,
|
|
1347
1373
|
c
|
|
1348
1374
|
].filter(Boolean).forEach((e) => t.add(e));
|
|
1349
|
-
let e =
|
|
1375
|
+
let e = be()?.parentElement;
|
|
1350
1376
|
for (; e && e !== i.body && e !== i.documentElement && (t.add(e), e.id !== "stickyLeaderboard");) e = e.parentElement;
|
|
1351
1377
|
}
|
|
1352
1378
|
for (let n of t) Ee(n), n.style.setProperty("z-index", String(e), "important");
|
|
1353
|
-
}, Oe = () =>
|
|
1354
|
-
if (!
|
|
1379
|
+
}, Oe = () => pe && (a.closest("#stickyLeaderboard") || i.querySelector("#stickyLeaderboard")) || be(), ke = () => {
|
|
1380
|
+
if (!pe || !R) return;
|
|
1355
1381
|
let e = R.style;
|
|
1356
1382
|
e.left = "0px", e.width = "100vw";
|
|
1357
1383
|
}, Ae = () => {
|
|
1358
|
-
if (!
|
|
1384
|
+
if (!pe || !R || Y === "active") return;
|
|
1359
1385
|
let e = Oe();
|
|
1360
1386
|
if (!e) return;
|
|
1361
1387
|
let t = e.getBoundingClientRect(), n = R.style;
|
|
1362
1388
|
n.position = "absolute", n.top = `${Math.round(r.scrollY + t.top)}px`, ke(), n.setProperty("z-index", "6", "important"), R.removeAttribute("data-mf-sticky-active");
|
|
1363
1389
|
}, je = () => {
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
}),
|
|
1367
|
-
|
|
1390
|
+
pe && (Ae(), X && r.cancelAnimationFrame(X), X = r.requestAnimationFrame(() => {
|
|
1391
|
+
X = null, Ae();
|
|
1392
|
+
}), Z && r.clearTimeout(Z), Z = r.setTimeout(() => {
|
|
1393
|
+
Z = null, Ae();
|
|
1368
1394
|
}, 350));
|
|
1369
1395
|
}, Me = () => {
|
|
1370
|
-
for (let e =
|
|
1371
|
-
let { el: t, value: n, priority: r } =
|
|
1396
|
+
for (let e = ce.length - 1; e >= 0; --e) {
|
|
1397
|
+
let { el: t, value: n, priority: r } = ce[e];
|
|
1372
1398
|
n ? t.style.setProperty("z-index", n, r) : t.style.removeProperty("z-index");
|
|
1373
1399
|
}
|
|
1374
|
-
|
|
1400
|
+
ce.length = 0;
|
|
1375
1401
|
}, Ne = () => {
|
|
1376
1402
|
if (!R) return;
|
|
1377
|
-
|
|
1378
|
-
let e =
|
|
1403
|
+
_e(be());
|
|
1404
|
+
let e = be().getBoundingClientRect(), t = we();
|
|
1379
1405
|
De(t);
|
|
1380
1406
|
let n = R.style;
|
|
1381
|
-
n.position = "fixed", n.top = `${Ce()}px`,
|
|
1407
|
+
n.position = "fixed", n.top = `${Ce()}px`, pe ? ke() : (n.left = `${Math.round(e.left)}px`, n.width = `${Math.round(e.width)}px`), n.setProperty("z-index", String(t), "important"), R.setAttribute("data-mf-sticky-active", "");
|
|
1382
1408
|
}, Pe = () => {
|
|
1383
1409
|
if (!R) return;
|
|
1384
|
-
if (
|
|
1410
|
+
if (pe) {
|
|
1385
1411
|
je(), Me();
|
|
1386
1412
|
return;
|
|
1387
1413
|
}
|
|
1388
1414
|
let e = R.style;
|
|
1389
1415
|
e.position = "relative", e.top = "", e.left = "", e.width = "100%", e.setProperty("z-index", "1"), Me(), R.removeAttribute("data-mf-sticky-active");
|
|
1390
1416
|
}, Fe = () => {
|
|
1391
|
-
|
|
1417
|
+
se &&= (r.cancelAnimationFrame(se), null);
|
|
1392
1418
|
}, Ie = () => {
|
|
1393
|
-
if (
|
|
1394
|
-
let e =
|
|
1395
|
-
|
|
1419
|
+
if (oe === null) {
|
|
1420
|
+
let e = be().getBoundingClientRect();
|
|
1421
|
+
oe = Math.max(0, r.scrollY + e.top - Ce());
|
|
1396
1422
|
}
|
|
1397
|
-
return
|
|
1398
|
-
}, Le = () =>
|
|
1399
|
-
let e =
|
|
1423
|
+
return oe;
|
|
1424
|
+
}, Le = () => ae + (Y === "active" ? Math.max(0, r.performance.now() - ie) : 0), Re = () => Math.max(0, r.scrollY - Ie()), ze = () => {
|
|
1425
|
+
let e = J ? Le() / t.stickyDurationMs : 0, n = ne ? Re() / t.stickyScrollDistance : 0;
|
|
1400
1426
|
return Math.max(e, n);
|
|
1401
|
-
}, Be = () =>
|
|
1402
|
-
|
|
1427
|
+
}, Be = () => J ? t.stickyDurationMs - Le() : 0, Ve = () => r.scrollY < Ie() - 1, He = () => {
|
|
1428
|
+
Y === "active" && (ae = Le(), Y = "paused", Fe(), Pe(), Te({
|
|
1403
1429
|
active: !1,
|
|
1404
1430
|
progress: ze(),
|
|
1405
1431
|
remainingMs: Be()
|
|
1406
1432
|
}));
|
|
1407
1433
|
}, Ue = () => {
|
|
1408
|
-
|
|
1434
|
+
Y !== "paused" || Ve() || (Y = "active", ie = r.performance.now(), Ne(), Ge());
|
|
1409
1435
|
}, We = () => {
|
|
1410
|
-
|
|
1436
|
+
Y !== "active" && Y !== "paused" || (Y === "active" && (ae = Le()), Y = "released", Fe(), Pe(), Te({
|
|
1411
1437
|
active: !1,
|
|
1412
1438
|
progress: 1,
|
|
1413
1439
|
remainingMs: 0
|
|
1414
1440
|
}));
|
|
1415
1441
|
}, Ge = () => {
|
|
1416
|
-
if (
|
|
1442
|
+
if (Y !== "active") return;
|
|
1417
1443
|
if (Ve()) {
|
|
1418
1444
|
He();
|
|
1419
1445
|
return;
|
|
1420
1446
|
}
|
|
1421
|
-
let e = Le(), n = Re(), i =
|
|
1447
|
+
let e = Le(), n = Re(), i = J ? e / t.stickyDurationMs : 0, a = ne ? n / t.stickyScrollDistance : 0, o = Math.max(i, a), s = J ? t.stickyDurationMs - e : 0;
|
|
1422
1448
|
if (Ne(), Te({
|
|
1423
1449
|
active: !0,
|
|
1424
1450
|
progress: o,
|
|
@@ -1427,21 +1453,21 @@ var e = (e, t, n) => {
|
|
|
1427
1453
|
We();
|
|
1428
1454
|
return;
|
|
1429
1455
|
}
|
|
1430
|
-
|
|
1456
|
+
se = r.requestAnimationFrame(Ge);
|
|
1431
1457
|
}, Ke = () => {
|
|
1432
|
-
if (!
|
|
1433
|
-
let e =
|
|
1434
|
-
|
|
1458
|
+
if (!re || Y !== "pending" || !R) return;
|
|
1459
|
+
let e = be().getBoundingClientRect();
|
|
1460
|
+
oe = Math.max(0, r.scrollY + e.top - Ce()), ae = 0, Y = "active", ie = r.performance.now(), Ne(), Ge();
|
|
1435
1461
|
}, qe = () => {
|
|
1436
|
-
!
|
|
1462
|
+
!re || Y !== "pending" || !R || r.scrollY <= 0 || be().getBoundingClientRect().top <= Ce() && Ke();
|
|
1437
1463
|
}, Je = () => {
|
|
1438
|
-
|
|
1464
|
+
Y === "pending" ? qe() : Y === "active" && Ve() ? He() : Y === "paused" && Ue(), Y !== "active" && je();
|
|
1439
1465
|
}, Ye = () => {
|
|
1440
|
-
Je(),
|
|
1441
|
-
|
|
1466
|
+
Je(), $ && r.cancelAnimationFrame($), $ = r.requestAnimationFrame(() => {
|
|
1467
|
+
$ = null, Je();
|
|
1442
1468
|
});
|
|
1443
1469
|
}, Xe = () => {
|
|
1444
|
-
|
|
1470
|
+
ge();
|
|
1445
1471
|
let e = n.parentElement;
|
|
1446
1472
|
for (; e && e !== i.body && e !== i.documentElement;) {
|
|
1447
1473
|
let t = r.getComputedStyle(e);
|
|
@@ -1462,7 +1488,7 @@ var e = (e, t, n) => {
|
|
|
1462
1488
|
} catch (e) {
|
|
1463
1489
|
console.warn("[mobilefireplace] Could not create AFR wallpaper iframe:", e);
|
|
1464
1490
|
}
|
|
1465
|
-
if (a.setAttribute("poweredAC", "0.1.
|
|
1491
|
+
if (a.setAttribute("poweredAC", "0.1.101"), _) {
|
|
1466
1492
|
let e = _.style;
|
|
1467
1493
|
e.width = "100%", e.height = "0", e.overflow = "visible", e.position = "static", e.margin = "0";
|
|
1468
1494
|
}
|
|
@@ -1723,34 +1749,34 @@ var e = (e, t, n) => {
|
|
|
1723
1749
|
padding: 0 !important;
|
|
1724
1750
|
}
|
|
1725
1751
|
`, i.head.appendChild(L), f.setup && f.setup(i, a), f === u.wwos) {
|
|
1726
|
-
let e =
|
|
1752
|
+
let e = ye();
|
|
1727
1753
|
e && (N = e.el, P = N.getAttribute("style"), F = e.list, I = F ? F.getAttribute("style") : null, N.style.marginLeft = "10px", N.style.marginRight = "10px", N.style.width = "calc(100% - 20px)", F && (F.style.width = "100%"));
|
|
1728
1754
|
}
|
|
1729
|
-
if (
|
|
1730
|
-
if (K && (
|
|
1755
|
+
if (fe === ue.SPLIT_IN_FLOW) {
|
|
1756
|
+
if (K && (W = c || y), l && l !== "about:blank") {
|
|
1731
1757
|
let e = new URL(l);
|
|
1732
1758
|
e.searchParams.set("mfRole", "wallpaper"), z = i.createElement("iframe"), z.src = e.href, z.setAttribute("data-mf-wallpaper-iframe", ""), z.setAttribute("scrolling", "no"), z.setAttribute("frameborder", "0");
|
|
1733
1759
|
let n = z.style;
|
|
1734
1760
|
n.position = "fixed", n.top = "0", n.left = "0", n.width = "100vw", n.height = "100dvh", n.border = "none", n.margin = "0", n.padding = "0", n.display = "block", n.background = "transparent", n.zIndex = String(t.zIndex), n.pointerEvents = "none", i.body.insertBefore(z, i.body.firstChild);
|
|
1735
1761
|
}
|
|
1736
|
-
n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "0", n.style.height = "0", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1", B =
|
|
1762
|
+
n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "0", n.style.height = "0", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1", B = ve(), o.parentElement.insertBefore(B, o), K ? (K.style.position = "static", K.style.inset = "auto", K.style.height = "0", K.style.minHeight = "0", K.style.maxHeight = "0", K.style.overflow = "hidden", K.style.backgroundColor = "transparent", K.style.boxShadow = "none", K.style.border = "0", K.style.outline = "0", K.style.pointerEvents = "none") : y && (y.style.height = "0", y.style.minHeight = "0", y.style.maxHeight = "0", y.style.overflow = "hidden", y.style.backgroundColor = "transparent", y.style.border = "0", y.style.outline = "0"), p.height = "0", p.minHeight = "0", p.width = "0", p.overflow = "hidden", s && (s.style.backgroundColor = "transparent", s.style.backgroundImage = "none", s.style.position = "relative", s.style.zIndex = "1"), o.style.marginLeft = "14px", o.style.marginRight = "14px", o.style.backgroundColor = "#ffffff", o.style.position = "relative", o.style.zIndex = "2", o.style.overflowX = "clip", o.style.isolation = "isolate";
|
|
1737
1763
|
for (let { el: e } of M) e.style.backgroundColor = "transparent", e.style.boxShadow = "none", e.style.paddingLeft = "10px", e.style.paddingRight = "10px";
|
|
1738
|
-
E && (E.style.borderTop = "0", E.style.outline = "0", E.style.boxShadow = "none"), O && (O.style.borderBottom = "0"), A && (A.style.marginLeft = "14px", A.style.marginRight = "14px", A.style.position = "relative", A.style.zIndex = "2"),
|
|
1764
|
+
E && (E.style.borderTop = "0", E.style.outline = "0", E.style.boxShadow = "none"), O && (O.style.borderBottom = "0"), A && (A.style.marginLeft = "14px", A.style.marginRight = "14px", A.style.position = "relative", A.style.zIndex = "2"), ge();
|
|
1739
1765
|
}
|
|
1740
|
-
B || (B =
|
|
1766
|
+
B || (B = ve(), a.appendChild(B));
|
|
1741
1767
|
}, Ze = null, Qe = null, $e = !1, et = () => {
|
|
1742
1768
|
let e = r.innerWidth, n = r.innerHeight;
|
|
1743
1769
|
if (e > n) {
|
|
1744
1770
|
let r = n / e, i = Math.round(t.billboardHeight * r);
|
|
1745
1771
|
a.style.height = i + "px", a.style.minHeight = i + "px", B && (B.style.height = i + "px", B.style.minHeight = i + "px", B.style.maxHeight = i + "px"), R && (R.style.height = i + "px");
|
|
1746
1772
|
} else a.style.height = t.billboardHeight + "px", a.style.minHeight = t.billboardHeight + "px", B && (B.style.height = t.billboardHeight + "px", B.style.minHeight = t.billboardHeight + "px", B.style.maxHeight = t.billboardHeight + "px"), R && (R.style.height = t.billboardHeight + "px");
|
|
1747
|
-
|
|
1773
|
+
Y === "active" ? Ne() : je();
|
|
1748
1774
|
};
|
|
1749
1775
|
if (Xe(), l && l !== "about:blank") try {
|
|
1750
1776
|
let e = new URL(l);
|
|
1751
1777
|
e.searchParams.set("mfRole", "billboard"), R = i.createElement("iframe"), R.src = e.href, R.setAttribute("data-mf-billboard-iframe", ""), R.setAttribute("scrolling", "no"), R.setAttribute("frameborder", "0");
|
|
1752
1778
|
let n = R.style;
|
|
1753
|
-
n.position =
|
|
1779
|
+
n.position = pe ? "absolute" : "relative", n.width = "100%", n.height = t.billboardHeight + "px", n.border = "none", n.margin = "0", n.padding = "0", n.display = "block", n.overflow = "hidden", n.background = "transparent", n.zIndex = pe ? "6" : "1", pe ? (R.setAttribute("data-mf-body-billboard", ""), i.body.appendChild(R), Ae()) : (B || a).appendChild(R), re && (Q = Ye, r.addEventListener("scroll", Q, { passive: !0 }), i.addEventListener("scroll", Q, { passive: !0 }), i.scrollingElement?.addEventListener("scroll", Q, { passive: !0 }));
|
|
1754
1780
|
} catch (e) {
|
|
1755
1781
|
console.warn("[mobilefireplace] Could not create billboard iframe:", e);
|
|
1756
1782
|
}
|
|
@@ -1774,7 +1800,7 @@ var e = (e, t, n) => {
|
|
|
1774
1800
|
});
|
|
1775
1801
|
let tt = () => {
|
|
1776
1802
|
if (!$e) {
|
|
1777
|
-
$e = !0, Qe &&= (window.removeEventListener("pagehide", Qe), window.removeEventListener("beforeunload", Qe), null), Ze &&= (r.removeEventListener("resize", Ze), null),
|
|
1803
|
+
$e = !0, Qe &&= (window.removeEventListener("pagehide", Qe), window.removeEventListener("beforeunload", Qe), null), Ze &&= (r.removeEventListener("resize", Ze), null), Q &&= (r.removeEventListener("scroll", Q), i.removeEventListener("scroll", Q), i.scrollingElement?.removeEventListener("scroll", Q), null), $ &&= (r.cancelAnimationFrame($), null), Fe(), X &&= (r.cancelAnimationFrame(X), null), Z &&= (r.clearTimeout(Z), null), Te({
|
|
1778
1804
|
active: !1,
|
|
1779
1805
|
progress: 1,
|
|
1780
1806
|
remainingMs: 0
|
|
@@ -1782,19 +1808,19 @@ var e = (e, t, n) => {
|
|
|
1782
1808
|
try {
|
|
1783
1809
|
delete r.__mfBridge;
|
|
1784
1810
|
} catch {}
|
|
1785
|
-
for (let e =
|
|
1786
|
-
let { shell: t, parent: n, nextSibling: r } =
|
|
1811
|
+
for (let e = q.length - 1; e >= 0; --e) {
|
|
1812
|
+
let { shell: t, parent: n, nextSibling: r } = q[e];
|
|
1787
1813
|
!t || !n || (r && r.parentNode === n ? n.insertBefore(t, r) : n.appendChild(t));
|
|
1788
1814
|
}
|
|
1789
|
-
|
|
1815
|
+
q.length = 0, H && (U && U.parentNode === H ? H.insertBefore(n, U) : H.appendChild(n), H = null, U = null), m ? n.setAttribute("style", m) : n.removeAttribute("style"), h || n.removeAttribute("data-mf-wallpaper-iframe");
|
|
1790
1816
|
for (let { el: e, orig: t } of V) t ? e.setAttribute("style", t) : e.removeAttribute("style");
|
|
1791
|
-
V.length = 0, g ? a.setAttribute("style", g) : a.removeAttribute("style"), _ && (v ? _.setAttribute("style", v) : _.removeAttribute("style")),
|
|
1817
|
+
V.length = 0, g ? a.setAttribute("style", g) : a.removeAttribute("style"), _ && (v ? _.setAttribute("style", v) : _.removeAttribute("style")), W &&= (ee && (G && G.parentNode === ee ? ee.insertBefore(W, G) : ee.appendChild(W), ee = null, G = null), null), y && (y.removeAttribute("data-mf-slot"), C ? y.setAttribute("style", C) : y.removeAttribute("style")), K && (te ? K.setAttribute("style", te) : K.removeAttribute("style"), K = null, te = null);
|
|
1792
1818
|
for (let { el: e, orig: t } of M) t ? e.setAttribute("style", t) : e.removeAttribute("style");
|
|
1793
1819
|
F && (I ? F.setAttribute("style", I) : F.removeAttribute("style"), F = null, I = null), N && (P ? N.setAttribute("style", P) : N.removeAttribute("style"), N = null, P = null), o && (T ? o.setAttribute("style", T) : o.removeAttribute("style")), E && (D ? E.setAttribute("style", D) : E.removeAttribute("style")), O && (k ? O.setAttribute("style", k) : O.removeAttribute("style")), A && (j ? A.setAttribute("style", j) : A.removeAttribute("style")), s && (w ? s.setAttribute("style", w) : s.removeAttribute("style"));
|
|
1794
1820
|
}
|
|
1795
1821
|
};
|
|
1796
1822
|
return tt;
|
|
1797
|
-
},
|
|
1823
|
+
}, B = (e = {}) => {
|
|
1798
1824
|
let t = {
|
|
1799
1825
|
expandedHeight: 180,
|
|
1800
1826
|
collapsedHeight: 50,
|
|
@@ -1805,35 +1831,28 @@ var e = (e, t, n) => {
|
|
|
1805
1831
|
onAdapt: null,
|
|
1806
1832
|
onProgress: null,
|
|
1807
1833
|
...e
|
|
1808
|
-
}
|
|
1809
|
-
if (!
|
|
1810
|
-
let r = window
|
|
1811
|
-
if (!r || r
|
|
1812
|
-
let i =
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
let e = i.querySelector("#adspot-mobile-mbanner-1-above, #adspot-mobile-mbanner-2-above");
|
|
1820
|
-
if (e) return e;
|
|
1821
|
-
let t = n.parentElement;
|
|
1822
|
-
for (; t && t !== i.body;) {
|
|
1823
|
-
if (t.id && t.id.includes("adspot")) return t;
|
|
1824
|
-
t = t.parentElement;
|
|
1834
|
+
};
|
|
1835
|
+
if (!window.frameElement) return () => {};
|
|
1836
|
+
let r = d(window);
|
|
1837
|
+
if (!r?.doc || !r?.win) return console.warn("[bottomscroller] Could not resolve publisher document — aborting setup."), () => {};
|
|
1838
|
+
let i = r.win, a = r.doc, o = r.iframe || window.frameElement;
|
|
1839
|
+
if (!o) return console.warn("[bottomscroller] Could not resolve host iframe on publisher page."), () => {};
|
|
1840
|
+
let s = (() => {
|
|
1841
|
+
let e = o;
|
|
1842
|
+
for (; e && e !== a.body && e !== a.documentElement;) {
|
|
1843
|
+
if (e.id && e.id.includes("adspot")) return e;
|
|
1844
|
+
e = e.parentElement;
|
|
1825
1845
|
}
|
|
1826
|
-
return
|
|
1846
|
+
return a.querySelector("#adspot-mobile-mbanner-1-above, #adspot-mobile-mbanner-2-above") || o.parentElement;
|
|
1827
1847
|
})();
|
|
1828
|
-
if (!
|
|
1829
|
-
let
|
|
1848
|
+
if (!s) return () => {};
|
|
1849
|
+
let c = {
|
|
1830
1850
|
nine: {
|
|
1831
1851
|
getPaddingTargets(e) {
|
|
1832
|
-
|
|
1833
|
-
return [e.querySelector("main"), t?.querySelector("[data-ad-target=\"page-container\"]")].filter(Boolean);
|
|
1852
|
+
return [e.querySelector("#app")?.querySelector("[data-ad-target=\"page-container\"]") || e.querySelector("main")].filter(Boolean);
|
|
1834
1853
|
},
|
|
1835
1854
|
setup(e) {
|
|
1836
|
-
e.querySelector("main")?.style.setProperty("position", "relative");
|
|
1855
|
+
e.querySelector("main")?.style.setProperty("position", "relative"), n(e, "bottomscroller-pac", "\n #app > [data-ad-target=\"header-ad-mobile\"] {\n height: 0 !important;\n min-height: 0 !important;\n max-height: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n background: transparent !important;\n }\n #bottomscroller-shell {\n background: transparent !important;\n }\n ");
|
|
1837
1856
|
}
|
|
1838
1857
|
},
|
|
1839
1858
|
smh: {
|
|
@@ -1860,149 +1879,150 @@ var e = (e, t, n) => {
|
|
|
1860
1879
|
(e.querySelector("main#content") || e.querySelector("main"))?.style.setProperty("position", "relative");
|
|
1861
1880
|
}
|
|
1862
1881
|
}
|
|
1863
|
-
},
|
|
1882
|
+
}, l = [
|
|
1864
1883
|
{
|
|
1865
1884
|
site: "https://www.nine.com.au",
|
|
1866
|
-
config:
|
|
1885
|
+
config: c.nine
|
|
1867
1886
|
},
|
|
1868
1887
|
{
|
|
1869
1888
|
site: "https://staging.nine.com.au",
|
|
1870
|
-
config:
|
|
1889
|
+
config: c.nine
|
|
1871
1890
|
},
|
|
1872
1891
|
{
|
|
1873
1892
|
site: "https://preview.nine.com.au",
|
|
1874
|
-
config:
|
|
1893
|
+
config: c.nine
|
|
1875
1894
|
},
|
|
1876
1895
|
{
|
|
1877
1896
|
site: "https://creative-preview-an.com",
|
|
1878
|
-
config:
|
|
1897
|
+
config: c.nine
|
|
1879
1898
|
},
|
|
1880
1899
|
{
|
|
1881
1900
|
site: "https://www.smh",
|
|
1882
|
-
config:
|
|
1901
|
+
config: c.smh
|
|
1883
1902
|
},
|
|
1884
1903
|
{
|
|
1885
1904
|
site: "https://www.theage",
|
|
1886
|
-
config:
|
|
1905
|
+
config: c.theage
|
|
1887
1906
|
},
|
|
1888
1907
|
{
|
|
1889
1908
|
site: "https://www.afr.com.au",
|
|
1890
|
-
config:
|
|
1909
|
+
config: c.afr
|
|
1891
1910
|
},
|
|
1892
1911
|
{
|
|
1893
1912
|
site: "https://www.afr.com",
|
|
1894
|
-
config:
|
|
1913
|
+
config: c.afr
|
|
1895
1914
|
}
|
|
1896
|
-
],
|
|
1897
|
-
let e =
|
|
1898
|
-
for (let t of
|
|
1899
|
-
return
|
|
1900
|
-
})(),
|
|
1901
|
-
let e =
|
|
1902
|
-
return Math.max(
|
|
1903
|
-
},
|
|
1904
|
-
let e =
|
|
1905
|
-
for (let n of e) t.includes(n) || t.push(n);
|
|
1915
|
+
], u = (() => {
|
|
1916
|
+
let e = i.location.href;
|
|
1917
|
+
for (let t of l) if (e.indexOf(t.site) >= 0) return t.config;
|
|
1918
|
+
return c.nine;
|
|
1919
|
+
})(), f = s.getAttribute("style"), p = o.getAttribute("style"), m = o.parentElement === s ? null : o.parentElement, h = m ? m.getAttribute("style") : null, g = s.parentElement, _ = g ? g.getAttribute("style") : null, v = s.closest("[data-ad-target=\"header-ad-mobile\"]"), y = !!(g && v && g === v), b = [], x = [], S = null, C = null, w = null, T = null, E = t.expandedHeight, D = "idle", O = 0, k = 0, A = null, j = null, M = null, N = !1, P = Number.isFinite(t.collapseDurationMs) && t.collapseDurationMs > 0, F = Number.isFinite(t.collapseScrollDistance) && t.collapseScrollDistance > 0, I = () => i.visualViewport ? Math.round(i.innerHeight - (i.visualViewport.offsetTop + i.visualViewport.height)) : 0, L = () => D === "tracking" ? O + (i.performance.now() - k) : O, R = () => {
|
|
1920
|
+
let e = L(), n = Math.max(0, i.scrollY), r = P ? e / t.collapseDurationMs : 0, a = F ? n / t.collapseScrollDistance : 0;
|
|
1921
|
+
return Math.max(r, a);
|
|
1922
|
+
}, z = () => P ? Math.max(0, t.collapseDurationMs - L()) : 0, B = () => {
|
|
1923
|
+
let e = u.getPaddingTargets(a), t = [];
|
|
1924
|
+
for (let n of e) !n || t.includes(n) || t.some((e) => e.contains(n)) || t.push(n);
|
|
1906
1925
|
return t;
|
|
1907
|
-
},
|
|
1908
|
-
!e ||
|
|
1926
|
+
}, V = (e) => {
|
|
1927
|
+
!e || x.some((t) => t.el === e) || x.push({
|
|
1909
1928
|
el: e,
|
|
1910
1929
|
paddingBottom: e.style.getPropertyValue("padding-bottom"),
|
|
1911
1930
|
paddingBottomPriority: e.style.getPropertyPriority("padding-bottom")
|
|
1912
1931
|
});
|
|
1913
|
-
},
|
|
1914
|
-
for (let t of
|
|
1915
|
-
},
|
|
1916
|
-
if (!
|
|
1917
|
-
|
|
1918
|
-
let
|
|
1919
|
-
|
|
1920
|
-
},
|
|
1921
|
-
let
|
|
1932
|
+
}, H = (e) => {
|
|
1933
|
+
for (let t of B()) V(t), t.style.setProperty("padding-bottom", `${e}px`, "important");
|
|
1934
|
+
}, U = (e, n = !1) => {
|
|
1935
|
+
if (!C) return;
|
|
1936
|
+
E = e;
|
|
1937
|
+
let r = I();
|
|
1938
|
+
n ? C.style.transition = `height ${t.collapseTransitionMs}ms ease` : C.style.transition = "none", C.style.height = `${e}px`, C.style.bottom = `${r}px`, o.style.height = "100%", H(e);
|
|
1939
|
+
}, W = (e) => {
|
|
1940
|
+
let n = {
|
|
1922
1941
|
type: "bottomscroller:progress",
|
|
1923
|
-
phase:
|
|
1924
|
-
progress: Math.max(0, Math.min(1, e.progress ??
|
|
1925
|
-
remainingMs: Math.max(0, Math.round(e.remainingMs ??
|
|
1926
|
-
height:
|
|
1927
|
-
active:
|
|
1942
|
+
phase: D,
|
|
1943
|
+
progress: Math.max(0, Math.min(1, e.progress ?? R())),
|
|
1944
|
+
remainingMs: Math.max(0, Math.round(e.remainingMs ?? z())),
|
|
1945
|
+
height: E,
|
|
1946
|
+
active: D === "tracking",
|
|
1928
1947
|
...e
|
|
1929
1948
|
};
|
|
1930
|
-
|
|
1931
|
-
},
|
|
1932
|
-
|
|
1949
|
+
o.contentWindow && o.contentWindow.postMessage(n, "*"), typeof window < "u" && window.postMessage && window.postMessage(n, "*"), typeof t.onProgress == "function" && t.onProgress(n);
|
|
1950
|
+
}, ee = () => {
|
|
1951
|
+
D = "collapsed", G(), U(t.collapsedHeight, !0), W({
|
|
1933
1952
|
phase: "collapsed",
|
|
1934
1953
|
progress: 1,
|
|
1935
1954
|
remainingMs: 0,
|
|
1936
1955
|
active: !1
|
|
1937
1956
|
});
|
|
1938
|
-
},
|
|
1939
|
-
|
|
1940
|
-
},
|
|
1941
|
-
if (
|
|
1942
|
-
if (
|
|
1943
|
-
|
|
1957
|
+
}, G = () => {
|
|
1958
|
+
A &&= (i.cancelAnimationFrame(A), null);
|
|
1959
|
+
}, K = () => {
|
|
1960
|
+
if (D !== "tracking") return;
|
|
1961
|
+
if (i.scrollY <= 0) {
|
|
1962
|
+
O = L(), D = "idle", G(), W({
|
|
1944
1963
|
phase: "idle",
|
|
1945
1964
|
active: !1
|
|
1946
1965
|
});
|
|
1947
1966
|
return;
|
|
1948
1967
|
}
|
|
1949
|
-
let e =
|
|
1950
|
-
if (
|
|
1968
|
+
let e = R();
|
|
1969
|
+
if (W({
|
|
1951
1970
|
phase: "tracking",
|
|
1952
1971
|
progress: e,
|
|
1953
|
-
remainingMs:
|
|
1972
|
+
remainingMs: z(),
|
|
1954
1973
|
active: !0
|
|
1955
1974
|
}), e >= 1) {
|
|
1956
|
-
|
|
1975
|
+
ee();
|
|
1957
1976
|
return;
|
|
1958
1977
|
}
|
|
1959
|
-
|
|
1960
|
-
},
|
|
1961
|
-
|
|
1978
|
+
U(t.expandedHeight, !1), A = i.requestAnimationFrame(K);
|
|
1979
|
+
}, te = () => {
|
|
1980
|
+
D !== "collapsed" && D === "idle" && (D = "tracking", k = i.performance.now(), W({
|
|
1962
1981
|
phase: "tracking",
|
|
1963
|
-
progress:
|
|
1964
|
-
remainingMs:
|
|
1982
|
+
progress: R(),
|
|
1983
|
+
remainingMs: z(),
|
|
1965
1984
|
active: !0
|
|
1966
|
-
}),
|
|
1967
|
-
},
|
|
1968
|
-
if (
|
|
1969
|
-
|
|
1985
|
+
}), K());
|
|
1986
|
+
}, q = () => {
|
|
1987
|
+
if (D === "collapsed") {
|
|
1988
|
+
U(t.collapsedHeight, !1);
|
|
1970
1989
|
return;
|
|
1971
1990
|
}
|
|
1972
|
-
|
|
1991
|
+
i.scrollY > 0 ? D === "idle" ? te() : D === "tracking" && K() : D === "tracking" && (O = L(), D = "idle", G(), W({
|
|
1973
1992
|
phase: "idle",
|
|
1974
1993
|
active: !1,
|
|
1975
|
-
progress:
|
|
1976
|
-
remainingMs:
|
|
1994
|
+
progress: R(),
|
|
1995
|
+
remainingMs: z()
|
|
1977
1996
|
}));
|
|
1978
|
-
},
|
|
1979
|
-
|
|
1980
|
-
|
|
1997
|
+
}, J = () => {
|
|
1998
|
+
q(), M && i.cancelAnimationFrame(M), M = i.requestAnimationFrame(() => {
|
|
1999
|
+
M = null, q();
|
|
1981
2000
|
});
|
|
1982
|
-
},
|
|
1983
|
-
let e =
|
|
1984
|
-
for (; e && e !==
|
|
1985
|
-
let t =
|
|
1986
|
-
(t.transform && t.transform !== "none" || t.willChange && t.willChange !== "auto" || t.contain && t.contain !== "none" || t.filter && t.filter !== "none" || t.perspective && t.perspective !== "none") && (
|
|
2001
|
+
}, ne = () => {
|
|
2002
|
+
let e = o.parentElement;
|
|
2003
|
+
for (; e && e !== a.body && e !== a.documentElement;) {
|
|
2004
|
+
let t = i.getComputedStyle(e);
|
|
2005
|
+
(t.transform && t.transform !== "none" || t.willChange && t.willChange !== "auto" || t.contain && t.contain !== "none" || t.filter && t.filter !== "none" || t.perspective && t.perspective !== "none") && (b.push({
|
|
1987
2006
|
el: e,
|
|
1988
2007
|
orig: e.getAttribute("style")
|
|
1989
|
-
}), e.style.transform = "none", e.style.willChange = "auto", e.style.contain = "none", e.style.filter = "none", e.style.perspective = "none"), t.overflow !== "visible" && (
|
|
2008
|
+
}), e.style.transform = "none", e.style.willChange = "auto", e.style.contain = "none", e.style.filter = "none", e.style.perspective = "none"), t.overflow !== "visible" && (b.find((t) => t.el === e) || b.push({
|
|
1990
2009
|
el: e,
|
|
1991
2010
|
orig: e.getAttribute("style")
|
|
1992
2011
|
}), e.style.overflow = "visible"), e = e.parentElement;
|
|
1993
2012
|
}
|
|
1994
|
-
},
|
|
1995
|
-
let e =
|
|
1996
|
-
if (e.height = "0", e.minHeight = "0", e.maxHeight = "0", e.overflow = "hidden", e.margin = "0", e.padding = "0", e.border = "none", e.lineHeight = "0", e.fontSize = "0",
|
|
1997
|
-
let e =
|
|
2013
|
+
}, re = () => {
|
|
2014
|
+
let e = s.style;
|
|
2015
|
+
if (e.height = "0", e.minHeight = "0", e.maxHeight = "0", e.overflow = "hidden", e.margin = "0", e.padding = "0", e.border = "none", e.lineHeight = "0", e.fontSize = "0", m) {
|
|
2016
|
+
let e = m.style;
|
|
1998
2017
|
e.width = "0", e.height = "0", e.minHeight = "0", e.maxHeight = "0", e.overflow = "hidden", e.margin = "0", e.padding = "0";
|
|
1999
2018
|
}
|
|
2000
|
-
|
|
2019
|
+
y && g && (g.style.setProperty("height", "0", "important"), g.style.setProperty("min-height", "0", "important"), g.style.setProperty("max-height", "0", "important"), g.style.setProperty("margin", "0", "important"), g.style.setProperty("padding", "0", "important"), g.style.setProperty("overflow", "hidden", "important"));
|
|
2001
2020
|
};
|
|
2002
2021
|
return (() => {
|
|
2003
|
-
|
|
2022
|
+
s.setAttribute("poweredAC", "0.1.101"), u.setup && (u.setup(a, s), S = a.getElementById("bottomscroller-pac")), re(), ne(), w = o.parentElement, T = o.nextSibling, C = a.createElement("div"), C.id = "bottomscroller-shell", C.setAttribute("data-bottomscroller-shell", ""), Object.assign(C.style, {
|
|
2004
2023
|
position: "fixed",
|
|
2005
2024
|
left: "0",
|
|
2025
|
+
bottom: "0",
|
|
2006
2026
|
width: "100vw",
|
|
2007
2027
|
height: `${t.expandedHeight}px`,
|
|
2008
2028
|
zIndex: String(t.zIndex),
|
|
@@ -2010,28 +2030,29 @@ var e = (e, t, n) => {
|
|
|
2010
2030
|
margin: "0",
|
|
2011
2031
|
padding: "0",
|
|
2012
2032
|
pointerEvents: "auto",
|
|
2013
|
-
boxSizing: "border-box"
|
|
2033
|
+
boxSizing: "border-box",
|
|
2034
|
+
background: "transparent"
|
|
2014
2035
|
});
|
|
2015
|
-
let e =
|
|
2016
|
-
e.display = "block", e.width = "100%", e.height = "100%", e.border = "none", e.margin = "0", e.padding = "0", e.position = "relative", e.top = "", e.left = "", e.maxWidth = "none",
|
|
2036
|
+
let e = o.style;
|
|
2037
|
+
e.display = "block", e.width = "100%", e.height = "100%", e.border = "none", e.margin = "0", e.padding = "0", e.position = "relative", e.top = "", e.left = "", e.maxWidth = "none", C.appendChild(o), a.body.appendChild(C), U(t.expandedHeight, !1), W({
|
|
2017
2038
|
phase: "idle",
|
|
2018
2039
|
progress: 0,
|
|
2019
2040
|
remainingMs: t.collapseDurationMs,
|
|
2020
2041
|
active: !1
|
|
2021
|
-
}),
|
|
2042
|
+
}), j = J, i.addEventListener("scroll", j, { passive: !0 }), a.addEventListener("scroll", j, { passive: !0 }), a.scrollingElement?.addEventListener("scroll", j, { passive: !0 }), i.visualViewport?.addEventListener("resize", J, { passive: !0 }), N || (N = !0, t.onAdapt && t.onAdapt());
|
|
2022
2043
|
})(), () => {
|
|
2023
|
-
|
|
2024
|
-
for (let { el: e, orig: t } of
|
|
2025
|
-
|
|
2026
|
-
for (let { el: e, paddingBottom: t, paddingBottomPriority: n } of
|
|
2027
|
-
|
|
2044
|
+
G(), j &&= (i.removeEventListener("scroll", j), a.removeEventListener("scroll", j), a.scrollingElement?.removeEventListener("scroll", j), null), M &&= (i.cancelAnimationFrame(M), null), i.visualViewport?.removeEventListener("resize", J), C &&= (w && (T ? w.insertBefore(o, T) : w.appendChild(o)), C.remove(), null);
|
|
2045
|
+
for (let { el: e, orig: t } of b) t ? e.setAttribute("style", t) : e.removeAttribute("style");
|
|
2046
|
+
b.length = 0;
|
|
2047
|
+
for (let { el: e, paddingBottom: t, paddingBottomPriority: n } of x) t ? e.style.setProperty("padding-bottom", t, n) : e.style.removeProperty("padding-bottom");
|
|
2048
|
+
x.length = 0, f ? s.setAttribute("style", f) : s.removeAttribute("style"), p ? o.setAttribute("style", p) : o.removeAttribute("style"), m && (h ? m.setAttribute("style", h) : m.removeAttribute("style")), g && (_ ? g.setAttribute("style", _) : g.removeAttribute("style")), S?.remove(), S = null;
|
|
2028
2049
|
};
|
|
2029
|
-
},
|
|
2030
|
-
function
|
|
2031
|
-
typeof
|
|
2050
|
+
}, V = () => {};
|
|
2051
|
+
function H({ adFormat: e = "", stickyOffset: t = 0, logoPosX: n = 0, logoHeight: r = 0, logoSmallHeight: i = 0, ...a } = {}) {
|
|
2052
|
+
typeof V == "function" && V();
|
|
2032
2053
|
let o = () => {};
|
|
2033
|
-
return e === "fireplace" ? o =
|
|
2054
|
+
return e === "fireplace" ? o = m(t) : e === "fireplace-collant" ? o = h(t) : e === "logomorph" ? o = F(n, r, i) : e === "dynamicheading" ? o = P(a) : e === "interscroller" ? o = L(a) : e === "liquidframe" ? o = R(a) : e === "mobilefireplace" ? o = z(a) : e === "bottomscroller" ? o = B(a) : console.warn("[powered-ad-config] Unknown ad format:", e), V = typeof o == "function" ? o : () => {}, V;
|
|
2034
2055
|
}
|
|
2035
|
-
|
|
2056
|
+
H.version = "0.1.101";
|
|
2036
2057
|
//#endregion
|
|
2037
|
-
export {
|
|
2058
|
+
export { H as default };
|