@jolibox/ads 1.3.5-beta.3 → 1.3.5-beta.4

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.
Files changed (2) hide show
  1. package/dist/index.js +41 -42
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -992,7 +992,7 @@ function so() {
992
992
  function ao() {
993
993
  return L = W > 0 ? B($e, --W) : 0, Le--, L === 10 && (Le = 1, St--), L;
994
994
  }
995
- function X() {
995
+ function Z() {
996
996
  return L = W < vn ? B($e, W++) : 0, Le++, L === 10 && (Le = 1, St++), L;
997
997
  }
998
998
  function se() {
@@ -1047,16 +1047,16 @@ function lt(t) {
1047
1047
  }
1048
1048
  function lo(t) {
1049
1049
  for (; (L = se()) && L < 33; )
1050
- X();
1050
+ Z();
1051
1051
  return Ye(t) > 2 || Ye(L) > 3 ? "" : " ";
1052
1052
  }
1053
1053
  function uo(t, e) {
1054
- for (; --e && X() && !(L < 48 || L > 102 || L > 57 && L < 65 || L > 70 && L < 97); )
1054
+ for (; --e && Z() && !(L < 48 || L > 102 || L > 57 && L < 65 || L > 70 && L < 97); )
1055
1055
  ;
1056
- return Xe(t, dt() + (e < 6 && se() == 32 && X() == 32));
1056
+ return Xe(t, dt() + (e < 6 && se() == 32 && Z() == 32));
1057
1057
  }
1058
1058
  function Wt(t) {
1059
- for (; X(); )
1059
+ for (; Z(); )
1060
1060
  switch (L) {
1061
1061
  case t:
1062
1062
  return W;
@@ -1068,20 +1068,20 @@ function Wt(t) {
1068
1068
  t === 41 && Wt(t);
1069
1069
  break;
1070
1070
  case 92:
1071
- X();
1071
+ Z();
1072
1072
  break;
1073
1073
  }
1074
1074
  return W;
1075
1075
  }
1076
1076
  function co(t, e) {
1077
- for (; X() && t + L !== 57; )
1077
+ for (; Z() && t + L !== 57; )
1078
1078
  if (t + L === 84 && se() === 47)
1079
1079
  break;
1080
- return "/*" + Xe(e, W - 1) + "*" + _t(t === 47 ? t : X());
1080
+ return "/*" + Xe(e, W - 1) + "*" + _t(t === 47 ? t : Z());
1081
1081
  }
1082
1082
  function ho(t) {
1083
1083
  for (; !Ye(se()); )
1084
- X();
1084
+ Z();
1085
1085
  return Xe(t, W);
1086
1086
  }
1087
1087
  function fo(t) {
@@ -1089,7 +1089,7 @@ function fo(t) {
1089
1089
  }
1090
1090
  function ut(t, e, i, n, r, o, s, a, d) {
1091
1091
  for (var l = 0, u = 0, c = s, h = 0, f = 0, y = 0, v = 1, p = 1, g = 1, b = 0, A = "", w = r, S = o, E = n, m = A; p; )
1092
- switch (y = b, b = X()) {
1092
+ switch (y = b, b = Z()) {
1093
1093
  case 40:
1094
1094
  if (y != 108 && B(m, c - 1) == 58) {
1095
1095
  Ht(m += x(lt(b), "&", "&\f"), "&\f") != -1 && (g = -1);
@@ -1113,7 +1113,7 @@ function ut(t, e, i, n, r, o, s, a, d) {
1113
1113
  switch (se()) {
1114
1114
  case 42:
1115
1115
  case 47:
1116
- rt(vo(co(X(), dt()), e, i), d);
1116
+ rt(vo(co(Z(), dt()), e, i), d);
1117
1117
  break;
1118
1118
  default:
1119
1119
  m += "/";
@@ -1168,7 +1168,7 @@ function ut(t, e, i, n, r, o, s, a, d) {
1168
1168
  a[l++] = (oe(m) - 1) * g, g = 1;
1169
1169
  break;
1170
1170
  case 64:
1171
- se() === 45 && (m += lt(X())), h = se(), u = c = oe(A = m += ho(dt())), b++;
1171
+ se() === 45 && (m += lt(Z())), h = se(), u = c = oe(A = m += ho(dt())), b++;
1172
1172
  break;
1173
1173
  case 45:
1174
1174
  y === 45 && oe(m) == 2 && (v = 0);
@@ -1231,7 +1231,7 @@ function bo(t) {
1231
1231
  }
1232
1232
  var wo = function(e, i, n) {
1233
1233
  for (var r = 0, o = 0; r = o, o = se(), r === 38 && o === 12 && (i[n] = 1), !Ye(o); )
1234
- X();
1234
+ Z();
1235
1235
  return Xe(e, W);
1236
1236
  }, Ao = function(e, i) {
1237
1237
  var n = -1, r = 44;
@@ -1251,7 +1251,7 @@ var wo = function(e, i, n) {
1251
1251
  default:
1252
1252
  e[n] += _t(r);
1253
1253
  }
1254
- while (r = X());
1254
+ while (r = Z());
1255
1255
  return e;
1256
1256
  }, mo = function(e, i) {
1257
1257
  return yn(Ao(gn(e), i));
@@ -1760,10 +1760,10 @@ var Po = function(e) {
1760
1760
  return i;
1761
1761
  }, $o = Po({
1762
1762
  key: "css"
1763
- }), K = $o.css, Yt, Q, Dt, Ui, Bi = 0, An = [], $ = Ne, Fi = $.__b, ji = $.__r, Vi = $.diffed, Gi = $.__c, Ki = $.unmount, qi = $.__;
1763
+ }), K = $o.css, Yt, X, Dt, Ui, Bi = 0, An = [], $ = Ne, Fi = $.__b, ji = $.__r, Vi = $.diffed, Gi = $.__c, Ki = $.unmount, qi = $.__;
1764
1764
  function Mo(t, e) {
1765
- $.__h && $.__h(Q, t, Bi || e), Bi = 0;
1766
- var i = Q.__H || (Q.__H = { __: [], __h: [] });
1765
+ $.__h && $.__h(X, t, Bi || e), Bi = 0;
1766
+ var i = X.__H || (X.__H = { __: [], __h: [] });
1767
1767
  return t >= i.__.length && i.__.push({}), i.__[t];
1768
1768
  }
1769
1769
  function mn(t, e) {
@@ -1780,21 +1780,21 @@ function Uo() {
1780
1780
  }
1781
1781
  }
1782
1782
  $.__b = function(t) {
1783
- Q = null, Fi && Fi(t);
1783
+ X = null, Fi && Fi(t);
1784
1784
  }, $.__ = function(t, e) {
1785
1785
  t && e.__k && e.__k.__m && (t.__m = e.__k.__m), qi && qi(t, e);
1786
1786
  }, $.__r = function(t) {
1787
1787
  ji && ji(t), Yt = 0;
1788
- var e = (Q = t.__c).__H;
1789
- e && (Dt === Q ? (e.__h = [], Q.__h = [], e.__.forEach(function(i) {
1788
+ var e = (X = t.__c).__H;
1789
+ e && (Dt === X ? (e.__h = [], X.__h = [], e.__.forEach(function(i) {
1790
1790
  i.__N && (i.__ = i.__N), i.u = i.__N = void 0;
1791
- })) : (e.__h.forEach(ct), e.__h.forEach(Qt), e.__h = [], Yt = 0)), Dt = Q;
1791
+ })) : (e.__h.forEach(ct), e.__h.forEach(Qt), e.__h = [], Yt = 0)), Dt = X;
1792
1792
  }, $.diffed = function(t) {
1793
1793
  Vi && Vi(t);
1794
1794
  var e = t.__c;
1795
1795
  e && e.__H && (e.__H.__h.length && (An.push(e) !== 1 && Ui === $.requestAnimationFrame || ((Ui = $.requestAnimationFrame) || Bo)(Uo)), e.__H.__.forEach(function(i) {
1796
1796
  i.u && (i.__H = i.u), i.u = void 0;
1797
- })), Dt = Q = null;
1797
+ })), Dt = X = null;
1798
1798
  }, $.__c = function(t, e) {
1799
1799
  e.some(function(i) {
1800
1800
  try {
@@ -1826,12 +1826,12 @@ function Bo(t) {
1826
1826
  Ji && (e = requestAnimationFrame(i));
1827
1827
  }
1828
1828
  function ct(t) {
1829
- var e = Q, i = t.__c;
1830
- typeof i == "function" && (t.__c = void 0, i()), Q = e;
1829
+ var e = X, i = t.__c;
1830
+ typeof i == "function" && (t.__c = void 0, i()), X = e;
1831
1831
  }
1832
1832
  function Qt(t) {
1833
- var e = Q;
1834
- t.__c = t.__(), Q = e;
1833
+ var e = X;
1834
+ t.__c = t.__(), X = e;
1835
1835
  }
1836
1836
  function Fo(t, e) {
1837
1837
  return !t || t.length !== e.length || e.some(function(i, n) {
@@ -2843,8 +2843,8 @@ const ss = () => {
2843
2843
  visible: d,
2844
2844
  payload: l
2845
2845
  } = e, [u, c] = _e(!1), [h, f] = _e(0), [y, v] = _e(!1), [p, g] = _e(!1), [b, A] = _e("Loading next content..."), w = nn(null), S = l.value, E = Gt((U) => {
2846
- var C, Y, Z, R;
2847
- c(!1), d.value = !1, U === "dismiss" ? (C = n.value) == null || C.call(n) : (Y = r.value) == null || Y.call(r), (Z = i.value) == null || Z.call(i), (R = o.value) == null || R.call(o);
2846
+ var C, Y, Q, R;
2847
+ c(!1), d.value = !1, U === "dismiss" ? (C = n.value) == null || C.call(n) : (Y = r.value) == null || Y.call(r), (Q = i.value) == null || Q.call(i), (R = o.value) == null || R.call(o);
2848
2848
  }, [d, n, r, i, o]), m = Gt(() => {
2849
2849
  var U;
2850
2850
  c(!1), d.value = !1, (U = a.value) == null || U.call(a);
@@ -2859,14 +2859,14 @@ const ss = () => {
2859
2859
  if (f(C), g(S.mode === "reward" ? C === 0 : !0), v(S.mode === "interstitial" ? C === 0 : !1), C === 0)
2860
2860
  return;
2861
2861
  let Y = C;
2862
- const Z = window.setInterval(() => {
2863
- Y -= 1, f(Math.max(Y, 0)), Y <= 0 && (window.clearInterval(Z), S.mode === "reward" ? g(!0) : v(!0));
2862
+ const Q = window.setInterval(() => {
2863
+ Y -= 1, f(Math.max(Y, 0)), Y <= 0 && (window.clearInterval(Q), S.mode === "reward" ? g(!0) : v(!0));
2864
2864
  }, 1e3);
2865
2865
  return () => {
2866
- window.clearInterval(Z);
2866
+ window.clearInterval(Q);
2867
2867
  };
2868
2868
  }, [d.value, S, E]), Pe(() => {
2869
- var Z;
2869
+ var Q;
2870
2870
  if (!d.value || !S)
2871
2871
  return;
2872
2872
  const U = w.current;
@@ -2874,7 +2874,7 @@ const ss = () => {
2874
2874
  return;
2875
2875
  if (U.innerHTML = "", A("Loading next content..."), c(!1), S.testMode) {
2876
2876
  const R = document.createElement("div");
2877
- R.className = zi, R.innerText = "Preview slot placeholder", U.appendChild(R), c(!0), (Z = s.value) == null || Z.call(s);
2877
+ R.className = zi, R.innerText = "Preview slot placeholder", U.appendChild(R), c(!0), (Q = s.value) == null || Q.call(s);
2878
2878
  return;
2879
2879
  }
2880
2880
  if (typeof window == "undefined") {
@@ -5167,7 +5167,7 @@ class Qn {
5167
5167
  };
5168
5168
  const n = i.data.UUID;
5169
5169
  if (e.callbacks) {
5170
- const r = e.timeout !== void 0 ? e.timeout : 3e5;
5170
+ const r = e.timeout !== void 0 ? e.timeout : -1;
5171
5171
  let o = null;
5172
5172
  const s = () => {
5173
5173
  Ma("onAdsStateChange", a), o && (clearTimeout(o), o = null);
@@ -5289,8 +5289,7 @@ class qa {
5289
5289
  };
5290
5290
  (await this.helper.showAdAsync({
5291
5291
  providers: this.providers,
5292
- callbacks: s,
5293
- timeout: 2e3
5292
+ callbacks: s
5294
5293
  })).code !== "SUCCESS" && this.reinit("noAdPreloaded");
5295
5294
  });
5296
5295
  }), this.providers = i, this.helper = new Qn(e), this.init();
@@ -5369,8 +5368,7 @@ class Ha {
5369
5368
  };
5370
5369
  (await this.helper.showAdAsync({
5371
5370
  providers: this.providers,
5372
- callbacks: s,
5373
- timeout: 2e3
5371
+ callbacks: s
5374
5372
  })).code !== "SUCCESS" && this.reinit("noAdPreloaded");
5375
5373
  }), this.providers = i, this.helper = new Qn(e), this.init();
5376
5374
  }
@@ -5679,16 +5677,17 @@ class Ld {
5679
5677
  let m = !0, ae = null;
5680
5678
  const Se = new Fr(this.context);
5681
5679
  this.adsActionDetection.adBreakIsShowing = !0;
5682
- const U = S.filter((R) => R.isNative), C = S.filter((R) => !R.isNative), Z = [{
5680
+ const U = S.filter((R) => R.isNative), C = S.filter((R) => !R.isNative);
5681
+ let Q = [{
5683
5682
  seq: (p = (v = U[0]) == null ? void 0 : v.seq) != null ? p : 0,
5684
5683
  provider: "INTERNAL_NATIVE",
5685
5684
  params: U
5686
5685
  }].concat(C);
5687
- for (Z.sort((R, de) => R.seq - de.seq).map((R, de) => mi(Rt({}, R), {
5686
+ for (Q = Q.sort((R, de) => R.seq - de.seq).map((R, de) => mi(Rt({}, R), {
5688
5687
  seq: de
5689
5688
  // re-assign seq
5690
- })); Z.length > 0; ) {
5691
- const R = Z.shift(), de = this.providers[R.provider];
5689
+ })); Q.length > 0; ) {
5690
+ const R = Q.shift(), de = this.providers[R.provider];
5692
5691
  if (de) {
5693
5692
  const [Xn, Zn] = await Se.callAdBreakAndContinue(de, e, R, (yi) => {
5694
5693
  var pi;
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.3",
4
+ "version": "1.3.5-beta.4",
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.3",
15
+ "@jolibox/common": "1.3.5-beta.4",
16
16
  "@emotion/css": "11.13.5",
17
- "@jolibox/types": "1.3.5-beta.3",
17
+ "@jolibox/types": "1.3.5-beta.4",
18
18
  "preact": "10.26.4",
19
19
  "@preact/signals": "2.0.4",
20
- "@jolibox/native-bridge": "1.3.5-beta.3"
20
+ "@jolibox/native-bridge": "1.3.5-beta.4"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@babel/core": "7.23.3",