
That is an entry in Viral Studies, a Slate sequence through which we break down latest viral articles and—most significantly—their caveats.
The latest mass gathering in South Dakota for the annual Sturgis Motorbike Rally appeared like the right recipe for what epidemiologists name a “superspreading” occasion. Starting Aug. 7, an estimated 460,000 attendees from throughout nation descended on the small city of Sturgis for a 10-day occasion crammed with indoor and outside occasions resembling live shows and drag racing.
Now a new working paper by economist Dhaval Dave and colleagues is making headlines with their estimate that the Sturgis rally led to a stunning 266,796 new instances within the U.S. over a four-week interval, which might account for a staggering 19 % of newly confirmed instances within the U.S. in that point. They estimate the financial price of those instances at $12.2 billion, based mostly on earlier estimates of the statistical price of treating a COVID-19 affected person.
Not surprisingly, the web lit up with “we informed you so!” headlines and social media shaming and blaming. The massive figures instantly hit the “affirmation bias” button in many individuals’s brains. However maintain up. There are many causes to be skeptical of those findings, and the 266,796 quantity itself ought to increase critical believability alarm bells.
Modeling an infection transmission dynamics is laborious, as we’ve got seen by the lower than stellar efficiency of many predictive COVID-19 fashions to date. (Keep in mind again in April, when the IHME mannequin from the College of Washington predicted zero U.S. deaths in July?) Pandemic unfold is tough each to foretell and to clarify after the very fact—like making an attempt to clarify the path and depth of present wildfires in the West. Whereas some underlying components do predict unfold, there’s a excessive diploma of randomness, and small disturbances (like winds) may cause big variation throughout time and house. Many outcomes that social scientists usually research, like earnings, are extra steady and never as prone to those “butterfly results” that threaten the validity of sure analysis designs.
The Sturgis research basically tries to re-create a randomized experiment by evaluating the COVID-19 developments in counties that rallygoers traveled from with counties that apparently don’t have as many motorbike fans. The authors estimate the supply of influx into Sturgis in the course of the rally based mostly on the “house” location of nonresident cellphone pings. They use a “difference-in-difference” strategy, calculating whether or not the change in case developments for a county that despatched many individuals to Sturgis was bigger in contrast with a county that despatched none. They checked out how cumulative case numbers modified between June 6 and Sept. 2.
Whereas this strategy could sound wise, it depends on robust assumptions that hardly ever maintain in the true world. For one factor, there are a lot of different variations between counties full of motorcycle rally followers versus these with none, and therein lies the problem of making a superb “counterfactual” for the implied experiment— evaluate developments in counties which are totally different on many geographic, social, and financial dimensions? The “parallel developments” assumption assumes that each county was on an analogous trajectory and the one distinction was the variety of attendees despatched to the Sturgis rally. When this “parallel developments” assumption is violated, the ensuing estimates should not simply off by a bit of—they are often utterly improper. This sort of modeling is dangerous, and the burden of proof for the believability of the assumptions very excessive.
Extra critically, the paper assumes the “noise” in COVID-19 instances from totally different counties averages out over time and thus evaluating the developments is legitimate. All of us in all probability know by now that epidemic curves should not so predictable and are closely depending on the luck of floating wildfire embers, so to talk. This strategy may go for adjustments within the uptake of state advantages or different outcomes historically analyzed by difference-in-difference designs, however not for outcomes which are serially correlated, like wildfires or epidemics. Thus, this concept—that even when the parallel developments assumption held, variations in COVID-19 instances throughout counties are totally attributable to the rally—is a robust ask.
“Someplace between zero and 450,000 infections” wouldn’t have been as headline-grabbing.
Having estimated such numerous further infections because of the Sturgis rally from mixture knowledge, the authors ought to have puzzled if such excessive ranges of transmission had been epidemiologically possible over the quick time-frame. However as computational social scientist Rex Douglass particulars in this Twitter thread, the paper doesn’t present a mannequin of infectious illness transmission—a fairly main oversight. Principally, the authors don’t define what transmission on this scale must appear to be to achieve 266,796 infections—for instance, X share of attendees arriving contaminated throughout the ten days, Y % transmitting the virus to Z new individuals, and many others. Given the staggered arrivals (visitors circulate knowledge present that about 50,000 confirmed up per day) and incubation interval (roughly 5 days), it appears seemingly that these contaminated at arrival may solely have contaminated on common one or two new “generations” of infections in the course of the rally itself. Even with a bleak assumption that 1 % of attendees arrived already infectious (unfold over 10 days) but properly sufficient to journey bikes to South Dakota, and all of them had been “superspreaders,” passing their an infection alongside to a different 10 individuals, back-of-the-envelope math makes it laborious to get within the ballpark of this variety of infections that would have occurred on the rally.
In fact, the research measures new instances in house counties, so maybe that’s when the transmission actually explodes. Let’s recall this was a motorbike rally, so many attendees virtually definitely didn’t fly house as quickly as potential. Excessive numbers of individuals got here from California, Nevada, and Florida, so we will assume the return journey house took not less than a number of days for these heading house immediately. The lure of the open highway in August after months of worldwide lockdown could have even induced many riders to take a meandering path house. Briefly, it’s a stretch to consider that so many contaminated riders may have gotten house within the quick time-frame required to contaminate others, incubate, get examined, and have these infections present up in county statistics by Sept. 2, simply two weeks after the conclusion of the rally. In concept, the authors may have used the cellphone ping knowledge to include this variation in return occasions and routes, however they don’t point out doing so within the paper.
Since attendees hardly had time to attend the rally, get contaminated, after which bike house and infect others, the truth that charges in giant sending counties are greater than these for non-sending nations strongly means that these variations in developments had been within the works anyway on account of native transmission dynamics, and never a direct results of the rally. As Ashish Jha, a doctor and the dean of Brown College’s College of Public Well being, identified on Twitter, the uncooked knowledge present no spikes in counties the place the authors say the rally attendees got here from, rising the thriller of the place the 266,796 instances may have taken place.
If considering by the required transmission dynamics doesn’t increase your alarm bells, think about this: The paper’s outcomes present that the numerous improve in transmission was solely evident after Aug. 26. That is smart—it could be in line with a lag time for infections from the start of the rally. Nonetheless, the authors state that their estimate of the whole variety of instances, 266,796, represents “19 % of the 1.4 million instances of COVID-19 in the US between August 2nd 2020 and September 2nd.” (Italics mine.) In actuality, these additional instances should have occurred within the second half of the month, which means these estimates would account for a staggering 45 % of U.S. instances over these two weeks. This merely doesn’t appear believable.
The 266,796 quantity additionally overstates the precision of the estimates within the paper even when the mannequin is taken at face worth. The boldness intervals for the “excessive influx” counties appear to incorporate zero (which means the authors can’t say with statistical confidence that there was any distinction in infections throughout counties because of the rally). No normal errors (measures of the variability across the estimate) are supplied for the principle regression outcomes, and most of the p-values for key outcomes should not statistically vital at standard ranges. So even when one believes the design and assumptions, the outcomes are very “noisy” and topic to caveats that don’t benefit the broadcasting of the extremely particular 266,796 determine with confidence, although I think about that “someplace between zero and 450,000 infections” wouldn’t have been as headline-grabbing.
None of which means that the rally was in all probability innocent. Frequent sense would inform us that such a big occasion with shut contact was dangerous and did improve transmission. The paper’s estimates for the rise in instances in Meade County, South Dakota, the location of the rally, studies a extra believable improve of between 177 and 195 instances, in line with uncooked knowledge.* Given the large influx to this particular location together with elevated testing for the occasion, a bump was not shocking. Contact tracing reports have recognized instances and deaths linked to the occasion, however within the vary of lots of.
Extra broadly, whereas it’s necessary for us to know components driving COVID-19 transmission, the methodological challenges to figuring out these results on the mixture stage are tough to beat. Improved contact tracing and surveys on the particular person stage are the easiest way to achieve insights into transmission dynamics. (At Dear Pandemic, a COVID-19 science communication effort I run with colleagues, we sadly spend a lot of our time explaining and correcting such deceptive statistics.) The authors of this research have used the identical research design to estimate the results of different mass gatherings together with the BLM protests and Trump’s June Tulsa, Oklahoma, rally. Every paper has given some a part of the political spectrum one thing they may need to hear however has completed little or no to light up the precise dangers of COVID-19 transmission at these occasions. Exaggerated headlines and cherry-picking of outcomes for “I informed you so” media moments can dangerously undermine the long-term integrity of the science—one thing we will little afford proper now.
Correction, Sept. 11, 2020: This text initially and erroneously questioned the paper’s estimates for Meade County based mostly on an information error. The Meade County estimates are the truth is in a variety in line with uncooked county knowledge.
Future Tense
is a partnership of
Slate,
New America, and
Arizona State University
that examines rising applied sciences, public coverage, and society.
'));else {
if (!0 === d.b.getConfig("enableSendAllBids")) return;
p.native = {
title: (t = e.native).merchandise[0].title,
physique: t.merchandise[0].description,
sponsoredBy: t.advertiser.description,
icon: t.advertiser.brand,
picture: t.merchandise[0].picture,
clickUrl: t.merchandise[0].click_url,
privacyLink: t.privateness.optout_click_url,
privacyIcon: t.privateness.optout_image_url,
cta: t.merchandise[0].call_to_action,
worth: t.merchandise[0].worth,
impressionTrackers: t.impression_pixels.map(operate (t) {
return t.url;
})
}, p.mediaType = h.c;
}
} else e.video ? (p.vastUrl = e.displayurl, p.mediaType = h.d) : p.advert = e.inventive;
c.push(p);
}), c;
},
onTimeout: operate onTimeout(t) {
T() && Criteo.PubTag.Adapters.Prebid.GetAdapter(t.auctionId).handleBidTimeout();
},
onBidWon: operate onBidWon(t) {
T() && Criteo.PubTag.Adapters.Prebid.GetAdapter(t.auctionId).handleBidWon(t);
},
onSetTargeting: operate onSetTargeting(t) {
T() && Criteo.PubTag.Adapters.Prebid.GetAdapter(t.auctionId).handleSetTargeting(t);
}
};
operate T() {
return "undefined" != typeof Criteo && Criteo.PubTag && Criteo.PubTag.Adapters && Criteo.PubTag.Adapters.Prebid;
}
operate C(t) t.sizes;
operate A(t, e) {
return Array.isArray(t[0]) ? t.map(operate (t) {
return e(t);
}) : [e(t)];
}
operate S(t) {
return t[0] + "x" + t[1];
}
operate I(t) {
return void 0 === t[0] && void 0 === t[1] ? "2x2" : t[0] + "x" + t[1];
}
operate R(t) {
return void 0 !== f.deepAccess(t, "params.video") && void 0 !== f.deepAccess(t, "mediaTypes.video");
}
operate x() {
attempt {
var t,
e,
r,
i,
o,
n = "criteo_fast_bid",
s = "// Hash: ",
a = y.getDataFromLocalStorage(n);
null !== a && (t = a.indexOf("n"), (e = a.substr(0, t).trim()).substr(0, s.size) !== s ? (f.logWarn("No hash present in FastBid"), y.removeDataFromLocalStorage(n)) : (r = e.substr(s.size), i = a.substr(t + 1), Object(p.confirm)(i, r, g, b) ? (f.logInfo("Utilizing Criteo FastBid"), (o = doc.createElement("script")).kind = "textual content/javascript", o.textual content = i, f.insertElement(o)) : (f.logWarn("Invalid Criteo FastBid discovered"), y.removeDataFromLocalStorage(n))));
} catch (t) {}
}
Object(i.registerBidder)(s);
},
382: operate _(t, e, r) {
"use strict";
Object.defineProperty(e, "__esModule", {
worth: !0
});
var a = r(383),
p = r(384);
e.confirm = operate (t, e, r, i) {
var o = new a.BigInteger(a.b64toHex(e)),
n = new a.BigInteger(a.b64toHex(r)),
s = o.modPowInt(i, n);
return a.removeExtraSymbols(s.toHexString()) === p.Sha256.hash(t);
};
},
383: operate _(t, e, r) {
"use strict";
var i;
Object.defineProperty(e, "__esModule", {
worth: !0
});
var o = (g.prototype.toHexString = operate () {
if (this.s < 0) return "-" + this.negate().toHexString();
var t,
e = !1,
r = "",
i = this.t,
o = this.DB - i * this.DB % 4;
if (0 < i--) for (o < this.DB && 0 < (t = this[i] >> o) && (e = !0, r = c(t)); 0 <= i;) = this[--i] >> (o += this.DB - 4)) : (t = this[i] >> (o -= 4) & 15, o <= 0 && (o += this.DB, --i)), 0 < t && (e = !0), e && (r += c(t));
return e ? r : "0";
}, g.prototype.fromHexString = operate (t) {
if (null !== t) {
this.t = 0, this.s = 0; for (var e = t.size, r = !1, i = 0; 0 <= --e;) = (o & (1 << this.DB - i) - 1) << i, this[this.t++] = o >> this.DB - i) : this[this.t - 1]
this.clamp(), r && g.ZERO.subTo(this, this);
}
}, g.prototype.negate = operate () {
var t = T();
return g.ZERO.subTo(this, t), t;
}, g.prototype.abs = operate () {
return this.s < 0 ? this.negate() : this;
}, g.prototype.mod = operate (t) {
var e = T();
return this.abs().divRemTo(t, null, e), this.s < 0 && 0 < e.compareTo(g.ZERO) && t.subTo(e, e), e;
}, g.prototype.copyTo = operate (t) {
for (var e = this.t - 1; 0 <= e; --e) {
t[e] = this[e];
} t.t = this.t, t.s = this.s;
}, g.prototype.lShiftTo = operate (t, e) {
for (var r = t % this.DB, i = this.DB - r, o = (1 << i) - 1, n = Math.ground(t / this.DB), s = this.s << r & this.DM, a = this.t - 1; 0 <= a; --a) s, s = (this[a] & o) << r; for (a = n - 1; 0 <= a; --a) {
e[a] = 0;
} e[n] = s, e.t = this.t + n + 1, e.s = this.s, e.clamp();
}, g.prototype.invDigit = operate () {
if (this.t < 1) return 0;
var t = this[0];
if (0 == (1 & t)) return 0;
var e = 3 & t;
return 0 < (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) ? this.DV - e : -e;
}, g.prototype.dlShiftTo = operate (t, e) {
for (var r = this.t - 1; 0 <= r; --r) {
e[r + t] = this[r];
} for (r = t - 1; 0 <= r; --r) {
e[r] = 0;
} e.t = this.t + t, e.s = this.s;
}, g.prototype.squareTo = operate (t) {
for (var e = this.abs(), r = t.t = 2 * e.t; 0 <= --r;) {
t[r] = 0;
} for (r = 0; r < e.t - 1; ++r) {
var i = e.am(r, e[r], t, 2 * r, 0, 1);
(t[r + e.t] += e.am(r + 1, 2 * e[r], t, 2 * r + 1, i, e.t - r - 1)) >= e.DV && (t[r + e.t] -= e.DV, t[r + e.t + 1] = 1);
}
0 < t.t && (t[t.t - 1] += e.am(r, e[r], t, 2 * r, 0, 1)), t.s = 0, t.clamp();
}, g.prototype.multiplyTo = operate (t, e) {
var r = this.abs(),
i = t.abs(),
o = r.t; for (e.t = o + i.t; 0 <= --o;) {
e[o] = 0;
} for (o = 0; o < i.t; ++o) {
e[o + r.t] = r.am(0, i[o], e, o, 0, r.t);
} e.s = 0, e.clamp(), this.s != t.s && g.ZERO.subTo(e, e);
}, g.prototype.divRemTo = operate (t, e, r) {
var i = t.abs(); if (!(i.t <= 0)) {
var o = this.abs();
if (o.t < i.t) return null != e && e.fromHexString("0"), void (null != r && this.copyTo(r));
null == r && (r = T());
var n = T(),
s = this.s,
a = t.s,
p = this.DB - C(i[i.t - 1]);
0 < p ? (i.lShiftTo(p, n), o.lShiftTo(p, r)) : (i.copyTo(n), o.copyTo(r));
var u = n.t,
c = n[u - 1]; if (0 != c) {
var d = c * (1 << this.F1) + (1 < u ? n[u - 2] >> this.F2 : 0),
h = this.FV / d,
f = (1 << this.F1) / d,
l = 1 << this.F2,
m = r.t,
v = m - u,
y = null == e ? T() : e; for (n.dlShiftTo(v, y), 0 <= r.compareTo(y) && (r[r.t++] = 1, r.subTo(y, r)), g.ONE.dlShiftTo(u, y), y.subTo(n, n); n.t < u;) {
n[n.t++] = 0;
} for (; 0 <= --v;) {
var b = r[--m] == c ? this.DM : Math.ground(r[m] * h + (r[m - 1] + l) * f);
if ((r[m] += n.am(0, b, r, v, 0, u)) < b) for (n.dlShiftTo(v, y), r.subTo(y, r); r[m] < --b;) {
r.subTo(y, r);
}
} null != e && (r.drShiftTo(u, e), s != a && g.ZERO.subTo(e, e)), r.t = u, r.clamp(), 0 < p && r.rShiftTo(p, r), s < 0 && g.ZERO.subTo(r, r);
}
}
}, g.prototype.rShiftTo = function (t, e) {
e.s = this.s;
var r = Math.floor(t / this.DB);
if (r >= this.t) e.t = 0;else = (this.s & n) << o), e.t = this.t - r, e.clamp();
}, g.prototype.drShiftTo = operate (t, e) {
for (var r = t; r < this.t; ++r) {
e[r - t] = this[r];
} e.t = Math.max(this.t - t, 0), e.s = this.s;
}, g.prototype.subTo = operate (t, e) {
for (var r = 0, i = 0, o = Math.min(t.t, this.t); r < o;) {
i += this[r] - t[r], e[r++] = i & this.DM, i >>= this.DB;
}
if (t.t < this.t) {
for (i -= t.s; r < this.t;) {
i += this[r], e[r++] = i & this.DM, i >>= this.DB;
}
i += this.s;
} else {
for (i += this.s; r < t.t;) {
i -= t[r], e[r++] = i & this.DM, i >>= this.DB;
}
i -= t.s;
}
e.s = i < 0 ? -1 : 0, i < -1 ? e[r++] = this.DV + i : 0 < i && (e[r++] = i), e.t = r, e.clamp();
}, g.prototype.clamp = operate () {
for (var t = this.s & this.DM; 0 < this.t && this[this.t - 1] == t;) {
--this.t;
}
}, g.prototype.modPowInt = operate (t, e) e.isEven() ? d : f)(e);
return this.exp(t, r);
, g.prototype.exp = operate (t, e) {
if (4294967295 < t || t < 1) return g.ONE;
var r,
i = T(),
o = T(),
n = e.convert(this),
s = C(t) - 1; for (n.copyTo(i); 0 <= --s;) {
e.sqrTo(i, o), 0 < (t & 1 << s) ? e.mulTo(o, n, i) : (r = i, i = o, o = r);
} return e.revert(i);
}, g.prototype.isEven = operate () {
return 0 == (0 < this.t ? 1 & this[0] : this.s);
}, g.prototype.compareTo = operate (t) {
var e = this.s - t.s;
if (0 != e) return e;
var r = this.t;
if (0 != (e = r - t.t)) return this.s < 0 ? -e : e; for (; 0 <= --r;) {
if (0 != (e = this[r] - t[r])) return e;
} return 0;
}, g.prototype.am1 = operate (t, e, r, i, o, n) {
for (; 0 <= --n;) {
var s = e * this[t++] + r[i] + o;
o = Math.floor(s / 67108864), r[i++] = 67108863 & s;
} return o;
}, g.prototype.am2 = function (t, e, r, i, o, n) {
for (var s = 32767 & e, a = e >> 15; 0 <= --n;) {
var p = 32767 & this[t],
u = this[t++] >> 15,
c = a * p + u * s;
o = ((p = s * p + ((32767 & c) << 15) + r[i] + (1073741823 & o)) >>> 30) + (c >>> 15) + a * u + (o >>> 30), r[i++] = 1073741823 & p;
}
return o;
}, g.prototype.am3 = operate (t, e, r, i, o, n) {
for (var s = 16383 & e, a = e >> 14; 0 <= --n;) {
var p = 16383 & this[t],
u = this[t++] >> 14,
c = a * p + u * s;
o = ((p = s * p + ((16383 & c) << 14) + r[i] + o) >> 28) + (c >> 14) + a * u, r[i++] = 268435455 & p;
}
return o;
}, g);
operate g(t) {
null !== t && this.fromHexString(t);
}
operate T() {
return new o(null);
}
operate C(t) {
var e,
r = 1;
return 0 != (e = t >>> 16) && (t = e, r += 16), 0 != (e = t >> 8) && (t = e, r += 8), 0 != (e = t >> 4) && (t = e, r += 4), 0 != (e = t >> 2) && (t = e, r += 2), 0 != (e = t >> 1) && (t = e, r += 1), r;
}
e.BigInteger = o, e.nbi = T, e.nbits = C;
for (var n = [], s = "0".charCodeAt(0), a = 0; a <= 9; ++a) { n[s++] = a; } for (s = "a".charCodeAt(0), a = 10; a < 36; ++a) { n[s++] = a; } for (s = "A".charCodeAt(0), a = 10; a < 36; ++a) { n[s++] = a; } operate p(t, e) { var r = n[t.charCodeAt(e)]; return null == r ? -1 : r; } e.intAt = p; var u = "0123456789abcdefghijklmnopqrstuvwxyz"; operate c(t) { return u.charAt(t); } e.int2char = c; e.b64toHex = operate (t) { for (var e = "", r = 0, i = 0, o = 0; o < t.size && "=" != t.charAt(o); ++o) n >> 4), e += c(15 & n), 0));
return 1 == r && (e += c(i << 2)), e;
}, e.removeExtraSymbols = operate (t) {
return t.exchange(/^1f+00/, "").exchange("3031300d060960864801650304020105000420"https://slate.com/expertise/2020/09/,"");
};
var d = (h.prototype.convert = operate (t) , h.prototype.revert = operate (t) {
return t;
}, h.prototype.cut back = operate (t) {
t.divRemTo(this.m, null, t);
}, h.prototype.mulTo = operate (t, e, r) {
t.multiplyTo(e, r), this.cut back(r);
}, h.prototype.sqrTo = operate (t, e) {
t.squareTo(e), this.cut back(e);
}, h); operate h(t) {
this.m = t;
} var f = (l.prototype.convert = operate (t) {
var e = T();
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && 0 < e.compareTo(o.ZERO) && this.m.subTo(e, e), e;
}, l.prototype.revert = operate (t) {
var e = T();
return t.copyTo(e), this.cut back(e), e;
}, l.prototype.cut back = operate (t) {
for (; t.t <= this.mt2;) {
t[t.t++] = 0;
} for (var e = 0; e < this.m.t; ++e) {
var r = 32767 & t[e],
i = r * this.mpl + ((r * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM; for (t[r = e + this.m.t] += this.m.am(0, i, t, e, 0, this.m.t); t[r] >= t.DV;) {
t[r] -= t.DV, t[++r]++;
}
}
t.clamp(), t.drShiftTo(this.m.t, t), 0 <= t.compareTo(this.m) && t.subTo(this.m, t); }, l.prototype.mulTo = function (t, e, r) { t.multiplyTo(e, r), this.reduce(r); }, l.prototype.sqrTo = function (t, e) { t.squareTo(e), this.reduce(e); }, l); function l(t) { this.m = t, this.mp = t.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t; } operate m(t) { var e = T(); return e.fromHexString(t.toString()), e; } e.nbv = m, o.ZERO = m(0), o.ONE = m(1), i = "Microsoft Web Explorer" == navigator.appName ? (o.prototype.am = o.prototype.am2, 30) : "Netscape" != navigator.appName ? (o.prototype.am = o.prototype.am1, 26) : (o.prototype.am = o.prototype.am3, 28), o.prototype.DB = i, o.prototype.DM = (1 << i) - 1, o.prototype.DV = 1 << i; o.prototype.FV = Math.pow(2, 52), o.prototype.F1 = 52 - i, o.prototype.F2 = 2 * i - 52; }, 384: operate _(t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { worth: !0 }); var i = (S.hash = operate (t) { t = S.utf8Encode(t || ""); for (var e = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], r = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], i = (t += String.fromCharCode(128)).size / 4 + 2, o = Math.ceil(i / 16), n = new Array(o), s = 0; s < o; s++) { n[s] = new Array(16); for (var a = 0; a < 16; a++) t.charCodeAt(64 * s + 4 * a + 3) << 0; } var p = 8 * (t.length - 1) / Math.pow(2, 32), u = 8 * (t.length - 1) >>> 0;
for (n[o - 1][14] = Math.ground(p), n[o - 1][15] = u, s = 0; s < o; s++) {
for (var c = new Array(64), d = 0; d < 16; d++) {
c[d] = n[s][d];
} for (d = 16; d < 64; d++) {
c[d] = S.q1(c[d - 2]) + c[d - 7] + S.q0(c[d - 15]) + c[d - 16] >>> 0;
}
for (var h = r[0], f = r[1], l = r[2], m = r[3], v = r[4], y = r[5], b = r[6], g = r[7], d = 0; d < 64; d++) {
var T = g + S.z1(v) + S.Ch(v, y, b) + e[d] + c[d],
C = S.z0(h) + S.Maj(h, f, l);
g = b, b = y, y = v, v = m + T >>> 0, m = l, l = f, f = h, h = T + C >>> 0;
}
r[0] = r[0] + h >>> 0, r[1] = r[1] + f >>> 0, r[2] = r[2] + l >>> 0, r[3] = r[3] + m >>> 0, r[4] = r[4] + v >>> 0, r[5] = r[5] + y >>> 0, r[6] = r[6] + b >>> 0, r[7] = r[7] + g >>> 0;
}
for (var A = new Array(r.size), g = 0; g < r.length; g++) {
A[g] = ("00000000" + r[g].toString(16)).slice(-8);
} return A.join("");
}, S.utf8Encode = function (e) {
try {
return new TextEncoder().encode(e).reduce(function (t, e) {
return t + String.fromCharCode(e);
}, "");
} catch (t) {
return unescape(encodeURIComponent(e));
}
}, S.ROTR = function (t, e) e << 32 - t;
, S.z0 = function (t) {
return S.ROTR(2, t) ^ S.ROTR(13, t) ^ S.ROTR(22, t);
}, S.z1 = function (t) {
return S.ROTR(6, t) ^ S.ROTR(11, t) ^ S.ROTR(25, t);
}, S.q0 = function (t) {
return S.ROTR(7, t) ^ S.ROTR(18, t) ^ t >>> 3;
}, S.q1 = operate (t) {
return S.ROTR(17, t) ^ S.ROTR(19, t) ^ t >>> 10;
}, S.Ch = operate (t, e, r) {
return t & e ^ ~t & r;
}, S.Maj = operate (t, e, r) {
return t & e ^ t & r ^ e & r;
}, S);
operate S() {}
e.Sha256 = i;
}
}, [380]);
pbjsChunk([187], {
481: operate _(e, r, t) {
e.exports = t(482);
},
482: operate _(e, r, t) {
"use strict";
Object.defineProperty(r, "__esModule", {
worth: !0
}), t.d(r, "spec", operate () {
return m;
});
var b = t(0),
y = t(2),
h = t(3),
i = t(11),
l = t.n(i),
a = t(483),
n = t.n(a),
s = t(1);
operate v(e) {
return (v = "operate" == typeof Image && "image" == _typeof(Image.iterator) ? operate (e) {
return _typeof(e);
} : operate (e) {
return e && "operate" == typeof Image && e.constructor === Image && e !== Image.prototype ? "image" : _typeof(e);
})(e);
}
var o = [y.b, y.d],
g = 100,
w = 300,
x = 3600,
I = !0,
P = {
JPY: 1
};
operate p(e) {
var r = {};
return r.id = e.bidId, r.ext = {}, r.ext.siteID = e.params.siteId, !e.params.hasOwnProperty("id") || "string" != typeof e.params.id && "quantity" != typeof e.params.id ? r.ext.sid = "".concat(e.params.dimension[0], "x").concat(e.params.dimension[1]) : r.ext.sid = String(e.params.id), e.params.hasOwnProperty("bidFloor") && e.params.hasOwnProperty("bidFloorCur") && (r.bidfloor = e.params.bidFloor, r.bidfloorcur = e.params.bidFloorCur), r;
}
operate d(e) {
return Array.isArray(e) && 2 === e.size && n()(e[0]) && n()(e[1]);
}
operate c(e, r) {
if (d(e)) return e[0] === r[0] && e[1] === r[1];
for (var t = 0; t < e.size; t++) { if (e[t][0] === r[0] && e[t][1] === r[1]) return 1; } } operate u(e, r, t, i) { var a = []; if (window.headertag && "operate" == typeof window.headertag.getIdentityInfo) { var n, s = window.headertag.getIdentityInfo(); if (s && "object" === v(s)) for (var o in s) } var d, p = {}; p.id = e[0].bidderRequestId, p.imp = t, p.website = {}, p.ext = {}, p.ext.supply = "prebid", e[0].schain && (p.supply = { ext: { schain: e[0].schain } }), 0 < a.size && (p.person = {}, p.person.eids = a), doc.referrer && "" !== doc.referrer && (p.website.ref = doc.referrer), r && (r.gdprConsent && ((d = r.gdprConsent).hasOwnProperty("gdprApplies") && (p.regs = { ext: { gdpr: d.gdprApplies ? 1 : 0 } }), d.hasOwnProperty("consentString") && (p.person = p.person || {}, p.person.ext = )), r.uspConsent && b.deepSetValue(p, "regs.ext.us_privacy", r.uspConsent), r.refererInfo && (p.website.web page = r.refererInfo.referer)); var c = {}, u = r && r.bidderCode || "ix", m = h.b.getConfig(u); if (m) { if ("object" === v(m.firstPartyData)) { var f = m.firstPartyData, y = "?"; for (var l in f) { f.hasOwnProperty(l) && (y += "".concat(encodeURIComponent(l), "=").concat(encodeURIComponent(f[l]), "&")); } y = y.slice(0, -1), p.website.web page += y; } "quantity" == typeof m.timeout && (c.t = m.timeout); } return c.s = e[0].params.siteId, c.v = i, c.r = JSON.stringify(p), c.ac = "j", c.sd = 1, 8.1 === i && (c.nf = 1), { methodology: "GET", url: "https://as-sec.casalemedia.com/cygnus", knowledge: c }; } var m = { code: "ix", gvlid: 10, supportedMediaTypes: o, isBidRequestValid: operate isBidRequestValid(e) { if (!d(e.params.dimension)) return b.logError("ix bidder params: bid dimension has invalid format."), !1; if (!c(e.sizes, e.params.dimension)) return b.logError("ix bidder params: bid dimension just isn't included in advert unit sizes."), !1; if (e.hasOwnProperty("mediaType") && !b.comprises(o, e.mediaType)) return !1; if (e.hasOwnProperty("mediaTypes") && !b.deepAccess(e, "mediaTypes.banner.sizes") && !b.deepAccess(e, "mediaTypes.video.playerSize")) return !1; if ("string" != typeof e.params.siteId && "quantity" != typeof e.params.siteId) return b.logError("ix bidder params: siteId have to be string or quantity worth."), !1; var r, t, i = e.params.hasOwnProperty("bidFloor"), a = e.params.hasOwnProperty("bidFloorCur"); return !!(!i && !a || i && a && (r = e.params.bidFloor, t = e.params.bidFloorCur, Boolean("quantity" == typeof r && "string" == typeof t && t.match(/^[A-Z]{3}$/)))) || (b.logError("ix bidder params: bidFloor / bidFloorCur parameter has invalid format."), !1); }, buildRequests: operate buildRequests(e, r) { for (var t, i, a = [], n = [], s = [], o = null, d = 0; d < e.size; d++) { (o = e[d]).mediaType !== y.d && !b.deepAccess(o, "mediaTypes.video") || (o.mediaType === y.d || c(o.mediaTypes.video.playerSize, o.params.dimension) ? s.push(operate (e) { var r = p(e); r.video = b.deepClone(e.params.video), r.video.w = e.params.dimension[0], r.video.h = e.params.dimension[1]; var t = b.deepAccess(e, "mediaTypes.video.context"); return t && ("instream" === t ? r.video.placement = 1 : "outstream" === t ? r.video.placement = 4 : b.logWarn("ix bidder params: video context '".concat(t, "' just isn't supported"))), r; }(o)) : b.logError("Bid dimension just isn't included in video playerSize")), o.mediaType !== y.b && !b.deepAccess(o, "mediaTypes.banner") && (o.mediaType || o.mediaTypes) || n.push((i = void 0, (i = p(t = o)).banner = {}, i.banner.w = t.params.dimension[0], i.banner.h = t.params.dimension[1], i.banner.topframe = b.inIframe() ? 0 : 1, i)); } return 0 < n.size && a.push(u(e, r, n, 7.2)), 0 < s.size && a.push(u(e, r, s, 8.1)), a; }, interpretResponse: operate interpretResponse(e, r) { var t = []; if (!e.hasOwnProperty("physique") || !e.physique.hasOwnProperty("seatbid")) return t; for (var i, a, n, s, o = e.physique, d = o.seatbid, p = 0; p < d.size; p++) { if (d[p].hasOwnProperty("bid")) for (var c = d[p].bid, u = JSON.parse(r.knowledge.r), m = 0; m < c.size; m++) { var f = operate (r, e) { if (r) return l()(e, operate (e) { return e.id === r; }); }(c[m].impid, u.imp); i = c[m], a = o.cur, n = f, s = void 0, s = {}, P.hasOwnProperty(a) ? s.cpm = i.worth / P[a] : s.cpm = i.worth / g, s.requestId = i.impid, s.dealId = b.deepAccess(i, "ext.dealid"), s.netRevenue = I, s.foreign money = a, s.creativeId = i.hasOwnProperty("crid") ? i.crid : "-", b.deepAccess(i, "ext.vasturl") ? (s.vastUrl = i.ext.vasturl, s.width = n.video.w, s.peak = n.video.h, s.mediaType = y.d, s.ttl = x) : (s.advert = i.adm, s.width = i.w, s.peak = i.h, s.mediaType = y.b, s.ttl = w), s.meta = {}, s.meta.networkId = b.deepAccess(i, "ext.dspid"), s.meta.brandId = b.deepAccess(i, "ext.advbrandid"), s.meta.brandName = b.deepAccess(i, "ext.advbrand"), t.push(s); } } return t; }, transformBidParams: operate transformBidParams(e) { return b.convertTypes({ siteID: "quantity" }, e); }, getUserSyncs: operate getUserSyncs(e) { return e.iframeEnabled ? [{ type: "iframe", url: "https://js-sec.indexww.com/um/ixmatch.html" }] : []; } }; Object(s.registerBidder)(m); } }, [481]); pbjsChunk([184], { 493: operate _(e, t, r) { e.exports = r(494); }, 494: operate _(e, t, r) { "use strict"; Object.defineProperty(t, "__esModule", { worth: !0 }), r.d(t, "spec", operate () { return l; }); var s = r(0), d = r(3), n = r(1), a = r(9); operate g() { return (g = Object.assign || operate (e) { for (var t = 1; t < arguments.size; t++) { var r = arguments[t]; for (var n in r) { Object.prototype.hasOwnProperty.name(r, n) && (e[n] = r[n]); } } return e; }).apply(this, arguments); } var o, i, c, u = Object(a.b)(), l = { code: "kargo", isBidRequestValid: operate isBidRequestValid(e) , buildRequests: operate buildRequests(e, t) { var r, n = d.b.getConfig("foreign money"), a = n && n.adServerCurrency || "USD", o = {}, i = {}; s._each(e, operate (e) { o[e.bidId] = e.params.placementId, i[e.bidId] = e.sizes; }), 0 < e.size && e[0].userId && e[0].userId.tdid && (r = e[0].userId.tdid); var c = g({}, { sessionId: l._getSessionId(), requestCount: l._getRequestCount(), timeout: t.timeout, foreign money: a, cpmGranularity: 1, timestamp: new Date().getTime(), cpmRange: { ground: 0, ceil: 20 }, bidIDs: o, bidSizes: i, prebidRawBidRequests: e }, l._getAllMetadata(r, t.uspConsent)), u = encodeURIComponent(JSON.stringify(c)); return g({}, t, { methodology: "GET", url: "".concat("https://krk.kargo.com"https://slate.com/expertise/2020/09/,"/api/v2/bid"), knowledge: "json=".concat(u), foreign money: a }); }, interpretResponse: operate interpretResponse(e, t) { var r = e.physique, n = []; for (var a in r) { var o = r[a], i = void 0; o.metadata && o.metadata.landingPageDomain && (i = { clickUrl: o.metadata.landingPageDomain }), n.push({ requestId: a, cpm: Quantity(o.cpm), width: o.width, peak: o.peak, advert: o.adm, ttl: 300, creativeId: o.id, dealId: o.targetingCustom, netRevenue: !0, foreign money: t.foreign money, meta: i }); } return n; }, getUserSyncs: operate getUserSyncs(e) { var t = [], r = l._generateRandomUuid(), n = l._getClientId(); if (e.iframeEnabled && r && n) for (var a = 0; a < 5; a++) { t.push({ kind: "iframe", url: "https://crb.kargo.com/api/v1/initsyncrnd/{UUID}?seed={SEED}&idx={INDEX}".exchange("{UUID}", n).exchange("{SEED}", r).exchange("{INDEX}", a) }); } return t; }, _readCookie: operate _readCookie(e) { if (!u.cookiesAreEnabled()) return null; for (var t = "".concat(e, "="), r = doc.cookie.break up(";"), n = 0; n < r.length; n++) { for (var a = r[n]; " " === a.charAt(0);) { a = a.substring(1, a.length); } if (0 === a.indexOf(t)) return a.substring(t.length, a.length); } return null; }, _getCrbFromCookie: function _getCrbFromCookie() { try { var e = JSON.parse(decodeURIComponent(l._readCookie("krg_crb"))); if (e && e.v) { var t = JSON.parse(atob(e.v)); if (t) return t; } return {}; } catch (e) { return {}; } }, _getCrbFromLocalStorage: function _getCrbFromLocalStorage() { try { return JSON.parse(atob(l._getLocalStorageSafely("krg_crb"))); } catch (e) { return {}; } }, _getCrb: function _getCrb() { var e = l._getCrbFromLocalStorage(); return Object.keys(e).length ? e : l._getCrbFromCookie(); }, _getKruxUserId: function _getKruxUserId() { return l._getLocalStorageSafely("kxkar_user"); }, _getKruxSegments: function _getKruxSegments() { return l._getLocalStorageSafely("kxkar_segs"); }, _getKrux: function _getKrux() { var e = l._getKruxSegments(), t = []; return e && (t = e.split(",")), { userID: l._getKruxUserId(), segments: t }; }, _getLocalStorageSafely: function _getLocalStorageSafely(e) { try { return u.getDataFromLocalStorage(e); } catch (e) { return null; } }, _getUserIds: function _getUserIds(e, t) { var r = l._getCrb(), n = { kargoID: r.userId, clientID: r.clientId, crbIDs: r.syncIds || {}, optOut: r.optOut, usp: t }; return e && (n.tdID = e), n; }, _getClientId: function _getClientId() { return l._getCrb().clientId; }, _getAllMetadata: function _getAllMetadata(e, t) { return { userIDs: l._getUserIds(e, t), krux: l._getKrux(), pageURL: window.location.href, rawCRB: l._readCookie("krg_crb"), rawCRBLocalStorage: l._getLocalStorageSafely("krg_crb") }; }, _getSessionId: function _getSessionId() l._generateRandomUuid(); , _getRequestCount: function _getRequestCount() { return i === window.location.pathname ? ++c : (i = window.location.pathname, c = 0); }, _generateRandomUuid: function _generateRandomUuid() { try { var e = new Uint8Array(16); crypto.getRandomValues(e), e[6] = -177 & e[6] | 64, e[8] = -65 & e[8] | 128; var t = Array.prototype.map.call(new Uint8Array(e), function (e) { return ("00" + e.toString(16)).slice(-2); }).join(""); return t.slice(0, 8) + "-" + t.slice(8, 12) + "-" + t.slice(12, 16) + "-" + t.slice(16, 20) + "-" + t.slice(20); } catch (e) { return ""; } } }; Object(n.registerBidder)(l); } }, [493]); pbjsChunk([110], { 677: function _(e, r, t) { e.exports = t(678); }, 678: function _(e, r, t) { "use strict"; Object.defineProperty(r, "__esModule", { value: !0 }), t.d(r, "FASTLANE_ENDPOINT", function () { return o; }), t.d(r, "VIDEO_ENDPOINT", function () { return l; }), t.d(r, "SYNC_ENDPOINT", function () { return a; }), t.d(r, "spec", function () { return h; }), r.hasVideoMediaType = c, r.masSizeOrdering = S, r.determineRubiconVideoSizeId = C, r.getPriceGranularity = j, r.hasValidVideoParams = k, r.hasValidSupplyChainParams = T, r.encodeParam = w, r.resetUserSync = function () { R = !1; }; var g = t(0), i = t(1), b = t(3), u = t(2); function v(e, r) { return function (e) { if (Array.isArray(e)) return e; }(e) || function (e, r) { if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return; var t = [], i = !0, n = !1, o = void 0; try { for (var a, s = e[Symbol.iterator](); !(i = (a = s.next()).done) && (t.push(a.value), !r || t.length !== r); i = !0) { ; } } catch (e) { n = !0, o = e; } finally { try finally { if (n) throw o; } } return t; }(e, r) || function (e, r) 32)(?:Clamped)?Array$/.test(t)) return n(e, r); (e, r) || function () { throw new TypeError("Invalid attempt to destructure non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }(); } function n(e, r) { (null == r || r > e.size) && (r = e.size);
for (var t = 0, i = new Array(r); t < r; t++) { i[t] = e[t]; } return i; } operate y() { return (y = Object.assign || operate (e) { for (var r = 1; r < arguments.size; r++) { var t = arguments[r]; for (var i in t) { Object.prototype.hasOwnProperty.name(t, i) && (e[i] = t[i]); } } return e; }).apply(this, arguments); } operate p(e, r, t) { return r in e ? Object.defineProperty(e, r, { worth: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } operate x(e) { return (x = "operate" == typeof Image && "image" == _typeof(Image.iterator) ? operate (e) { return _typeof(e); } : operate (e) { return e && "operate" == typeof Image && e.constructor === Image && e !== Image.prototype ? "image" : _typeof(e); })(e); } var o = "https://fastlane.rubiconproject.com/a/api/fastlane.json", l = "https://prebid-server.rubiconproject.com/openrtb2/public sale", a = "https://eus.rubiconproject.com/usync.html", d = { FASTLANE: { id: "dt.id", keyv: "dt.keyv", pref: "dt.pref" }, PREBID_SERVER: { id: "id", keyv: "keyv" } }, f = { 1: "468x60", 2: "728x90", 5: "120x90", 8: "120x600", 9: "160x600", 10: "300x600", 13: "200x200", 14: "250x250", 15: "300x250", 16: "336x280", 17: "240x400", 19: "300x100", 31: "980x120", 32: "250x360", 33: "180x500", 35: "980x150", 37: "468x400", 38: "930x180", 39: "750x100", 40: "750x200", 41: "750x300", 42: "2x4", 43: "320x50", 44: "300x50", 48: "300x300", 53: "1024x768", 54: "300x1050", 55: "970x90", 57: "970x250", 58: "1000x90", 59: "320x80", 60: "320x150", 61: "1000x1000", 64: "580x500", 65: "640x480", 66: "930x600", 67: "320x480", 68: "1800x1000", 72: "320x320", 73: "320x160", 78: "980x240", 79: "980x300", 80: "980x400", 83: "480x300", 85: "300x120", 90: "548x150", 94: "970x310", 95: "970x100", 96: "970x210", 101: "480x320", 102: "768x1024", 103: "480x280", 105: "250x800", 108: "320x240", 113: "1000x300", 117: "320x100", 125: "800x250", 126: "200x600", 144: "980x600", 145: "980x150", 152: "1000x250", 156: "640x320", 159: "320x250", 179: "250x600", 195: "600x300", 198: "640x360", 199: "640x200", 213: "1030x590", 214: "980x360", 221: "1x1", 229: "320x180", 230: "2000x1400", 232: "580x400", 234: "6x6", 251: "2x2", 256: "480x820", 257: "400x600", 258: "500x200", 259: "998x200", 264: "970x1000", 265: "1920x1080", 274: "1800x200", 278: "320x500", 282: "320x400", 288: "640x380" }; g._each(f, operate (e, r) { return f[e] = r; }); var h = { code: "rubicon", gvlid: 52, supportedMediaTypes: [u.b, u.d], isBidRequestValid: operate isBidRequestValid(e) { if ("object" !== x(e.params)) return !1; for (var r = 0, t = ["accountId"https://slate.com/technology/2020/09/,"siteId"https://slate.com/technology/2020/09/,"zoneId"]; r < t.size; r++) { if (e.params[t[r]] = parseInt(e.params[t[r]]), isNaN(e.params[t[r]])) return g.logError("Rubicon: improper format of accountId or siteId or zoneId."), !1; } var i = m(e, !0); return !!i && ("video" !== i || okay(e)); }, buildRequests: operate buildRequests(e, u) { var n, r = e.filter(operate (e) { return "video" === m(e); }).map(operate (e) { e.startTime = new Date().getTime(); var r, t, i = { id: e.transactionId, take a look at: b.b.getConfig("debug") ? 1 : 0, cur: ["USD"], supply: { tid: e.transactionId }, tmax: b.b.getConfig("TTL") || 1e3, imp: [{ exp: 300, id: e.adUnitCode, secure: 1, ext: p({}, e.bidder, e.params), video: g.deepAccess(e, "mediaTypes.video") || {} }], ext: { prebid: { cache: { vastxml: { returnCreative: !1 } }, focusing on: { includewinners: !0, includebidderkeys: !1, pricegranularity: j(b.b) }, bidders: { rubicon: "pbjs" } } } }; "rubicon" !== e.bidder && (i.ext.prebid.aliases = p({}, e.bidder, "rubicon")), t = "operate" != typeof e.getFloor || b.b.getConfig("rubicon.disableFloors") ? parseFloat(g.deepAccess(e, "params.ground")) : "object" !== x(r = e.getFloor({ foreign money: "USD", mediaType: "video", dimension: A(e, "video") })) || "USD" !== r.foreign money || isNaN(parseInt(r.ground)) ? void 0 : parseFloat(r.ground), isNaN(t) || (i.imp[0].bidfloor = t), i.imp[0].ext[e.bidder].video.size_id = C(e), operate (r, t, e) { if (!r) return; "object" === x(b.b.getConfig("app")) ? r.app = b.b.getConfig("app") : r.website = { web page: I(t, e) }; "object" === x(b.b.getConfig("system")) && (r.system = b.b.getConfig("system")); t.params.video.language && ["site"https://slate.com/technology/2020/09/,"device"].forEach(operate (e) { r[e] && (r[e].content material = y({ language: t.params.video.language }, r[e].content material)); }); }(i, e, u), operate (e, r) { "object" === x(e.imp[0].video) && void 0 === e.imp[0].video.skip && (e.imp[0].video.skip = r.params.video.skip); "object" === x(e.imp[0].video) && void 0 === e.imp[0].video.skipafter && (e.imp[0].video.skipafter = r.params.video.skipdelay); "object" === x(e.imp[0].video) && void 0 === e.imp[0].video.pos && ("atf" === r.params.place ? e.imp[0].video.pos = 1 : "btf" === r.params.place && (e.imp[0].video.pos = 3)); var t = A(r, "video"); e.imp[0].video.w = t[0], e.imp[0].video.h = t[1]; }(i, e); var n, o = _(e, "PREBID_SERVER"); o && g.deepSetValue(i, "person.ext.digitrust", o), u.gdprConsent && ("boolean" == typeof u.gdprConsent.gdprApplies && (n = u.gdprConsent.gdprApplies ? 1 : 0), g.deepSetValue(i, "regs.ext.gdpr", n), g.deepSetValue(i, "person.ext.consent", u.gdprConsent.consentString)), u.uspConsent && g.deepSetValue(i, "regs.ext.us_privacy", u.uspConsent), e.userId && "object" === x(e.userId) && (e.userId.tdid || e.userId.pubcid || e.userId.lipb || e.userId.idl_env) && (g.deepSetValue(i, "person.ext.eids", []), e.userId.tdid && i.person.ext.eids.push({ supply: "adserver.org", uids: [{ id: e.userId.tdid, ext: { rtiPartner: "TDID" } }] }), e.userId.pubcid && i.person.ext.eids.push({ supply: "pubcommon", uids: [{ id: e.userId.pubcid }] }), e.userId.lipb && e.userId.lipb.lipbid && (i.person.ext.eids.push({ supply: "liveintent.com", uids: [{ id: e.userId.lipb.lipbid }] }), i.person.ext.tpid = { supply: "liveintent.com", uid: e.userId.lipb.lipbid }, Array.isArray(e.userId.lipb.segments) && e.userId.lipb.segments.size && g.deepSetValue(i, "rp.goal.LIseg", e.userId.lipb.segments)), e.userId.idl_env && i.person.ext.eids.push({ supply: "liveramp.com", uids: [{ id: e.userId.idl_env }] })), !0 === b.b.getConfig("coppa") && g.deepSetValue(i, "regs.coppa", 1), e.schain && T(e.schain) && g.deepSetValue(i, "supply.ext.schain", e.schain); var a, s = y({}, e.params.stock, b.b.getConfig("fpd.context")), d = y({}, e.params.customer, b.b.getConfig("fpd.person")); g.isEmpty(s) && g.isEmpty(d) || (a = { bidders: [u.bidderCode], config: { fpd: {} } }, g.isEmpty(s) || (a.config.fpd.website = s), g.isEmpty(d) || (a.config.fpd.person = d), g.deepSetValue(i, "ext.prebid.bidderconfig.0", a)); var c = g.deepAccess(e, "fpd.context.pbAdSlot"); return "string" == typeof c && c && g.deepSetValue(i.imp[0].ext, "context.knowledge.adslot", c), e.storedAuctionResponse && g.deepSetValue(i.imp[0], "ext.prebid.storedauctionresponse.id", e.storedAuctionResponse.toString()), g.deepSetValue(i.imp[0], "ext.prebid.auctiontimestamp", u.auctionStart), { methodology: "POST", url: l, knowledge: i, bidRequest: e }; }); return !0 !== b.b.getConfig("rubicon.singleRequest") ? r.concat(e.filter(operate (e) { return "banner" === m(e); }).map(operate (e) { var i = h.createSlotParams(e, u); return { methodology: "GET", url: o, knowledge: h.getOrderedParams(i).cut back(operate (e, r) , "") + "slots=1&rand=".concat(Math.random()), bidRequest: e }; })) : (n = e.filter(operate (e) { return "banner" === m(e); }).cut back(operate (e, r) []).push(r), e; , {}), r.concat(Object.keys(n).cut back(operate (r, e) { var t, i; return t = n[e], i = 10, t.map(operate (e, r) { return r % i == 0 ? t.slice(r, r + i) : null; }).filter(operate (e) { return e; }).forEach(operate (e) { var i = h.combineSlotUrlParams(e.map(operate (e) { return h.createSlotParams(e, u); })); r.push({ methodology: "GET", url: o, knowledge: h.getOrderedParams(i).cut back(operate (e, r) g.isNumber(t) ? "".concat(e).concat(w(r, t), "&") : e; , "") + "slots=".concat(e.size, "&rand=").concat(Math.random()), bidRequest: e }); }), r; }, []))); }, getOrderedParams: operate getOrderedParams(e) { var r = /^tg_v/, t = /^tg_i/, i = ["account_id"https://slate.com/technology/2020/09/,"site_id"https://slate.com/technology/2020/09/,"zone_id"https://slate.com/technology/2020/09/,"size_id"https://slate.com/technology/2020/09/,"alt_size_ids"https://slate.com/technology/2020/09/,"p_pos"https://slate.com/technology/2020/09/,"gdpr"https://slate.com/technology/2020/09/,"gdpr_consent"https://slate.com/technology/2020/09/,"us_privacy"https://slate.com/technology/2020/09/,"rp_schain"https://slate.com/technology/2020/09/,"tpid_tdid"https://slate.com/technology/2020/09/,"tpid_liveintent.com"https://slate.com/technology/2020/09/,"tg_v.LIseg"https://slate.com/technology/2020/09/,"dt.id"https://slate.com/technology/2020/09/,"dt.keyv"https://slate.com/technology/2020/09/,"dt.pref"https://slate.com/technology/2020/09/,"rf"https://slate.com/technology/2020/09/,"p_geo.latitude"https://slate.com/technology/2020/09/,"p_geo.longitude"https://slate.com/technology/2020/09/,"kw"].concat(Object.keys(e).filter(operate (e) { return r.take a look at(e); })).concat(Object.keys(e).filter(operate (e) { return t.take a look at(e); })).concat(["tk_flint"https://slate.com/technology/2020/09/,"x_source.tid"https://slate.com/technology/2020/09/,"x_source.pchain"https://slate.com/technology/2020/09/,"p_screen_res"https://slate.com/technology/2020/09/,"rp_floor"https://slate.com/technology/2020/09/,"rp_secure"https://slate.com/technology/2020/09/,"tk_user_key"]); return i.concat(Object.keys(e).filter(operate (e) { return -1 === i.indexOf(e); })); }, combineSlotUrlParams: operate combineSlotUrlParams(n) { if (1 === n.size) return n[0]; var i = n.cut back(operate (r, t, i) { return Object.keys(t).forEach(operate (e) (r[e] = new Array(n.size)), r[e].splice(i, 1, t[e]); ), r; }, {}), o = new RegExp("^([^;]*)(;1)+$"); return Object.keys(i).forEach(operate (e) { var r = i[e].be part of(";"), t = r.match(o); i[e] = t ? t[1] : r; }), i; }, createSlotParams: operate createSlotParams(e, r) { e.startTime = new Date().getTime(); var t, i = e.params, n = A(e, "banner"), o = v(i.latLong || [], 2), a = o[0], s = o[1], d = b.b.getConfig("rubicon.int_type"), c = ; "operate" != typeof e.getFloor || b.b.getConfig("rubicon.disableFloors") || (t = e.getFloor({ foreign money: "USD", mediaType: "banner", dimension: "*" }), c.rp_hard_floor = "object" !== x(t) || "USD" !== t.foreign money || isNaN(parseInt(t.ground)) ? void 0 : t.ground), c.p_pos = "atf" === i.place || "btf" === i.place ? i.place : "", e.userId && (e.userId.tdid && (c.tpid_tdid = e.userId.tdid), e.userId.lipb && e.userId.lipb.lipbid && (c["tpid_liveintent.com"] = e.userId.lipb.lipbid, Array.isArray(e.userId.lipb.segments) && e.userId.lipb.segments.size && (c["tg_v.LIseg"] = e.userId.lipb.segments.be part of(","))), e.userId.idl_env && (c["tpid_liveramp.com"] = e.userId.idl_env)), r.gdprConsent && ("boolean" == typeof r.gdprConsent.gdprApplies && (c.gdpr = Quantity(r.gdprConsent.gdprApplies)), c.gdpr_consent = r.gdprConsent.consentString), r.uspConsent && (c.us_privacy = encodeURIComponent(r.uspConsent)); var u = y({}, i.customer, b.b.getConfig("fpd.person")); Object.keys(u).forEach(operate (e) ); var p = y({}, i.stock, b.b.getConfig("fpd.context")); Object.keys(p).forEach(operate (e) ); var l = (i.key phrases || []).concat(g.deepAccess(b.b.getConfig("fpd.person"), "key phrases") || [], g.deepAccess(b.b.getConfig("fpd.context"), "key phrases") || []); c.kw = Array.isArray(l) && l.size ? l.be part of(",") : ""; var f = g.deepAccess(e, "fpd.context.pbAdSlot"); "string" == typeof f && f && (c["tg_i.dfp_ad_unit_code"] = f.exchange(/^/+/, "")); var m = _(e, "FASTLANE"); return y(c, m), !0 === b.b.getConfig("coppa") && (c.coppa = 1), e.schain && T(e.schain) && (c.rp_schain = h.serializeSupplyChain(e.schain)), c; }, serializeSupplyChain: operate serializeSupplyChain(e) { if (!T(e)) return ""; var r = e.ver, t = e.full, i = e.nodes; return "".concat(r, ",").concat(t, "!").concat(h.serializeSupplyChainNodes(i)); }, serializeSupplyChainNodes: operate serializeSupplyChainNodes(e) { var t = ["asi"https://slate.com/technology/2020/09/,"sid"https://slate.com/technology/2020/09/,"hp"https://slate.com/technology/2020/09/,"rid"https://slate.com/technology/2020/09/,"name"https://slate.com/technology/2020/09/,"domain"]; return e.map(operate (r) { return t.map(operate (e) ).be part of(","); }).be part of("!"); }, interpretResponse: operate interpretResponse(d, e) { var c = e.bidRequest; if (!(d = d.physique) || "object" !== x(d)) return []; if (d.seatbid) { var r = g.deepAccess(d, "ext.errors.rubicon"); Array.isArray(r) && 0 < r.size && g.logWarn("Rubicon: Error in video response"); var o = []; return d.seatbid.forEach(operate (n) { (n.bid || []).forEach(operate (e) { var r = ; e.id && (r.seatBidId = e.id), e.dealid && (r.dealId = e.dealid); var t, i = g.deepAccess(d, "ext.responsetimemillis.rubicon"); c && i && (c.serverResponseTimeMs = i), g.deepAccess(e, "ext.prebid.kind") === u.d ? (r.mediaType = u.d, (t = g.deepAccess(e, "ext.prebid.focusing on")) && "object" === x(t) && (r.adserverTargeting = t), e.ext.prebid.cache && "object" === x(e.ext.prebid.cache.vastXml) && e.ext.prebid.cache.vastXml.cacheId && e.ext.prebid.cache.vastXml.url ? (r.videoCacheKey = e.ext.prebid.cache.vastXml.cacheId, r.vastUrl = e.ext.prebid.cache.vastXml.url) : t && t.hb_uuid && t.hb_cache_host && t.hb_cache_path && (r.videoCacheKey = t.hb_uuid, r.vastUrl = "https://".concat(t.hb_cache_host).concat(t.hb_cache_path, "?uuid=").concat(t.hb_uuid)), e.adm && (r.vastXml = e.adm), e.nurl && (r.vastUrl = e.nurl), !r.vastUrl && e.nurl && (r.vastUrl = e.nurl)) : g.logWarn("Rubicon: video response acquired non-video media kind"), o.push(r); }); }), o; } var t = d.advertisements; return "object" !== x(c) || Array.isArray(c) || "video" !== m(c) || "object" !== x(t) || (t = t[c.adUnitCode]), !Array.isArray(t) || t.size < 1 ? [] : t.cut back(operate (e, r, t) { if ("okay" !== r.standing) return e; var i, n, o, a, s = Array.isArray(c) ? c[t] : c; return s && "object" === x(s) ? (i = { requestId: s.bidId, foreign money: "USD", creativeId: r.creative_id || "".concat(r.community || ""https://slate.com/expertise/2020/09/,"-").concat(r.advertiser || ""), cpm: r.cpm || 0, dealId: r.deal, ttl: 300, netRevenue: !1 !== b.b.getConfig("rubicon.netRevenue"), rubicon: { advertiserId: r.advertiser, networkId: r.community }, meta: { advertiserId: r.advertiser, networkId: r.community } }, r.creative_type && (i.mediaType = r.creative_type), r.creative_type === u.d ? (i.width = s.params.video.playerWidth, i.peak = s.params.video.playerHeight, i.vastUrl = r.creative_depot_url, i.impression_id = r.impression_id, i.videoCacheKey = r.impression_id) : (i.advert = (o = r.script, a = r.impression_id, "n
nnx3c!-- Rubicon Undertaking Advert Tag --x3ennn")), n = v(f[r.size_id].break up("x").map(operate (e) {
return Quantity(e);
}), 2), i.width = n[0], i.peak = n[1]), i.rubiconTargeting = (Array.isArray(r.focusing on) ? r.focusing on : []).cut back(operate (e, r) {
return e[r.key] = r.values[0], e;
}, {
rpfl_elemid: s.adUnitCode
}), e.push(i)) : g.logError("Rubicon: bidRequest undefined at index place:".concat(t), c, d), e;
}, []).type(operate (e, r) 0) - (e.cpm );
},
getUserSyncs: operate getUserSyncs(e, r, t, i) {
if (!R && e.iframeEnabled) {
var n = "";
return t && "string" == typeof t.consentString && ("boolean" == typeof t.gdprApplies ? n += "?gdpr=".concat(Quantity(t.gdprApplies), "&gdpr_consent=").concat(t.consentString) : n += "?gdpr_consent=".concat(t.consentString)), i && (n += "".concat(n ? "&" : "?"https://slate.com/expertise/2020/09/,"us_privacy=").concat(encodeURIComponent(i))), R = !0, {
kind: "iframe",
url: a + n
};
}
},
transformBidParams: operate transformBidParams(e) {
return g.convertTypes({
accountId: "quantity",
siteId: "quantity",
zoneId: "quantity"
}, e);
}
};
operate _(e, r) {
var t,
i = 0 < arguments.size && void 0 !== e ? e : {},
n = 1 < arguments.size ? r : void 0;
if (!n || !d[n]) return null;
var o = d[n]; var a = operate () {
var e = g.deepAccess(i, "userId.digitrustid.knowledge");
if (e) return e;
var r = window.DigiTrust && (b.b.getConfig("digiTrustId") || window.DigiTrust.getUser({
member: "T9QSFKPDN9"
}));
return r && r.success && r.identification || null;
}(); if (!a || a.privateness && a.privateness.optout) return null;
var s = (p(t = {}, o.id, a.id), p(t, o.keyv, a.keyv), t);
return o.pref && (s[o.pref] = 0), s;
} operate I(e, r) operate A(e, r) {
var t = e.params; if ("video" === r) {
var i = [];
return t.video && t.video.playerWidth && t.video.playerHeight ? i = [t.video.playerWidth, t.video.playerHeight] : Array.isArray(g.deepAccess(e, "mediaTypes.video.playerSize")) && 1 === e.mediaTypes.video.playerSize.size ? i = e.mediaTypes.video.playerSize[0] : Array.isArray(e.sizes) && 0 < e.sizes.size && Array.isArray(e.sizes[0]) && 1 < e.sizes[0].size && (i = e.sizes[0]), i;
} var n = [];
return Array.isArray(t.sizes) ? n = t.sizes : void 0 !== g.deepAccess(e, "mediaTypes.banner.sizes") ? n = s(e.mediaTypes.banner.sizes) : Array.isArray(e.sizes) && 0 < e.sizes.size ? n = s(e.sizes) : g.logWarn("Rubicon: no sizes are setup or discovered"), S(n);
} operate s(e) {
return g.parseSizesInput(e).cut back(operate (e, r) {
var t = parseInt(f[r], 10);
return t && e.push(t), e;
}, []);
} operate c(e) {
return "object" === x(g.deepAccess(e, "params.video")) && void 0 !== g.deepAccess(e, "mediaTypes.".concat(u.d));
} operate m(e, r) {
var t = 1 < arguments.size && void 0 !== r && r;
return c(e) ? -1 === ["outstream"https://slate.com/technology/2020/09/,"instream"].indexOf(g.deepAccess(e, "mediaTypes.".concat(u.d, ".context"))) ? void (t && g.logError("Rubicon: mediaTypes.video.context have to be outstream or instream")) : A(e, "video").size < 2 ? void (t && g.logError("Rubicon: couldn't decide the playerSize of the video")) : (t && g.logMessage("Rubicon: making video request for adUnit", e.adUnitCode), "video") : 0 === A(e, "banner").size ? void (t && g.logError("Rubicon: couldn't decide the sizes for banner request")) : (t && g.logMessage("Rubicon: making banner request for adUnit", e.adUnitCode), "banner");
} operate S(e) {
var n = [15, 2, 9];
return e.type(operate (e, r) );
} function C(e) {
var r = parseInt(g.deepAccess(e, "params.video.size_id"));
return isNaN(r) ? "outstream" === g.deepAccess(e, "mediaTypes.".concat(u.d, ".context")) ? 203 : 201 : r;
} function j(e) {
return {
ranges: {
low: [{
max: 5,
increment: .5
}],
medium: [{
max: 20,
increment: .1
}],
high: [{
max: 20,
increment: .01
}],
auto: [{
max: 5,
increment: .05
}, {
min: 5,
max: 10,
increment: .1
}, {
min: 10,
max: 20,
increment: .5
}],
dense: [{
max: 3,
increment: .01
}, {
min: 3,
max: 8,
increment: .05
}, {
min: 8,
max: 20,
increment: .5
}],
custom: e.getConfig("customPriceBucket") && e.getConfig("customPriceBucket").buckets
}[e.getConfig("priceGranularity")]
};
} function k(r) {
var t = !0,
e = Object.prototype.toString.call([]),
i = Object.prototype.toString.call(0),
n = {
mimes: e,
protocols: e,
maxduration: i,
linearity: i,
api: e
};
return Object.keys(n).forEach(function (e) {
Object.prototype.toString.call(g.deepAccess(r, "mediaTypes.video." + e)) !== n[e] && (t = !1, g.logError("Rubicon: mediaTypes.video." + e + " is required and must be of type: " + n[e]));
}), t;
} function T(e) {
var r = !1,
t = ["asi"https://slate.com/technology/2020/09/,"sid"https://slate.com/technology/2020/09/,"hp"];
return e.nodes && ((r = e.nodes.reduce(function (e, r) {
return e ? t.every(function (e) {
return r[e];
}) : e;
}, !0)) || g.logError("Rubicon: required schain params missing")), r;
} function w(e, r) {
return "rp_schain" === e ? "rp_schain=".concat(r) : "".concat(e, "=").concat(encodeURIComponent(r));
} var R = !1;
Object(i.registerBidder)(h);
}
}, [677]);
pbjsChunk([93], {
719: function _(e, t, r) {
e.exports = r(720);
},
720: function _(e, t, r) {
"use strict"; Object.defineProperty(t, "__esModule", {
value: !0
}), r.d(t, "spec", function () {
return o;
}), r.d(t, "_isInbounds", function () {
return a;
}), t._getPlatform = v;
var n = r(1),
y = r(0),
i = r(2),
c = r(3),
g = r(10),
d = r(44); function h(e, t) {
return function (e) {
if (Array.isArray(e)) return e;
}(e) || function (e, t) {
if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(e))) return;
var r = [],
n = !0,
i = !1,
s = void 0; try {
for (var o, a = e[Symbol.iterator](); !(n = (o = a.next()).done) && (r.push(o.value), !t || r.length !== t); n = !0) {
;
}
} catch (e) {
i = !0, s = e;
} finally {
try finally {
if (i) throw s;
}
} return r;
}(e, t) || function (e, t) "Set" === r) return Array.from(e);
if ("Arguments" === r (e, t) || function () {
throw new TypeError("Invalid attempt to destructure non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}();
} function s(e, t) {
(null == t || t > e.size) && (t = e.size);
for (var r = 0, n = new Array(t); r < t; r++) {
n[r] = e[r];
} return n;
} operate u() {
return (u = Object.assign || operate (e) {
for (var t = 1; t < arguments.size; t++) {
var r = arguments[t]; for (var n in r) {
Object.prototype.hasOwnProperty.name(r, n) && (e[n] = r[n]);
}
} return e;
}).apply(this, arguments);
} operate p(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
worth: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e;
} var b = "sonobi",
l = Object(y.generateUUID)(),
o = {
code: b,
supportedMediaTypes: [i.b, i.d],
isBidRequestValid: operate isBidRequestValid(e) {
if (!e.params) return !1;
if (!e.params.ad_unit && !e.params.placement_id) return !1;
if (!Object(y.deepAccess)(e, "mediaTypes.banner") && !Object(y.deepAccess)(e, "mediaTypes.video")) return !1; if (Object(y.deepAccess)(e, "mediaTypes.banner")) {
if (!Object(y.deepAccess)(e, "mediaTypes.banner.sizes") && !e.params.sizes) return !1;
} else if (Object(y.deepAccess)(e, "mediaTypes.video")) {
if ("outstream" === Object(y.deepAccess)(e, "mediaTypes.video.context") && !e.params.sizes) return !1;
if ("instream" === Object(y.deepAccess)(e, "mediaTypes.video.context") && !Object(y.deepAccess)(e, "mediaTypes.video.playerSize")) return !1;
} return !0;
},
buildRequests: operate buildRequests(e, t) {
var r = e.map(operate (e) {
var t = operate (e) {
if (e.params.ad_unit) return e.params.ad_unit;
return e.params.placement_id;
}(e); return /^[/]?[d]+[[/].+[/]?]?$/.take a look at(t) ? (t = "/" === t.charAt(0) ? t : "/" + t, p({}, "".concat(t, "|").concat(e.bidId), "".concat(f(e)).concat(m(e)))) : /^[0-9a-fA-F]{20}$/.take a look at(t) && 20 === t.size ? p({}, e.bidId, "".concat(t, "|").concat(f(e)).concat(m(e))) : void Object(y.logError)("The advert unit code or Sonobi Placement id for slot ".concat(e.bidId, " is invalid"));
}),
n = {};
r.forEach(operate (e) {
u(n, e);
});
var i = {
key_maker: JSON.stringify(n),
ref: t.refererInfo.referer,
s: Object(y.generateUUID)(),
pv: l,
vp: v(),
lib_name: "prebid",
lib_v: "3.23.0",
us: 0
};
c.b.getConfig("userSync") && c.b.getConfig("userSync").syncsPerBidder && (i.us = c.b.getConfig("userSync").syncsPerBidder), d.a.canBidderRegisterSync("iframe", b) ? i.ius = 1 : i.ius = 0, Object(y.deepAccess)(e[0], "params.hfa") && (i.hfa = Object(y.deepAccess)(e[0], "params.hfa")), e[0].params.referrer && (i.ref = e[0].params.referrer), t && t.gdprConsent && (i.gdpr = t.gdprConsent.gdprApplies ? "true" : "false", t.gdprConsent.consentString && (i.consent_string = t.gdprConsent.consentString)); var s = operate (t) {
var e = operate () {
var e = window.DigiTrust && (c.b.getConfig("digiTrustId") || window.DigiTrust.getUser({
member: t
}));
return e && e.success && e.identification || null;
}(); if (!e || e.privateness && e.privateness.optout) return null;
return e;
}("fhnS5drwmH"); s && (i.digid = s.id, i.digkeyv = s.keyv), e[0].schain && (i.schain = JSON.stringify(e[0].schain)), Object(y.deepAccess)(e[0], "userId") && 0 < Object.keys(e[0].userId).size && (i.userid = JSON.stringify(e[0].userId));
var o = e[0].params.key phrases;
if (o && (i.kw = o), t && t.uspConsent && (i.us_privacy = t.uspConsent), Object(y.isEmpty)(n)) return null;
var a = "https://apex.go.sonobi.com/trinity.json";
return Object(y.deepAccess)(e[0], "params.bid_request_url") && (a = Object(y.deepAccess)(e[0], "params.bid_request_url")), {
methodology: "GET",
url: a,
withCredentials: !0,
knowledge: i,
bidderRequests: e
};
},
interpretResponse: operate interpretResponse(e, l) {
var f = e.physique,
m = [],
v = l.knowledge.ref;
return 0 === Object.keys(f.slots).size || Object.keys(f.slots).forEach(operate (e) {
var t = f.slots[e],
r = e.break up("|").slice(-1)[0],
n = operate (e, t) {
for (var r = 0; r < e.size; r++) {
if (e[r].bidId === t) return e[r];
}
}(l.bidderRequests, r),
i = null; "video" === t.sbi_ct && (i = "video"https://slate.com/expertise/2020/09/,"outstream" === Object(y.deepAccess)(n, "mediaTypes.video.context") && (i = "outstream"));
var s,
o,
a,
c,
d,
u,
p,
b = j(i, v);
t.sbi_aid && t.sbi_mouse && t.sbi_size && (a = void 0 === (o = (s = h(t.sbi_size.break up("x"), 2))[0]) ? 1 : o, d = void 0 === (c = s[1]) ? 1 : c, u = , t.sbi_dozer && (u.dealId = t.sbi_dozer), "video" === i ? (u.mediaType = "video", u.vastUrl = b(f.sbi_dc, t.sbi_aid), delete u.advert, delete u.width, delete u.peak) : "outstream" === i && n && (u.mediaType = "video", u.vastUrl = b(f.sbi_dc, t.sbi_aid), u.renderer = operate (e, t) {
var r = 2 < arguments.size && void 0 !== arguments[2] ? arguments[2] : {},
n = g.a.set up({
id: t.support,
url: "https://mtrx.go.sonobi.com/sbi_outstream_renderer.js",
config: r,
loaded: !1,
adUnitCode: e
}); attempt {
n.setRender(O);
} catch (e) {
Object(y.logWarn)("Prebid Error calling setRender on renderer", e);
} return n.setEventHandlers({
impression: operate impression() {
return Object(y.logMessage)("Sonobi outstream video impression occasion");
},
loaded: operate loaded() {
return Object(y.logMessage)("Sonobi outstream video loaded occasion");
},
ended: operate ended() {
Object(y.logMessage)("Sonobi outstream renderer video occasion");
}
}), n;
}(n.adUnitCode, u, Object(y.deepAccess)(n, "renderer.choices")), p = Object(y.deepAccess)(n, "params.sizes"), Array.isArray(p) && Array.isArray(p[0]) && (p = p[0]), p && (u.width = p[0], u.peak = p[1])), m.push(u));
}), m;
},
getUserSyncs: operate getUserSyncs(e, t) {
var r = []; attempt {
e.pixelEnabled && t[0].physique.sbi_px.forEach(operate (e) {
r.push({
kind: e.kind,
url: e.url
});
});
} catch (e) {} return r;
}
}; operate f(e) {
return Object(y.deepAccess)(e, "mediaTypes.video") ? "" : e.params.sizes ? Object(y.parseSizesInput)(e.params.sizes).be part of(",") : Object(y.deepAccess)(e, "mediaTypes.banner.sizes") ? Object(y.parseSizesInput)(Object(y.deepAccess)(e, "mediaTypes.banner.sizes")).be part of(",") : e.sizes ? Object(y.parseSizesInput)(e.sizes).be part of(",") : void 0;
} operate m(e) f=".concat(e.params.ground) : ""; var j = operate j(i, s) {
return operate (e, t) "outstream" === i ? (r = t, n = s, "https://".concat(e, "apex.go.sonobi.com/huge.xml?vid=").concat(r, "&ref=").concat(encodeURIComponent(n))) : '‘;
var r, n;
;
};
var a = operate a(e) {
var r = 0 < arguments.size && void 0 !== e ? e : window;
return operate () {
var e = 0 < arguments.size && void 0 !== arguments[0] ? arguments[0] : 0,
t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : Number.MAX_SAFE_INTEGER;
return r.innerWidth >= e && r.innerWidth < t;
};
}; operate v() {
var e = 0 < arguments.size && void 0 !== arguments[0] ? arguments[0] : window,
t = a(e),
r = 992,
n = 768;
return t(0, 768) ? "cell" : t(n, r) ? "pill" : "desktop";
} operate O(i) {
i.renderer.push(operate () {
var e = h(i.getSize().break up("x"), 2),
t = e[0],
r = e[1],
n = new window.SbiOutstreamRenderer();
n.init({
vastUrl: i.vastUrl,
peak: r,
width: t
}), n.setRootElement(i.adUnitCode);
});
} Object(n.registerBidder)(o);
}
}, [719]);
pbjsChunk([85], {
741: operate _(e, r, t) {
e.exports = t(742);
},
742: operate _(e, r, t) {
"use strict"; Object.defineProperty(r, "__esModule", {
worth: !0
}), t.d(r, "spec", operate () {
return n;
});
var a = t(1),
d = t(0),
p = 12,
o = 11,
c = 0,
u = 22,
n = {
code: "teads",
supportedMediaTypes: ["video"https://slate.com/technology/2020/09/,"banner"],
isBidRequestValid: operate isBidRequestValid(e) ,
buildRequests: operate buildRequests(e, r) {
var t = e.map(I),
a = {
referrer: operate (e) {
var r = "";
e && e.refererInfo && e.refererInfo.referer && (r = e.refererInfo.referer);
return r;
}(r),
knowledge: t,
deviceWidth: display screen.width,
hb_version: "3.23.0"
};
e[0].schain && (a.schain = e[0].schain);
var n,
d,
i,
s = r.gdprConsent;
return r && s && (n = "boolean" == typeof s.gdprApplies, d = "string" == typeof s.consentString, i = n ? operate (e, r, t) {
var a = p;
e ? operate (e, r) (r, t) && (a = o) : a = c;
return a;
}(s.gdprApplies, s.vendorData, s.apiVersion) : u, a.gdpr_iab = {
consent: d ? s.consentString : "",
standing: i,
apiVersion: s.apiVersion
}), r && r.uspConsent && (a.us_privacy = r.uspConsent), {
methodology: "POST",
url: "https://a.teads.television/hb/bid-request",
knowledge: JSON.stringify(a)
};
},
interpretResponse: operate interpretResponse(e) {
var t = [];
return (e = e.physique).responses && e.responses.forEach(operate (e) {
var r = {
cpm: e.cpm,
width: e.width,
peak: e.peak,
foreign money: e.foreign money,
netRevenue: !0,
ttl: e.ttl,
advert: e.advert,
requestId: e.bidId,
creativeId: e.creativeId,
placementId: e.placementId
};
e.dealId && (r.dealId = e.dealId), t.push(r);
}), t;
}
}; operate I(e) {
var r,
t = {},
a = d.getValue(e.params, "placementId"),
n = d.getValue(e.params, "pageId");
return t.sizes = (r = e, d.parseSizesInput(operate (e) {
var r = d.deepAccess(e, "mediaTypes.video.playerSize"),
t = d.deepAccess(e, "mediaTypes.video.sizes"),
a = d.deepAccess(e, "mediaTypes.banner.sizes");
return d.isArray(a) || d.isArray(r) || d.isArray(t) ? [a, t, r].cut back(operate (r, e) {
return d.isArray(e) && (d.isArray(e[0]) ? e.forEach(operate (e) {
r.push(e);
}) : r.push(e)), r;
}, []) : e.sizes;
}(r))), t.bidId = d.getBidIdParameter("bidId", e), t.bidderRequestId = d.getBidIdParameter("bidderRequestId", e), t.placementId = parseInt(a, 10), t.pageId = parseInt(n, 10), t.adUnitCode = d.getBidIdParameter("adUnitCode", e), t.auctionId = d.getBidIdParameter("auctionId", e), t.transactionId = d.getBidIdParameter("transactionId", e), t;
} operate i(e) {
return 0 < parseInt(e);
} Object(a.registerBidder)(n);
}
}, [741]);
pbjsChunk([76], {
761: function _(r, e, t) {
r.exports = t(762);
},
762: function _(r, e, t) {
"use strict"; Object.defineProperty(e, "__esModule", {
value: !0
}), t.d(e, "tripleliftAdapterSpec", function () {
return s;
});
var n = t(2),
i = t(1),
o = t(0),
u = t(3); function p(r) {
return function (r) {
if (Array.isArray(r)) return d(r);
}(r) || function (r) {
if ("undefined" != typeof Symbol && Symbol.iterator in Object(r)) return Array.from(r);
}(r) || function (r, e) (r) || function () {
throw new TypeError("Invalid attempt to spread non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}();
} function d(r, e) {
(null == e || e > r.size) && (e = r.size);
for (var t = 0, n = new Array(e); t < e; t++) {
n[t] = r[t];
} return n;
} var a = !0,
c = null,
s = {
code: "triplelift",
supportedMediaTypes: [n.b],
isBidRequestValid: operate isBidRequestValid(r) {
return void 0 !== r.params.inventoryCode;
},
buildRequests: operate buildRequests(r, e) {
var t,
n = "https://tlx.3lift.com/header/public sale?",
i = operate (r) {
var e = {},
t = r[0].schain;
e.imp = r.map(operate (r, e) {
return {
id: e,
tagid: r.params.inventoryCode,
ground: r.params.ground,
banner: {
format: r.sizes.filter(l).map(operate (r) {
return {
w: r[0],
h: r[1]
};
})
}
};
});
var n = [].concat(p(operate (r) {
return f(r, "tdid"https://slate.com/expertise/2020/09/,"adserver.org"https://slate.com/expertise/2020/09/,"TDID");
}(r)), p(operate (r) {
return f(r, "idl_env"https://slate.com/expertise/2020/09/,"liveramp.com"https://slate.com/expertise/2020/09/,"idl");
}(r)), p(operate (r) {
return f(r, "criteoId"https://slate.com/expertise/2020/09/,"criteo.com"https://slate.com/expertise/2020/09/,"criteoId");
}(r)));
0 < n.size && (e.person = {
ext: {
eids: n
}
});
t && (e.ext = {
schain: t
});
return e;
}(r); return n = o.tryAppendQueryString(n, "lib"https://slate.com/expertise/2020/09/,"prebid"), n = o.tryAppendQueryString(n, "v"https://slate.com/expertise/2020/09/,"3.23.0"), e && e.refererInfo && (t = e.refererInfo.referer, n = o.tryAppendQueryString(n, "referrer", t)), e && e.timeout && (n = o.tryAppendQueryString(n, "tmax", e.timeout)), e && e.gdprConsent && (void 0 !== e.gdprConsent.gdprApplies && (a = e.gdprConsent.gdprApplies, n = o.tryAppendQueryString(n, "gdpr", a.toString())), void 0 !== e.gdprConsent.consentString && (c = e.gdprConsent.consentString, n = o.tryAppendQueryString(n, "cmp_cs", c))), e && e.uspConsent && (n = o.tryAppendQueryString(n, "us_privacy", e.uspConsent)), !0 === u.b.getConfig("coppa") && (n = o.tryAppendQueryString(n, "coppa", !0)), n.lastIndexOf("&") === n.size - 1 && (n = n.substring(0, n.size - 1)), o.logMessage("tlCall request constructed: " + n), {
methodology: "POST",
url: n,
knowledge: i,
bidderRequest: e
};
},
interpretResponse: operate interpretResponse(r, e) {
var t = e.bidderRequest;
return (r.physique.bids || []).map(operate (r) {
return operate (r, e) {
var t = {},
n = e.width || 1,
i = e.peak || 1,
u = e.deal_id || "",
o = e.crid || "";
0 != e.cpm && e.advert && (t = {
requestId: r.bids[e.imp_id].bidId,
cpm: e.cpm,
width: n,
peak: i,
netRevenue: !0,
advert: e.advert,
creativeId: o,
dealId: u,
foreign money: "USD",
ttl: 300,
tl_source: e.tl_source
});
return t;
}(t, r);
});
},
getUserSyncs: operate getUserSyncs(r, e, t, n) {
var i = operate (r) {
if (!r) return;
if (r.iframeEnabled) return "iframe";
if (r.pixelEnabled) return "picture";
}(r); if (i) {
var u = "https://eb2.3lift.com/sync?";
return "picture" === i && (u = o.tryAppendQueryString(u, "px", 1), u = o.tryAppendQueryString(u, "src"https://slate.com/expertise/2020/09/,"prebid")), null !== c && (u = o.tryAppendQueryString(u, "gdpr", a), u = o.tryAppendQueryString(u, "cmp_cs", c)), n && (u = o.tryAppendQueryString(u, "us_privacy", n)), [{
type: i,
url: u
}];
}
}
}; operate f(r, e, t, n) {
return r.map((o = e, operate (r) {
return r && r.userId && r.userId[o];
})).filter(operate (r) {
return !!r;
}).map((i = t, u = n, operate (r) {
return {
supply: i,
uids: [{
id: r,
ext: {
rtiPartner: u
}
}]
};
}));
var i, u, o;
} operate l(r) {
return 2 === r.size && "quantity" == typeof r[0] && "quantity" == typeof r[1];
} Object(i.registerBidder)(s);
}
}, [761]);
pbjsChunk([75], {
763: operate _(e, r, t) {
e.exports = t(764);
},
764: operate _(e, r, t) {
"use strict"; Object.defineProperty(r, "__esModule", {
worth: !0
}), t.d(r, "spec", operate () {
return v;
});
var m = t(0),
s = t(1),
o = t(10),
c = t(2),
f = "Bid from response has no auid parameter - ",
l = "Bid from response has no adm parameter - ",
p = "Array of bid objects is empty",
g = "Cannot discover in requested bids the bid with auid - ",
u = "Seatbid array from response has empty merchandise",
y = "Response is empty",
b = "Response has empty seatbid array",
h = "Seatbid from response has no array of bid objects - ",
v = {
code: "trustx",
supportedMediaTypes: [c.b, c.d],
isBidRequestValid: operate isBidRequestValid(e) {
return !!e.params.uid;
},
buildRequests: operate buildRequests(e, r) {
var a,
o,
p = [],
u = {},
c = {},
f = {},
l = "web";
(e || []).forEach(operate (e) {
"gross" === e.params.priceType && (l = "gross"), o = e.bidderRequestId;
var r = e.params.uid,
t = e.adUnitCode;
p.push(r);
var s,
n = m.parseSizesInput(e.sizes);
a || m.isEmpty(e.params.key phrases) || (0 < (s = m.transformBidderParamKeywords(e.params.key phrases)).size && s.forEach(E), a = s), c[r] || (c[r] = {});
var d = c[r];
d[t] ? d[t].bids.push(e) : d[t] = {
adUnitCode: t,
bids: [e],
dad and mom: []
};
var i = d[t];
n.forEach(operate (e) {
f[e] = !0, u[r] || (u[r] = {}), u[r][e] ? u[r][e].push(i) : u[r][e] = [i], i.dad and mom.push({
mum or dad: u[r],
key: e,
uid: r
});
});
});
var t = {
pt: l,
auids: p.be part of(","),
sizes: m.getKeys(f).be part of(","),
r: o,
wrapperType: "Prebid_js",
wrapperVersion: "3.23.0"
};
return a && (t.key phrases = JSON.stringify(a)), r && (r.refererInfo && r.refererInfo.referer && (t.u = r.refererInfo.referer), r.timeout && (t.wtimeout = r.timeout), r.gdprConsent && (r.gdprConsent.consentString && (t.gdpr_consent = r.gdprConsent.consentString), t.gdpr_applies = "boolean" == typeof r.gdprConsent.gdprApplies ? Quantity(r.gdprConsent.gdprApplies) : 1), r.uspConsent && (t.us_privacy = r.uspConsent)), {
methodology: "GET",
url: "https://sofia.trustx.org/hb",
knowledge: m.parseQueryStringParameters(t).exchange(/&$/, ""),
bidsMap: u
};
},
interpretResponse: operate interpretResponse(e, r, t) {
var s = 2 < arguments.size && void 0 !== t ? t : o.a;
e = e && e.physique;
var n,
d = [],
i = r.bidsMap,
a = r.knowledge.pt;
return e ? e.seatbid && !e.seatbid.size && (n = b) : n = y, !n && e.seatbid && e.seatbid.forEach(operate (e) {
!operate (e, d, r, t, s) {
if (!e) return;
var n;
e.auid || (n = f + JSON.stringify(e));
{
var i, a, o, p, u;
e.adm ? (i = d[e.auid]) ? (a = "".concat(e.w, "x").concat(e.h), i[a] && (o = i[a][0], p = o.bids.shift(), u = {
requestId: p.bidId,
bidderCode: v.code,
cpm: e.worth,
width: e.w,
peak: e.h,
creativeId: e.auid,
foreign money: "USD",
netRevenue: "gross" !== r,
ttl: 360,
dealId: e.dealid
}, "video" === e.content_type ? (u.vastXml = e.adm, u.mediaType = c.d, u.adResponse = {
content material: u.vastXml
}, p.renderer || p.mediaTypes && p.mediaTypes.video && "outstream" !== p.mediaTypes.video.context || (u.renderer = operate (e, r) {
var t = r.set up({
id: e.id,
url: e.url,
loaded: !1
}); attempt {
t.setRender(w);
} catch (e) {
m.logWarn("Prebid Error calling setRender on renderer", e);
} return t;
}({
id: p.bidId,
url: "https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"
}, s))) : (u.advert = e.adm, u.mediaType = c.b), t.push(u), o.bids.size || o.dad and mom.forEach(operate (e) ))) : n = g + e.auid : n = l + JSON.stringify(e);
}
n && m.logError(n);
}(operate (e) (e), i, a, d, s);
}), n && m.logError(n), d;
},
getUserSyncs: operate getUserSyncs(e) {
if (e.pixelEnabled) return [{
type: "image",
url: "https://sofia.trustx.org/push_sync"
}];
}
}; operate E(e) {
var r;
r = e.worth, m.isArray(r) && 0 < r.size && "" === e.worth[0] && delete e.worth;
} operate w(e) {
e.renderer.push(operate () {
window.ANOutstreamVideo.renderAd({
targetId: e.adUnitCode,
adResponse: e.adResponse
});
});
} Object(s.registerBidder)(v);
}
}, [763]);
pbjs.processQueue();
}, {}];
window.modules["via.legacy"] = [function(require,module,exports){"use strict"; DS.service("via", function () {
"use strict"; // remove `via` from url, to be used after amplitude logs it to prevent users from sharing such urls function removeFromLocation() {
var url = new URL(location.href);
url.searchParams.delete("via");
history.replaceState(null, "", url.toString());
} // and add `via` param to any outbound links function addViaToUrl(href, via) {
if (!href || href.substr(0, 1) === "#") {
return href; // don't add to jumps on the current page, e.g. "Skip to main content"
} var url = new URL(href);
var apexDomain = new URL(location.href).hostname.split(".").slice(-2).join("."); if (url.hostname.indexOf(apexDomain) === -1) {
return href; // don't add it to external links
} url.searchParams.set("via", via);
return url.toString();
} // keys correspond to "page_types" in editable_components.yml var PREFIXES = {
article: "article",
homepage: "homepage",
"vertical front": "section",
"rubric front": "rubric"
};
var pageType; function setPageType(amplitudePageType) {
pageType = PREFIXES[amplitudePageType];
} var DELIMITER = "_"; operate concatVia(node, by way of) {
var tag = node.dataset && node.dataset.by way of; if (tag) {
by way of = (by way of.size ? tag + DELIMITER : tag) + by way of;
} return by way of;
} operate addToClickedLinks() {
doc.documentElement.addEventListener("click on", operate (e) {
var a;
var by way of = ""; // detect hyperlink nodes and acquire by way of directives to append to the href var node = e.goal; // the aspect the place this occasion originated could have been faraway from the dom, e.g. within the case of the OIL CMP which disappears after you work together with it whereas (node && node !== e.currentTarget) {
if (node.tagName === "A") {
a = node;
} by way of = concatVia(node, by way of);
node = node.parentNode;
} if (a && by way of) {
if (pageType) {
by way of = pageType + DELIMITER + by way of;
} a.href = addViaToUrl(a.href, by way of);
}
});
} operate addToSubmittedForms() {
doc.documentElement.addEventListener("submit", operate (e) {
var type = e.goal; // acquire by way of directives var by way of = "";
var node = e.goal; whereas (node !== e.currentTarget) {
by way of = concatVia(node, by way of);
node = node.parentNode;
} if (by way of) {
if (pageType) {
by way of = pageType + DELIMITER + by way of;
} // dynamically create a hidden enter for the shape url var enter = doc.createElement("enter");
enter.kind = "hidden";
enter.title = "by way of";
enter.worth = by way of;
type.appendChild(enter);
}
});
} // begin listening solely as soon as, when first injected addToClickedLinks();
addToSubmittedForms();
return {
setPageType: setPageType,
removeFromLocation: removeFromLocation
};
});
}, {}];
window.modules["visibility.legacy"] = [function(require,module,exports){"use strict"; DS.service("$visibility", ["$document"https://slate.com/technology/2020/09/,"$window"https://slate.com/technology/2020/09/,"_throttle"https://slate.com/technology/2020/09/,"Eventify", function ($document, $window, _throttle, Eventify) {
var list = [],
Seen,
VisibleEvent;
/**
* @param {quantity} a
* @param {quantity} b
* @returns {*}
* @see http://jsperf.com/math-min-vs-if-condition-vs/8
*/ operate min(a, b) {
return a < b ? a : b;
}
/**
* @param {number} a
* @param {number} b
* @returns {*}
* @see http://jsperf.com/math-min-vs-if-condition-vs/8
*/ function max(a, b) {
return a > b ? a : b;
}
/**
* Quick loop by watched parts
*/
operate onScroll() {
listing.forEach(updateVisibility);
}
/**
* updates seen property
* @param {Visble} merchandise
* @param {{}} evt
* @fires Seen#proven
* @fires Seen#hidden
*/
operate updateSeen(merchandise, evt) {
var px = evt.visiblePx,
% = evt.visiblePercent; // if some pixels are seen and we’re higher/equal to threshold
if (px && % >= merchandise.shownThreshold && !merchandise.seen) {
merchandise.seen = true;
setTimeout(operate () {
merchandise.set off(“proven”, new VisibleEvent(“proven”, evt));
}, 15); // if no pixels or % is lower than threshold
} else if ((!px || % < item.hiddenThreshold) && item.seen) {
item.seen = false;
setTimeout(function () {
item.trigger("hidden", new VisibleEvent("hidden", evt));
}, 15);
}
}
/**
* sets preload property
* @param {Visible} item
* @param {{}} evt
* @param {Number} innerHeight
* @fires Visible#preload
*/ function updatePreload(item, evt, innerHeight) {
if (!item.preload && item.preloadThreshhold && shouldBePreloaded(evt.target, evt.rect, item.preloadThreshhold, innerHeight)) {
item.preload = true;
setTimeout(function () {
item.trigger("preload", new VisibleEvent("preload", evt));
}, 15);
}
}
/**
* Trigger events
* @param {Visible} item
*/ function updateVisibility(item) {
var rect = item.el.getBoundingClientRect(),
innerHeight = $window.innerHeight || $document.documentElement.clientHeight,
px = getVerticallyVisiblePixels(rect, innerHeight),
percent = px / (rect.height || innerHeight),
evt = {
target: item.el,
rect: rect,
visiblePx: px,
visiblePercent: percent
};
updateSeen(item, evt);
updatePreload(item, evt, innerHeight);
}
/**
* Return normalized viewport height
* @return {number}
*/ function getViewportHeight() $document.documentElement.clientHeight
/**
* Return normalized viewport width
* @return {number}
*/ function getViewportWidth()
/**
* make sure an element isn't hidden by styles or etc
* @param {Element} el
* @return {Boolean}
*/ function isElementNotHidden(el) {
return el && el.offsetParent !== null && !el.getAttribute("hidden") && getComputedStyle(el).display !== "none" && getComputedStyle(el).visibility !== "hidden";
}
/**
* Apparently the fastest way...
* @param {Element} el
* @returns {boolean}
* @example if (!$visibility.isElementInViewport(el)) { ... }
*/ function isElementInViewport(el) $doc.documentElement.clientWidth);
/**
* @param {Component} el
* @param {ClientRect} rect
* @param {Quantity} preloadThreshhold
* @param {Quantity} innerHeight
* @return {Boolean}
*/ operate shouldBePreloaded(el, rect, preloadThreshhold, innerHeight) {
return rect.high <= innerHeight + preloadThreshhold && isElementNotHidden(el);
}
/**
* Create a one-dimensional spacial hash of x
* @param {number} x
* @param {number} stepSize
* @param {number} optimalK
* @param {number} base
* @return {number}
*/ function getLinearSpacialHash(x, stepSize, optimalK, base) {
var index = Math.floor(x / (stepSize || 1)),
remainder = x % stepSize,
result = index.toString(base); if (optimalK > 1) {
consequence += getLinearSpacialHash(the rest, Math.ground(stepSize / base), optimalK – 1, base);
}
return consequence;
}
/**
* @param {ClientRect} rect
* @param {quantity} innerHeight
* @returns {quantity}
*/
operate getVerticallyVisiblePixels(rect, innerHeight) {
return min(innerHeight, max(rect.backside, 0)) – min(max(rect.high, 0), innerHeight);
}
/**
* Get offset of aspect relative to total web page
*
* @param {Component} el
* @returns {{left: quantity, high: quantity}}
* @see http://jsperf.com/offset-vs-getboundingclientrect/7
*/
operate getPageOffset(el) {
var offsetLeft = el.offsetLeft,
offsetTop = el.offsetTop;
whereas (el = el.offsetParent) {
offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop;
}
return {
left: offsetLeft,
high: offsetTop
};
}
/**
* Create a brand new Seen class to look at when parts enter and depart the viewport
*
* Name destroy operate to cease listening (that is till we’ve got higher help for looking ahead to Node Elimination)
* @param {Component} el
* @param {{shownThreshold: quantity, hiddenThreshold: quantity}} [options]
* @class
* @instance this.seen = new $visibility.Seen(el);
*/
Seen = operate Seen(el, choices) {
choices = choices || {};
this.el = el;
this.seen = false;
this.preload = false;
this.preloadThreshhold = choices && choices.preloadThreshhold || 0;
this.shownThreshold = choices && choices.shownThreshold || 0;
this.hiddenThreshold = choices && min(choices.shownThreshold, choices.hiddenThreshold) || 0;
listing.push(this);
updateVisibility(this); // set instantly to seen or not
};
Seen.prototype = {
/**
* Cease triggering.
*/
destroy: operate destroy() {
// take away from listing
listing.splice(listing.indexOf(this), 1);
}
/**
* @title Seen#on
* @operate
* @param ‘hidden’ e EventName
* @param {operate} cb Callback
*/
/**
* @title Seen#set off
* @operate
* @param ‘hidden’ e
* @param {{}}
*/
};
Eventify.allow(Seen.prototype);
VisibleEvent = operate VisibleEvent(kind, choices) {
var _this = this;
this.kind = kind;
Object.keys(choices).forEach(operate (key) {
_this[key] = choices[key];
});
}; // hear for scroll occasions (throttled)
$doc.addEventListener(“scroll”, _throttle(onScroll, 200)); // public
this.getPageOffset = getPageOffset;
this.getLinearSpacialHash = getLinearSpacialHash;
this.getVerticallyVisiblePixels = getVerticallyVisiblePixels;
this.getViewportHeight = getViewportHeight;
this.getViewportWidth = getViewportWidth;
this.isElementNotHidden = isElementNotHidden;
this.isElementInViewport = isElementInViewport;
this.Seen = Seen;
}]);
}, {}];
require=(operate e(t,n,r){operate s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==”operate”&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(“Can’t discover module ‘”+o+”‘”);throw f.code=”MODULE_NOT_FOUND”,f}var l=n[o]={exports:{}};t[o][0].name(l.exports,operate(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==”operate”&&require;for(var o=0;o
Source link