window.probidai = {
  "trafficEnabled": 0, 
  "prebidGlobals": ["pbjs"],
  "baseModifier": 1.15,
  "modifiers": {}
}

function h(o) {
  return Math.round((o + Number.EPSILON) * 100) / 100;
}
function E(o, r = 12) {
  let n = Math.round(o * 100), i = 0.01;
  n >= r * 100 ? n = r * 100 : n <= 110 ? i = 0.01 : n <= 250 ? i = 0.05 : n <= 700 ? i = 0.1 : n <= 1200 ? i = 0.25 : n = 1200;
  const d = B(n, i * 100);
  return h(d / 100);
}
function B(o, r) {
  const e = o % r;
  let n = 0;
  return e > 0 && (n = r - e), o + n;
}
function C(o, r) {
  const e = [];
  return Math.round(r * 100).toString().split("").forEach((i) => {
    e.push(o[parseInt(i)]);
  }), e.join("");
}
const N = "ouhlicxnpe";
function F(o) {
  var l, f, g, u, b, w, p, m;
  const r = ((l = o == null ? void 0 : o.getAdUnitPath) == null ? void 0 : l.call(o)) || "", e = o == null ? void 0 : o.getTargetingMap(), n = ((f = e == null ? void 0 : e.hb_pb) == null ? void 0 : f[0]) || 0, i = (g = e == null ? void 0 : e.amznbid) == null ? void 0 : g[0], d = ((b = (u = window.probidai) == null ? void 0 : u.amazonBidMap) == null ? void 0 : b[i]) || 0;
  console.log(`Probid.ai Amazon Bid: ${d} for slot ${r}`), console.log(`Probid.ai Prebid Bid: ${n} for slot ${r}`);
  const a = Math.max(Number(n), Number(d)), t = 0.1;
  if (r.toLowerCase().includes("outstream"))
    return;
  const c = ((w = window.probidai) == null ? void 0 : w.baseModifier) || 1.15, y = ((p = window.probidai) == null ? void 0 : p.currencyConversion) || 1, M = a >= t ? a * c * y : t, P = h(M), s = E(P, (m = window.probidai) == null ? void 0 : m.maxFloor), T = C(N, s);
  console.log(`Probid.ai setting floor of ${s} for ad code: ${r}`), o == null || o.setTargeting("dynamic_floor", T);
}
try {
  window.googletag = window.googletag || { cmd: [] }, window.probidai = window.probidai || { bidCaching: !1, modifiers: {}, prebidGlobals: ["pbjs"], trafficEnabled: 50 }, window.probidai.hasOwnProperty("trafficEnabled") || (window.probidai.trafficEnabled = 50);
  const o = Math.floor(Math.random() * 100) + 1;
  window.googletag.cmd.push(function() {
    var r;
    if (o <= window.probidai.trafficEnabled) {
      window.probidai.enabled = !0, window.googletag.pubads().setTargeting("dynamic_floors", "on");
      const e = {
        apply(i, d, a) {
          return a[0].forEach((c) => {
            F(c);
          }), i.apply(d, a);
        }
      }, n = new Proxy(window.googletag.pubads().refresh, e);
      window.googletag.pubads().refresh = n, (r = window.googletag) == null || r.pubads().addEventListener("slotRenderEnded", (i) => {
        var a, t, c;
        ((c = (t = (a = i == null ? void 0 : i.slot) == null ? void 0 : a.getTargeting) == null ? void 0 : t.call(a, "dynamic_floor")) == null ? void 0 : c[0]) && i.slot.clearTargeting("dynamic_floor");
      });
    } else
      window.googletag.pubads().setTargeting("dynamic_floors", "off");
  });
} catch (o) {
  console.log("Probid.ai Error: ", o);
}
