powered-ad-config 0.1.29 → 0.1.31

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.
@@ -662,7 +662,111 @@ var e = (e) => {
662
662
  return m(), () => {
663
663
  n.removeEventListener("scroll", C), E &&= (clearTimeout(E), null);
664
664
  };
665
- }, n = (e, t, n) => {
665
+ }, n = 866, r = 68, i = 16, a = 7e3, o = "adspot-desktop-takeover-2-above", s = -24, c = -24, l = [
666
+ "www.nine.com.au",
667
+ "staging.nine.com.au",
668
+ "preview.nine.com.au",
669
+ "render-web-nine-staging-v1.ffxblue.com.au",
670
+ "render-web-nine-production-v1.ffxblue.com.au"
671
+ ], u = [{
672
+ hostnames: l,
673
+ path: "/sport",
674
+ headingText: "Sport",
675
+ slotId: o
676
+ }], d = new Set(["localhost", "127.0.0.1"]), f = "__poweredAdConfigHeadingintegrationActive", p = "data-pac-headingintegration-owner", m = (e, t) => {
677
+ if (typeof e == "number" && Number.isFinite(e)) return `${e}px`;
678
+ if (typeof e == "string") {
679
+ let n = e.trim();
680
+ return n ? /^-?\d+(\.\d+)?$/.test(n) ? `${n}px` : n : `${t}px`;
681
+ }
682
+ return `${t}px`;
683
+ }, h = (e) => {
684
+ if (!e || typeof e != "object") return null;
685
+ 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) : [];
686
+ return !t || !n && !r ? null : {
687
+ headingText: t,
688
+ path: n || null,
689
+ pathPrefix: r || null,
690
+ slotId: typeof e.slotId == "string" && e.slotId.trim() ? e.slotId.trim() : o,
691
+ hostnames: i.length ? i : l
692
+ };
693
+ }, g = (e) => {
694
+ if (!Array.isArray(e) || e.length === 0) return u;
695
+ let t = e.map(h).filter(Boolean);
696
+ return t.length ? t : u;
697
+ }, _ = ({ offsetTop: e = s, offsetLeft: t = c, width: o = n, height: l = r, pageTargets: h = u } = {}) => {
698
+ let _ = window.frameElement || null;
699
+ if (!_) return () => {};
700
+ let v = window.parent;
701
+ if (!v || v === window) return () => {};
702
+ let y = null;
703
+ try {
704
+ y = v.document, v.location.href;
705
+ } catch {
706
+ return () => {};
707
+ }
708
+ let b = v[f];
709
+ if (b?.iframe === _ && typeof b.cleanup == "function") return b.cleanup;
710
+ if (b?.iframe?.isConnected && typeof b?.cleanup == "function") return () => {};
711
+ typeof b?.cleanup == "function" && b.cleanup();
712
+ let x = `headingintegration-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, S = (e, t, n) => {
713
+ e && e.style[t] !== n && (e.style[t] = n);
714
+ }, C = () => {
715
+ try {
716
+ let e = window.location.hostname.toLowerCase();
717
+ return d.has(e) ? !0 : new URLSearchParams(window.location.search).get("keepHeadingintegrationVisible") === "1";
718
+ } catch {
719
+ return !1;
720
+ }
721
+ }, w = (e = _.parentElement) => {
722
+ let t = e;
723
+ for (; t && t !== y.body;) {
724
+ let e = t.id || "", n = t.getAttribute?.("data-testid") || "", r = t.getAttribute?.("type") || "";
725
+ if (e.includes("adspot") || n.toLowerCase().includes("ad") || r) return t;
726
+ t = t.parentElement;
727
+ }
728
+ return _.parentElement;
729
+ }, T = () => {
730
+ try {
731
+ let e = new URL(v.location.href), t = e.hostname.toLowerCase(), n = e.pathname.toLowerCase();
732
+ return B.find((e) => {
733
+ let r = e.hostnames.includes(t), i = e.path ? n === e.path : n.startsWith(e.pathPrefix);
734
+ return r && i;
735
+ }) || null;
736
+ } catch {
737
+ return null;
738
+ }
739
+ return null;
740
+ }, E = (e) => Array.from(y.querySelectorAll("#app h1, #app h2, #app h3")).filter((t) => t.textContent?.trim().toLowerCase() === e.toLowerCase())[0] || null, D = T();
741
+ if (!D) return () => {};
742
+ let O = w((D.slotId ? y.getElementById(D.slotId) : null) || _.parentElement);
743
+ if (!O) return () => {};
744
+ let k = O.getAttribute(p);
745
+ if (k && k !== x) return () => {};
746
+ let A = O.parentElement, j = O.nextSibling, M = y.createComment("headingintegration-placeholder"), N = null, P = null, F = C(), I = m(e, s), L = m(t, c), R = m(o, n), z = m(l, r), B = g(h), V = () => {
747
+ [O.parentElement, O].filter(Boolean).forEach((e) => {
748
+ S(e, "overflow", "visible");
749
+ }), S(O, "width", R), S(O, "maxWidth", R), S(O, "minWidth", R), S(O, "height", z), S(O, "minHeight", z), S(O, "marginLeft", "auto"), S(O, "marginRight", "auto"), S(O, "marginBottom", `${i}px`), S(O, "position", "absolute"), S(O, "top", I), S(O, "left", L), S(O, "display", "block"), S(O, "pointerEvents", "none"), S(O, "zIndex", "1080"), O.setAttribute(p, x), S(_, "width", R), S(_, "height", z), S(_, "display", "block"), S(_, "border", "0"), S(_, "position", "relative"), S(_, "pointerEvents", "auto");
750
+ }, H = () => {
751
+ S(O, "display", "none"), S(O, "height", "0px"), S(O, "minHeight", "0px"), S(O, "marginBottom", "0px");
752
+ }, U = (e = 12) => {
753
+ let t = E(D.headingText);
754
+ if (!t) {
755
+ e > 1 && (P = v.setTimeout(() => U(e - 1), 250));
756
+ return;
757
+ }
758
+ !M.parentNode && A && A.insertBefore(M, O), t.parentNode?.insertBefore(O, t), V(), F || (N = v.setTimeout(H, a));
759
+ };
760
+ U();
761
+ let W = () => {
762
+ P &&= (v.clearTimeout(P), null), N &&= (v.clearTimeout(N), null), O.getAttribute(p) === x && O.removeAttribute(p), M.parentNode && A && (A.insertBefore(O, j), M.parentNode.removeChild(M)), v[f]?.instanceId === x && delete v[f];
763
+ };
764
+ return v[f] = {
765
+ instanceId: x,
766
+ iframe: _,
767
+ cleanup: W
768
+ }, W;
769
+ }, v = (e, t, n) => {
666
770
  let r = window.frameElement ? window.frameElement : null;
667
771
  if (!r) return () => {};
668
772
  let i = window.parent;
@@ -903,11 +1007,11 @@ var e = (e) => {
903
1007
  return p(), () => {
904
1008
  i.removeEventListener("scroll", y), w &&= (clearTimeout(w), null);
905
1009
  };
906
- }, r = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
1010
+ }, y = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
907
1011
  if (e === 0 || e === 1) return e;
908
1012
  let t = 2 * Math.PI / 3;
909
1013
  return 2 ** (-10 * e) * Math.sin((e * 10 - .75) * t) + 1;
910
- }), i = (e = {}) => {
1014
+ }), b = (e = {}) => {
911
1015
  let t = {
912
1016
  adScrollHeight: "300vh",
913
1017
  bandHeight: 24,
@@ -930,7 +1034,7 @@ var e = (e) => {
930
1034
  snapOverlap: 2,
931
1035
  stretchOverlap: 20,
932
1036
  snapDuration: .9,
933
- snapEase: r,
1037
+ snapEase: y,
934
1038
  onEnter: null,
935
1039
  onExit: null,
936
1040
  onProgress: null,
@@ -938,26 +1042,26 @@ var e = (e) => {
938
1042
  ...e
939
1043
  }, n = window.frameElement ? window.frameElement : null;
940
1044
  if (!n) return () => {};
941
- let i = window.parent;
942
- if (!i || i === window) return () => {};
943
- let a = null;
1045
+ let r = window.parent;
1046
+ if (!r || r === window) return () => {};
1047
+ let i = null;
944
1048
  try {
945
- a = i.document, i.location.href;
1049
+ i = r.document, r.location.href;
946
1050
  } catch {
947
1051
  return () => {};
948
1052
  }
949
- let o = (() => {
950
- let e = a.querySelector("#adspot-mobile-mobile-3-above");
1053
+ let a = (() => {
1054
+ let e = i.querySelector("#adspot-mobile-mobile-3-above");
951
1055
  if (e) return e;
952
1056
  let t = n.parentElement;
953
- for (; t && t !== a.body;) {
1057
+ for (; t && t !== i.body;) {
954
1058
  if (t.id && t.id.includes("adspot")) return t;
955
1059
  t = t.parentElement;
956
1060
  }
957
1061
  return n.parentElement;
958
1062
  })();
959
- if (!o) return () => {};
960
- let s = o.getAttribute("style"), c = n.getAttribute("style"), l = [], u = {
1063
+ if (!a) return () => {};
1064
+ let o = a.getAttribute("style"), s = n.getAttribute("style"), c = [], l = {
961
1065
  width: "100vw",
962
1066
  marginLeft: "calc(50% - 50vw)",
963
1067
  height: t.bandHeight + "px",
@@ -973,38 +1077,38 @@ var e = (e) => {
973
1077
  pointerEvents: "none"
974
1078
  };
975
1079
  (() => {
976
- let e = o.style;
977
- e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", o.setAttribute("poweredAC", "0.1.29"), 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";
978
- let r = o.parentElement;
979
- for (let e = 0; e < 6 && r && r !== a.body; e++) {
980
- let t = i.getComputedStyle(r), n = !1;
981
- (t.overflow === "hidden" || t.overflowY === "hidden") && (l.push({
982
- el: r,
1080
+ let e = a.style;
1081
+ e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.31"), 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";
1082
+ let o = a.parentElement;
1083
+ for (let e = 0; e < 6 && o && o !== i.body; e++) {
1084
+ let t = r.getComputedStyle(o), n = !1;
1085
+ (t.overflow === "hidden" || t.overflowY === "hidden") && (c.push({
1086
+ el: o,
983
1087
  prop: "overflow",
984
- val: r.style.overflow
985
- }), l.push({
986
- el: r,
1088
+ val: o.style.overflow
1089
+ }), c.push({
1090
+ el: o,
987
1091
  prop: "overflowY",
988
- val: r.style.overflowY
989
- }), r.style.overflow = "visible", r.style.overflowY = "visible", n = !0);
990
- let a = parseFloat(t.height);
991
- t.height !== "auto" && !isNaN(a) && a < 600 && (l.push({
992
- el: r,
1092
+ val: o.style.overflowY
1093
+ }), o.style.overflow = "visible", o.style.overflowY = "visible", n = !0);
1094
+ let i = parseFloat(t.height);
1095
+ t.height !== "auto" && !isNaN(i) && i < 600 && (c.push({
1096
+ el: o,
993
1097
  prop: "height",
994
- val: r.style.height
995
- }), r.style.height = "auto", n = !0);
996
- let o = t.maxHeight;
997
- if (o && o !== "none" && (l.push({
998
- el: r,
1098
+ val: o.style.height
1099
+ }), o.style.height = "auto", n = !0);
1100
+ let a = t.maxHeight;
1101
+ if (a && a !== "none" && (c.push({
1102
+ el: o,
999
1103
  prop: "maxHeight",
1000
- val: r.style.maxHeight
1001
- }), r.style.maxHeight = "none", n = !0), !n && e > 1) break;
1002
- r = r.parentElement;
1104
+ val: o.style.maxHeight
1105
+ }), o.style.maxHeight = "none", n = !0), !n && e > 1) break;
1106
+ o = o.parentElement;
1003
1107
  }
1004
1108
  let s = n.style;
1005
1109
  s.position = "fixed", s.top = "0", s.left = "0", s.width = "100vw", s.height = "100vh", s.maxWidth = "100vw", s.margin = "0", s.padding = "0", s.border = "none", s.zIndex = "1";
1006
- let c = a.createElement("div");
1007
- c.id = "interscroller-top-band-wrapper", Object.assign(c.style, {
1110
+ let u = i.createElement("div");
1111
+ u.id = "interscroller-top-band-wrapper", Object.assign(u.style, {
1008
1112
  position: "sticky",
1009
1113
  bottom: "0",
1010
1114
  width: "100vw",
@@ -1012,15 +1116,15 @@ var e = (e) => {
1012
1116
  zIndex: t.zIndexTop,
1013
1117
  pointerEvents: "none"
1014
1118
  });
1015
- let d = a.createElement("div");
1016
- d.id = "interscroller-top-band", d.textContent = t.labelTop, Object.assign(d.style, u, {
1119
+ let d = i.createElement("div");
1120
+ d.id = "interscroller-top-band", d.textContent = t.labelTop, Object.assign(d.style, l, {
1017
1121
  position: "relative",
1018
1122
  width: "100%",
1019
1123
  marginLeft: "0",
1020
1124
  transformOrigin: "top center"
1021
- }), c.appendChild(d), o.insertAdjacentElement("beforebegin", c);
1022
- let f = a.createElement("div");
1023
- f.id = "interscroller-bottom-band", Object.assign(f.style, u, {
1125
+ }), u.appendChild(d), a.insertAdjacentElement("beforebegin", u);
1126
+ let f = i.createElement("div");
1127
+ f.id = "interscroller-bottom-band", Object.assign(f.style, l, {
1024
1128
  position: "fixed",
1025
1129
  bottom: "0",
1026
1130
  left: "0",
@@ -1030,9 +1134,9 @@ var e = (e) => {
1030
1134
  transform: "translateY(100%)",
1031
1135
  transition: "none"
1032
1136
  });
1033
- let p = a.createElement("span");
1137
+ let p = i.createElement("span");
1034
1138
  if (p.id = "interscroller-bottom-label", p.textContent = t.labelBottomResume, p.style.cssText = "position:relative;z-index:1;pointer-events:none;", f.appendChild(p), t.progressBarColor) {
1035
- let e = a.createElement("span");
1139
+ let e = i.createElement("span");
1036
1140
  e.id = "interscroller-bottom-progress", e.style.cssText = [
1037
1141
  "position:absolute",
1038
1142
  "inset:0",
@@ -1043,14 +1147,14 @@ var e = (e) => {
1043
1147
  "pointer-events:none"
1044
1148
  ].join(";"), f.appendChild(e);
1045
1149
  }
1046
- o.after(f);
1150
+ a.after(f);
1047
1151
  })();
1048
- let d = a.querySelector("#interscroller-top-band"), f = a.querySelector("#interscroller-top-band-wrapper"), p = a.querySelector("#interscroller-bottom-band"), m = a.querySelector("#interscroller-bottom-label"), h = a.querySelector("#interscroller-bottom-progress"), g = t.bandHeight, _ = t.snapPx, v = !1, y = !1, b = !1, x = !1, S = (t.thresholds || []).map(() => !1), C = () => {
1049
- if (!p) return;
1050
- let e = o.getBoundingClientRect(), n = i.innerHeight, r = e.top <= n, a = e.bottom <= n - g, s = x ? e.top <= n - t.bottomBandHideAt : e.top <= n - t.bottomBandShowAt, c = o.offsetHeight, l = Math.min(1, Math.max(0, (n - e.top) / (c + n))), u = Math.min(1, Math.max(0, (n - e.top) / (c + g))), f = Math.min(1, Math.max(0, (n - e.top) / c)), C = Math.min(e.bottom, n) - Math.max(e.top - g, 0), w = Math.min(1, Math.max(0, C / n)), T = Math.max(0, Math.round(e.bottom - n));
1051
- !y && r && t.onEnter && t.onEnter(), !b && a && t.onExit && t.onExit(), y = r, b = a, x = s, t.onProgress && t.onProgress({
1152
+ let u = i.querySelector("#interscroller-top-band"), d = i.querySelector("#interscroller-top-band-wrapper"), f = i.querySelector("#interscroller-bottom-band"), p = i.querySelector("#interscroller-bottom-label"), m = i.querySelector("#interscroller-bottom-progress"), h = t.bandHeight, g = t.snapPx, _ = !1, v = !1, b = !1, x = !1, S = (t.thresholds || []).map(() => !1), C = () => {
1153
+ if (!f) return;
1154
+ let e = a.getBoundingClientRect(), n = r.innerHeight, i = e.top <= n, o = e.bottom <= n - h, s = x ? e.top <= n - t.bottomBandHideAt : e.top <= n - t.bottomBandShowAt, c = a.offsetHeight, l = Math.min(1, Math.max(0, (n - e.top) / (c + n))), d = Math.min(1, Math.max(0, (n - e.top) / (c + h))), y = Math.min(1, Math.max(0, (n - e.top) / c)), C = Math.min(e.bottom, n) - Math.max(e.top - h, 0), w = Math.min(1, Math.max(0, C / n)), T = Math.max(0, Math.round(e.bottom - n));
1155
+ !v && i && t.onEnter && t.onEnter(), !b && o && t.onExit && t.onExit(), v = i, b = o, x = s, t.onProgress && t.onProgress({
1052
1156
  scrollProgress: l,
1053
- adExposure: f,
1157
+ adExposure: y,
1054
1158
  viewportCoverage: w,
1055
1159
  pxRemaining: T
1056
1160
  }), (t.thresholds || []).forEach((e, t) => {
@@ -1058,22 +1162,22 @@ var e = (e) => {
1058
1162
  !n && r ? (S[t] = !0, e.onEnter && e.onEnter(l)) : n && !r && (S[t] = !1, e.onLeave && e.onLeave(l));
1059
1163
  });
1060
1164
  let E = n;
1061
- if (d && e.top <= E + t.stretchOverlap && !a) {
1165
+ if (u && e.top <= E + t.stretchOverlap && !o) {
1062
1166
  let n = E - e.top;
1063
- if (!v && n <= _ - t.snapOverlap) {
1064
- let e = 1 + Math.max(0, n + t.stretchOverlap) / g;
1065
- d.style.transition = "none", d.style.transform = `scaleY(${e})`;
1066
- } else !v && n > _ - t.snapOverlap && (v = !0, d.style.transition = `transform ${t.snapDuration}s ${t.snapEase}`, d.style.transform = "scaleY(1)");
1067
- } else d && e.top > E + t.stretchOverlap && (v = !1, d.style.transition = "none", d.style.transform = "scaleY(1)");
1068
- let D = i.visualViewport ? Math.round(i.innerHeight - (i.visualViewport.offsetTop + i.visualViewport.height)) : 0;
1069
- a ? (p.style.transition = "none", p.style.transform = "none", p.style.position = "sticky", p.style.top = "0", p.style.bottom = "", p.style.left = "", p.style.marginLeft = "calc(50% - 50vw)", p.style.width = "100vw", m && (m.textContent = t.labelBottomNow), h && (h.style.width = "100%")) : s ? (m && (m.textContent = T > 0 ? u < .2 ? t.labelBottomResume : u < .75 ? t.labelBottomMid : t.labelBottomLate : t.labelBottomNow), h && (h.style.width = `${Math.round(u * 100)}%`), p.style.transition = "transform 0.3s ease", p.style.transform = "translateY(0)", p.style.position = "fixed", p.style.bottom = `${D}px`, p.style.top = "", p.style.left = "0", p.style.marginLeft = "0", p.style.width = "100vw") : (p.style.transition = "transform 0.3s ease", p.style.transform = "translateY(100%)", p.style.position = "fixed", p.style.bottom = `${D}px`, p.style.left = "0", p.style.marginLeft = "0", p.style.width = "100vw");
1167
+ if (!_ && n <= g - t.snapOverlap) {
1168
+ let e = 1 + Math.max(0, n + t.stretchOverlap) / h;
1169
+ u.style.transition = "none", u.style.transform = `scaleY(${e})`;
1170
+ } else !_ && n > g - t.snapOverlap && (_ = !0, u.style.transition = `transform ${t.snapDuration}s ${t.snapEase}`, u.style.transform = "scaleY(1)");
1171
+ } else u && e.top > E + t.stretchOverlap && (_ = !1, u.style.transition = "none", u.style.transform = "scaleY(1)");
1172
+ let D = r.visualViewport ? Math.round(r.innerHeight - (r.visualViewport.offsetTop + r.visualViewport.height)) : 0;
1173
+ o ? (f.style.transition = "none", f.style.transform = "none", f.style.position = "sticky", f.style.top = "0", f.style.bottom = "", f.style.left = "", f.style.marginLeft = "calc(50% - 50vw)", f.style.width = "100vw", p && (p.textContent = t.labelBottomNow), m && (m.style.width = "100%")) : s ? (p && (p.textContent = T > 0 ? d < .2 ? t.labelBottomResume : d < .75 ? t.labelBottomMid : t.labelBottomLate : t.labelBottomNow), m && (m.style.width = `${Math.round(d * 100)}%`), f.style.transition = "transform 0.3s ease", f.style.transform = "translateY(0)", f.style.position = "fixed", f.style.bottom = `${D}px`, f.style.top = "", f.style.left = "0", f.style.marginLeft = "0", f.style.width = "100vw") : (f.style.transition = "transform 0.3s ease", f.style.transform = "translateY(100%)", f.style.position = "fixed", f.style.bottom = `${D}px`, f.style.left = "0", f.style.marginLeft = "0", f.style.width = "100vw");
1070
1174
  };
1071
- return C(), i.addEventListener("scroll", C, { passive: !0 }), i.visualViewport?.addEventListener("resize", C, { passive: !0 }), () => {
1072
- i.removeEventListener("scroll", C), i.visualViewport?.removeEventListener("resize", C), f ? f.remove() : d && d.remove(), p && p.remove(), s ? o.setAttribute("style", s) : o.removeAttribute("style"), c ? n.setAttribute("style", c) : n.removeAttribute("style"), l.forEach(({ el: e, prop: t, val: n }) => {
1175
+ return C(), r.addEventListener("scroll", C, { passive: !0 }), r.visualViewport?.addEventListener("resize", C, { passive: !0 }), () => {
1176
+ r.removeEventListener("scroll", C), r.visualViewport?.removeEventListener("resize", C), d ? d.remove() : u && u.remove(), f && f.remove(), o ? a.setAttribute("style", o) : a.removeAttribute("style"), s ? n.setAttribute("style", s) : n.removeAttribute("style"), c.forEach(({ el: e, prop: t, val: n }) => {
1073
1177
  e.style[t] = n || "";
1074
1178
  });
1075
1179
  };
1076
- }, a = (e = {}) => {
1180
+ }, x = (e = {}) => {
1077
1181
  let t = {
1078
1182
  adaptToWidth: "100%",
1079
1183
  maxWidth: "400px",
@@ -1106,7 +1210,7 @@ var e = (e) => {
1106
1210
  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;
1107
1211
  return (() => {
1108
1212
  let e = a.style;
1109
- if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.29"), c) {
1213
+ if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.31"), c) {
1110
1214
  let e = c.style;
1111
1215
  e.width = "100%", e.height = "100%", e.margin = "0", e.textAlign = "left";
1112
1216
  }
@@ -1121,7 +1225,7 @@ var e = (e) => {
1121
1225
  })(), () => {
1122
1226
  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);
1123
1227
  };
1124
- }, o = (e = {}) => {
1228
+ }, S = (e = {}) => {
1125
1229
  let t = {
1126
1230
  billboardHeight: 150,
1127
1231
  sideStripWidth: 10,
@@ -1254,7 +1358,7 @@ var e = (e) => {
1254
1358
  }), e.style.overflow = "visible"), e = e.parentElement;
1255
1359
  }
1256
1360
  let o = n.style;
1257
- if (o.position = "fixed", o.top = "0", o.left = "0", o.width = "100vw", o.height = "100dvh", o.zIndex = String(t.zIndex), o.border = "none", o.margin = "0", o.padding = "0", o.display = "block", a.setAttribute("poweredAC", "0.1.29"), d) {
1361
+ if (o.position = "fixed", o.top = "0", o.left = "0", o.width = "100vw", o.height = "100dvh", o.zIndex = String(t.zIndex), o.border = "none", o.margin = "0", o.padding = "0", o.display = "block", a.setAttribute("poweredAC", "0.1.31"), d) {
1258
1362
  let e = d.style;
1259
1363
  e.width = "100%", e.height = "0", e.overflow = "visible", e.position = "static", e.margin = "0";
1260
1364
  }
@@ -1351,12 +1455,12 @@ var e = (e) => {
1351
1455
  for (let { el: e, orig: t } of _) t ? e.setAttribute("style", t) : e.removeAttribute("style");
1352
1456
  _.length = 0, u ? a.setAttribute("style", u) : a.removeAttribute("style"), d && (f ? d.setAttribute("style", f) : d.removeAttribute("style")), p && (p.removeAttribute("data-mf-slot"), m ? p.setAttribute("style", m) : p.removeAttribute("style"));
1353
1457
  };
1354
- }, s = () => {};
1355
- function c({ adFormat: r = "", stickyOffset: c = 0, logoPosX: l = 0, logoHeight: u = 0, logoSmallHeight: d = 0, ...f } = {}) {
1356
- typeof s == "function" && s();
1357
- let p = () => {};
1358
- return r === "fireplace" ? p = e(c) : r === "fireplace-collant" ? p = t(c) : r === "logomorph" ? p = n(l, u, d) : r === "interscroller" ? p = i(f) : r === "liquidframe" ? p = a(f) : r === "mobilefireplace" ? p = o(f) : console.warn("[powered-ad-config] Unknown ad format:", r), s = typeof p == "function" ? p : () => {}, s;
1458
+ }, C = () => {};
1459
+ function w({ adFormat: n = "", stickyOffset: r = 0, logoPosX: i = 0, logoHeight: a = 0, logoSmallHeight: o = 0, ...s } = {}) {
1460
+ typeof C == "function" && C();
1461
+ let c = () => {};
1462
+ return n === "fireplace" ? c = e(r) : n === "fireplace-collant" ? c = t(r) : n === "logomorph" ? c = v(i, a, o) : n === "headingintegration" ? c = _(s) : n === "interscroller" ? c = b(s) : n === "liquidframe" ? c = x(s) : n === "mobilefireplace" ? c = S(s) : console.warn("[powered-ad-config] Unknown ad format:", n), C = typeof c == "function" ? c : () => {}, C;
1359
1463
  }
1360
- c.version = "0.1.29";
1464
+ w.version = "0.1.31";
1361
1465
  //#endregion
1362
- export { c as default };
1466
+ export { w as default };
@@ -105,7 +105,7 @@
105
105
  div:has(#adspot-tablet-takeover-2-above) {
106
106
  position: static;
107
107
  }
108
- `,e.head.appendChild(t)}}},f={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector(`div[class*="VideoIndexComponent"]`)?324:292,zIndex:function(){let e=window.parent.document;e.querySelector(`.header-wrapper`)?.setAttribute(`style`,`height:124px`),e.querySelector(`.weather-widget-wrapper`)?.setAttribute(`style`,`bottom:0px`),e.querySelector(`.content`)?.setAttribute(`style`,`padding-top:32px`),e.querySelector(`.layout`)?.setAttribute(`style`,`position:relative;background-color:transparent;`),e.querySelector(`.footer-ad`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`);let t=e.querySelector(`[class*="VideoIndexComponent"]`);t&&(e.querySelector(`.breadcrumbs`)?.setAttribute(`style`,`display:none`),t.style.maxWidth=`1190px`,t.style.margin=`auto`,t.style.position=`relative`)}},p=[{site:`https://www.nine.com.au/sport`,config:u},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:u},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:d},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:f},{site:`https://staging.9news`,config:f},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],m=()=>{let e=window.document.getElementById(`nineContent`);e&&(e.style.backgroundColor=T.siteBackgroundColor),i&&(a.setProperty(`--masthead-height`,`250px`),a.height=`var(--masthead-height)`),y(),v(),g(),b(),n.addEventListener(`scroll`,C,{passive:!0}),E=setTimeout(C,50)},h=()=>{let e=null;return e=r.querySelector(`div[id*="billboard"][id*="above"]`),e},g=()=>{let e=null;if(!window.parent)return e;if(e=r.querySelector(`div[id*="halfpage"][id*="above"]`),!e)return;let t=e;for(let e=0;e<3;e++)if(t=t.parentNode,t&&getComputedStyle(t).position===`sticky`){t.setAttribute(`style`,`top: ${T.stickyMargin.offset}px`);break}},_=()=>{let e=n.location.href;for(let t=0;t<p.length;t+=1)if(e.indexOf(p[t].site)>=0)return p[t].config},v=()=>{if(!t)return;let e=t.style;e.width=`100%`,e.height=`1000px`,e.position=`fixed`,e.left=`50%`,e.setProperty(`--transform-y`,`0px`),e.transform=`translate3d(-50%, var(--transform-y), 0)`},y=()=>{if(!w)return;let e=w.style;w.className=``,e.minHeight=`250px`,e.marginTop=T.adNodeMarginTop+`px`,e.marginBottom=T.adNodeMarginBottom+`px`,e.position=`static`,e.display=`block`,T.zIndex&&T.zIndex()},b=()=>{o=r.querySelector(`div[data-contentunit-id="stan"]`)?.parentNode||r.querySelector(`div[data-ui-testid="header-score-strip"]`)?.parentNode||r.querySelector(`div[class*="__MyContainer"]`)||r.querySelector(`div[class*="__ArticleContainer"]`)||r.querySelector(`div[class*="__VideoIndexComponent"]`)||r.querySelector(`div.container.layout`)||r.querySelector(`main.container.layout`),o&&(o.style.willChange=`clip-path`,o.style.transition=`none`,o.style.webkitBackfaceVisibility=`hidden`,o.style.backfaceVisibility=`hidden`,o.style.transform=`translate3d(0,0,0)`,o.style.backgroundColor=T.siteBackgroundColor,o.style.setProperty(`--mask-inset`,`0px`),o.style.clipPath=`inset(var(--mask-inset, 0px) 0 0 0)`)},x=0,S=0,C=()=>{let e=n.scrollY,r=e>x,i=e>O?e-T.maskOffset:0,s=Math.abs(i-S);if(o)if(r&&i>S)if(s>100){let e=Math.max(0,i-100);o.style.transition=`none`,o.style.setProperty(`--mask-inset`,`${e}px`),o.offsetHeight,o.style.transition=`clip-path 0.3s ease-out`,o.style.setProperty(`--mask-inset`,`${i}px`)}else o.style.transition=`clip-path 0.3s ease-out`,o.style.setProperty(`--mask-inset`,`${i}px`);else o.style.transition=`none`,o.style.setProperty(`--mask-inset`,`${i}px`);x=e,S=i,e>O?(t.style.setProperty(`--transform-y`,`${-D}px`),a.setProperty(`--masthead-height`,`100px`),window.CollantOn||window.goCollant()):e>D&&e<=O?(t.style.setProperty(`--transform-y`,`${-D}px`),a.setProperty(`--masthead-height`,`${250+D-e}px`),window.CollantOn&&window.goBillboard()):e>=0&&e<=D&&(t.style.setProperty(`--transform-y`,`${-e}px`),a.setProperty(`--masthead-height`,`250px`),window.CollantOn&&window.goBillboard())},w=h(),T=_();if(!T)return()=>{};let E=null,D=-T.responsiveScroll+e,O=D+150;return m(),()=>{n.removeEventListener(`scroll`,C),E&&=(clearTimeout(E),null)}},n=(e,t,n)=>{let r=window.frameElement?window.frameElement:null;if(!r)return()=>{};let i=window.parent;if(!i||i===window)return()=>{};let a=null;try{a=i.document,i.location.href}catch{return()=>{}}let o={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`250px`,logoSmallTransform:`translateX(0px)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;e.querySelector(`.container--padded`)?.setAttribute(`style`,`position:relative`),((e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n)))(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},s={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));e.querySelector(`.nk-demographics`)?.setAttribute(`style`,`max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`.nk-footer`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#VideoIndex`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#Index`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.show`)?.setAttribute(`style`,`position:relative`),t(e.querySelectorAll(`.column`),[[`position`,`relative`]]),t(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),t(e.querySelectorAll(`blockquote`),[[`zIndex`,`1`]]),e.querySelector(`div[class*="article__MyContainer"]`)?.setAttribute(`style`,`max-width:1190px;margin-top:-24px`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},c={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));e.querySelector(`.nk-demographics`)?.setAttribute(`style`,`max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`.nk-footer`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#VideoIndex`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#Index`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.show`)?.setAttribute(`style`,`position:relative`),t(e.querySelectorAll(`.column`),[[`position`,`relative`]]),t(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),t(e.querySelectorAll(`blockquote`),[[`zIndex`,`1`]]),e.querySelector(`div[class^="component__StrapContainer"]`)?.setAttribute(`style`,`position:relative`),e.querySelector(`section[class^="WatchNow__Container"]`)?.setAttribute(`style`,`margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);`),e.querySelector(`div[class*="ArticleContainer"]`)?.setAttribute(`style`,`max-width:1190px;margin-top:0px`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},l={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));e.querySelector(`section[data-section="marketing-banner"]`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.container--ads`)?.setAttribute(`style`,`min-height:0`),e.getElementById(`mastheadAnchorToggle`)?.setAttribute(`style`,`display:none`),t(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),t(e.querySelectorAll(`iframe`),[[`position`,`relative`]]),e.querySelector(`div[data-testid="live-tv"]`)?.parentNode?.setAttribute(`style`,`position:relative`),e.querySelector(`div[data-contentunit-id="stan"]`)?.parentNode?.setAttribute(`style`,`position:relative`),t(e.querySelectorAll(`small`),[[`position`,`relative`]]),e.querySelector(`small`)?.setAttribute(`style`,`position:inherit`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},u={siteBackgroundColor:`#ffffff`,logoTop:`-148px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;e.querySelector(`.container--padded`)?.setAttribute(`style`,`position:relative`),((e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n)))(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},d={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`invert(1)`,zIndex:function(){let e=window.parent.document;e.querySelector(`.header-wrapper`)?.setAttribute(`style`,`height:124px`),e.querySelector(`.weather-widget-wrapper`)?.setAttribute(`style`,`bottom:0px`),e.querySelector(`.content`)?.setAttribute(`style`,`padding-top:32px`),e.querySelector(`.layout`)?.setAttribute(`style`,`position:relative;background-color:transparent;`),e.querySelector(`.footer-ad`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},f=[{site:`https://www.nine.com.au/sport`,config:o},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:o},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:u},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:d},{site:`https://staging.9news`,config:d},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],p=()=>{let e=window.document.getElementById(`logo-small`);e&&(e.style.left=C.logoSmallLeft,e.style.transform=C.logoSmallTransform,e.style.filter=C.logoSmallFilter),_(),g(),i.addEventListener(`scroll`,y),w=setTimeout(y,50)},m=()=>{let e=null;return e=a.querySelector(`div[id*="desktop"][id*="takeover"][id*="above"]`),e},h=()=>{let e=i.location.href;for(let t=0;t<f.length;t+=1)if(e.indexOf(f[t].site)>=0)return f[t].config},g=()=>{if(!r)return;let e=r.style;e.width=`100%`,e.height=`${t}px`,e.position=`relative`},_=()=>{if(!S)return;let e=S.style;e.maxHeight=`${t}px`,e.minHeight=`${t}px`,e.marginTop=`0px`,e.marginBottom=`0px`,e.position=`absolute`,e.width=`1900px`,e.top=C.logoTop,e.left=C.logoLeft,e.transform=C.logoTransform,e.zIndex=`10000`,e.pointerEvents=`none`,C.zIndex&&C.zIndex()},v=e=>{if(!S)return;let r=S.style;e===`big`&&!window.bigActive?(r.maxHeight=`${t}px`,r.minHeight=`${t}px`,r.position=`absolute`,r.top=C.logoTop,r.zIndex=`10000`,window.loadBig()):e===`small`&&!window.smallActive&&(r.maxHeight=`${n}px`,r.minHeight=`${n}px`,r.position=`fixed`,r.top=`0px`,r.zIndex=`100000`,window.loadSmall())},y=()=>{let e=i.scrollY;r.style,e>=0&&e<=T?v(`big`):e>T&&(v(e>E?`small`:`big`),E=e<=0?0:e)},b=(e=4)=>{x()||e>1&&setTimeout(()=>{b(e-1)},20)},x=()=>{let e=a.querySelector(`header`);return window.getComputedStyle(e).top===`0px`?(v(`big`),!0):(v(`small`),!1)},S=m(),C=h();if(!C)return()=>{};let w=null,T=e,E=0;return p(),()=>{i.removeEventListener(`scroll`,y),w&&=(clearTimeout(w),null)}},r=((e,t=50)=>`linear(${Array.from({length:t+1},(n,r)=>e(r/t)).map(e=>+e.toFixed(4)).join(`, `)})`)(e=>{if(e===0||e===1)return e;let t=2*Math.PI/3;return 2**(-10*e)*Math.sin((e*10-.75)*t)+1}),i=(e={})=>{let t={adScrollHeight:`300vh`,bandHeight:24,bandBg:`#222`,bandColor:`#fff`,bandFontSize:`10px`,bandFontFamily:`Arial, Helvetica, sans-serif`,bandLetterSpacing:`1px`,labelTop:`Advertisement`,labelBottomResume:`Scroll to continue`,labelBottomMid:`Keep scrolling`,labelBottomLate:`Almost there`,labelBottomNow:`Content now ↓`,progressBarColor:`rgba(255,255,255,0.35)`,zIndexTop:9,zIndexBottom:8,bottomBandShowAt:400,bottomBandHideAt:300,snapPx:50,snapOverlap:2,stretchOverlap:20,snapDuration:.9,snapEase:r,onEnter:null,onExit:null,onProgress:null,thresholds:[],...e},n=window.frameElement?window.frameElement:null;if(!n)return()=>{};let i=window.parent;if(!i||i===window)return()=>{};let a=null;try{a=i.document,i.location.href}catch{return()=>{}}let o=(()=>{let e=a.querySelector(`#adspot-mobile-mobile-3-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==a.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!o)return()=>{};let s=o.getAttribute(`style`),c=n.getAttribute(`style`),l=[],u={width:`100vw`,marginLeft:`calc(50% - 50vw)`,height:t.bandHeight+`px`,backgroundColor:t.bandBg,color:t.bandColor,fontSize:t.bandFontSize,fontFamily:t.bandFontFamily,textTransform:`uppercase`,letterSpacing:t.bandLetterSpacing,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`};(()=>{let e=o.style;e.height=t.adScrollHeight,e.maxHeight=t.adScrollHeight,e.position=`relative`,o.setAttribute(`poweredAC`,`0.1.29`),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`;let r=o.parentElement;for(let e=0;e<6&&r&&r!==a.body;e++){let t=i.getComputedStyle(r),n=!1;(t.overflow===`hidden`||t.overflowY===`hidden`)&&(l.push({el:r,prop:`overflow`,val:r.style.overflow}),l.push({el:r,prop:`overflowY`,val:r.style.overflowY}),r.style.overflow=`visible`,r.style.overflowY=`visible`,n=!0);let a=parseFloat(t.height);t.height!==`auto`&&!isNaN(a)&&a<600&&(l.push({el:r,prop:`height`,val:r.style.height}),r.style.height=`auto`,n=!0);let o=t.maxHeight;if(o&&o!==`none`&&(l.push({el:r,prop:`maxHeight`,val:r.style.maxHeight}),r.style.maxHeight=`none`,n=!0),!n&&e>1)break;r=r.parentElement}let s=n.style;s.position=`fixed`,s.top=`0`,s.left=`0`,s.width=`100vw`,s.height=`100vh`,s.maxWidth=`100vw`,s.margin=`0`,s.padding=`0`,s.border=`none`,s.zIndex=`1`;let c=a.createElement(`div`);c.id=`interscroller-top-band-wrapper`,Object.assign(c.style,{position:`sticky`,bottom:`0`,width:`100vw`,marginLeft:`calc(50% - 50vw)`,zIndex:t.zIndexTop,pointerEvents:`none`});let d=a.createElement(`div`);d.id=`interscroller-top-band`,d.textContent=t.labelTop,Object.assign(d.style,u,{position:`relative`,width:`100%`,marginLeft:`0`,transformOrigin:`top center`}),c.appendChild(d),o.insertAdjacentElement(`beforebegin`,c);let f=a.createElement(`div`);f.id=`interscroller-bottom-band`,Object.assign(f.style,u,{position:`fixed`,bottom:`0`,left:`0`,zIndex:t.zIndexBottom,display:`flex`,overflow:`hidden`,transform:`translateY(100%)`,transition:`none`});let p=a.createElement(`span`);if(p.id=`interscroller-bottom-label`,p.textContent=t.labelBottomResume,p.style.cssText=`position:relative;z-index:1;pointer-events:none;`,f.appendChild(p),t.progressBarColor){let e=a.createElement(`span`);e.id=`interscroller-bottom-progress`,e.style.cssText=[`position:absolute`,`inset:0`,`width:0%`,`background:${t.progressBarColor}`,`transition:none`,`z-index:0`,`pointer-events:none`].join(`;`),f.appendChild(e)}o.after(f)})();let d=a.querySelector(`#interscroller-top-band`),f=a.querySelector(`#interscroller-top-band-wrapper`),p=a.querySelector(`#interscroller-bottom-band`),m=a.querySelector(`#interscroller-bottom-label`),h=a.querySelector(`#interscroller-bottom-progress`),g=t.bandHeight,_=t.snapPx,v=!1,y=!1,b=!1,x=!1,S=(t.thresholds||[]).map(()=>!1),C=()=>{if(!p)return;let e=o.getBoundingClientRect(),n=i.innerHeight,r=e.top<=n,a=e.bottom<=n-g,s=x?e.top<=n-t.bottomBandHideAt:e.top<=n-t.bottomBandShowAt,c=o.offsetHeight,l=Math.min(1,Math.max(0,(n-e.top)/(c+n))),u=Math.min(1,Math.max(0,(n-e.top)/(c+g))),f=Math.min(1,Math.max(0,(n-e.top)/c)),C=Math.min(e.bottom,n)-Math.max(e.top-g,0),w=Math.min(1,Math.max(0,C/n)),T=Math.max(0,Math.round(e.bottom-n));!y&&r&&t.onEnter&&t.onEnter(),!b&&a&&t.onExit&&t.onExit(),y=r,b=a,x=s,t.onProgress&&t.onProgress({scrollProgress:l,adExposure:f,viewportCoverage:w,pxRemaining:T}),(t.thresholds||[]).forEach((e,t)=>{let n=S[t],r=l>=e.at;!n&&r?(S[t]=!0,e.onEnter&&e.onEnter(l)):n&&!r&&(S[t]=!1,e.onLeave&&e.onLeave(l))});let E=n;if(d&&e.top<=E+t.stretchOverlap&&!a){let n=E-e.top;if(!v&&n<=_-t.snapOverlap){let e=1+Math.max(0,n+t.stretchOverlap)/g;d.style.transition=`none`,d.style.transform=`scaleY(${e})`}else !v&&n>_-t.snapOverlap&&(v=!0,d.style.transition=`transform ${t.snapDuration}s ${t.snapEase}`,d.style.transform=`scaleY(1)`)}else d&&e.top>E+t.stretchOverlap&&(v=!1,d.style.transition=`none`,d.style.transform=`scaleY(1)`);let D=i.visualViewport?Math.round(i.innerHeight-(i.visualViewport.offsetTop+i.visualViewport.height)):0;a?(p.style.transition=`none`,p.style.transform=`none`,p.style.position=`sticky`,p.style.top=`0`,p.style.bottom=``,p.style.left=``,p.style.marginLeft=`calc(50% - 50vw)`,p.style.width=`100vw`,m&&(m.textContent=t.labelBottomNow),h&&(h.style.width=`100%`)):s?(m&&(m.textContent=T>0?u<.2?t.labelBottomResume:u<.75?t.labelBottomMid:t.labelBottomLate:t.labelBottomNow),h&&(h.style.width=`${Math.round(u*100)}%`),p.style.transition=`transform 0.3s ease`,p.style.transform=`translateY(0)`,p.style.position=`fixed`,p.style.bottom=`${D}px`,p.style.top=``,p.style.left=`0`,p.style.marginLeft=`0`,p.style.width=`100vw`):(p.style.transition=`transform 0.3s ease`,p.style.transform=`translateY(100%)`,p.style.position=`fixed`,p.style.bottom=`${D}px`,p.style.left=`0`,p.style.marginLeft=`0`,p.style.width=`100vw`)};return C(),i.addEventListener(`scroll`,C,{passive:!0}),i.visualViewport?.addEventListener(`resize`,C,{passive:!0}),()=>{i.removeEventListener(`scroll`,C),i.visualViewport?.removeEventListener(`resize`,C),f?f.remove():d&&d.remove(),p&&p.remove(),s?o.setAttribute(`style`,s):o.removeAttribute(`style`),c?n.setAttribute(`style`,c):n.removeAttribute(`style`),l.forEach(({el:e,prop:t,val:n})=>{e.style[t]=n||``})}},a=(e={})=>{let t={adaptToWidth:`100%`,maxWidth:`400px`,maintainAspectRatio:!0,adaptToHeight:!1,zIndex:7,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};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;return(()=>{let e=a.style;if(e.position=`relative`,e.overflow=`visible`,e.boxSizing=`border-box`,a.setAttribute(`poweredAC`,`0.1.29`),c){let e=c.style;e.width=`100%`,e.height=`100%`,e.margin=`0`,e.textAlign=`left`}let t=n.style;t.display=`block`,t.width=`100%`,t.height=`100%`,t.border=`none`,t.margin=`0`,t.padding=`0`})(),(()=>{let e=a.style;e.zIndex=String(t.zIndex),t.adaptToWidth&&(e.width=t.adaptToWidth,e.maxWidth=t.maxWidth||t.adaptToWidth,t.maxWidth&&t.adaptToWidth!==`100vw`&&!t.adaptToWidth.endsWith(`vw`)?(e.marginLeft=`auto`,e.marginRight=`auto`):(t.adaptToWidth===`100vw`||t.adaptToWidth.endsWith(`vw`))&&(e.marginLeft=`calc(50% - 50vw)`,e.marginRight=`0`)),u&&d&&d!==`0px`&&(u.style.paddingTop=`0`),t.maintainAspectRatio?r.requestAnimationFrame(()=>{let e=a.offsetWidth||p,r=Math.round((m||50)/p*e);a.style.height=r+`px`,c&&(c.style.height=r+`px`),n.style.height=r+`px`,t.onAdapt&&t.onAdapt()}):(t.adaptToHeight&&(e.height=t.adaptToHeight),t.onAdapt&&t.onAdapt())})(),()=>{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)}},o=(e={})=>{let t={billboardHeight:150,sideStripWidth:10,zIndex:0,creativeUrl:null,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};let o={nine:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},wwos:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},nineNews:{siteBackgroundColor:`#ffffff`,setup(e){let t=e.querySelector(`.layout`);t&&(t.style.backgroundColor=`transparent`),e.querySelector(`.content`)?.style.setProperty(`position`,`relative`)}},lifestyle:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},smh:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},theage:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}}},s=[{site:`https://www.nine.com.au/sport`,config:o.wwos},{site:`https://staging.nine.com.au/sport`,config:o.wwos},{site:`https://www.nine.com.au`,config:o.nine},{site:`https://staging.nine.com.au`,config:o.nine},{site:`https://preview.nine.com.au`,config:o.nine},{site:`https://www.9news`,config:o.nineNews},{site:`https://staging.9news`,config:o.nineNews},{site:`https://honey`,config:o.lifestyle},{site:`https://www.smh`,config:o.smh},{site:`https://www.theage`,config:o.theage},{site:`https://creative-preview-an.com`,config:o.nine}],c=(()=>{let e=r.location.href;for(let t of s)if(e.indexOf(t.site)>=0)return t.config;return o.nine})(),l=n.getAttribute(`style`),u=a.getAttribute(`style`),d=n.parentElement===a?null:n.parentElement,f=d?d.getAttribute(`style`):null,p=a.parentElement,m=p?p.getAttribute(`style`):null,h=null,g=null,_=[],v=()=>{let e=n.parentElement;for(;e&&e!==i.body&&e!==i.documentElement;){let t=r.getComputedStyle(e);(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`)&&(_.push({el:e,orig:e.getAttribute(`style`)}),e.style.transform=`none`,e.style.willChange=`auto`,e.style.contain=`none`,e.style.filter=`none`,e.style.perspective=`none`),t.overflow!==`visible`&&(_.find(t=>t.el===e)||_.push({el:e,orig:e.getAttribute(`style`)}),e.style.overflow=`visible`),e=e.parentElement}let o=n.style;if(o.position=`fixed`,o.top=`0`,o.left=`0`,o.width=`100vw`,o.height=`100dvh`,o.zIndex=String(t.zIndex),o.border=`none`,o.margin=`0`,o.padding=`0`,o.display=`block`,a.setAttribute(`poweredAC`,`0.1.29`),d){let e=d.style;e.width=`100%`,e.height=`0`,e.overflow=`visible`,e.position=`static`,e.margin=`0`}let s=a.style;s.height=t.billboardHeight+`px`,s.minHeight=t.billboardHeight+`px`,s.background=`transparent`,s.overflow=`visible`,s.position=`relative`,s.width=`100%`,s.padding=`0`,s.margin=`0`,p&&(p.style.overflow=`visible`,p.style.position=`relative`,p.style.backgroundColor=`transparent`,p.style.height=t.billboardHeight+`px`,p.style.minHeight=t.billboardHeight+`px`,p.style.maxHeight=t.billboardHeight+`px`,p.style.padding=`0`,p.style.margin=`0`,p.setAttribute(`data-mf-slot`,``));let l=`max(${t.sideStripWidth}px, env(safe-area-inset-left))`,u=`max(${t.sideStripWidth}px, env(safe-area-inset-right))`;h=i.createElement(`style`),h.id=`mobilefireplace-pac`,h.textContent=`
108
+ `,e.head.appendChild(t)}}},f={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector(`div[class*="VideoIndexComponent"]`)?324:292,zIndex:function(){let e=window.parent.document;e.querySelector(`.header-wrapper`)?.setAttribute(`style`,`height:124px`),e.querySelector(`.weather-widget-wrapper`)?.setAttribute(`style`,`bottom:0px`),e.querySelector(`.content`)?.setAttribute(`style`,`padding-top:32px`),e.querySelector(`.layout`)?.setAttribute(`style`,`position:relative;background-color:transparent;`),e.querySelector(`.footer-ad`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`);let t=e.querySelector(`[class*="VideoIndexComponent"]`);t&&(e.querySelector(`.breadcrumbs`)?.setAttribute(`style`,`display:none`),t.style.maxWidth=`1190px`,t.style.margin=`auto`,t.style.position=`relative`)}},p=[{site:`https://www.nine.com.au/sport`,config:u},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:u},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:d},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:f},{site:`https://staging.9news`,config:f},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],m=()=>{let e=window.document.getElementById(`nineContent`);e&&(e.style.backgroundColor=T.siteBackgroundColor),i&&(a.setProperty(`--masthead-height`,`250px`),a.height=`var(--masthead-height)`),y(),v(),g(),b(),n.addEventListener(`scroll`,C,{passive:!0}),E=setTimeout(C,50)},h=()=>{let e=null;return e=r.querySelector(`div[id*="billboard"][id*="above"]`),e},g=()=>{let e=null;if(!window.parent)return e;if(e=r.querySelector(`div[id*="halfpage"][id*="above"]`),!e)return;let t=e;for(let e=0;e<3;e++)if(t=t.parentNode,t&&getComputedStyle(t).position===`sticky`){t.setAttribute(`style`,`top: ${T.stickyMargin.offset}px`);break}},_=()=>{let e=n.location.href;for(let t=0;t<p.length;t+=1)if(e.indexOf(p[t].site)>=0)return p[t].config},v=()=>{if(!t)return;let e=t.style;e.width=`100%`,e.height=`1000px`,e.position=`fixed`,e.left=`50%`,e.setProperty(`--transform-y`,`0px`),e.transform=`translate3d(-50%, var(--transform-y), 0)`},y=()=>{if(!w)return;let e=w.style;w.className=``,e.minHeight=`250px`,e.marginTop=T.adNodeMarginTop+`px`,e.marginBottom=T.adNodeMarginBottom+`px`,e.position=`static`,e.display=`block`,T.zIndex&&T.zIndex()},b=()=>{o=r.querySelector(`div[data-contentunit-id="stan"]`)?.parentNode||r.querySelector(`div[data-ui-testid="header-score-strip"]`)?.parentNode||r.querySelector(`div[class*="__MyContainer"]`)||r.querySelector(`div[class*="__ArticleContainer"]`)||r.querySelector(`div[class*="__VideoIndexComponent"]`)||r.querySelector(`div.container.layout`)||r.querySelector(`main.container.layout`),o&&(o.style.willChange=`clip-path`,o.style.transition=`none`,o.style.webkitBackfaceVisibility=`hidden`,o.style.backfaceVisibility=`hidden`,o.style.transform=`translate3d(0,0,0)`,o.style.backgroundColor=T.siteBackgroundColor,o.style.setProperty(`--mask-inset`,`0px`),o.style.clipPath=`inset(var(--mask-inset, 0px) 0 0 0)`)},x=0,S=0,C=()=>{let e=n.scrollY,r=e>x,i=e>O?e-T.maskOffset:0,s=Math.abs(i-S);if(o)if(r&&i>S)if(s>100){let e=Math.max(0,i-100);o.style.transition=`none`,o.style.setProperty(`--mask-inset`,`${e}px`),o.offsetHeight,o.style.transition=`clip-path 0.3s ease-out`,o.style.setProperty(`--mask-inset`,`${i}px`)}else o.style.transition=`clip-path 0.3s ease-out`,o.style.setProperty(`--mask-inset`,`${i}px`);else o.style.transition=`none`,o.style.setProperty(`--mask-inset`,`${i}px`);x=e,S=i,e>O?(t.style.setProperty(`--transform-y`,`${-D}px`),a.setProperty(`--masthead-height`,`100px`),window.CollantOn||window.goCollant()):e>D&&e<=O?(t.style.setProperty(`--transform-y`,`${-D}px`),a.setProperty(`--masthead-height`,`${250+D-e}px`),window.CollantOn&&window.goBillboard()):e>=0&&e<=D&&(t.style.setProperty(`--transform-y`,`${-e}px`),a.setProperty(`--masthead-height`,`250px`),window.CollantOn&&window.goBillboard())},w=h(),T=_();if(!T)return()=>{};let E=null,D=-T.responsiveScroll+e,O=D+150;return m(),()=>{n.removeEventListener(`scroll`,C),E&&=(clearTimeout(E),null)}},n=866,r=68,i=16,a=7e3,o=`adspot-desktop-takeover-2-above`,s=-24,c=-24,l=[`www.nine.com.au`,`staging.nine.com.au`,`preview.nine.com.au`,`render-web-nine-staging-v1.ffxblue.com.au`,`render-web-nine-production-v1.ffxblue.com.au`],u=[{hostnames:l,path:`/sport`,headingText:`Sport`,slotId:o}],d=new Set([`localhost`,`127.0.0.1`]),f=`__poweredAdConfigHeadingintegrationActive`,p=`data-pac-headingintegration-owner`,m=(e,t)=>{if(typeof e==`number`&&Number.isFinite(e))return`${e}px`;if(typeof e==`string`){let n=e.trim();return n?/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n:`${t}px`}return`${t}px`},h=e=>{if(!e||typeof e!=`object`)return null;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):[];return!t||!n&&!r?null:{headingText:t,path:n||null,pathPrefix:r||null,slotId:typeof e.slotId==`string`&&e.slotId.trim()?e.slotId.trim():o,hostnames:i.length?i:l}},g=e=>{if(!Array.isArray(e)||e.length===0)return u;let t=e.map(h).filter(Boolean);return t.length?t:u},_=({offsetTop:e=s,offsetLeft:t=c,width:o=n,height:l=r,pageTargets:h=u}={})=>{let _=window.frameElement||null;if(!_)return()=>{};let v=window.parent;if(!v||v===window)return()=>{};let y=null;try{y=v.document,v.location.href}catch{return()=>{}}let b=v[f];if(b?.iframe===_&&typeof b.cleanup==`function`)return b.cleanup;if(b?.iframe?.isConnected&&typeof b?.cleanup==`function`)return()=>{};typeof b?.cleanup==`function`&&b.cleanup();let x=`headingintegration-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,S=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},C=()=>{try{let e=window.location.hostname.toLowerCase();return d.has(e)?!0:new URLSearchParams(window.location.search).get(`keepHeadingintegrationVisible`)===`1`}catch{return!1}},w=(e=_.parentElement)=>{let t=e;for(;t&&t!==y.body;){let e=t.id||``,n=t.getAttribute?.(`data-testid`)||``,r=t.getAttribute?.(`type`)||``;if(e.includes(`adspot`)||n.toLowerCase().includes(`ad`)||r)return t;t=t.parentElement}return _.parentElement},T=()=>{try{let e=new URL(v.location.href),t=e.hostname.toLowerCase(),n=e.pathname.toLowerCase();return B.find(e=>{let r=e.hostnames.includes(t),i=e.path?n===e.path:n.startsWith(e.pathPrefix);return r&&i})||null}catch{return null}return null},E=e=>Array.from(y.querySelectorAll(`#app h1, #app h2, #app h3`)).filter(t=>t.textContent?.trim().toLowerCase()===e.toLowerCase())[0]||null,D=T();if(!D)return()=>{};let O=w((D.slotId?y.getElementById(D.slotId):null)||_.parentElement);if(!O)return()=>{};let k=O.getAttribute(p);if(k&&k!==x)return()=>{};let A=O.parentElement,j=O.nextSibling,M=y.createComment(`headingintegration-placeholder`),N=null,P=null,F=C(),I=m(e,s),L=m(t,c),R=m(o,n),z=m(l,r),B=g(h),V=()=>{[O.parentElement,O].filter(Boolean).forEach(e=>{S(e,`overflow`,`visible`)}),S(O,`width`,R),S(O,`maxWidth`,R),S(O,`minWidth`,R),S(O,`height`,z),S(O,`minHeight`,z),S(O,`marginLeft`,`auto`),S(O,`marginRight`,`auto`),S(O,`marginBottom`,`${i}px`),S(O,`position`,`absolute`),S(O,`top`,I),S(O,`left`,L),S(O,`display`,`block`),S(O,`pointerEvents`,`none`),S(O,`zIndex`,`1080`),O.setAttribute(p,x),S(_,`width`,R),S(_,`height`,z),S(_,`display`,`block`),S(_,`border`,`0`),S(_,`position`,`relative`),S(_,`pointerEvents`,`auto`)},H=()=>{S(O,`display`,`none`),S(O,`height`,`0px`),S(O,`minHeight`,`0px`),S(O,`marginBottom`,`0px`)},U=(e=12)=>{let t=E(D.headingText);if(!t){e>1&&(P=v.setTimeout(()=>U(e-1),250));return}!M.parentNode&&A&&A.insertBefore(M,O),t.parentNode?.insertBefore(O,t),V(),F||(N=v.setTimeout(H,a))};U();let W=()=>{P&&=(v.clearTimeout(P),null),N&&=(v.clearTimeout(N),null),O.getAttribute(p)===x&&O.removeAttribute(p),M.parentNode&&A&&(A.insertBefore(O,j),M.parentNode.removeChild(M)),v[f]?.instanceId===x&&delete v[f]};return v[f]={instanceId:x,iframe:_,cleanup:W},W},v=(e,t,n)=>{let r=window.frameElement?window.frameElement:null;if(!r)return()=>{};let i=window.parent;if(!i||i===window)return()=>{};let a=null;try{a=i.document,i.location.href}catch{return()=>{}}let o={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`250px`,logoSmallTransform:`translateX(0px)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;e.querySelector(`.container--padded`)?.setAttribute(`style`,`position:relative`),((e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n)))(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},s={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));e.querySelector(`.nk-demographics`)?.setAttribute(`style`,`max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`.nk-footer`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#VideoIndex`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#Index`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.show`)?.setAttribute(`style`,`position:relative`),t(e.querySelectorAll(`.column`),[[`position`,`relative`]]),t(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),t(e.querySelectorAll(`blockquote`),[[`zIndex`,`1`]]),e.querySelector(`div[class*="article__MyContainer"]`)?.setAttribute(`style`,`max-width:1190px;margin-top:-24px`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},c={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));e.querySelector(`.nk-demographics`)?.setAttribute(`style`,`max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`.nk-footer`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#article`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#VideoIndex`)?.setAttribute(`style`,`position:relative`),e.querySelector(`#Index`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.show`)?.setAttribute(`style`,`position:relative`),t(e.querySelectorAll(`.column`),[[`position`,`relative`]]),t(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),t(e.querySelectorAll(`blockquote`),[[`zIndex`,`1`]]),e.querySelector(`div[class^="component__StrapContainer"]`)?.setAttribute(`style`,`position:relative`),e.querySelector(`section[class^="WatchNow__Container"]`)?.setAttribute(`style`,`margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);`),e.querySelector(`div[class*="ArticleContainer"]`)?.setAttribute(`style`,`max-width:1190px;margin-top:0px`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},l={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));e.querySelector(`section[data-section="marketing-banner"]`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.container--ads`)?.setAttribute(`style`,`min-height:0`),e.getElementById(`mastheadAnchorToggle`)?.setAttribute(`style`,`display:none`),t(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),t(e.querySelectorAll(`iframe`),[[`position`,`relative`]]),e.querySelector(`div[data-testid="live-tv"]`)?.parentNode?.setAttribute(`style`,`position:relative`),e.querySelector(`div[data-contentunit-id="stan"]`)?.parentNode?.setAttribute(`style`,`position:relative`),t(e.querySelectorAll(`small`),[[`position`,`relative`]]),e.querySelector(`small`)?.setAttribute(`style`,`position:inherit`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},u={siteBackgroundColor:`#ffffff`,logoTop:`-148px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;e.querySelector(`.container--padded`)?.setAttribute(`style`,`position:relative`),((e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n)))(e.querySelectorAll(`.advert`),[[`position`,`relative`]]),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},d={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`invert(1)`,zIndex:function(){let e=window.parent.document;e.querySelector(`.header-wrapper`)?.setAttribute(`style`,`height:124px`),e.querySelector(`.weather-widget-wrapper`)?.setAttribute(`style`,`bottom:0px`),e.querySelector(`.content`)?.setAttribute(`style`,`padding-top:32px`),e.querySelector(`.layout`)?.setAttribute(`style`,`position:relative;background-color:transparent;`),e.querySelector(`.footer-ad`)?.setAttribute(`style`,`position:relative`),e.querySelector(`.footer-netkit`)?.setAttribute(`style`,`position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);`),e.querySelector(`div[type="BANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[type="MBANNER"]`)?.setAttribute(`style`,`display:none`),e.querySelector(`div[id*="sidepanel"][id*="above"]`)?.setAttribute(`style`,`display:none`)}},f=[{site:`https://www.nine.com.au/sport`,config:o},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:o},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:u},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:d},{site:`https://staging.9news`,config:d},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],p=()=>{let e=window.document.getElementById(`logo-small`);e&&(e.style.left=C.logoSmallLeft,e.style.transform=C.logoSmallTransform,e.style.filter=C.logoSmallFilter),_(),g(),i.addEventListener(`scroll`,y),w=setTimeout(y,50)},m=()=>{let e=null;return e=a.querySelector(`div[id*="desktop"][id*="takeover"][id*="above"]`),e},h=()=>{let e=i.location.href;for(let t=0;t<f.length;t+=1)if(e.indexOf(f[t].site)>=0)return f[t].config},g=()=>{if(!r)return;let e=r.style;e.width=`100%`,e.height=`${t}px`,e.position=`relative`},_=()=>{if(!S)return;let e=S.style;e.maxHeight=`${t}px`,e.minHeight=`${t}px`,e.marginTop=`0px`,e.marginBottom=`0px`,e.position=`absolute`,e.width=`1900px`,e.top=C.logoTop,e.left=C.logoLeft,e.transform=C.logoTransform,e.zIndex=`10000`,e.pointerEvents=`none`,C.zIndex&&C.zIndex()},v=e=>{if(!S)return;let r=S.style;e===`big`&&!window.bigActive?(r.maxHeight=`${t}px`,r.minHeight=`${t}px`,r.position=`absolute`,r.top=C.logoTop,r.zIndex=`10000`,window.loadBig()):e===`small`&&!window.smallActive&&(r.maxHeight=`${n}px`,r.minHeight=`${n}px`,r.position=`fixed`,r.top=`0px`,r.zIndex=`100000`,window.loadSmall())},y=()=>{let e=i.scrollY;r.style,e>=0&&e<=T?v(`big`):e>T&&(v(e>E?`small`:`big`),E=e<=0?0:e)},b=(e=4)=>{x()||e>1&&setTimeout(()=>{b(e-1)},20)},x=()=>{let e=a.querySelector(`header`);return window.getComputedStyle(e).top===`0px`?(v(`big`),!0):(v(`small`),!1)},S=m(),C=h();if(!C)return()=>{};let w=null,T=e,E=0;return p(),()=>{i.removeEventListener(`scroll`,y),w&&=(clearTimeout(w),null)}},y=((e,t=50)=>`linear(${Array.from({length:t+1},(n,r)=>e(r/t)).map(e=>+e.toFixed(4)).join(`, `)})`)(e=>{if(e===0||e===1)return e;let t=2*Math.PI/3;return 2**(-10*e)*Math.sin((e*10-.75)*t)+1}),b=(e={})=>{let t={adScrollHeight:`300vh`,bandHeight:24,bandBg:`#222`,bandColor:`#fff`,bandFontSize:`10px`,bandFontFamily:`Arial, Helvetica, sans-serif`,bandLetterSpacing:`1px`,labelTop:`Advertisement`,labelBottomResume:`Scroll to continue`,labelBottomMid:`Keep scrolling`,labelBottomLate:`Almost there`,labelBottomNow:`Content now ↓`,progressBarColor:`rgba(255,255,255,0.35)`,zIndexTop:9,zIndexBottom:8,bottomBandShowAt:400,bottomBandHideAt:300,snapPx:50,snapOverlap:2,stretchOverlap:20,snapDuration:.9,snapEase:y,onEnter:null,onExit:null,onProgress:null,thresholds:[],...e},n=window.frameElement?window.frameElement:null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mobile-3-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};let o=a.getAttribute(`style`),s=n.getAttribute(`style`),c=[],l={width:`100vw`,marginLeft:`calc(50% - 50vw)`,height:t.bandHeight+`px`,backgroundColor:t.bandBg,color:t.bandColor,fontSize:t.bandFontSize,fontFamily:t.bandFontFamily,textTransform:`uppercase`,letterSpacing:t.bandLetterSpacing,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`};(()=>{let e=a.style;e.height=t.adScrollHeight,e.maxHeight=t.adScrollHeight,e.position=`relative`,a.setAttribute(`poweredAC`,`0.1.31`),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`;let o=a.parentElement;for(let e=0;e<6&&o&&o!==i.body;e++){let t=r.getComputedStyle(o),n=!1;(t.overflow===`hidden`||t.overflowY===`hidden`)&&(c.push({el:o,prop:`overflow`,val:o.style.overflow}),c.push({el:o,prop:`overflowY`,val:o.style.overflowY}),o.style.overflow=`visible`,o.style.overflowY=`visible`,n=!0);let i=parseFloat(t.height);t.height!==`auto`&&!isNaN(i)&&i<600&&(c.push({el:o,prop:`height`,val:o.style.height}),o.style.height=`auto`,n=!0);let a=t.maxHeight;if(a&&a!==`none`&&(c.push({el:o,prop:`maxHeight`,val:o.style.maxHeight}),o.style.maxHeight=`none`,n=!0),!n&&e>1)break;o=o.parentElement}let s=n.style;s.position=`fixed`,s.top=`0`,s.left=`0`,s.width=`100vw`,s.height=`100vh`,s.maxWidth=`100vw`,s.margin=`0`,s.padding=`0`,s.border=`none`,s.zIndex=`1`;let u=i.createElement(`div`);u.id=`interscroller-top-band-wrapper`,Object.assign(u.style,{position:`sticky`,bottom:`0`,width:`100vw`,marginLeft:`calc(50% - 50vw)`,zIndex:t.zIndexTop,pointerEvents:`none`});let d=i.createElement(`div`);d.id=`interscroller-top-band`,d.textContent=t.labelTop,Object.assign(d.style,l,{position:`relative`,width:`100%`,marginLeft:`0`,transformOrigin:`top center`}),u.appendChild(d),a.insertAdjacentElement(`beforebegin`,u);let f=i.createElement(`div`);f.id=`interscroller-bottom-band`,Object.assign(f.style,l,{position:`fixed`,bottom:`0`,left:`0`,zIndex:t.zIndexBottom,display:`flex`,overflow:`hidden`,transform:`translateY(100%)`,transition:`none`});let p=i.createElement(`span`);if(p.id=`interscroller-bottom-label`,p.textContent=t.labelBottomResume,p.style.cssText=`position:relative;z-index:1;pointer-events:none;`,f.appendChild(p),t.progressBarColor){let e=i.createElement(`span`);e.id=`interscroller-bottom-progress`,e.style.cssText=[`position:absolute`,`inset:0`,`width:0%`,`background:${t.progressBarColor}`,`transition:none`,`z-index:0`,`pointer-events:none`].join(`;`),f.appendChild(e)}a.after(f)})();let u=i.querySelector(`#interscroller-top-band`),d=i.querySelector(`#interscroller-top-band-wrapper`),f=i.querySelector(`#interscroller-bottom-band`),p=i.querySelector(`#interscroller-bottom-label`),m=i.querySelector(`#interscroller-bottom-progress`),h=t.bandHeight,g=t.snapPx,_=!1,v=!1,b=!1,x=!1,S=(t.thresholds||[]).map(()=>!1),C=()=>{if(!f)return;let e=a.getBoundingClientRect(),n=r.innerHeight,i=e.top<=n,o=e.bottom<=n-h,s=x?e.top<=n-t.bottomBandHideAt:e.top<=n-t.bottomBandShowAt,c=a.offsetHeight,l=Math.min(1,Math.max(0,(n-e.top)/(c+n))),d=Math.min(1,Math.max(0,(n-e.top)/(c+h))),y=Math.min(1,Math.max(0,(n-e.top)/c)),C=Math.min(e.bottom,n)-Math.max(e.top-h,0),w=Math.min(1,Math.max(0,C/n)),T=Math.max(0,Math.round(e.bottom-n));!v&&i&&t.onEnter&&t.onEnter(),!b&&o&&t.onExit&&t.onExit(),v=i,b=o,x=s,t.onProgress&&t.onProgress({scrollProgress:l,adExposure:y,viewportCoverage:w,pxRemaining:T}),(t.thresholds||[]).forEach((e,t)=>{let n=S[t],r=l>=e.at;!n&&r?(S[t]=!0,e.onEnter&&e.onEnter(l)):n&&!r&&(S[t]=!1,e.onLeave&&e.onLeave(l))});let E=n;if(u&&e.top<=E+t.stretchOverlap&&!o){let n=E-e.top;if(!_&&n<=g-t.snapOverlap){let e=1+Math.max(0,n+t.stretchOverlap)/h;u.style.transition=`none`,u.style.transform=`scaleY(${e})`}else !_&&n>g-t.snapOverlap&&(_=!0,u.style.transition=`transform ${t.snapDuration}s ${t.snapEase}`,u.style.transform=`scaleY(1)`)}else u&&e.top>E+t.stretchOverlap&&(_=!1,u.style.transition=`none`,u.style.transform=`scaleY(1)`);let D=r.visualViewport?Math.round(r.innerHeight-(r.visualViewport.offsetTop+r.visualViewport.height)):0;o?(f.style.transition=`none`,f.style.transform=`none`,f.style.position=`sticky`,f.style.top=`0`,f.style.bottom=``,f.style.left=``,f.style.marginLeft=`calc(50% - 50vw)`,f.style.width=`100vw`,p&&(p.textContent=t.labelBottomNow),m&&(m.style.width=`100%`)):s?(p&&(p.textContent=T>0?d<.2?t.labelBottomResume:d<.75?t.labelBottomMid:t.labelBottomLate:t.labelBottomNow),m&&(m.style.width=`${Math.round(d*100)}%`),f.style.transition=`transform 0.3s ease`,f.style.transform=`translateY(0)`,f.style.position=`fixed`,f.style.bottom=`${D}px`,f.style.top=``,f.style.left=`0`,f.style.marginLeft=`0`,f.style.width=`100vw`):(f.style.transition=`transform 0.3s ease`,f.style.transform=`translateY(100%)`,f.style.position=`fixed`,f.style.bottom=`${D}px`,f.style.left=`0`,f.style.marginLeft=`0`,f.style.width=`100vw`)};return C(),r.addEventListener(`scroll`,C,{passive:!0}),r.visualViewport?.addEventListener(`resize`,C,{passive:!0}),()=>{r.removeEventListener(`scroll`,C),r.visualViewport?.removeEventListener(`resize`,C),d?d.remove():u&&u.remove(),f&&f.remove(),o?a.setAttribute(`style`,o):a.removeAttribute(`style`),s?n.setAttribute(`style`,s):n.removeAttribute(`style`),c.forEach(({el:e,prop:t,val:n})=>{e.style[t]=n||``})}},x=(e={})=>{let t={adaptToWidth:`100%`,maxWidth:`400px`,maintainAspectRatio:!0,adaptToHeight:!1,zIndex:7,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};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;return(()=>{let e=a.style;if(e.position=`relative`,e.overflow=`visible`,e.boxSizing=`border-box`,a.setAttribute(`poweredAC`,`0.1.31`),c){let e=c.style;e.width=`100%`,e.height=`100%`,e.margin=`0`,e.textAlign=`left`}let t=n.style;t.display=`block`,t.width=`100%`,t.height=`100%`,t.border=`none`,t.margin=`0`,t.padding=`0`})(),(()=>{let e=a.style;e.zIndex=String(t.zIndex),t.adaptToWidth&&(e.width=t.adaptToWidth,e.maxWidth=t.maxWidth||t.adaptToWidth,t.maxWidth&&t.adaptToWidth!==`100vw`&&!t.adaptToWidth.endsWith(`vw`)?(e.marginLeft=`auto`,e.marginRight=`auto`):(t.adaptToWidth===`100vw`||t.adaptToWidth.endsWith(`vw`))&&(e.marginLeft=`calc(50% - 50vw)`,e.marginRight=`0`)),u&&d&&d!==`0px`&&(u.style.paddingTop=`0`),t.maintainAspectRatio?r.requestAnimationFrame(()=>{let e=a.offsetWidth||p,r=Math.round((m||50)/p*e);a.style.height=r+`px`,c&&(c.style.height=r+`px`),n.style.height=r+`px`,t.onAdapt&&t.onAdapt()}):(t.adaptToHeight&&(e.height=t.adaptToHeight),t.onAdapt&&t.onAdapt())})(),()=>{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)}},S=(e={})=>{let t={billboardHeight:150,sideStripWidth:10,zIndex:0,creativeUrl:null,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};let o={nine:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},wwos:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},nineNews:{siteBackgroundColor:`#ffffff`,setup(e){let t=e.querySelector(`.layout`);t&&(t.style.backgroundColor=`transparent`),e.querySelector(`.content`)?.style.setProperty(`position`,`relative`)}},lifestyle:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},smh:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},theage:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}}},s=[{site:`https://www.nine.com.au/sport`,config:o.wwos},{site:`https://staging.nine.com.au/sport`,config:o.wwos},{site:`https://www.nine.com.au`,config:o.nine},{site:`https://staging.nine.com.au`,config:o.nine},{site:`https://preview.nine.com.au`,config:o.nine},{site:`https://www.9news`,config:o.nineNews},{site:`https://staging.9news`,config:o.nineNews},{site:`https://honey`,config:o.lifestyle},{site:`https://www.smh`,config:o.smh},{site:`https://www.theage`,config:o.theage},{site:`https://creative-preview-an.com`,config:o.nine}],c=(()=>{let e=r.location.href;for(let t of s)if(e.indexOf(t.site)>=0)return t.config;return o.nine})(),l=n.getAttribute(`style`),u=a.getAttribute(`style`),d=n.parentElement===a?null:n.parentElement,f=d?d.getAttribute(`style`):null,p=a.parentElement,m=p?p.getAttribute(`style`):null,h=null,g=null,_=[],v=()=>{let e=n.parentElement;for(;e&&e!==i.body&&e!==i.documentElement;){let t=r.getComputedStyle(e);(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`)&&(_.push({el:e,orig:e.getAttribute(`style`)}),e.style.transform=`none`,e.style.willChange=`auto`,e.style.contain=`none`,e.style.filter=`none`,e.style.perspective=`none`),t.overflow!==`visible`&&(_.find(t=>t.el===e)||_.push({el:e,orig:e.getAttribute(`style`)}),e.style.overflow=`visible`),e=e.parentElement}let o=n.style;if(o.position=`fixed`,o.top=`0`,o.left=`0`,o.width=`100vw`,o.height=`100dvh`,o.zIndex=String(t.zIndex),o.border=`none`,o.margin=`0`,o.padding=`0`,o.display=`block`,a.setAttribute(`poweredAC`,`0.1.31`),d){let e=d.style;e.width=`100%`,e.height=`0`,e.overflow=`visible`,e.position=`static`,e.margin=`0`}let s=a.style;s.height=t.billboardHeight+`px`,s.minHeight=t.billboardHeight+`px`,s.background=`transparent`,s.overflow=`visible`,s.position=`relative`,s.width=`100%`,s.padding=`0`,s.margin=`0`,p&&(p.style.overflow=`visible`,p.style.position=`relative`,p.style.backgroundColor=`transparent`,p.style.height=t.billboardHeight+`px`,p.style.minHeight=t.billboardHeight+`px`,p.style.maxHeight=t.billboardHeight+`px`,p.style.padding=`0`,p.style.margin=`0`,p.setAttribute(`data-mf-slot`,``));let l=`max(${t.sideStripWidth}px, env(safe-area-inset-left))`,u=`max(${t.sideStripWidth}px, env(safe-area-inset-right))`;h=i.createElement(`style`),h.id=`mobilefireplace-pac`,h.textContent=`
109
109
  /* Mobile Fireplace — powered-ad-config */
110
110
  html, body {
111
111
  background-color: transparent !important;
@@ -157,4 +157,4 @@
157
157
  margin: 0 !important;
158
158
  padding: 0 !important;
159
159
  }
160
- `,i.head.appendChild(h),c.setup&&c.setup(i,a)},y=null,b=()=>{let e=r.innerWidth,n=r.innerHeight;if(e>n){let r=n/e,i=Math.round(t.billboardHeight*r);a.style.height=i+`px`,a.style.minHeight=i+`px`,g&&(g.style.height=i+`px`)}else a.style.height=t.billboardHeight+`px`,a.style.minHeight=t.billboardHeight+`px`,g&&(g.style.height=t.billboardHeight+`px`)};v();let x=t.creativeUrl||``;if(x&&x!==`about:blank`)try{let e=new URL(x);e.searchParams.set(`mfRole`,`billboard`),g=i.createElement(`iframe`),g.src=e.href,g.setAttribute(`data-mf-billboard-iframe`,``),g.setAttribute(`scrolling`,`no`),g.setAttribute(`frameborder`,`0`);let n=g.style;n.position=`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=`1`,a.appendChild(g)}catch(e){console.warn(`[mobilefireplace] Could not create billboard iframe:`,e)}return r.__mfBridge={adapted:!1,wallpaperWindow:n.contentWindow,billboardIframe:g,billboardWindow:null},g&&g.addEventListener(`load`,()=>{try{r.__mfBridge.billboardWindow=g.contentWindow}catch{}}),y=b,r.addEventListener(`resize`,y),b(),t.onAdapt&&r.requestAnimationFrame(()=>{r.__mfBridge.adapted=!0,t.onAdapt()}),()=>{y&&=(r.removeEventListener(`resize`,y),null),h&&h.parentNode&&(h.parentNode.removeChild(h),h=null),g&&g.parentNode&&(g.parentNode.removeChild(g),g=null);try{delete r.__mfBridge}catch{}l?n.setAttribute(`style`,l):n.removeAttribute(`style`);for(let{el:e,orig:t}of _)t?e.setAttribute(`style`,t):e.removeAttribute(`style`);_.length=0,u?a.setAttribute(`style`,u):a.removeAttribute(`style`),d&&(f?d.setAttribute(`style`,f):d.removeAttribute(`style`)),p&&(p.removeAttribute(`data-mf-slot`),m?p.setAttribute(`style`,m):p.removeAttribute(`style`))}},s=()=>{};function c({adFormat:r=``,stickyOffset:c=0,logoPosX:l=0,logoHeight:u=0,logoSmallHeight:d=0,...f}={}){typeof s==`function`&&s();let p=()=>{};return r===`fireplace`?p=e(c):r===`fireplace-collant`?p=t(c):r===`logomorph`?p=n(l,u,d):r===`interscroller`?p=i(f):r===`liquidframe`?p=a(f):r===`mobilefireplace`?p=o(f):console.warn(`[powered-ad-config] Unknown ad format:`,r),s=typeof p==`function`?p:()=>{},s}return c.version=`0.1.29`,c});
160
+ `,i.head.appendChild(h),c.setup&&c.setup(i,a)},y=null,b=()=>{let e=r.innerWidth,n=r.innerHeight;if(e>n){let r=n/e,i=Math.round(t.billboardHeight*r);a.style.height=i+`px`,a.style.minHeight=i+`px`,g&&(g.style.height=i+`px`)}else a.style.height=t.billboardHeight+`px`,a.style.minHeight=t.billboardHeight+`px`,g&&(g.style.height=t.billboardHeight+`px`)};v();let x=t.creativeUrl||``;if(x&&x!==`about:blank`)try{let e=new URL(x);e.searchParams.set(`mfRole`,`billboard`),g=i.createElement(`iframe`),g.src=e.href,g.setAttribute(`data-mf-billboard-iframe`,``),g.setAttribute(`scrolling`,`no`),g.setAttribute(`frameborder`,`0`);let n=g.style;n.position=`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=`1`,a.appendChild(g)}catch(e){console.warn(`[mobilefireplace] Could not create billboard iframe:`,e)}return r.__mfBridge={adapted:!1,wallpaperWindow:n.contentWindow,billboardIframe:g,billboardWindow:null},g&&g.addEventListener(`load`,()=>{try{r.__mfBridge.billboardWindow=g.contentWindow}catch{}}),y=b,r.addEventListener(`resize`,y),b(),t.onAdapt&&r.requestAnimationFrame(()=>{r.__mfBridge.adapted=!0,t.onAdapt()}),()=>{y&&=(r.removeEventListener(`resize`,y),null),h&&h.parentNode&&(h.parentNode.removeChild(h),h=null),g&&g.parentNode&&(g.parentNode.removeChild(g),g=null);try{delete r.__mfBridge}catch{}l?n.setAttribute(`style`,l):n.removeAttribute(`style`);for(let{el:e,orig:t}of _)t?e.setAttribute(`style`,t):e.removeAttribute(`style`);_.length=0,u?a.setAttribute(`style`,u):a.removeAttribute(`style`),d&&(f?d.setAttribute(`style`,f):d.removeAttribute(`style`)),p&&(p.removeAttribute(`data-mf-slot`),m?p.setAttribute(`style`,m):p.removeAttribute(`style`))}},C=()=>{};function w({adFormat:n=``,stickyOffset:r=0,logoPosX:i=0,logoHeight:a=0,logoSmallHeight:o=0,...s}={}){typeof C==`function`&&C();let c=()=>{};return n===`fireplace`?c=e(r):n===`fireplace-collant`?c=t(r):n===`logomorph`?c=v(i,a,o):n===`headingintegration`?c=_(s):n===`interscroller`?c=b(s):n===`liquidframe`?c=x(s):n===`mobilefireplace`?c=S(s):console.warn(`[powered-ad-config] Unknown ad format:`,n),C=typeof c==`function`?c:()=>{},C}return w.version=`0.1.31`,w});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powered-ad-config",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Configure Ads to load smoothly and at the right position on All Nine's websites",
5
5
  "main": "dist/powered-ad-config.umd.js",
6
6
  "module": "dist/powered-ad-config.es.js",