@brndts/brndts-ads 1.14.9 → 1.14.10

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
@@ -72471,6 +72471,16 @@ var PrebidGAM = /*#__PURE__*/ function() {
72471
72471
  value: function request(slotId, containerId, callback) {
72472
72472
  var _window_pbjs;
72473
72473
  var PREBID_TIMEOUT = 1e3;
72474
+ if (!tcf_ready) {
72475
+ console.warn("TCF not ready, waiting for consent data.");
72476
+ var container = document.createElement("div");
72477
+ container.id = containerId;
72478
+ var script = document.createElement("script");
72479
+ script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"));\n });');
72480
+ container.appendChild(script);
72481
+ callback(container);
72482
+ return;
72483
+ }
72474
72484
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.que.push(function() {
72475
72485
  var _window_pbjs;
72476
72486
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.requestBids({