@hopeplayer/core 1.0.16 → 1.0.18

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 (135) hide show
  1. package/README.md +24 -14
  2. package/dist/HopePlayerElement.d.ts +3 -0
  3. package/dist/HopePlayerElement.d.ts.map +1 -1
  4. package/dist/chunks/{index-CWLyz1fp.js → adTriggers-DXmtF4t2.js} +113 -118
  5. package/dist/chunks/adTriggers-DXmtF4t2.js.map +1 -0
  6. package/dist/chunks/{index-DITXYcHx.js → ads-MCG5a6eK.js} +130 -125
  7. package/dist/chunks/ads-MCG5a6eK.js.map +1 -0
  8. package/dist/chunks/{index-BeJNpAyx.js → audio-LkYgd5Wq.js} +7 -7
  9. package/dist/chunks/audio-LkYgd5Wq.js.map +1 -0
  10. package/dist/chunks/{ScratchSound-0XKHUcJK.js → audioScratchSound-7XkwCCDm.js} +1 -1
  11. package/dist/chunks/audioScratchSound-7XkwCCDm.js.map +1 -0
  12. package/dist/chunks/{index-Miba3PD_.js → cast-bMrkGGuD.js} +70 -66
  13. package/dist/chunks/cast-bMrkGGuD.js.map +1 -0
  14. package/dist/chunks/{index-rENB3n9O.js → countdownScreen-CI-u6jjA.js} +1 -1
  15. package/dist/chunks/countdownScreen-CI-u6jjA.js.map +1 -0
  16. package/dist/chunks/{index-Q8FMOHj0.js → dai-B9Tth1Iv.js} +1 -1
  17. package/dist/chunks/dai-B9Tth1Iv.js.map +1 -0
  18. package/dist/chunks/{index-DCXX1ZJG.js → debugPanel-Bnc_7GOn.js} +1 -1
  19. package/dist/chunks/debugPanel-Bnc_7GOn.js.map +1 -0
  20. package/dist/chunks/{index-DXWK4EFa.js → dubbing-kNMPpyHl.js} +1 -1
  21. package/dist/chunks/dubbing-kNMPpyHl.js.map +1 -0
  22. package/dist/chunks/{index-BBmuCtKu.js → geoChecker-BRtvHwI-.js} +1 -1
  23. package/dist/chunks/geoChecker-BRtvHwI-.js.map +1 -0
  24. package/dist/chunks/{index-Ca8hocby.js → gesture-BzPCgi87.js} +1 -1
  25. package/dist/chunks/gesture-BzPCgi87.js.map +1 -0
  26. package/dist/chunks/{loadGpt-CmiAy366.js → gpt-CGXHTG_H.js} +1 -1
  27. package/dist/chunks/gpt-CGXHTG_H.js.map +1 -0
  28. package/dist/chunks/{index-3QALpwsf.js → inViewAutoplay-CRJe7GA4.js} +1 -1
  29. package/dist/chunks/inViewAutoplay-CRJe7GA4.js.map +1 -0
  30. package/dist/chunks/{index-7IBf8Y-R.js → liveWallClock-ChUTtzLD.js} +1 -1
  31. package/dist/chunks/liveWallClock-ChUTtzLD.js.map +1 -0
  32. package/dist/chunks/{index-f0vSgRIK.js → loopSection-CvF4l5uf.js} +1 -1
  33. package/dist/chunks/loopSection-CvF4l5uf.js.map +1 -0
  34. package/dist/chunks/{index-e00_M05B.js → markers-BhMJLPqj.js} +2 -2
  35. package/dist/chunks/markers-BhMJLPqj.js.map +1 -0
  36. package/dist/chunks/{index-CDPrkLq0.js → pauseAd-BQQe21X4.js} +2 -2
  37. package/dist/chunks/pauseAd-BQQe21X4.js.map +1 -0
  38. package/dist/chunks/{index-DEv3YqLg.js → player-DW5iWvPs.js} +939 -880
  39. package/dist/chunks/player-DW5iWvPs.js.map +1 -0
  40. package/dist/chunks/{index-D3Z7ZDLJ.js → playlist-DYGbJ5wz.js} +24 -24
  41. package/dist/chunks/playlist-DYGbJ5wz.js.map +1 -0
  42. package/dist/chunks/{VideoPrebid-CpckFzSq.js → prebid-CRY3i2OT.js} +1 -1
  43. package/dist/chunks/prebid-CRY3i2OT.js.map +1 -0
  44. package/dist/chunks/{index-DT8-oMPm.js → qrResume-DXwD3oSA.js} +29 -30
  45. package/dist/chunks/qrResume-DXwD3oSA.js.map +1 -0
  46. package/dist/chunks/redirectScreen-CSjrS8Kg.js +208 -0
  47. package/dist/chunks/redirectScreen-CSjrS8Kg.js.map +1 -0
  48. package/dist/chunks/{index-BbRYOSvk.js → rewardedUnlock-DZ_qPcDG.js} +22 -19
  49. package/dist/chunks/rewardedUnlock-DZ_qPcDG.js.map +1 -0
  50. package/dist/chunks/seekWhenReady-Clzne3-S.js +32 -0
  51. package/dist/chunks/seekWhenReady-Clzne3-S.js.map +1 -0
  52. package/dist/chunks/{index-CBX7bn-G.js → segments-LsZPlbYi.js} +2 -2
  53. package/dist/chunks/segments-LsZPlbYi.js.map +1 -0
  54. package/dist/chunks/{index-Ch3ep-eJ.js → sponsorship-BT21uwN5.js} +36 -41
  55. package/dist/chunks/sponsorship-BT21uwN5.js.map +1 -0
  56. package/dist/chunks/{index-BXSND_xN.js → spriteThumbnails-BQkEBRu-.js} +2 -2
  57. package/dist/chunks/spriteThumbnails-BQkEBRu-.js.map +1 -0
  58. package/dist/chunks/{index-DGtpFgHV.js → statsPanel-DSClIwA3.js} +1 -1
  59. package/dist/chunks/statsPanel-DSClIwA3.js.map +1 -0
  60. package/dist/chunks/{index-CDDke5rz.js → sticky-D_eLCNFk.js} +1 -1
  61. package/dist/chunks/sticky-D_eLCNFk.js.map +1 -0
  62. package/dist/chunks/{index-C3BQGcT3.js → story-H6f7gSoX.js} +27 -15
  63. package/dist/chunks/story-H6f7gSoX.js.map +1 -0
  64. package/dist/chunks/{index-C5oGMHF_.js → tapGestures-DrC42DiI.js} +1 -1
  65. package/dist/chunks/tapGestures-DrC42DiI.js.map +1 -0
  66. package/dist/chunks/trackingPixel-D2wxdCEz.js +20 -0
  67. package/dist/chunks/trackingPixel-D2wxdCEz.js.map +1 -0
  68. package/dist/controls/SeekBar.d.ts.map +1 -1
  69. package/dist/hls/SourceManager.d.ts.map +1 -1
  70. package/dist/hope-player.js +1 -1
  71. package/dist/i18n/locales/en.d.ts.map +1 -1
  72. package/dist/i18n/locales/tr.d.ts.map +1 -1
  73. package/dist/i18n/types.d.ts +3 -0
  74. package/dist/i18n/types.d.ts.map +1 -1
  75. package/dist/index.d.ts +1 -1
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/keyboard/KeyboardController.d.ts.map +1 -1
  78. package/dist/plugins/ad-triggers/AdTriggers.d.ts.map +1 -1
  79. package/dist/plugins/ads/AdsController.d.ts.map +1 -1
  80. package/dist/plugins/ads/generateVastUrl.d.ts +10 -0
  81. package/dist/plugins/ads/generateVastUrl.d.ts.map +1 -1
  82. package/dist/plugins/cast/CastController.d.ts.map +1 -1
  83. package/dist/plugins/playlist/PlaylistRunner.d.ts.map +1 -1
  84. package/dist/plugins/qr-resume/QrResume.d.ts.map +1 -1
  85. package/dist/plugins/redirect-screen/RedirectScreen.d.ts +26 -3
  86. package/dist/plugins/redirect-screen/RedirectScreen.d.ts.map +1 -1
  87. package/dist/plugins/rewarded/RewardedUnlock.d.ts +0 -5
  88. package/dist/plugins/rewarded/RewardedUnlock.d.ts.map +1 -1
  89. package/dist/plugins/shared/seekWhenReady.d.ts +22 -0
  90. package/dist/plugins/shared/seekWhenReady.d.ts.map +1 -0
  91. package/dist/plugins/shared/trackingPixel.d.ts +8 -0
  92. package/dist/plugins/shared/trackingPixel.d.ts.map +1 -0
  93. package/dist/plugins/sponsorship/SponsorshipLayer.d.ts.map +1 -1
  94. package/dist/plugins/story/HopeStory.d.ts +2 -0
  95. package/dist/plugins/story/HopeStory.d.ts.map +1 -1
  96. package/dist/screens/ErrorScreen.d.ts +7 -0
  97. package/dist/screens/ErrorScreen.d.ts.map +1 -1
  98. package/dist/types/index.d.ts +49 -1
  99. package/dist/types/index.d.ts.map +1 -1
  100. package/dist/utils/media-error.d.ts +10 -0
  101. package/dist/utils/media-error.d.ts.map +1 -0
  102. package/dist/utils/seek-by.d.ts +8 -0
  103. package/dist/utils/seek-by.d.ts.map +1 -1
  104. package/package.json +4 -1
  105. package/dist/chunks/ScratchSound-0XKHUcJK.js.map +0 -1
  106. package/dist/chunks/VideoPrebid-CpckFzSq.js.map +0 -1
  107. package/dist/chunks/index-3QALpwsf.js.map +0 -1
  108. package/dist/chunks/index-7IBf8Y-R.js.map +0 -1
  109. package/dist/chunks/index-BBmuCtKu.js.map +0 -1
  110. package/dist/chunks/index-BXSND_xN.js.map +0 -1
  111. package/dist/chunks/index-BbRYOSvk.js.map +0 -1
  112. package/dist/chunks/index-BeJNpAyx.js.map +0 -1
  113. package/dist/chunks/index-C3BQGcT3.js.map +0 -1
  114. package/dist/chunks/index-C5oGMHF_.js.map +0 -1
  115. package/dist/chunks/index-CBX7bn-G.js.map +0 -1
  116. package/dist/chunks/index-CDDke5rz.js.map +0 -1
  117. package/dist/chunks/index-CDPrkLq0.js.map +0 -1
  118. package/dist/chunks/index-CWLyz1fp.js.map +0 -1
  119. package/dist/chunks/index-Ca8hocby.js.map +0 -1
  120. package/dist/chunks/index-Ch3ep-eJ.js.map +0 -1
  121. package/dist/chunks/index-D3Z7ZDLJ.js.map +0 -1
  122. package/dist/chunks/index-D6r-BGAV.js +0 -77
  123. package/dist/chunks/index-D6r-BGAV.js.map +0 -1
  124. package/dist/chunks/index-DCXX1ZJG.js.map +0 -1
  125. package/dist/chunks/index-DEv3YqLg.js.map +0 -1
  126. package/dist/chunks/index-DGtpFgHV.js.map +0 -1
  127. package/dist/chunks/index-DITXYcHx.js.map +0 -1
  128. package/dist/chunks/index-DT8-oMPm.js.map +0 -1
  129. package/dist/chunks/index-DXWK4EFa.js.map +0 -1
  130. package/dist/chunks/index-Miba3PD_.js.map +0 -1
  131. package/dist/chunks/index-Q8FMOHj0.js.map +0 -1
  132. package/dist/chunks/index-e00_M05B.js.map +0 -1
  133. package/dist/chunks/index-f0vSgRIK.js.map +0 -1
  134. package/dist/chunks/index-rENB3n9O.js.map +0 -1
  135. package/dist/chunks/loadGpt-CmiAy366.js.map +0 -1
