@brndts/brndts-ads 1.14.12 → 1.14.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -72302,15 +72302,7 @@ var GPT = /*#__PURE__*/ function() {
72302
72302
  ]);
72303
72303
  return GPT;
72304
72304
  }();
72305
- var tcf_ready = false;
72306
- function handleTCFApiEvent(data, success) {
72307
- if (!success) return;
72308
- var ready = (data === null || data === void 0 ? void 0 : data.eventStatus) === "tcloaded" || (data === null || data === void 0 ? void 0 : data.eventStatus) === "useractioncomplete";
72309
- var hasTC = !!(data === null || data === void 0 ? void 0 : data.tcString);
72310
- if (ready && hasTC) {
72311
- tcf_ready = true;
72312
- }
72313
- }
72305
+ var displayedSlots = /* @__PURE__ */ new Set();
72314
72306
  var PrebidGAM = /*#__PURE__*/ function() {
72315
72307
  "use strict";
72316
72308
  function _PrebidGAM() {
@@ -72345,13 +72337,6 @@ var PrebidGAM = /*#__PURE__*/ function() {
72345
72337
  key: "configure",
72346
72338
  value: function configure(context, options) {
72347
72339
  var _window_pbjs_que, _window_pbjs;
72348
- if (typeof window.__tcfapi === "function") {
72349
- var _window___tcfapi, _window, _window___tcfapi1, _window1;
72350
- (_window___tcfapi = (_window = window).__tcfapi) === null || _window___tcfapi === void 0 ? void 0 : _window___tcfapi.call(_window, "getTCData", 2, handleTCFApiEvent);
72351
- (_window___tcfapi1 = (_window1 = window).__tcfapi) === null || _window___tcfapi1 === void 0 ? void 0 : _window___tcfapi1.call(_window1, "addEventListener", 2, handleTCFApiEvent);
72352
- } else {
72353
- tcf_ready = true;
72354
- }
72355
72340
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : (_window_pbjs_que = _window_pbjs.que) === null || _window_pbjs_que === void 0 ? void 0 : _window_pbjs_que.push(function() {
72356
72341
  var _context_config_getAdsConfig_general_debug_mode, _context_config_getAdsConfig_general, _window_pbjs, _window_pbjs1, _window_pbjs2;
72357
72342
  var configBuilder = new PrebidConfigBuilder();
@@ -72504,16 +72489,6 @@ var PrebidGAM = /*#__PURE__*/ function() {
72504
72489
  value: function request(slotId, containerId, callback) {
72505
72490
  var _window_pbjs;
72506
72491
  var PREBID_TIMEOUT = 1e3;
72507
- if (!tcf_ready) {
72508
- console.warn("TCF not ready, waiting for consent data.");
72509
- var container = document.createElement("div");
72510
- container.id = containerId;
72511
- var script = document.createElement("script");
72512
- script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"));\n });');
72513
- container.appendChild(script);
72514
- callback(container);
72515
- return;
72516
- }
72517
72492
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.que.push(function() {
72518
72493
  var _window_pbjs;
72519
72494
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.requestBids({
@@ -72526,6 +72501,12 @@ var PrebidGAM = /*#__PURE__*/ function() {
72526
72501
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.setTargetingForGPTAsync([
72527
72502
  "".concat(containerId)
72528
72503
  ]);
72504
+ window.googletag.cmd.push(function() {
72505
+ if (!displayedSlots.has(containerId)) {
72506
+ window.googletag.display(containerId);
72507
+ displayedSlots.add(containerId);
72508
+ }
72509
+ });
72529
72510
  window.googletag.cmd.push(function() {
72530
72511
  var container = document.createElement("div");
72531
72512
  container.id = containerId;
@@ -72732,6 +72713,7 @@ var ReviveProvider = /*#__PURE__*/ function(ContentProvider) {
72732
72713
  iframe.scrolling = "no";
72733
72714
  iframe.width = "".concat(regionInfo.w);
72734
72715
  iframe.height = "".concat(regionInfo.h);
72716
+ iframe.style.maxWidth = "inherit";
72735
72717
  iframe.allow = "autoplay";
72736
72718
  iframe.style.display = "block";
72737
72719
  link = document.createElement("a");