@dreamsengine/dreams-ad-engine 0.2.0 → 0.2.1
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/dreams-ad-engine.js +9 -9
- package/package.json +1 -1
package/dist/dreams-ad-engine.js
CHANGED
|
@@ -309,8 +309,8 @@ class N {
|
|
|
309
309
|
for (; (s = b.nextNode()) !== null && d.length < a; ) {
|
|
310
310
|
if (s.nodeType === 1) {
|
|
311
311
|
if (s.hasAttributes()) for (const p of s.getAttributeNames()) if (p.endsWith(vt)) {
|
|
312
|
-
const v = f[r++], $ = s.getAttribute(p).split(y),
|
|
313
|
-
d.push({ type: 1, index: o, name:
|
|
312
|
+
const v = f[r++], $ = s.getAttribute(p).split(y), D = /([.?@])?(.*)/.exec(v);
|
|
313
|
+
d.push({ type: 1, index: o, name: D[2], strings: $, ctor: D[1] === "." ? Dt : D[1] === "?" ? Rt : D[1] === "@" ? jt : W }), s.removeAttribute(p);
|
|
314
314
|
} else p.startsWith(y) && (d.push({ type: 6, index: o }), s.removeAttribute(p));
|
|
315
315
|
if (yt.test(s.tagName)) {
|
|
316
316
|
const p = s.textContent.split(y), v = p.length - 1;
|
|
@@ -456,7 +456,7 @@ class W {
|
|
|
456
456
|
t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
class
|
|
459
|
+
class Dt extends W {
|
|
460
460
|
constructor() {
|
|
461
461
|
super(...arguments), this.type = 3;
|
|
462
462
|
}
|
|
@@ -464,7 +464,7 @@ class Rt extends W {
|
|
|
464
464
|
this.element[this.name] = t === u ? void 0 : t;
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
class
|
|
467
|
+
class Rt extends W {
|
|
468
468
|
constructor() {
|
|
469
469
|
super(...arguments), this.type = 4;
|
|
470
470
|
}
|
|
@@ -928,7 +928,7 @@ var Yt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, _t = (n) =
|
|
|
928
928
|
for (var s = i > 1 ? void 0 : i ? Qt(t, e) : t, o = n.length - 1, r; o >= 0; o--)
|
|
929
929
|
(r = n[o]) && (s = (i ? r(t, e, s) : r(s)) || s);
|
|
930
930
|
return i && s && Yt(t, e, s), s;
|
|
931
|
-
}, Xt = (n, t, e) => t.has(n) || _t("Cannot " + e), te = (n, t, e) => t.has(n) ? _t("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e),
|
|
931
|
+
}, Xt = (n, t, e) => t.has(n) || _t("Cannot " + e), te = (n, t, e) => t.has(n) ? _t("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), R = (n, t, e) => (Xt(n, t, "access private method"), e), E, wt, bt, At, St;
|
|
932
932
|
let l = class extends k {
|
|
933
933
|
constructor() {
|
|
934
934
|
super(...arguments), te(this, E), this.networkId = "", this.adUnit = "", this.divId = "", this.slot = "", this.mapping = [], this.sizing = [], this.targeting = [], this.autoTargeting = !1, this.resolvedTargeting = [], this.setCentering = !1, this.enableLazyLoad = !1, this.configLazyLoad = {
|
|
@@ -939,18 +939,18 @@ let l = class extends k {
|
|
|
939
939
|
}
|
|
940
940
|
connectedCallback() {
|
|
941
941
|
if (super.connectedCallback(), !l.initialized)
|
|
942
|
-
|
|
942
|
+
R(this, E, wt).call(this), l.initialized = !0, l.old_url = location.href;
|
|
943
943
|
else {
|
|
944
944
|
const n = location.href;
|
|
945
945
|
l.old_url !== n && (window.googletag.destroySlots(window.dreamsAllSlots), l.old_url = n, window.dreamsAllSlots = [], window.dreamsSlotsToUpdate = []);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
async firstUpdated() {
|
|
949
|
-
await
|
|
949
|
+
await R(this, E, bt).call(this), await R(this, E, At).call(this), this.divId = `div-gpt-ad-${this.adUnit}-${crypto.randomUUID()}`, this.apstag && this.pubId && !l.initialized_aps && (window.apstag.init({
|
|
950
950
|
pubID: this.pubId,
|
|
951
951
|
adServer: "googletag",
|
|
952
952
|
bidTimeout: this.bidTimeout
|
|
953
|
-
}), l.initialized_aps = !0),
|
|
953
|
+
}), l.initialized_aps = !0), R(this, E, St).call(this);
|
|
954
954
|
}
|
|
955
955
|
render() {
|
|
956
956
|
return C`
|
|
@@ -983,7 +983,7 @@ let l = class extends k {
|
|
|
983
983
|
E = /* @__PURE__ */ new WeakSet();
|
|
984
984
|
wt = function() {
|
|
985
985
|
window.googletag = window.googletag || { cmd: [] }, window.googletag.cmd.push(() => {
|
|
986
|
-
window.dreamsAllSlots = window.dreamsAllSlots || [], window.dreamsSlotsToUpdate = window.dreamsSlotsToUpdate || [], window.googletag.
|
|
986
|
+
window.dreamsAllSlots = window.dreamsAllSlots || [], window.dreamsSlotsToUpdate = window.dreamsSlotsToUpdate || [], window.googletag.enableServices();
|
|
987
987
|
});
|
|
988
988
|
};
|
|
989
989
|
bt = async function() {
|