@@ -1,9 +1,9 @@
1
- var T = Object.defineProperty;
2
- var P = (l, e, t) => e in l ? T(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
- var r = (l, e, t) => P(l, typeof e != "symbol" ? e + "" : e, t);
4
- import { g as k } from "./index-DEv3YqLg.js";
5
- const M = 8e3;
6
- class L {
1
+ var P = Object.defineProperty;
2
+ var k = (d, e, t) => e in d ? P(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
3
+ var r = (d, e, t) => k(d, typeof e != "symbol" ? e + "" : e, t);
4
+ import { t as E, g as M, m as L } from "./player-DW5iWvPs.js";
5
+ const x = 8e3;
6
+ class C {
7
7
  constructor(e) {
8
8
  /** Reklam yüzünden çıkılan yüzey — reklam bitince geri dönüş butonu için. */
9
9
  r(this, "exited", null);
@@ -43,7 +43,7 @@ class L {
43
43
  const t = this.ctx.labels(), i = document.createElement("button");
44
44
  i.type = "button", i.className = "hp-ad-return", i.setAttribute("part", "ad-return"), i.textContent = e === "fullscreen" ? t.adReturnFullscreen : t.adReturnPip, i.addEventListener("click", (s) => {
45
45
  s.stopPropagation(), this.hideButton(), e === "fullscreen" ? this.ctx.enterFullscreen() : this.enterPip();
46
- }), i.addEventListener("pointerdown", (s) => s.stopPropagation()), this.ctx.containerEl.appendChild(i), this.button = i, this.hideTimer = setTimeout(() => this.hideButton(), M);
46
+ }), i.addEventListener("pointerdown", (s) => s.stopPropagation()), this.ctx.containerEl.appendChild(i), this.button = i, this.hideTimer = setTimeout(() => this.hideButton(), x);
47
47
  }
48
48
  enterPip() {
49
49
  var t, i;
@@ -59,19 +59,19 @@ class L {
59
59
  this.hideButton(), this.exited = null;
60
60
  }
61
61
  }
62
- const x = "https://imasdk.googleapis.com/js/sdkloader/ima3.js";
62
+ const b = "https://imasdk.googleapis.com/js/sdkloader/ima3.js";
63
63
  let g = null;
64
- function C() {
65
- var l;
66
- return (l = window.google) != null && l.ima ? Promise.resolve(window.google.ima) : g || (g = new Promise((e, t) => {
64
+ function S() {
65
+ var d;
66
+ return (d = window.google) != null && d.ima ? Promise.resolve(window.google.ima) : g || (g = new Promise((e, t) => {
67
67
  const i = document.createElement("script");
68
- i.src = x, i.async = !0, i.onload = () => {
68
+ i.src = b, i.async = !0, i.onload = () => {
69
69
  var s;
70
70
  (s = window.google) != null && s.ima ? e(window.google.ima) : t(new Error("IMA SDK yüklendi ama window.google.ima yok"));
71
71
  }, i.onerror = () => t(new Error("IMA SDK yüklenemedi (reklam engelleyici olabilir)")), document.head.appendChild(i);
72
72
  }), g);
73
73
  }
74
- class b {
74
+ class R {
75
75
  constructor(e) {
76
76
  r(this, "adRetryCount", 0);
77
77
  r(this, "chain", {});
@@ -97,26 +97,26 @@ class b {
97
97
  s("retry-disabled");
98
98
  return;
99
99
  }
100
- const o = this.resolveMaxRetry();
101
- if (this.adRetryCount >= o) {
100
+ const a = this.resolveMaxRetry();
101
+ if (this.adRetryCount >= a) {
102
102
  this.reset(), s("retry-limit");
103
103
  return;
104
104
  }
105
105
  this.cancelPending(), this.adRetryCount++;
106
- const n = this.getChainState(e, t);
107
- n.attemptsOnCurrent++;
108
- const c = this.config.maxAttemptsPerTag ?? 1 / 0;
109
- n.attemptsOnCurrent > c && n.index < n.tags.length - 1 && (n.index++, n.attemptsOnCurrent = 1);
110
- const h = n.tags[n.index], d = this.adRetryCount;
106
+ const o = this.getChainState(e, t);
107
+ o.attemptsOnCurrent++;
108
+ const l = this.config.maxAttemptsPerTag ?? 1 / 0;
109
+ o.attemptsOnCurrent > l && o.index < o.tags.length - 1 && (o.index++, o.attemptsOnCurrent = 1);
110
+ const c = o.tags[o.index], h = this.adRetryCount;
111
111
  this.retryTimer = setTimeout(() => {
112
- this.retryTimer = null, i(h, d);
112
+ this.retryTimer = null, i(c, h);
113
113
  }, this.applyJitter(this.resolveRetryDelay()));
114
114
  }
115
115
  getChainState(e, t) {
116
116
  const i = this.chain[e];
117
117
  if (i) return i;
118
- const s = (Array.isArray(t) ? t : [t]).filter((o) => !!o), a = { tags: s.length ? s : [t], index: 0, attemptsOnCurrent: 0 };
119
- return this.chain[e] = a, a;
118
+ const s = (Array.isArray(t) ? t : [t]).filter((a) => !!a), n = { tags: s.length ? s : [t], index: 0, attemptsOnCurrent: 0 };
119
+ return this.chain[e] = n, n;
120
120
  }
121
121
  resolveRetryDelay() {
122
122
  const e = this.config.retryDelayPattern;
@@ -141,71 +141,71 @@ class b {
141
141
  return Math.max(0, Math.round(e * i));
142
142
  }
143
143
  }
144
- function E(l, e) {
144
+ function T(d, e) {
145
145
  var t;
146
146
  try {
147
- (t = l == null ? void 0 : l.settings) != null && t.setPrivacySettings && (l.settings.setPrivacySettings({ nonPersonalizedAds: !0 }), console.warn(`[HopePlayer consent] non-personalized ads zorlandı (${e})`));
147
+ (t = d == null ? void 0 : d.settings) != null && t.setPrivacySettings && (d.settings.setPrivacySettings({ nonPersonalizedAds: !0 }), console.warn(`[HopePlayer consent] non-personalized ads zorlandı (${e})`));
148
148
  } catch (i) {
149
149
  console.warn("[HopePlayer consent] setPrivacySettings hatası:", i);
150
150
  }
151
151
  }
152
- function S(l, e) {
153
- if (l.consentAware) {
152
+ function B(d, e) {
153
+ if (d.consentAware) {
154
154
  try {
155
155
  typeof window.__uspapi == "function" && window.__uspapi("getUSPData", 1, (t, i) => {
156
- !i || !(t != null && t.uspString) || t.uspString.charAt(2) === "Y" && E(e, "USP/CCPA opt-out");
156
+ !i || !(t != null && t.uspString) || t.uspString.charAt(2) === "Y" && T(e, "USP/CCPA opt-out");
157
157
  });
158
158
  } catch (t) {
159
159
  console.warn("[HopePlayer consent] __uspapi okuma hatası:", t);
160
160
  }
161
161
  try {
162
162
  typeof window.__tcfapi == "function" && window.__tcfapi("getTCData", 2, (t, i) => {
163
- var o, n, c, h;
163
+ var a, o, l, c;
164
164
  if (!i || !t || t.gdprApplies !== !0) return;
165
- const s = (n = (o = t.vendor) == null ? void 0 : o.consents) == null ? void 0 : n[755], a = (h = (c = t.purpose) == null ? void 0 : c.consents) == null ? void 0 : h[1];
166
- (s === !1 || a === !1) && E(e, "TCF yetersiz onay");
165
+ const s = (o = (a = t.vendor) == null ? void 0 : a.consents) == null ? void 0 : o[755], n = (c = (l = t.purpose) == null ? void 0 : l.consents) == null ? void 0 : c[1];
166
+ (s === !1 || n === !1) && T(e, "TCF yetersiz onay");
167
167
  });
168
168
  } catch (t) {
169
169
  console.warn("[HopePlayer consent] __tcfapi okuma hatası:", t);
170
170
  }
171
171
  }
172
172
  }
173
- function R(l) {
173
+ function w(d) {
174
174
  try {
175
- const e = atob(l), t = new Uint8Array(e.length);
176
- for (let d = 0; d < e.length; d++) t[d] = e.charCodeAt(d);
175
+ const e = atob(d), t = new Uint8Array(e.length);
176
+ for (let h = 0; h < e.length; h++) t[h] = e.charCodeAt(h);
177
177
  if (t[0] !== 252 || t[13] !== 5) return null;
178
178
  const s = (t[14] << 24 | t[15] << 16 | t[16] << 8 | t[17]) >>> 0;
179
179
  if (t[18] >> 7 & 1) return { type: "cancel", spliceEventId: s };
180
- const o = t[19] >> 7 & 1, n = t[19] >> 6 & 1, c = t[19] >> 5 & 1;
181
- let h = null;
182
- if (n) {
183
- let d = 20;
184
- const u = t[d] >> 7 & 1;
185
- if (d += u ? 5 : 1, c) {
186
- const p = t[d] >> 7 & 1, f = (t[d] & 1) * Math.pow(2, 32) + t[d + 1] * Math.pow(2, 24) + t[d + 2] * Math.pow(2, 16) + t[d + 3] * Math.pow(2, 8) + t[d + 4];
187
- h = { autoReturn: p, seconds: f / 9e4 };
180
+ const a = t[19] >> 7 & 1, o = t[19] >> 6 & 1, l = t[19] >> 5 & 1;
181
+ let c = null;
182
+ if (o) {
183
+ let h = 20;
184
+ const u = t[h] >> 7 & 1;
185
+ if (h += u ? 5 : 1, l) {
186
+ const p = t[h] >> 7 & 1, f = (t[h] & 1) * Math.pow(2, 32) + t[h + 1] * Math.pow(2, 24) + t[h + 2] * Math.pow(2, 16) + t[h + 3] * Math.pow(2, 8) + t[h + 4];
187
+ c = { autoReturn: p, seconds: f / 9e4 };
188
188
  }
189
189
  }
190
- return { type: o ? "out" : "in", spliceEventId: s, breakDuration: h, programSplice: !!n };
190
+ return { type: a ? "out" : "in", spliceEventId: s, breakDuration: c, programSplice: !!o };
191
191
  } catch {
192
192
  return null;
193
193
  }
194
194
  }
195
- function B(l, e) {
196
- if (l === "EXT-X-CUE-OUT")
195
+ function I(d, e) {
196
+ if (d === "EXT-X-CUE-OUT")
197
197
  return { type: "out", duration: parseFloat(e) || null };
198
- if (l === "EXT-X-CUE-IN")
198
+ if (d === "EXT-X-CUE-IN")
199
199
  return { type: "in" };
200
- if (l === "EXT-X-DATERANGE") {
201
- const t = e.match(/SCTE35-OUT=0x([0-9A-Fa-f]+)/), i = e.match(/SCTE35-IN=0x([0-9A-Fa-f]+)/), s = e.match(/PLANNED-DURATION=([\d.]+)/), a = e.match(/CLASS="([^"]+)"/);
200
+ if (d === "EXT-X-DATERANGE") {
201
+ const t = e.match(/SCTE35-OUT=0x([0-9A-Fa-f]+)/), i = e.match(/SCTE35-IN=0x([0-9A-Fa-f]+)/), s = e.match(/PLANNED-DURATION=([\d.]+)/), n = e.match(/CLASS="([^"]+)"/);
202
202
  if (t)
203
- return { type: "out", duration: s ? parseFloat(s[1]) : null, class: a ? a[1] : null, raw: t[1] };
203
+ return { type: "out", duration: s ? parseFloat(s[1]) : null, class: n ? n[1] : null, raw: t[1] };
204
204
  if (i) return { type: "in", raw: i[1] };
205
205
  }
206
- return l === "EXT-OATCLS-SCTE35" ? R(e) : null;
206
+ return d === "EXT-OATCLS-SCTE35" ? w(e) : null;
207
207
  }
208
- class w {
208
+ class O {
209
209
  constructor(e, t) {
210
210
  r(this, "inAdBreak", !1);
211
211
  r(this, "adBreakTimer", null);
@@ -242,12 +242,12 @@ class w {
242
242
  if (t.value && typeof t.value == "object")
243
243
  i = t.value.key ?? null, s = t.value.data ?? t.value.value ?? "";
244
244
  else if (typeof t.text == "string") {
245
- const o = t.text.match(/^(EXT[^:]+):?(.*)$/);
246
- o && (i = o[1], s = o[2] ?? "");
245
+ const a = t.text.match(/^(EXT[^:]+):?(.*)$/);
246
+ a && (i = a[1], s = a[2] ?? "");
247
247
  }
248
248
  if (!i) return;
249
- const a = B(i, s);
250
- a && this.handleSignal(a);
249
+ const n = I(i, s);
250
+ n && this.handleSignal(n);
251
251
  }
252
252
  handleSignal(e) {
253
253
  var t;
@@ -270,11 +270,11 @@ class w {
270
270
  this.inAdBreak && (this.inAdBreak = !1, this.adBreakTimer && (clearTimeout(this.adBreakTimer), this.adBreakTimer = null), this.callbacks.onAdBreakEnd());
271
271
  }
272
272
  }
273
- const I = 250, O = 300 * 1e3, q = "100% 0px 100% 0px";
274
- function D(l, e) {
275
- return e === "Preroll" ? l.adTagPreroll : e === "Midroll" ? l.adTagMidroll : l.adTagPostroll;
273
+ const q = 250, D = 300 * 1e3, V = "100% 0px 100% 0px";
274
+ function F(d, e) {
275
+ return e === "Preroll" ? d.adTagPreroll : e === "Midroll" ? d.adTagMidroll : d.adTagPostroll;
276
276
  }
277
- class V {
277
+ class _ {
278
278
  constructor(e, t) {
279
279
  r(this, "ima", null);
280
280
  r(this, "adDisplayContainer", null);
@@ -360,7 +360,7 @@ class V {
360
360
  }
361
361
  });
362
362
  r(this, "onAdsManagerLoaded", (e) => {
363
- var a, o;
363
+ var n, a;
364
364
  if (!this.ima) return;
365
365
  const t = this.currentBreakType === "Preroll";
366
366
  if (t && this.prerollAbandoned) {
@@ -382,8 +382,8 @@ class V {
382
382
  this.adsManager.addEventListener(i.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested), this.adsManager.addEventListener(i.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested), this.adsManager.addEventListener(i.Type.ALL_ADS_COMPLETED, this.onAllAdsCompleted), this.adsManager.addEventListener(i.Type.LOADED, this.onAdLoaded), this.adsManager.addEventListener(i.Type.STARTED, this.onAdStarted), this.adsManager.addEventListener(i.Type.COMPLETE, this.stopAdProgress), this.adsManager.addEventListener(i.Type.SKIPPED, this.stopAdProgress), i.Type.USER_CLOSE && this.adsManager.addEventListener(i.Type.USER_CLOSE, this.endNonLinear), this.adsManager.addEventListener(this.ima.AdErrorEvent.Type.AD_ERROR, this.onAdsManagerError), this.adsManager.addEventListener(i.Type.PAUSED, this.onAdPaused), this.adsManager.addEventListener(i.Type.RESUMED, this.onAdResumed);
383
383
  const s = this.ctx.prerollGate;
384
384
  if (t && (s != null && s.isArmed)) {
385
- const n = ((o = (a = this.adsManager).getCuePoints) == null ? void 0 : o.call(a)) ?? [];
386
- if (n.length > 0 && !n.includes(0)) {
385
+ const o = ((a = (n = this.adsManager).getCuePoints) == null ? void 0 : a.call(n)) ?? [];
386
+ if (o.length > 0 && !o.includes(0)) {
387
387
  s.release(!0), this.startAdsManager();
388
388
  return;
389
389
  }
@@ -402,7 +402,7 @@ class V {
402
402
  return;
403
403
  }
404
404
  if (this.prerollStartPending) {
405
- if (this.prerollStartPending = !1, Date.now() - this.prerollRequestedAt > O) {
405
+ if (this.prerollStartPending = !1, Date.now() - this.prerollRequestedAt > D) {
406
406
  (e = this.adsManager) == null || e.destroy(), this.adsManager = null, this.initialRequestFired = !1, this.vmapRequested = !1, this.fireInitialRequest();
407
407
  return;
408
408
  }
@@ -445,12 +445,12 @@ class V {
445
445
  * reklam katmanı içerikle birlikte görünür, kontrol çubuğunun üstünde durur ve yalnızca overlay tıklanabilir.
446
446
  */
447
447
  r(this, "onAdLoaded", (e) => {
448
- var s, a, o;
448
+ var s, n, a;
449
449
  const t = (s = e == null ? void 0 : e.getAd) == null ? void 0 : s.call(e);
450
450
  if (!t || typeof t.isLinear != "function" || t.isLinear()) return;
451
451
  this.nonLinearActive = !0;
452
452
  const i = this.ctx.adLayerEl;
453
- this.nonLinearCreativeHeight = ((a = t.getHeight) == null ? void 0 : a.call(t)) || 0, i.setAttribute("data-nonlinear", ""), i.classList.remove("hp:hidden"), i.classList.add("hp:block"), this.resizeAd(), this.currentBreakType === "Preroll" && ((o = this.ctx.prerollGate) == null || o.release(!0)), this.ctx.hostEl.dispatchEvent(new CustomEvent("hp:adstart", { detail: { type: this.breakTypeOf(e), linear: !1 } }));
453
+ this.nonLinearCreativeHeight = ((n = t.getHeight) == null ? void 0 : n.call(t)) || 0, i.setAttribute("data-nonlinear", ""), i.classList.remove("hp:hidden"), i.classList.add("hp:block"), this.resizeAd(), this.currentBreakType === "Preroll" && ((a = this.ctx.prerollGate) == null || a.release(!0)), this.ctx.hostEl.dispatchEvent(new CustomEvent("hp:adstart", { detail: { type: this.breakTypeOf(e), linear: !1 } }));
454
454
  });
455
455
  /** Boyut değişimleri (ResizeObserver) kare başına bire indirilir — pencere sürüklenirken IMA'yı boğmasın. */
456
456
  r(this, "scheduleResize", () => {
@@ -478,19 +478,19 @@ class V {
478
478
  });
479
479
  /** Lineer reklam başladı: pod bilgisi + kalan süre toolbar'a (geri sayım). */
480
480
  r(this, "onAdStarted", (e) => {
481
- var s, a;
481
+ var s, n;
482
482
  const t = (s = e == null ? void 0 : e.getAd) == null ? void 0 : s.call(e);
483
483
  if (!t || typeof t.isLinear == "function" && !t.isLinear()) return;
484
484
  try {
485
- const o = t.getAdPodInfo();
486
- this.podPosition = o.getAdPosition() || 1, this.podTotal = o.getTotalAds() || 1;
485
+ const a = t.getAdPodInfo();
486
+ this.podPosition = a.getAdPosition() || 1, this.podTotal = a.getTotalAds() || 1;
487
487
  } catch {
488
488
  this.podPosition = 1, this.podTotal = 1;
489
489
  }
490
- this.stopAdProgress(), this.reportAdProgress(), this.progressTimer = setInterval(this.reportAdProgress, I);
490
+ this.stopAdProgress(), this.reportAdProgress(), this.progressTimer = setInterval(this.reportAdProgress, q);
491
491
  let i = "";
492
492
  try {
493
- i = ((a = t.getContentType) == null ? void 0 : a.call(t)) ?? "";
493
+ i = ((n = t.getContentType) == null ? void 0 : n.call(t)) ?? "";
494
494
  } catch {
495
495
  }
496
496
  this.ctx.adLayerEl.toggleAttribute("data-audio-ad", i.startsWith("audio/"));
@@ -504,17 +504,17 @@ class V {
504
504
  var e, t;
505
505
  this.progressTimer && clearInterval(this.progressTimer), this.progressTimer = null, (t = (e = this.ctx).onAdProgress) == null || t.call(e, null);
506
506
  });
507
- this.ctx = e, this.options = t, this.retry = new b(t.retry ?? {}), this.prebidIdSuffix = e.hostEl.id || Math.random().toString(36).slice(2, 8), this.surfaceGuard = e.surface ? new L(e.surface) : null;
507
+ this.ctx = e, this.options = t, this.retry = new R(t.retry ?? {}), this.prebidIdSuffix = e.hostEl.id || Math.random().toString(36).slice(2, 8), this.surfaceGuard = e.surface ? new C(e.surface) : null;
508
508
  }
509
509
  async install() {
510
- var s, a, o, n, c, h;
510
+ var s, n, a, o, l, c;
511
511
  let e;
512
512
  const t = this.ctx.prerollGate;
513
513
  t && (t.onPlayIntent = this.onPrerollPlayIntent, t.onTimeout = this.onPrerollTimeout);
514
514
  try {
515
- e = await C();
516
- } catch (d) {
517
- t == null || t.release(!0), (a = (s = this.ctx).log) == null || a.call(s, { message: `IMA SDK failed to load: ${String(d)}`, details: { hint: "ad blocker / network" } }), this.ctx.hostEl.dispatchEvent(new CustomEvent("hp:aderror", { detail: { message: String(d), errorType: "sdkLoadError" } }));
515
+ e = await S();
516
+ } catch (h) {
517
+ t == null || t.release(!0), (n = (s = this.ctx).log) == null || n.call(s, { message: `IMA SDK failed to load: ${String(h)}`, details: { hint: "ad blocker / network" } }), this.ctx.hostEl.dispatchEvent(new CustomEvent("hp:aderror", { detail: { message: String(h), errorType: "sdkLoadError" } }));
518
518
  return;
519
519
  }
520
520
  this.ima = e;
@@ -531,18 +531,18 @@ class V {
531
531
  } catch {
532
532
  }
533
533
  try {
534
- (o = e.ImaSdkSettings) != null && o.VpaidMode && e.settings.setVpaidMode(e.ImaSdkSettings.VpaidMode.INSECURE);
534
+ (a = e.ImaSdkSettings) != null && a.VpaidMode && e.settings.setVpaidMode(e.ImaSdkSettings.VpaidMode.INSECURE);
535
535
  } catch {
536
536
  }
537
- if (S(this.options, this.ima), this.ctx.audioPoster)
537
+ if (B(this.options, this.ima), this.ctx.audioPoster)
538
538
  try {
539
- (c = (n = e.settings).setFeatureFlags) == null || c.call(n, { audioPosterImageEnabled: !0, audioPosterImageDefaultUrl: this.ctx.audioPoster });
539
+ (l = (o = e.settings).setFeatureFlags) == null || l.call(o, { audioPosterImageEnabled: !0, audioPosterImageDefaultUrl: this.ctx.audioPoster });
540
540
  } catch {
541
541
  }
542
542
  this.adDisplayContainer = new e.AdDisplayContainer(this.ctx.adLayerEl, this.ctx.videoEl), typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(this.scheduleResize), this.resizeObserver.observe(this.ctx.videoEl)), this.adsLoader = new e.AdsLoader(this.adDisplayContainer), this.adsLoader.addEventListener(e.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, this.onAdsManagerLoaded), this.adsLoader.addEventListener(e.AdErrorEvent.Type.AD_ERROR, this.onAdsLoaderError), this.ctx.videoEl.addEventListener("play", this.initializeDisplayContainerOnce);
543
543
  const i = typeof navigator < "u" && "userActivation" in navigator && navigator.userActivation.hasBeenActive;
544
- (!this.ctx.videoEl.paused || i || t != null && t.hasPlayIntent) && this.initializeDisplayContainerOnce(), this.ctx.videoEl.addEventListener("ended", this.onContentEnded), this.options.adTagMidroll && !this.options.adTagVmap && this.options.midrollIntervalSeconds && this.ctx.videoEl.addEventListener("timeupdate", this.onTimeUpdateForMidroll), this.requestInitialPrerollOrVmap(), (h = this.options.live) != null && h.scte35 && this.options.live.adTagLive && (this.scte35Manager = new w(this.ctx.videoEl, {
545
- onAdBreakStart: (d) => this.onScte35AdBreakStart(d),
544
+ (!this.ctx.videoEl.paused || i || t != null && t.hasPlayIntent) && this.initializeDisplayContainerOnce(), this.ctx.videoEl.addEventListener("ended", this.onContentEnded), this.options.adTagMidroll && !this.options.adTagVmap && this.options.midrollIntervalSeconds && this.ctx.videoEl.addEventListener("timeupdate", this.onTimeUpdateForMidroll), this.requestInitialPrerollOrVmap(), (c = this.options.live) != null && c.scte35 && this.options.live.adTagLive && (this.scte35Manager = new O(this.ctx.videoEl, {
545
+ onAdBreakStart: (h) => this.onScte35AdBreakStart(h),
546
546
  onAdBreakEnd: () => this.onScte35AdBreakEnd()
547
547
  }));
548
548
  }
@@ -566,7 +566,7 @@ class V {
566
566
  (t) => {
567
567
  t.some((i) => i.isIntersecting) && this.fireInitialRequest();
568
568
  },
569
- { rootMargin: q }
569
+ { rootMargin: V }
570
570
  ), this.visibilityObserver.observe(this.ctx.hostEl);
571
571
  return;
572
572
  }
@@ -585,8 +585,8 @@ class V {
585
585
  this.retry.reset(), this.vmapRequested = !1, this.postrollShown = !1, this.postrollPending = !1, this.lastMidrollTime = 0, this.prerollAbandoned = !1, this.prerollStartPending = !1, e !== void 0 && (this.options.adTagPreroll = e), this.initialRequestFired = !0, this.prerollRequestedAt = Date.now(), this.options.adTagPreroll ? this.requestAd("Preroll", this.options.adTagPreroll) : this.options.adTagVmap && (this.vmapRequested = !0, this.requestAd("Preroll", this.options.adTagVmap, 0, !0));
586
586
  }
587
587
  destroy() {
588
- var e, t, i, s, a, o, n;
589
- this.ctx.prerollGate && (this.ctx.prerollGate.onPlayIntent = null, this.ctx.prerollGate.onTimeout = null, this.ctx.prerollGate.release(!1)), (e = this.visibilityObserver) == null || e.disconnect(), this.visibilityObserver = null, this.stopAdProgress(), this.ctx.videoEl.removeEventListener("play", this.initializeDisplayContainerOnce), this.ctx.videoEl.removeEventListener("ended", this.onContentEnded), this.ctx.videoEl.removeEventListener("timeupdate", this.onTimeUpdateForMidroll), (t = this.surfaceGuard) == null || t.destroy(), (i = this.resizeObserver) == null || i.disconnect(), this.resizeObserver = null, cancelAnimationFrame(this.resizeFrame), this.retry.cancelPending(), (s = this.adsManager) == null || s.destroy(), (a = this.adsLoader) == null || a.destroy(), (o = this.adDisplayContainer) == null || o.destroy(), (n = this.scte35Manager) == null || n.destroy(), this.scte35BreakTimeout && clearTimeout(this.scte35BreakTimeout);
588
+ var e, t, i, s, n, a, o;
589
+ this.ctx.prerollGate && (this.ctx.prerollGate.onPlayIntent = null, this.ctx.prerollGate.onTimeout = null, this.ctx.prerollGate.release(!1)), (e = this.visibilityObserver) == null || e.disconnect(), this.visibilityObserver = null, this.stopAdProgress(), this.ctx.videoEl.removeEventListener("play", this.initializeDisplayContainerOnce), this.ctx.videoEl.removeEventListener("ended", this.onContentEnded), this.ctx.videoEl.removeEventListener("timeupdate", this.onTimeUpdateForMidroll), (t = this.surfaceGuard) == null || t.destroy(), (i = this.resizeObserver) == null || i.disconnect(), this.resizeObserver = null, cancelAnimationFrame(this.resizeFrame), this.retry.cancelPending(), (s = this.adsManager) == null || s.destroy(), (n = this.adsLoader) == null || n.destroy(), (a = this.adDisplayContainer) == null || a.destroy(), (o = this.scte35Manager) == null || o.destroy(), this.scte35BreakTimeout && clearTimeout(this.scte35BreakTimeout);
590
590
  }
591
591
  /** SCTE-35 OUT sinyali: IMA'ya reklam iste (normal midroll gibi) + IMA cevap vermezse N ms sonra vazgeç. */
592
592
  onScte35AdBreakStart(e) {
@@ -610,43 +610,48 @@ class V {
610
610
  getPrebidConfigFor(e) {
611
611
  var i;
612
612
  const t = this.options.prebid;
613
- return t ? e === "Preroll" ? t.enabled ? t : null : e === "Midroll" && (i = t.midroll) != null && i.enabled ? { ...t, ...t.midroll } : null : null;
613
+ if (!t) return null;
614
+ if (e === "Preroll") return t.enabled ? t : null;
615
+ if (e === "Midroll") {
616
+ if (!((i = t.midroll) != null && i.enabled)) return null;
617
+ const s = { ...E(t.custParams), ...E(t.midroll.custParams) };
618
+ return { ...t, ...t.midroll, custParams: s };
619
+ }
620
+ return null;
614
621
  }
615
622
  async getOrCreatePrebidInstance(e, t) {
616
- var n;
623
+ var o;
617
624
  const i = this.prebidInstances[e];
618
625
  if (i) return i;
619
- const { VideoPrebid: s } = await import("./VideoPrebid-CpckFzSq.js"), a = e === "Midroll" ? "hope-video-midroll" : "hope-video-preroll", o = new s({
626
+ const { VideoPrebid: s } = await import("./prebid-CRY3i2OT.js"), n = e === "Midroll" ? "hope-video-midroll" : "hope-video-preroll", a = new s({
620
627
  ...t,
621
- adUnitCode: `${t.adUnitCode || a}-${this.prebidIdSuffix}`,
622
- consentManagement: (n = this.options.prebid) == null ? void 0 : n.consentManagement
628
+ adUnitCode: `${t.adUnitCode || n}-${this.prebidIdSuffix}`,
629
+ consentManagement: (o = this.options.prebid) == null ? void 0 : o.consentManagement
623
630
  });
624
- return this.prebidInstances[e] = o, o;
631
+ return this.prebidInstances[e] = a, a;
625
632
  }
626
633
  async requestAd(e, t, i = 0, s = !1) {
627
- var h, d, u, p, y, f, A;
634
+ var h, u, p, y, f, A, v;
628
635
  if (!this.adsLoader || !this.ima || this.remote) return;
629
636
  this.currentBreakType = e, this.lastRequestIsVmap = s;
630
- const a = Array.isArray(t) ? t[0] : t;
631
- let o = s ? a : k(a, { includeRefreshCount: !!((h = this.options.retry) != null && h.enabled), adRefreshCount: i });
632
- if (!s && i === 0) {
633
- const m = this.getPrebidConfigFor(e);
634
- if (m) {
635
- const v = await this.getOrCreatePrebidInstance(e, m);
636
- v.isAvailable() && (o = await v.runAuction(o));
637
- }
637
+ const n = Array.isArray(t) ? t[0] : t;
638
+ let a = s ? n : M(n, { includeRefreshCount: !!((h = this.options.retry) != null && h.enabled), adRefreshCount: i });
639
+ const o = s ? null : this.getPrebidConfigFor(e);
640
+ if (o != null && o.custParams && (a = L(a, o.custParams)), !s && i === 0 && o) {
641
+ const m = await this.getOrCreatePrebidInstance(e, o);
642
+ m.isAvailable() && (a = await m.runAuction(a));
638
643
  }
639
644
  if (!this.adsLoader || !this.ima) return;
640
- const n = new this.ima.AdsRequest();
641
- n.adTagUrl = o, n.linearAdSlotWidth = this.ctx.videoEl.clientWidth || 640, n.linearAdSlotHeight = this.ctx.videoEl.clientHeight || 360, n.nonLinearAdSlotWidth = this.ctx.videoEl.clientWidth || 640, n.nonLinearAdSlotHeight = Math.round((this.ctx.videoEl.clientHeight || 360) / 3), n.vastLoadTimeout = this.options.vastLoadTimeoutMs ?? 1e4;
645
+ const l = new this.ima.AdsRequest();
646
+ l.adTagUrl = a, l.linearAdSlotWidth = this.ctx.videoEl.clientWidth || 640, l.linearAdSlotHeight = this.ctx.videoEl.clientHeight || 360, l.nonLinearAdSlotWidth = this.ctx.videoEl.clientWidth || 640, l.nonLinearAdSlotHeight = Math.round((this.ctx.videoEl.clientHeight || 360) / 3), l.vastLoadTimeout = this.options.vastLoadTimeoutMs ?? 1e4;
642
647
  try {
643
- (u = n.setAdWillAutoPlay) == null || u.call(n, this.ctx.videoEl.autoplay || !!((d = this.ctx.prerollGate) != null && d.hasPlayIntent) || !this.ctx.videoEl.paused), (p = n.setAdWillPlayMuted) == null || p.call(n, this.ctx.videoEl.muted), (A = n.setContinuousPlayback) == null || A.call(n, !!((f = (y = this.ctx).isContinuousPlayback) != null && f.call(y)));
648
+ (p = l.setAdWillAutoPlay) == null || p.call(l, this.ctx.videoEl.autoplay || !!((u = this.ctx.prerollGate) != null && u.hasPlayIntent) || !this.ctx.videoEl.paused), (y = l.setAdWillPlayMuted) == null || y.call(l, this.ctx.videoEl.muted), (v = l.setContinuousPlayback) == null || v.call(l, !!((A = (f = this.ctx).isContinuousPlayback) != null && A.call(f)));
644
649
  } catch {
645
650
  }
646
651
  const c = this.omidRules();
647
- c && (n.omidAccessModeRules = c);
652
+ c && (l.omidAccessModeRules = c);
648
653
  try {
649
- this.adsLoader.requestAds(n);
654
+ this.adsLoader.requestAds(l);
650
655
  } catch (m) {
651
656
  this.giveUpOrRetry(e, String(m));
652
657
  }
@@ -656,13 +661,13 @@ class V {
656
661
  * IMA'nın enum'ları yoksa (eski SDK) hiçbir şey ayarlanmaz — IMA kendi varsayılanını kullanır.
657
662
  */
658
663
  omidRules() {
659
- var c, h;
660
- const e = (c = this.ima) == null ? void 0 : c.OmidVerificationVendor, t = (h = this.ima) == null ? void 0 : h.OmidAccessMode;
664
+ var l, c;
665
+ const e = (l = this.ima) == null ? void 0 : l.OmidVerificationVendor, t = (c = this.ima) == null ? void 0 : c.OmidAccessMode;
661
666
  if (!e || !t) return null;
662
- const i = this.options.omidAccessMode ?? "full", s = (d) => d === "full" ? t.FULL : d === "domain" ? t.DOMAIN : d === "limited" ? t.LIMITED : void 0, a = typeof i == "string" ? {} : i, o = s(typeof i == "string" ? i : i.default ?? "full") ?? t.FULL, n = {};
663
- for (const [d, u] of Object.entries(e))
664
- typeof u == "number" && (n[u] = s(a[d]) ?? o);
665
- return n;
667
+ const i = this.options.omidAccessMode ?? "full", s = (h) => h === "full" ? t.FULL : h === "domain" ? t.DOMAIN : h === "limited" ? t.LIMITED : void 0, n = typeof i == "string" ? {} : i, a = s(typeof i == "string" ? i : i.default ?? "full") ?? t.FULL, o = {};
668
+ for (const [h, u] of Object.entries(e))
669
+ typeof u == "number" && (o[u] = s(n[h]) ?? a);
670
+ return o;
666
671
  }
667
672
  startAdsManager() {
668
673
  if (!(!this.adsManager || !this.ima))
@@ -719,14 +724,14 @@ class V {
719
724
  }
720
725
  /** IMA hatasının kodlarını çıkarır, hata kaydına yazar (yeniden denenecek olsa da) ve mesajı döndürür. */
721
726
  recordAdError(e) {
722
- var s, a, o, n, c, h, d;
727
+ var s, n, a, o, l, c, h;
723
728
  const t = (s = e.getError) == null ? void 0 : s.call(e), i = {
724
- message: ((a = t == null ? void 0 : t.getMessage) == null ? void 0 : a.call(t)) ?? "ad-error",
725
- code: (o = t == null ? void 0 : t.getErrorCode) == null ? void 0 : o.call(t),
726
- vastCode: (n = t == null ? void 0 : t.getVastErrorCode) == null ? void 0 : n.call(t),
727
- errorType: (c = t == null ? void 0 : t.getType) == null ? void 0 : c.call(t)
729
+ message: ((n = t == null ? void 0 : t.getMessage) == null ? void 0 : n.call(t)) ?? "ad-error",
730
+ code: (a = t == null ? void 0 : t.getErrorCode) == null ? void 0 : a.call(t),
731
+ vastCode: (o = t == null ? void 0 : t.getVastErrorCode) == null ? void 0 : o.call(t),
732
+ errorType: (l = t == null ? void 0 : t.getType) == null ? void 0 : l.call(t)
728
733
  };
729
- return i.vastCode !== void 0 && i.vastCode <= 0 && (i.vastCode = void 0), this.lastAdError = i, (d = (h = this.ctx).log) == null || d.call(h, {
734
+ return i.vastCode !== void 0 && i.vastCode <= 0 && (i.vastCode = void 0), this.lastAdError = i, (h = (c = this.ctx).log) == null || h.call(c, {
730
735
  message: i.message,
731
736
  details: { code: i.code, vastCode: i.vastCode, errorType: i.errorType, break: this.breakTypeLower() }
732
737
  }), i.message;
@@ -737,7 +742,7 @@ class V {
737
742
  this.endScte35Break();
738
743
  return;
739
744
  }
740
- const i = D(this.options, e);
745
+ const i = F(this.options, e);
741
746
  if (!i) {
742
747
  this.resumeContentAfterGiveUp(e, t);
743
748
  return;
@@ -745,7 +750,7 @@ class V {
745
750
  this.retry.retry(
746
751
  e,
747
752
  i,
748
- (s, a) => this.requestAd(e, s, a),
753
+ (s, n) => this.requestAd(e, s, n),
749
754
  () => this.resumeContentAfterGiveUp(e, t)
750
755
  );
751
756
  }
@@ -793,11 +798,11 @@ class V {
793
798
  * başlıyordu. IMA reklamın arasındaki konumu verir: 0 preroll, -1 postroll, diğerleri midroll.
794
799
  */
795
800
  breakTypeOf(e) {
796
- var t, i, s, a, o;
801
+ var t, i, s, n, a;
797
802
  if (!this.lastRequestIsVmap) return this.breakTypeLower();
798
803
  try {
799
- const n = (o = (a = (s = (i = (t = e == null ? void 0 : e.getAd) == null ? void 0 : t.call(e)) == null ? void 0 : i.getAdPodInfo) == null ? void 0 : s.call(i)) == null ? void 0 : a.getTimeOffset) == null ? void 0 : o.call(a);
800
- if (typeof n == "number") return n === 0 ? "preroll" : n < 0 ? "postroll" : "midroll";
804
+ const o = (a = (n = (s = (i = (t = e == null ? void 0 : e.getAd) == null ? void 0 : t.call(e)) == null ? void 0 : i.getAdPodInfo) == null ? void 0 : s.call(i)) == null ? void 0 : n.getTimeOffset) == null ? void 0 : a.call(n);
805
+ if (typeof o == "number") return o === 0 ? "preroll" : o < 0 ? "postroll" : "midroll";
801
806
  } catch {
802
807
  }
803
808
  return this.breakTypeLower();
@@ -806,12 +811,12 @@ class V {
806
811
  return this.currentBreakType.toLowerCase();
807
812
  }
808
813
  }
809
- async function U(l, e) {
810
- const t = new V(l, e);
814
+ async function G(d, e) {
815
+ const t = new _(d, e);
811
816
  return await t.install(), t;
812
817
  }
813
818
  export {
814
- V as AdsController,
815
- U as installAds
819
+ _ as AdsController,
820
+ G as installAds
816
821
  };
817
- //# sourceMappingURL=index-DITXYcHx.js.map
822
+ //# sourceMappingURL=ads-MCG5a6eK.js.map