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AIC,KACXC,EAAOC,UAEPN,GAAQG,EAAMH,EAAO3H,GAEvBmG,aAAayB,GACbA,EAAarB,YAAW,WACtBoB,EAAOG,EACPL,EAAGS,MAAML,EAASG,EACnB,GAAEhI,KAEH2H,EAAOG,EACPL,EAAGS,MAAML,EAASG,GAErB,CACF,C,uBC/BDG,EAAOC,QAAUC,M,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBnO,IAAjBoO,EACH,OAAOA,EAAaL,QAGrB,IAAID,EAASG,EAAyBE,GAAY,CAGjDJ,QAAS,CAAC,GAOX,OAHAM,EAAoBF,GAAUL,EAAQA,EAAOC,QAASG,GAG/CJ,EAAOC,OACf,CCrBAG,EAAoBI,EAAKP,IACH,oBAAX3O,QAA0BA,OAAOmP,aAC1ClO,OAAOC,eAAeyN,EAAS3O,OAAOmP,YAAa,CAAE7O,MAAO,WAE7DW,OAAOC,eAAeyN,EAAS,aAAc,CAAErO,OAAO,GAAO,ECA9DgN,EAAQ,KACRA,EAAQ,I","sources":["webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/ads/admanager-freestar.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/ads/common.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/utils/throttle.js","webpack://essence_site/external var \"jQuery\"","webpack://essence_site/webpack/bootstrap","webpack://essence_site/webpack/runtime/make namespace object","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/head-freestar.js"],"sourcesContent":["export default function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n  key = toPropertyKey(key);\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n  var key = toPrimitive(arg, \"string\");\n  return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n  if (_typeof(input) !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (_typeof(res) !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}","export default function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","/**\n * Javascript for Ads.\n *\n **/\n\n/**\n * Prepares and sends data from ad tags to Freestar for ad rendering.\n */\n// Object from Ajax\nconst viewPortHeight = Math.max(\n  document.documentElement.clientHeight,\n  window.innerHeight || 0\n);\n\nconst isMobileDevice = window.matchMedia(\n  \"only screen and (max-width: 760px)\"\n).matches;\n\n// Connatix ad tags:\n// - mobile only\n// - shown on specific sites and sections\nlet site = \"\";\nlet connatixBodyTag;\nlet connatixAdTag;\nconst isConnatixEnabled = () => {\n  if (!isMobileDevice) {\n    return false;\n  }\n\n  if (\"undefined\" !== typeof hide_outstream_ads && hide_outstream_ads) {\n    return false;\n  }\n\n  if (\"undefined\" === typeof ps_ad_object) {\n    return false;\n  }\n\n  const not_content = [\"homepage\", \"page\", \"search\", \"topic\"];\n  const this_content = JSON.parse(ps_ad_object[0].page_targeting).ctype;\n  if (not_content.includes(this_content)) {\n    return false;\n  }\n\n  const domain = window.location.hostname;\n  const path = window.location.pathname.split(\"/\")[1];\n\n  let is_nc = false;\n  if (\"undefined\" !== typeof is_nc_section) {\n    is_nc = is_nc_section[0];\n  }\n\n  if (domain.includes(\"beautycon\") || domain.includes(\"essnc.\")) {\n    if (is_nc) {\n      site = \"naturallycurly\";\n    } else {\n      site = \"beautycon\";\n    }\n  } else if (\n    (domain.includes(\"www.essence\") ||\n      domain.includes(\"ess.\") ||\n      domain.includes(\"essenceweb\")) &&\n    !path.includes(\"sokomrkt\")\n  ) {\n    site = \"essence\";\n  }\n\n  const tagsMap = {\n    essence: {\n      body: `!function(n){if(!window.cnx){window.cnx={},window.cnx.cmd=[];var t=n.createElement('iframe');t.src='javascript:false'; t.display='none',t.onload=function(){var n=t.contentWindow.document,c=n.createElement('script');c.src='//cd.connatix.com/connatix.player.js?cid=f9509d53-804e-427d-a0bc-1204c0a3bcb1',c.setAttribute('async','1'),c.setAttribute('type','text/javascript'),n.body.appendChild(c)},n.body.appendChild(t)}}(document);`,\n      ad: `<script async src=\"https://assets.connatix.com/Elements/e044018b-533a-471e-8e55-e3e6acfac5bd/essence-players.js\"></script>`,\n    },\n    naturallycurly: {\n      body: `!function(n){if(!window.cnx){window.cnx={},window.cnx.cmd=[];var t=n.createElement('iframe');t.src='javascript:false'; t.display='none',t.onload=function(){var n=t.contentWindow.document,c=n.createElement('script');c.src='//cd.connatix.com/connatix.player.js?cid=f9509d53-804e-427d-a0bc-1204c0a3bcb1&pid=41ea94c8-e157-4783-af66-e73d54d60471',c.setAttribute('async','1'),c.setAttribute('type','text/javascript'),n.body.appendChild(c)},n.head.appendChild(t)}}(document);`,\n      ad: `!function(){let x=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(x){var e=16*Math.random()|0;return(\"x\"==x?e:3&e|8).toString(16)}),e=document.currentScript||document.querySelector(\"script.cnxtemp\");e.setAttribute(\"id\",x),e.removeAttribute(\"class\"),(new Image()).src = 'https://capi.connatix.com/tr/si?token=4ea21d78-9205-4ec5-a7de-f7f5a5bd3492&cid=f9509d53-804e-427d-a0bc-1204c0a3bcb1', cnx.cmd.push(function(){cnx({playerId:\"41ea94c8-e157-4783-af66-e73d54d60471\"}).render(x)})}();`,\n    },\n    beautycon: {\n      body: `!function(n){if(!window.cnx){window.cnx={},window.cnx.cmd=[];var t=n.createElement('iframe');t.src='javascript:false'; t.display='none',t.onload=function(){var n=t.contentWindow.document,c=n.createElement('script');c.src='//cd.connatix.com/connatix.player.js?cid=f9509d53-804e-427d-a0bc-1204c0a3bcb1&pid=93c0ae75-a46d-4611-9287-3b42db35fd2d',c.setAttribute('async','1'),c.setAttribute('type','text/javascript'),n.body.appendChild(c)},n.head.appendChild(t)}}(document);`,\n      ad: `!function(){let x=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(x){var e=16*Math.random()|0;return(\"x\"==x?e:3&e|8).toString(16)}),e=document.currentScript||document.querySelector(\"script.cnxtemp\");e.setAttribute(\"id\",x),e.removeAttribute(\"class\"),(new Image()).src = 'https://capi.connatix.com/tr/si?token=4ea21d78-9205-4ec5-a7de-f7f5a5bd3492&cid=f9509d53-804e-427d-a0bc-1204c0a3bcb1', cnx.cmd.push(function(){cnx({playerId:\"93c0ae75-a46d-4611-9287-3b42db35fd2d\"}).render(x)})}();`,\n    },\n  };\n\n  if (site) {\n    connatixBodyTag = tagsMap[site].body;\n    connatixAdTag = tagsMap[site].ad;\n    return true;\n  }\n  return false;\n};\n\nlet viewPortMultiplier = isMobileDevice ? 0.9 : 0.5;\n// Google Optimize Test override\nif (typeof window.viewPortMultiplier !== \"undefined\") {\n  viewPortMultiplier = window.viewPortMultiplier;\n}\n\nconst rootMargin = Math.floor(viewPortMultiplier * viewPortHeight);\n\n// Observer to detect ads within 3 viewport view\nconst ads_observer = new IntersectionObserver(\n  (entries, observer) => {\n    let els = [];\n\n    entries.forEach((entry) => {\n      if (entry.intersectionRatio > 0) {\n        const el = $(entry.target);\n        el.addClass(\"freestar-pushed\");\n        els.push(el);\n        observer.unobserve(entry.target);\n      }\n    });\n\n    // Connatix outstream ads.\n    if (isConnatixEnabled()) {\n      // Separate the ad units that will be replaced by Connatix\n      let els_outstream = [];\n      els.forEach(function (el) {\n        let slot_id = el.attr(\"id\");\n        if (\n          (slot_id.includes(\"right_rail\") &&\n            !slot_id.includes(\"right_rail_sticky\")) ||\n          slot_id.includes(\"incontent\") ||\n          slot_id.includes(\"infinite_scroll\")\n        ) {\n          els_outstream.push(el);\n          els = els.filter((item) => item.attr(\"id\") !== slot_id);\n        }\n      });\n\n      setupConnatix().then(() => {\n        pushToConnatix(els_outstream);\n      });\n    }\n\n    pushToFreestar(els);\n  },\n  {\n    rootMargin: `0px 0px ${rootMargin}px 0px`,\n    threshold: 0,\n  }\n);\n\nconst setupConnatix = () => {\n  return new Promise((resolve, reject) => {\n    let scriptId = \"connatix-script\";\n    if (document.getElementById(scriptId) !== null) {\n      resolve();\n      return;\n    }\n\n    let cnx_body_script = document.createElement(\"script\");\n    cnx_body_script.id = scriptId;\n    cnx_body_script.type = \"text/javascript\";\n    cnx_body_script.textContent = connatixBodyTag;\n    cnx_body_script.onload = resolve;\n    cnx_body_script.onerror = reject;\n    document.body.insertBefore(cnx_body_script, document.body.firstChild);\n  });\n};\n\nconst pushToConnatix = (els) => {\n  els.forEach(function (el) {\n    // Locate the ad slot to be replaced by Connatix\n    let slot_id = el.attr(\"id\");\n    let slot = document.getElementById(slot_id);\n\n    // Hijack the first outstream ad slot for the following tests:\n    // 1) Testing GAM Ad Unit for Outstream Video in Shopping channel (PSP-2674).\n    if (window.gamtest !== undefined && window.gamtest) {\n      if (window.gamtest_count !== undefined && window.gamtest_count === 0) {\n        let gamtest_div = document.createElement(\"div\");\n        gamtest_div.id = \"div-gpt-ad-1739988354689-0\";\n        gamtest_div.style.cssText =\n          \"min-width: 300px; min-height: 50px; margin: 40px auto; border: 1px solid black;\";\n        gamtest_div.innerHTML = `\n          <script>\n            googletag.cmd.push(function() { googletag.display('div-gpt-ad-1739988354689-0'); });\n          </script>\n        `;\n        slot.after(gamtest_div);\n        slot.style.display = \"none\";\n        console.log(\"GAM Outstream test unit injected:\", gamtest_div);\n        window.gamtest_count++;\n        return;\n      }\n    }\n\n    // 2) Testing JWVideo Unit for Outstream Video in Lifestyle channel (PSP-2676).\n    if (window.jwotest !== undefined && window.jwotest) {\n      if (window.jwotest_count !== undefined && window.jwotest_count === 0) {\n        let jwotest_div = document.createElement(\"div\");\n        jwotest_div.id = \"jwp-outstream-unit\";\n        jwotest_div.style.cssText =\n          \"min-width: 300px; min-height: 50px; margin: 40px auto; border: 1px solid black;\";\n\n        let script = document.createElement(\"script\");\n        script.textContent = `\n          jwplayer(\"jwp-outstream-unit\").setup({\n              \"aspectratio\": \"16:9\",\n              \"width\": \"100%\",\n              \"advertising\": {\n                \"client\": \"vast\",\n                \"outstream\": true,\n                \"tag\": \"https://pubads.g.doubleclick.net/gampad/ads?iu=/21698916284/ess/jwpvideooutstreamEssence&description_url=http%3A%2F%2Fwww.essence.com&tfcd=0&npa=0&sz=1x1|300x1|300x250|400x300|640x480&min_ad_duration=6000&max_ad_duration=15000&gdfp_req=1&unviewed_position_start=1&output=vast&env=vp&impl=s&correlator=\",\n                \"endstate\": \"close\"\n              }\n            });\n        `;\n\n        slot.after(jwotest_div);\n        slot.style.display = \"none\";\n        jwotest_div.after(script);\n        console.log(\"JWVideo Outstream test unit injected:\", jwotest_div);\n        window.jwotest_count++;\n        return;\n      }\n    }\n\n    let rect = slot.getBoundingClientRect();\n    let scrollTop = window.scrollY || document.documentElement.scrollTop;\n    let current_position = Math.round(rect.top + scrollTop);\n\n    // Find all the Connatix and JW Player slots\n    let connatix_elements = [\n      ...document.querySelectorAll(\"div[id^='connatix_']\"),\n    ];\n    let jw_video_elements = [...document.querySelectorAll(\".jw-video-box\")];\n    let video_elements = [...connatix_elements, ...jw_video_elements];\n\n    // Calculate the distance between the current ad slot and neighboring video elements\n    let nearest_video = [\n      { direction: \"above\", id: null, distance: Infinity },\n      { direction: \"below\", id: null, distance: Infinity },\n    ];\n\n    video_elements.forEach((video_element) => {\n      let rect = video_element.getBoundingClientRect();\n      let scrollTop = window.scrollY || document.documentElement.scrollTop;\n      let video_position = Math.round(rect.top + scrollTop);\n\n      let distance = Math.abs(current_position - video_position);\n      let direction = video_position < current_position ? 0 : 1;\n      if (distance < nearest_video[direction].distance) {\n        nearest_video[direction].distance = distance;\n        nearest_video[direction].id = video_element.id;\n      }\n    });\n\n    // Only inject Connatix video if there's sufficient gap between top-of-page and neighboring video elements\n    let top_spacing = 0;\n    let cnx_spacing = 1000;\n    if (site === \"essence\") {\n      top_spacing = 1000;\n      cnx_spacing = 1500; // about every 7th ad slot\n    }\n    if (site === \"beautycon\") {\n      cnx_spacing = 1200; // about every 5th ad slot\n    }\n\n    if (\n      nearest_video[0].distance > cnx_spacing &&\n      nearest_video[1].distance > cnx_spacing &&\n      window.scrollY > top_spacing\n    ) {\n      let cnx_container = document.getElementById(\"connatix_\" + slot_id);\n      if (slot && !cnx_container) {\n        let cnx_id = \"connatix_\" + slot_id;\n        let cnx_container = document.createElement(\"div\");\n        cnx_container.setAttribute(\"id\", \"ess_cnx_container\");\n        // Swap-in the outstream ad\n        slot.after(cnx_container);\n        slot.style.display = \"none\";\n\n        let cnx_unit = document.createElement(\"div\");\n        cnx_unit.setAttribute(\"id\", cnx_id);\n        cnx_container.appendChild(cnx_unit);\n\n        let cnx_script = document.createElement(\"script\");\n        cnx_script.type = \"text/javascript\";\n        if (connatixAdTag.includes(\"essence-players\")) {\n          // Use script tag\n          cnx_script.src = connatixAdTag.match(/src=\"([^\"]+)\"/)[1];\n          cnx_script.async = true;\n        } else {\n          // Use inline script\n          cnx_script.setAttribute(\"class\", \"cnxtemp\");\n          cnx_script.textContent = connatixAdTag;\n        }\n        cnx_container.appendChild(cnx_script);\n      }\n    } else {\n      pushToFreestar(els);\n    }\n  });\n};\n\nlet count = 0;\nlet positions = \".ad-position\";\n\nconst pushToFreestar = (els) => {\n  let els_to_push = [];\n  let ad_unit_path =\n    ps_ad_object[0][\"account_id\"] + ps_ad_object[0][\"slot_name\"];\n\n  els.forEach(function (el) {\n    // Tell Freestar which element to use.\n    let slot_id = el.attr(\"id\");\n    if (\n      !isMobileDevice &&\n      typeof slot_id === \"string\" &&\n      slot_id.includes(\"_mobile_\")\n    ) {\n      return;\n    }\n\n    // Tell Freestar which type of ad to send.\n    let placement = el.attr(\"data-placement-name\");\n\n    let article_key_values = {};\n    article_key_values.pos = slot_id;\n\n    if (\n      \"undefined\" !== typeof ps_ad_object &&\n      ps_ad_object[0] &&\n      ps_ad_object[0].test !== null\n    ) {\n      article_key_values.test = ps_ad_object[0].test;\n    }\n\n    // Only send the tile value if the current ad is not outofpage 1x1.\n    if (!el.hasClass(\"dfp-ads-outofpage\")) {\n      count++;\n      article_key_values.tile = count;\n    }\n\n    if (slot_id.includes(\"leaderboard\")) {\n      article_key_values.inDapIF = true;\n    }\n\n    // Bring the page targeting & article_key_values values into article_targeting together\n    // so that overwriting values within objects does not occur.\n    let article_targeting = Object.assign(\n      article_key_values,\n      page_targeting(el)\n    );\n\n    els_to_push.push({\n      placementName: placement,\n      slotId: slot_id,\n      targeting: article_targeting,\n    });\n\n    // Define the slot for DoubleVerify\n    defineDvtagSlot(slot_id, {\n      id: ad_unit_path,\n      sizes: [],\n    });\n\n    // end forEach\n  });\n\n  freestar.queue.push(function () {\n    // When DoubleVerify is ready...\n    onDvtagReady(function () {\n      // 1. Get targeting information (must be performed inside onDvtagReady)\n      els_to_push.forEach(function (el) {\n        const dvTargeting = getDvtagTargeting(el.slotId);\n        el.targeting = { ...el.targeting, ...dvTargeting };\n      });\n      // 2. Push the ad slots to Freestar\n      freestar.newAdSlots(els_to_push);\n    });\n  });\n};\n\nconst page_targeting = (el) => {\n  const krux_data =\n    typeof Krux !== \"undefined\" ? { ksg: Krux.segments, kuid: Krux.user } : {};\n\n  try {\n    // Use the targeting data of the article the ad belongs to\n    // And use the first article for the out-of-page and leaderboard ads\n    const page_targeting = el.closest(\"article\").length\n      ? el.closest(\"article\").prev().data(\"page_targeting\")\n      : $(\".pubstack-post-header\").first().data(\"page_targeting\");\n    return { ...page_targeting, ...krux_data };\n  } catch (e) {\n    return krux_data;\n  }\n};\n\nfunction freestarAdsRequest() {\n  this.initTimer = 0;\n  this.init = function () {\n    $(window).on(\"ad:request\", this, this.freestarInit);\n    $(window).on(\"ad:scroll_update\", this, this.freestarPush);\n    this.freestarInit();\n  };\n\n  this.freestarInit = () => {\n    if (typeof freestar !== \"undefined\") {\n      clearTimeout(this.initTimer);\n      if (typeof PQ.loadSignals !== \"undefined\") {\n        // Load DV Authentic Direct signals first\n        PQ.loadSignals([\"abs\"], () => {\n          freestarInitAction(); // Proceed with initializing Freestar\n        });\n      }\n    } else {\n      this.initTimer = setTimeout(() => {\n        this.freestarInit();\n      }, 500);\n    }\n  };\n\n  const freestarInitAction = () => {\n    freestar.config.targeting = [{ essence_adhesion: page_targeting() }];\n    freestar.initCallback = function () {\n      $(positions)\n        .not(\".observed\")\n        .slice(0, 100)\n        .each((index, el) => {\n          $(el).addClass(\"observed\");\n          ads_observer.observe(el);\n        });\n    };\n  };\n\n  this.freestarPush = function () {\n    $(positions)\n      .not(\".observed\")\n      .slice(0, 100)\n      .each((index, el) => {\n        $(el).addClass(\"observed\");\n        ads_observer.observe(el);\n      });\n  };\n}\n\nvar freestartAdsRequestInstance = new freestarAdsRequest();\nfreestartAdsRequestInstance.init();\n","require(\"../utils/throttle\");\n\ngoogletag.cmd.push(function () {\n  googletag.pubads().addEventListener(\"slotRenderEnded\", function (event) {\n    const slotId = event.slot.getSlotElementId();\n\n    // If the slot is leaderboard:\n    if (slotId.includes(\"leaderboard\")) {\n      const leaderboard = $(\".ad-position.leaderboard\");\n\n      // Stick Leadboard ads for 2 seconds after being loaded.\n      $(window).on(\n        \"scroll\",\n        essThrottle(function () {\n          if (!$(window).scrollTop()) {\n            return; // return if page is not scrolled\n          }\n          setTimeout(function () {\n            leaderboard.addClass(\"fade\");\n            setTimeout(() => {\n              leaderboard.removeClass(\"sticky fade\");\n            }, 500);\n          }, 2000);\n        })\n      );\n    }\n  });\n});\n","/**\n * Throttle a function so that it fires once every { threshold }\n * @param {Function} fn\n * @param {Integer} threshold\n * @param {FunctionContext} scope\n */\n\nwindow.essThrottle = (fn, threshold, scope) => {\n  if (!threshold) {\n    threshold = 250;\n  }\n\n  var last, deferTimer;\n\n  return function () {\n    var context = scope || this;\n    var now = +new Date();\n    var args = arguments;\n\n    if (last && now < last + threshold) {\n      // hold on to it\n      clearTimeout(deferTimer);\n      deferTimer = setTimeout(function () {\n        last = now;\n        fn.apply(context, args);\n      }, threshold);\n    } else {\n      last = now;\n      fn.apply(context, args);\n    }\n  };\n};\n","module.exports = jQuery;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * All frontend scripts that are related to Freestar ads should be included here.\n *\n * This is the file that Webpack is compiling into main-head-freestar.[hash].js\n */\nrequire(\"./js/ads/admanager-freestar\");\nrequire(\"./js/ads/common\");\n"],"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_defineProperty","key","value","arg","input","hint","prim","toPrimitive","undefined","res","call","TypeError","String","Object","defineProperty","enumerable","configurable","writable","_arrayLikeToArray","arr","len","length","i","arr2","Array","_toConsumableArray","isArray","iter","from","o","minLen","n","toString","slice","name","test","connatixBodyTag","connatixAdTag","viewPortHeight","Math","max","document","documentElement","clientHeight","window","innerHeight","isMobileDevice","matchMedia","matches","site","viewPortMultiplier","rootMargin","floor","ads_observer","IntersectionObserver","entries","observer","els","forEach","entry","intersectionRatio","el","$","target","addClass","push","unobserve","hide_outstream_ads","ps_ad_object","this_content","JSON","parse","page_targeting","ctype","includes","domain","location","hostname","path","pathname","split","is_nc","is_nc_section","tagsMap","essence","body","ad","naturallycurly","beautycon","isConnatixEnabled","els_outstream","slot_id","attr","filter","item","setupConnatix","then","pushToConnatix","pushToFreestar","threshold","Promise","resolve","reject","scriptId","getElementById","cnx_body_script","createElement","id","type","textContent","onload","onerror","insertBefore","firstChild","slot","gamtest","gamtest_count","gamtest_div","style","cssText","innerHTML","after","display","console","log","jwotest","jwotest_count","jwotest_div","script","rect","getBoundingClientRect","scrollTop","scrollY","current_position","round","top","connatix_elements","querySelectorAll","jw_video_elements","video_elements","nearest_video","direction","distance","Infinity","video_element","video_position","abs","top_spacing","cnx_spacing","cnx_container","cnx_id","setAttribute","cnx_unit","appendChild","cnx_script","src","match","async","count","positions","els_to_push","ad_unit_path","placement","article_key_values","pos","hasClass","tile","inDapIF","article_targeting","assign","placementName","slotId","targeting","defineDvtagSlot","sizes","freestar","queue","onDvtagReady","dvTargeting","getDvtagTargeting","newAdSlots","krux_data","Krux","ksg","segments","kuid","user","closest","prev","data","first","e","this","initTimer","init","on","freestarInit","freestarPush","clearTimeout","PQ","loadSignals","freestarInitAction","setTimeout","config","essence_adhesion","initCallback","not","each","index","observe","require","googletag","cmd","pubads","addEventListener","event","getSlotElementId","leaderboard","essThrottle","removeClass","fn","scope","last","deferTimer","context","now","Date","args","arguments","apply","module","exports","jQuery","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","r","toStringTag"],"sourceRoot":""}