@jolibox/ads 1.3.5-beta.9 → 1.3.6

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.
@@ -5,6 +5,7 @@ export interface INativeInitServerParams {
5
5
  reward: string;
6
6
  rewardInterstitial: string;
7
7
  interstitial: string;
8
+ nativeAds: string;
8
9
  };
9
10
  extra?: Record<string, any>;
10
11
  };
@@ -4,7 +4,7 @@ export interface NativeProviderConfig {
4
4
  provider: 'ADMOB' | 'APPLOVIN';
5
5
  params: {
6
6
  placementId: string;
7
- adsType: 'INTERSTITIAL' | 'REWARD' | 'REWARD_INTERSTITIAL';
7
+ adsType: 'INTERSTITIAL' | 'REWARD' | 'REWARD_INTERSTITIAL' | 'NATIVE';
8
8
  extra?: Record<string, any>;
9
9
  };
10
10
  }
package/dist/index.js CHANGED
@@ -199,7 +199,7 @@ var qt = class Kt {
199
199
  }
200
200
  };
201
201
  qt.Undefined = new qt(void 0);
202
- var D = qt, Or = class {
202
+ var D = qt, Tr = class {
203
203
  constructor() {
204
204
  this._first = D.Undefined, this._last = D.Undefined, this._size = 0;
205
205
  }
@@ -265,9 +265,9 @@ var D = qt, Or = class {
265
265
  for (; e !== D.Undefined; )
266
266
  yield e.element, e = e.next;
267
267
  }
268
- }, Tr = 0, Fe = class {
268
+ }, Or = 0, Fe = class {
269
269
  constructor(e) {
270
- this.value = e, this.id = Tr++;
270
+ this.value = e, this.id = Or++;
271
271
  }
272
272
  }, He = class {
273
273
  constructor(e) {
@@ -348,7 +348,7 @@ var D = qt, Or = class {
348
348
  let i = this.listeners.get(e), n = this.cachedEventQueue.get(e);
349
349
  for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
350
350
  o[s - 1] = arguments[s];
351
- n || (n = new Or(), this.cachedEventQueue.set(e, n)), n.push({
351
+ n || (n = new Tr(), this.cachedEventQueue.set(e, n)), n.push({
352
352
  args: o
353
353
  }), i && i.fire({
354
354
  event: e,
@@ -397,14 +397,14 @@ function Pr(t, e) {
397
397
  return t((r) => e(r) && i.call(n, r), null);
398
398
  });
399
399
  }
400
- var Ot = Symbol.for("Jolibox.hostEmitter"), Lr = () => {
400
+ var Tt = Symbol.for("Jolibox.hostEmitter"), Lr = () => {
401
401
  let t = new Cr();
402
- return globalThis[Ot] || (globalThis[Ot] = {
402
+ return globalThis[Tt] || (globalThis[Tt] = {
403
403
  on: t.on.bind(t),
404
404
  off: t.off.bind(t),
405
405
  emit: t.emit.bind(t),
406
406
  once: t.once.bind(t)
407
- }), globalThis[Ot];
407
+ }), globalThis[Tt];
408
408
  };
409
409
  Lr();
410
410
  function $r(t, e) {
@@ -463,7 +463,7 @@ var zt = class {
463
463
  }
464
464
  };
465
465
  zt = on([sn], zt);
466
- var Oi = class {
466
+ var Ti = class {
467
467
  constructor() {
468
468
  this._onWillExecuteCommand = new He(), this.onWillExecuteCommand = this._onWillExecuteCommand.event, this._onDidExecuteCommand = new He(), this.onDidExecuteCommand = this._onDidExecuteCommand.event, this.registry = new zt(), this._starActivation = null;
469
469
  }
@@ -520,7 +520,7 @@ var Oi = class {
520
520
  }
521
521
  }
522
522
  };
523
- Oi = on([sn], Oi);
523
+ Ti = on([sn], Ti);
524
524
  function z(t, e, i) {
525
525
  return (e = Ur(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
526
526
  }
@@ -1134,7 +1134,7 @@ function ut(t, e, i, n, r, o, s, a, d) {
1134
1134
  case 59:
1135
1135
  m += ";";
1136
1136
  default:
1137
- if (rt(E = Ti(m, e, i, l, u, r, a, A, w = [], S = [], c), o), b === 123)
1137
+ if (rt(E = Oi(m, e, i, l, u, r, a, A, w = [], S = [], c), o), b === 123)
1138
1138
  if (u === 0)
1139
1139
  ut(m, e, E, E, w, o, c, a, S);
1140
1140
  else
@@ -1143,7 +1143,7 @@ function ut(t, e, i, n, r, o, s, a, d) {
1143
1143
  case 108:
1144
1144
  case 109:
1145
1145
  case 115:
1146
- ut(t, E, E, n && rt(Ti(t, E, E, 0, 0, r, a, A, r, w = [], c), S), r, S, c, a, n ? w : S);
1146
+ ut(t, E, E, n && rt(Oi(t, E, E, 0, 0, r, a, A, r, w = [], c), S), r, S, c, a, n ? w : S);
1147
1147
  break;
1148
1148
  default:
1149
1149
  ut(m, E, E, E, [""], S, 0, a, S);
@@ -1176,7 +1176,7 @@ function ut(t, e, i, n, r, o, s, a, d) {
1176
1176
  }
1177
1177
  return o;
1178
1178
  }
1179
- function Ti(t, e, i, n, r, o, s, a, d, l, u) {
1179
+ function Oi(t, e, i, n, r, o, s, a, d, l, u) {
1180
1180
  for (var c = r - 1, h = r === 0 ? o : [""], f = hi(h), y = 0, v = 0, p = 0; y < n; ++y)
1181
1181
  for (var g = 0, b = We(t, c + 1, c = to(v = s[y])), A = t; g < f; ++g)
1182
1182
  (A = fn(v > 0 ? h[g] + " " + b : R(b, /&\f/g, h[g]))) && (d[p++] = A);
@@ -1538,18 +1538,18 @@ var Ro = {
1538
1538
  strokeMiterlimit: 1,
1539
1539
  strokeOpacity: 1,
1540
1540
  strokeWidth: 1
1541
- }, Oo = /[A-Z]|^ms/g, To = /_EMO_([^_]+?)_([^]*?)_EMO_/g, bn = function(e) {
1541
+ }, To = /[A-Z]|^ms/g, Oo = /_EMO_([^_]+?)_([^]*?)_EMO_/g, bn = function(e) {
1542
1542
  return e.charCodeAt(1) === 45;
1543
1543
  }, Ni = function(e) {
1544
1544
  return e != null && typeof e != "boolean";
1545
- }, Tt = /* @__PURE__ */ bo(function(t) {
1546
- return bn(t) ? t : t.replace(Oo, "-$&").toLowerCase();
1545
+ }, Ot = /* @__PURE__ */ bo(function(t) {
1546
+ return bn(t) ? t : t.replace(To, "-$&").toLowerCase();
1547
1547
  }), Pi = function(e, i) {
1548
1548
  switch (e) {
1549
1549
  case "animation":
1550
1550
  case "animationName":
1551
1551
  if (typeof i == "string")
1552
- return i.replace(To, function(n, r, o) {
1552
+ return i.replace(Oo, function(n, r, o) {
1553
1553
  return be = {
1554
1554
  name: r,
1555
1555
  styles: o,
@@ -1608,16 +1608,16 @@ function Co(t, e, i) {
1608
1608
  var s = i[o];
1609
1609
  if (typeof s != "object") {
1610
1610
  var a = s;
1611
- e != null && e[a] !== void 0 ? n += o + "{" + e[a] + "}" : Ni(a) && (n += Tt(o) + ":" + Pi(o, a) + ";");
1611
+ e != null && e[a] !== void 0 ? n += o + "{" + e[a] + "}" : Ni(a) && (n += Ot(o) + ":" + Pi(o, a) + ";");
1612
1612
  } else if (Array.isArray(s) && typeof s[0] == "string" && (e == null || e[s[0]] === void 0))
1613
1613
  for (var d = 0; d < s.length; d++)
1614
- Ni(s[d]) && (n += Tt(o) + ":" + Pi(o, s[d]) + ";");
1614
+ Ni(s[d]) && (n += Ot(o) + ":" + Pi(o, s[d]) + ";");
1615
1615
  else {
1616
1616
  var l = pt(t, e, s);
1617
1617
  switch (o) {
1618
1618
  case "animation":
1619
1619
  case "animationName": {
1620
- n += Tt(o) + ":" + l + ";";
1620
+ n += Ot(o) + ":" + l + ";";
1621
1621
  break;
1622
1622
  }
1623
1623
  default:
@@ -1870,14 +1870,14 @@ function P(t) {
1870
1870
  kt();
1871
1871
  }
1872
1872
  }
1873
- var O = void 0, Ke = void 0, we = 0, Xt = 0, bt = 0;
1873
+ var T = void 0, Ke = void 0, we = 0, Xt = 0, bt = 0;
1874
1874
  function _n(t) {
1875
- if (O !== void 0) {
1875
+ if (T !== void 0) {
1876
1876
  var e = t.n;
1877
- if (e === void 0 || e.t !== O)
1878
- return e = { i: 0, S: t, p: O.s, n: void 0, t: O, e: void 0, x: void 0, r: e }, O.s !== void 0 && (O.s.n = e), O.s = e, t.n = e, 32 & O.f && t.S(e), e;
1877
+ if (e === void 0 || e.t !== T)
1878
+ return e = { i: 0, S: t, p: T.s, n: void 0, t: T, e: void 0, x: void 0, r: e }, T.s !== void 0 && (T.s.n = e), T.s = e, t.n = e, 32 & T.f && t.S(e), e;
1879
1879
  if (e.i === -1)
1880
- return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = O.s, e.n = void 0, O.s.n = e, O.s = e), e;
1880
+ return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = T.s, e.n = void 0, T.s.n = e, T.s = e), e;
1881
1881
  }
1882
1882
  }
1883
1883
  function j(t) {
@@ -1899,12 +1899,12 @@ j.prototype.U = function(t) {
1899
1899
  j.prototype.subscribe = function(t) {
1900
1900
  var e = this;
1901
1901
  return et(function() {
1902
- var i = e.value, n = O;
1903
- O = void 0;
1902
+ var i = e.value, n = T;
1903
+ T = void 0;
1904
1904
  try {
1905
1905
  t(i);
1906
1906
  } finally {
1907
- O = n;
1907
+ T = n;
1908
1908
  }
1909
1909
  });
1910
1910
  };
@@ -1918,12 +1918,12 @@ j.prototype.toJSON = function() {
1918
1918
  return this.value;
1919
1919
  };
1920
1920
  j.prototype.peek = function() {
1921
- var t = O;
1922
- O = void 0;
1921
+ var t = T;
1922
+ T = void 0;
1923
1923
  try {
1924
1924
  return this.value;
1925
1925
  } finally {
1926
- O = t;
1926
+ T = t;
1927
1927
  }
1928
1928
  };
1929
1929
  Object.defineProperty(j.prototype, "value", { get: function() {
@@ -1977,15 +1977,15 @@ function Me(t) {
1977
1977
  return !0;
1978
1978
  if (this.g = bt, this.f |= 1, this.i > 0 && !Sn(this))
1979
1979
  return this.f &= -2, !0;
1980
- var t = O;
1980
+ var t = T;
1981
1981
  try {
1982
- En(this), O = this;
1982
+ En(this), T = this;
1983
1983
  var e = this.x();
1984
1984
  (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
1985
1985
  } catch (i) {
1986
1986
  this.v = i, this.f |= 16, this.i++;
1987
1987
  }
1988
- return O = t, kn(this), this.f &= -2, !0;
1988
+ return T = t, kn(this), this.f &= -2, !0;
1989
1989
  };
1990
1990
  Me.prototype.S = function(t) {
1991
1991
  if (this.t === void 0) {
@@ -2024,14 +2024,14 @@ function In(t) {
2024
2024
  var e = t.u;
2025
2025
  if (t.u = void 0, typeof e == "function") {
2026
2026
  we++;
2027
- var i = O;
2028
- O = void 0;
2027
+ var i = T;
2028
+ T = void 0;
2029
2029
  try {
2030
2030
  e();
2031
2031
  } catch (n) {
2032
2032
  throw t.f &= -2, t.f |= 8, fi(t), n;
2033
2033
  } finally {
2034
- O = i, kt();
2034
+ T = i, kt();
2035
2035
  }
2036
2036
  }
2037
2037
  }
@@ -2041,9 +2041,9 @@ function fi(t) {
2041
2041
  t.x = void 0, t.s = void 0, In(t);
2042
2042
  }
2043
2043
  function Vo(t) {
2044
- if (O !== this)
2044
+ if (T !== this)
2045
2045
  throw new Error("Out-of-order effect");
2046
- kn(this), O = t, this.f &= -2, 8 & this.f && fi(this), kt();
2046
+ kn(this), T = t, this.f &= -2, 8 & this.f && fi(this), kt();
2047
2047
  }
2048
2048
  function Ze(t) {
2049
2049
  this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
@@ -2063,8 +2063,8 @@ Ze.prototype.S = function() {
2063
2063
  if (1 & this.f)
2064
2064
  throw new Error("Cycle detected");
2065
2065
  this.f |= 1, this.f &= -9, In(this), En(this), we++;
2066
- var t = O;
2067
- return O = this, Vo.bind(this, t);
2066
+ var t = T;
2067
+ return T = this, Vo.bind(this, t);
2068
2068
  };
2069
2069
  Ze.prototype.N = function() {
2070
2070
  2 & this.f || (this.f |= 2, this.o = Ke, Ke = this);
@@ -2092,8 +2092,8 @@ function Ue(t, e) {
2092
2092
  function wt(t) {
2093
2093
  Nt && Nt(), Nt = t && t.S();
2094
2094
  }
2095
- function On(t) {
2096
- var e = this, i = t.data, n = Tn(i);
2095
+ function Tn(t) {
2096
+ var e = this, i = t.data, n = On(i);
2097
2097
  n.value = i;
2098
2098
  var r = mn(function() {
2099
2099
  for (var a = e, d = e.__v; d = d.__; )
@@ -2118,8 +2118,8 @@ function On(t) {
2118
2118
  }, []), o = r[0], s = r[1];
2119
2119
  return o.value ? s.peek() : s.value;
2120
2120
  }
2121
- On.displayName = "_st";
2122
- Object.defineProperties(j.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: On }, props: { configurable: !0, get: function() {
2121
+ Tn.displayName = "_st";
2122
+ Object.defineProperties(j.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Tn }, props: { configurable: !0, get: function() {
2123
2123
  return { data: this };
2124
2124
  } }, __b: { configurable: !0, value: 1 } });
2125
2125
  Ue("__b", function(t, e) {
@@ -2223,7 +2223,7 @@ nr.prototype.shouldComponentUpdate = function(t, e) {
2223
2223
  return !0;
2224
2224
  return !1;
2225
2225
  };
2226
- function Tn(t) {
2226
+ function On(t) {
2227
2227
  return mn(function() {
2228
2228
  return k(t);
2229
2229
  }, []);
@@ -2466,7 +2466,7 @@ const Ho = q`
2466
2466
  const {
2467
2467
  startTimestamp: o,
2468
2468
  timerPaused: s
2469
- } = r, a = Tn(e);
2469
+ } = r, a = On(e);
2470
2470
  Jo(() => {
2471
2471
  a.value > 0 ? a.value -= 1 : P(() => {
2472
2472
  s.value = !0, a.value = 0;
@@ -3157,15 +3157,15 @@ class ws {
3157
3157
  }
3158
3158
  }
3159
3159
  }
3160
- const Te = {};
3160
+ const Oe = {};
3161
3161
  window.addEventListener("message", (t) => {
3162
- t.origin !== "https://ads.appsrockets.com" && t.origin !== "https://stg-ads.appsrockets.com" || Te[t.data.type] && Te[t.data.type].forEach((e) => {
3162
+ t.origin !== "https://ads.appsrockets.com" && t.origin !== "https://stg-ads.appsrockets.com" || Oe[t.data.type] && Oe[t.data.type].forEach((e) => {
3163
3163
  e(t.data.data);
3164
3164
  });
3165
3165
  });
3166
3166
  const ke = (t, e) => {
3167
- Pe(() => (Te[t] || (Te[t] = /* @__PURE__ */ new Set()), Te[t].add(e), () => {
3168
- Te[t].delete(e);
3167
+ Pe(() => (Oe[t] || (Oe[t] = /* @__PURE__ */ new Set()), Oe[t].add(e), () => {
3168
+ Oe[t].delete(e);
3169
3169
  }), [t, e]);
3170
3170
  }, Pn = () => {
3171
3171
  const t = k(), e = k(), i = k(), n = k(), r = k(), o = k(), s = k(), a = k(!1), d = k("");
@@ -3550,13 +3550,13 @@ class Rs {
3550
3550
  }
3551
3551
  }
3552
3552
  function me(t, e, i) {
3553
- return (e = Os(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
3553
+ return (e = Ts(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
3554
3554
  }
3555
- function Os(t) {
3556
- var e = Ts(t, "string");
3555
+ function Ts(t) {
3556
+ var e = Os(t, "string");
3557
3557
  return typeof e == "symbol" ? e : e + "";
3558
3558
  }
3559
- function Ts(t, e) {
3559
+ function Os(t, e) {
3560
3560
  if (typeof t != "object" || !t)
3561
3561
  return t;
3562
3562
  var i = t[Symbol.toPrimitive];
@@ -3785,11 +3785,11 @@ class Un {
3785
3785
  let s = [];
3786
3786
  switch (r) {
3787
3787
  case "afv": {
3788
- s = ["REWARD_INTERSTITIAL", "REWARD"];
3788
+ s = ["REWARD_INTERSTITIAL", "REWARD", "NATIVE"];
3789
3789
  break;
3790
3790
  }
3791
3791
  case "reward": {
3792
- s = ["REWARD_INTERSTITIAL", "REWARD"];
3792
+ s = ["REWARD_INTERSTITIAL", "REWARD", "NATIVE"];
3793
3793
  break;
3794
3794
  }
3795
3795
  default: {
@@ -4120,8 +4120,8 @@ function ca() {
4120
4120
  }
4121
4121
  }
4122
4122
  ca();
4123
- var Oe = typeof window == "undefined", ha = () => !Oe && !!(navigator.userAgent || "").includes("JoliboxPlatformSDK");
4124
- !Oe && (navigator.userAgent.includes("iPhone") || navigator.userAgent.includes("iPod") || navigator.userAgent.includes("iPad") || navigator.userAgent.includes("iPhone OS")), !Oe && navigator.userAgent.includes("Android"), !Oe && navigator.userAgent.includes("Mac"), !Oe && navigator.userAgent.includes("FB_IAB"), !Oe && !navigator.userAgent.includes("iPhone") && navigator.userAgent.includes("Android");
4123
+ var Te = typeof window == "undefined", ha = () => !Te && !!(navigator.userAgent || "").includes("JoliboxPlatformSDK");
4124
+ !Te && (navigator.userAgent.includes("iPhone") || navigator.userAgent.includes("iPod") || navigator.userAgent.includes("iPad") || navigator.userAgent.includes("iPhone OS")), !Te && navigator.userAgent.includes("Android"), !Te && navigator.userAgent.includes("Mac"), !Te && navigator.userAgent.includes("FB_IAB"), !Te && !navigator.userAgent.includes("iPhone") && navigator.userAgent.includes("Android");
4125
4125
  var ri = class oi {
4126
4126
  constructor(e) {
4127
4127
  this.element = e, this.next = oi.Undefined, this.prev = oi.Undefined;
@@ -4708,15 +4708,15 @@ function Ra(t, e) {
4708
4708
  }
4709
4709
  return i;
4710
4710
  }
4711
- var Ft = [], li = Symbol.for("Jolibox.invokeResolverInstance"), Oa = /* @__PURE__ */ new Map();
4712
- globalThis[li] || (globalThis[li] = Oa);
4713
- var Ta = {
4711
+ var Ft = [], li = Symbol.for("Jolibox.invokeResolverInstance"), Ta = /* @__PURE__ */ new Map();
4712
+ globalThis[li] || (globalThis[li] = Ta);
4713
+ var Oa = {
4714
4714
  get resolveMap() {
4715
4715
  return globalThis[li];
4716
4716
  }
4717
4717
  };
4718
4718
  function Ca(t, e) {
4719
- let i = 0, n = !0, r = Ta.resolveMap, o = Ra(t, e);
4719
+ let i = 0, n = !0, r = Oa.resolveMap, o = Ra(t, e);
4720
4720
  e("onJoliboxEnterBackground", () => {
4721
4721
  n = !1;
4722
4722
  }), e("onJoliboxEnterForeground", () => {
@@ -5395,7 +5395,7 @@ function Ya(t, e) {
5395
5395
  class Qa {
5396
5396
  constructor(e, i) {
5397
5397
  qe(this, "name", "INTERNAL_NATIVE"), qe(this, "context", void 0), qe(this, "rewardAdManager", void 0), qe(this, "interstitialManager", void 0), qe(this, "initProviders", void 0), this.context = e, this.initProviders = i.providers;
5398
- const n = this.getConfigsByTypes(["REWARD", "REWARD_INTERSTITIAL"], i.providers), r = this.getConfigsByTypes(["INTERSTITIAL"], i.providers);
5398
+ const n = this.getConfigsByTypes(["REWARD", "REWARD_INTERSTITIAL", "NATIVE"], i.providers), r = this.getConfigsByTypes(["INTERSTITIAL"], i.providers);
5399
5399
  n.length > 0 && (this.rewardAdManager = new Ka(this.context, n)), r.length > 0 && (this.interstitialManager = new Ha(this.context, r));
5400
5400
  }
5401
5401
  getConfigsByTypes(e, i, n) {
@@ -5403,7 +5403,7 @@ class Qa {
5403
5403
  return (n ? n.map((s) => i.find((a) => a.provider === s.provider)).filter((s) => !!s) : i).forEach((s) => {
5404
5404
  e.forEach((a) => {
5405
5405
  let d = "";
5406
- a === "REWARD" && (d = s.params.adUnitId.reward), a === "REWARD_INTERSTITIAL" && (d = s.params.adUnitId.rewardInterstitial), a === "INTERSTITIAL" && (d = s.params.adUnitId.interstitial), d && r.push({
5406
+ a === "REWARD" && (d = s.params.adUnitId.reward), a === "REWARD_INTERSTITIAL" && (d = s.params.adUnitId.rewardInterstitial), a === "INTERSTITIAL" && (d = s.params.adUnitId.interstitial), a === "NATIVE" && (d = s.params.adUnitId.nativeAds), d && r.push({
5407
5407
  provider: s.provider,
5408
5408
  params: {
5409
5409
  placementId: d,
@@ -5439,7 +5439,7 @@ class Qa {
5439
5439
  });
5440
5440
  return;
5441
5441
  }
5442
- const s = this.getConfigsByTypes(["REWARD", "REWARD_INTERSTITIAL"], this.initProviders, i.params);
5442
+ const s = this.getConfigsByTypes(["REWARD", "REWARD_INTERSTITIAL", "NATIVE"], this.initProviders, i.params);
5443
5443
  this.rewardAdManager.requestAds({
5444
5444
  beforeAd: e.beforeAd,
5445
5445
  afterAd: e.afterAd,
@@ -5822,7 +5822,7 @@ class F extends Error {
5822
5822
  }
5823
5823
  }
5824
5824
  }
5825
- function T(t, e, i) {
5825
+ function O(t, e, i) {
5826
5826
  return (e = od(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
5827
5827
  }
5828
5828
  function od(t) {
@@ -5843,10 +5843,10 @@ function sd(t, e) {
5843
5843
  }
5844
5844
  class ad {
5845
5845
  constructor(e, i, n) {
5846
- T(this, "adsLoader", void 0), T(this, "adDisplayContainer", void 0), T(this, "isAdPlaying", !1), T(this, "isContentFinished", !1), T(this, "videoContent", void 0), T(this, "adContainer", void 0), T(this, "adsManager", void 0), T(this, "intervalTimer", void 0), T(this, "completed", !1), T(this, "adTagUrl", void 0), T(this, "notifyRequestAd", void 0), T(this, "notifyLoaded", void 0), T(this, "notifyPlayingAd", void 0), T(this, "notifyCompleted", void 0), T(this, "notifyError", void 0), T(this, "destroy", () => {
5846
+ O(this, "adsLoader", void 0), O(this, "adDisplayContainer", void 0), O(this, "isAdPlaying", !1), O(this, "isContentFinished", !1), O(this, "videoContent", void 0), O(this, "adContainer", void 0), O(this, "adsManager", void 0), O(this, "intervalTimer", void 0), O(this, "completed", !1), O(this, "adTagUrl", void 0), O(this, "notifyRequestAd", void 0), O(this, "notifyLoaded", void 0), O(this, "notifyPlayingAd", void 0), O(this, "notifyCompleted", void 0), O(this, "notifyError", void 0), O(this, "destroy", () => {
5847
5847
  var r, o, s, a, d, l, u, c, h, f, y;
5848
5848
  this.intervalTimer && clearInterval(this.intervalTimer), (r = this.adsManager) == null || r.stop(), (o = this.adDisplayContainer) == null || o.destroy(), (s = this.adsLoader) == null || s.removeEventListener(window.google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, this.onAdsManagerLoaded), (a = this.adsLoader) == null || a.removeEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError), (d = this.adsManager) == null || d.removeEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError), (l = this.adsManager) == null || l.removeEventListener(window.google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested), (u = this.adsManager) == null || u.removeEventListener(window.google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested), (c = this.adsManager) == null || c.removeEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED, this.onAdEvent), (h = this.adsManager) == null || h.removeEventListener(window.google.ima.AdEvent.Type.LOADED, this.onAdEvent), (f = this.adsManager) == null || f.removeEventListener(window.google.ima.AdEvent.Type.STARTED, this.onAdEvent), (y = this.adsManager) == null || y.removeEventListener(window.google.ima.AdEvent.Type.COMPLETE, this.onAdEvent);
5849
- }), T(this, "requestAds", async (r, o) => {
5849
+ }), O(this, "requestAds", async (r, o) => {
5850
5850
  var u;
5851
5851
  this.createAdDisplayContainer(), this.notifyRequestAd = r.onAdRequested, this.notifyLoaded = r.onAdLoaded, this.notifyPlayingAd = r.onAdPlaying, this.notifyCompleted = r.onAdCompleted, this.notifyError = (c) => {
5852
5852
  var h;
@@ -5866,9 +5866,9 @@ class ad {
5866
5866
  });
5867
5867
  const l = `${this.adTagUrl}${d}`;
5868
5868
  a.adTagUrl = l, a.linearAdSlotWidth = 640, a.linearAdSlotHeight = 400, a.nonLinearAdSlotWidth = 640, a.nonLinearAdSlotHeight = 150, this.adsLoader.requestAds(a), (u = this.notifyRequestAd) == null || u.call(this);
5869
- }), T(this, "createAdDisplayContainer", () => {
5869
+ }), O(this, "createAdDisplayContainer", () => {
5870
5870
  this.adDisplayContainer = new window.google.ima.AdDisplayContainer(this.adContainer, this.videoContent);
5871
- }), T(this, "playAds", () => {
5871
+ }), O(this, "playAds", () => {
5872
5872
  var r, o;
5873
5873
  this.videoContent.load(), this.adDisplayContainer.initialize(), this.completed = !1;
5874
5874
  try {
@@ -5876,10 +5876,10 @@ class ad {
5876
5876
  } catch (s) {
5877
5877
  console.error("[JoliboxAFV] Google IMA Error: ", s), this.videoContent.play();
5878
5878
  }
5879
- }), T(this, "onAdsManagerLoaded", (r) => {
5879
+ }), O(this, "onAdsManagerLoaded", (r) => {
5880
5880
  const o = new window.google.ima.AdsRenderingSettings();
5881
5881
  o.restoreCustomPlaybackStateOnAdBreakComplete = !0, o.loadVideoTimeout = 1e4, this.adsManager = r.getAdsManager(this.videoContent, o), this.adsManager.addEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED, this.onAdEvent), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.LOADED, this.onAdEvent), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.STARTED, this.onAdEvent), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.COMPLETE, this.onAdEvent), r.type === "adsManagerLoaded" && this.playAds();
5882
- }), T(this, "onAdEvent", (r) => {
5882
+ }), O(this, "onAdEvent", (r) => {
5883
5883
  var s, a, d, l;
5884
5884
  const o = r.getAd();
5885
5885
  switch (r.type) {
@@ -5897,12 +5897,12 @@ class ad {
5897
5897
  o != null && o.isLinear() && clearInterval(this.intervalTimer), this.completed || (this.completed = !0, (l = this.notifyCompleted) == null || l.call(this, r));
5898
5898
  break;
5899
5899
  }
5900
- }), T(this, "onAdError", (r) => {
5900
+ }), O(this, "onAdError", (r) => {
5901
5901
  var o, s;
5902
5902
  (o = this.notifyError) == null || o.call(this, r.getError()), (s = this.adsManager) == null || s.destroy();
5903
- }), T(this, "onContentPauseRequested", () => {
5903
+ }), O(this, "onContentPauseRequested", () => {
5904
5904
  this.isAdPlaying = !0, this.videoContent.pause();
5905
- }), T(this, "onContentResumeRequested", () => {
5905
+ }), O(this, "onContentResumeRequested", () => {
5906
5906
  this.isAdPlaying = !1;
5907
5907
  }), this.adTagUrl = e, this.videoContent = i, this.adContainer = n;
5908
5908
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jolibox/ads",
3
3
  "description": "This project is for integrating Jolibox ads providers",
4
- "version": "1.3.5-beta.9",
4
+ "version": "1.3.6",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "type": "module",
@@ -12,12 +12,12 @@
12
12
  ],
13
13
  "types": "./dist/index.d.ts",
14
14
  "dependencies": {
15
- "@jolibox/common": "1.3.5-beta.9",
15
+ "@jolibox/common": "1.3.6",
16
16
  "@emotion/css": "11.13.5",
17
- "@jolibox/types": "1.3.5-beta.9",
17
+ "@jolibox/types": "1.3.6",
18
18
  "preact": "10.26.4",
19
19
  "@preact/signals": "2.0.4",
20
- "@jolibox/native-bridge": "1.3.5-beta.9"
20
+ "@jolibox/native-bridge": "1.3.6"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@babel/core": "7.23.3",
@@ -26,7 +26,7 @@
26
26
  "@babel/runtime": "7.22.10",
27
27
  "@babel/runtime-corejs3": "7.22.10",
28
28
  "@babel/plugin-transform-react-jsx": "7.25.9",
29
- "@jolibox/eslint-config": "1.0.1-beta.16",
29
+ "@jolibox/eslint-config": "1.0.1-beta.19",
30
30
  "@preact/preset-vite": "2.8.1",
31
31
  "@rollup/plugin-replace": "6.0.2",
32
32
  "@types/google-publisher-tag": "1.20250428.0",