@newrelic/video-core 3.2.0-beta-1 → 4.0.0

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/CHANGELOG.md CHANGED
@@ -2,11 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [3.2.1] - 2025/07/30
5
+ ## [4.0.0] - 2025/08/26
6
6
 
7
- ### Breaking Change
7
+ ### Standalone Agent: Decoupled & Redesigned
8
8
 
9
- - Decoupled from browser agent, now uses its own harvesting system for independent data collection.
9
+ #### Key Changes
10
+
11
+ - **Breaking Change: Decoupled Agent 💥**
12
+ The browser agent is now a completely standalone unit with its own architecture, independent of the Browser Agent.
13
+
14
+ - **Enhancement: Independent Logic ⚙️**
15
+ The agent now uses its own dedicated harvesting logic for data collection.
16
+
17
+ - **Build: Simplified Onboarding 🚀**
18
+ The onboarding process has been streamlined to reflect its new decoupled nature, making it easier to integrate and manage.
10
19
 
11
20
  ## [3.1.1] - 2025/06/09
12
21
 
package/README.md CHANGED
@@ -2,59 +2,37 @@
2
2
 
3
3
  # New Relic Video Core - JavaScript
4
4
 
5
- > **⚠️ BETA VERSION NOTICE**
6
- > This version is currently in **beta phase** and is under active development. Features and APIs may change without notice. Use with caution in production environments and expect potential breaking changes in future releases.
7
-
8
5
  The New Relic video tracking core library is the base for all video trackers in the browser platform. It contains the classes and core mechanisms used by the player specific trackers.
9
6
  It segregates the events into different event types based on action, such as video-related events going to `VideoAction`, ad-related events to `VideoAdAction`, errors to `VideoErrorAction`, and custom actions to `VideoCustomAction`.
10
7
 
11
- ## Build
12
-
13
- Install dependencies:
14
-
15
- ```
16
- $ npm install
17
- ```
18
-
19
- And build:
20
-
21
- ```
22
- $ npm run build:dev
23
- ```
24
-
25
- Or if you need a production build:
8
+ ## Registering Trackers
26
9
 
27
- ```
28
- $ npm run build
29
- ```
30
-
31
- ## Usage
32
-
33
- Add **scripts** inside `dist` folder to your page.
34
-
35
- > If you want to know how to generate `dist` folder, refer to **npm commands** section.
10
+ Any browser-based video tracker can extend the `VideoTracker` class and use its core functionality.
36
11
 
37
- ### Registering Trackers
38
-
39
- `nrvideo` provides a class called `VideoTracker` that will serve as an interface with
40
- _Browser Agent_, allowing you to manage and send events to New Relic.
41
-
42
- First, configure the authentication options and initialize a tracker:
12
+ To initialize a tracker, create an instance of your specific tracker class:
43
13
 
44
14
  ```javascript
45
15
  const options = {
46
16
  info: {
47
- beacon: "your-beacon-url.nr-data.net",
48
- errorBeacon: "your-beacon-url.nr-data.net",
49
- licenseKey: "your-license-key",
50
- applicationID: "your-application-id",
51
- sa: 1,
17
+ licenseKey: "xxxxxxxxxxx",
18
+ beacon: "xxxxxxxxxx",
19
+ applicationId: "xxxxxxx",
52
20
  },
53
21
  };
54
22
 
55
- const tracker = new VideoTracker(player, options);
23
+ // User can get the `info` object by completing the onboarding process on New Relic.
24
+ const tracker = new VideoSpecificTracker(player, options);
56
25
  ```
57
26
 
27
+ Some of the APIs exposed and commonly used are:
28
+
29
+ - `tracker.setUserId("userId")` — Set the user ID.
30
+ - `tracker.setHarvestInterval(30000)` — Set the harvest interval time (in milliseconds).
31
+ - `tracker.setOptions({ customData: { key: value } })` — Set custom options or data.
32
+ - `tracker.sendCustom("CustomEvent", { data: "custom-test" })` — Send a custom event.
33
+
34
+ Any event emitted by the tracker will be sent to New Relic and processed according to its type.
35
+
58
36
  Once the tracker is added, any event it emits will be sent to New Relic and processed by the following functions:
59
37
 
60
38
  ```javascript
package/dist/cjs/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- (()=>{"use strict";var e={51:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{}i.AdPositions={PRE:"pre",MID:"mid",POST:"post"},i.INTERVAL=1e4,i.MAX_EVENTS_PER_BATCH=1e3,i.MAX_PAYLOAD_SIZE=1,i.MAX_BEACON_SIZE=.0625,i.MAX_EVENT_SIZE=.0625,i.VALID_EVENT_TYPES=["VideoAction","VideoAdAction","VideoErrorAction","VideoCustomAction"],i.COLLECTOR={US:"bam-cell.nr-data.net",EU:"bam.eu01.nr-data.net",Stage:"staging-bam-cell.nr-data.net",GOV:"gov-bam.nr-data.net"},t.default=i},144:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{static error(...e){s(e,i.Levels.ERROR,"darkred")}static warn(...e){s(e,i.Levels.WARNING,"darkorange")}static notice(...e){s([].slice.call(arguments),i.Levels.NOTICE,"darkcyan")}static debug(...e){s(e,i.Levels.DEBUG,"indigo")}static debugCommonVideoEvents(e,t,s){try{if(i.level<=i.Levels.DEBUG){s=s||function(e){i.debug("Event: "+e.type)};var n=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart","loadedmetadata"];t&&(null===t[0]?(t.shift(),n=t):n=n.concat(t));for(var r=0;r<n.length;r++)"function"==typeof e?e.call(window,n[r],s):e.on?e.on(n[r],s):e.addEventListener?e.addEventListener(n[r],s):e.addEventHandler?e.addEventHandler(n[r],s):i.warn("debugCommonVideoEvents: No common listener function found for ",e)}}catch(e){i.warn(e)}}}function s(e,t,s){t=t||i.Levels.NOTICE,s=s||"darkcyan";var a,o,d=i.prefix;i.includeTime&&(d+="["+("0"+(a=new Date).getDate()).slice(-2)+":"+("0"+a.getMinutes()).slice(-2)+":"+("0"+a.getSeconds()).slice(-2)+"."+("00"+a.getMilliseconds()).slice(-3)+"] "),d+=function(e){return r[e]}(t)+":",i.level<=t&&t!==i.Levels.SILENT&&(!i.colorful||"undefined"!=typeof document&&document.documentMode?n(e,d):(o=t===i.Levels.ERROR&&console.error?console.error:t===i.Levels.WARNING&&console.warn?console.warn:t===i.Levels.DEBUG&&console.debug&&null==window.cast?console.debug:console.log,d="%c"+d,e.splice(0,0,d,"color: "+s),o.apply(console,e)))}function n(e,t){if(e instanceof Array)for(var i in e)n(e[i],t);else"string"==typeof e?console.log(t+" "+e):(console.log(t+"↵"),console.log(e))}i.Levels={SILENT:5,ERROR:4,WARNING:3,NOTICE:2,DEBUG:1,ALL:0},i.level=i.Levels.ERROR,i.colorful=!0,i.includeTime=!0,i.prefix="[nrvideo]";const r={4:"e",3:"w",2:"n",1:"d"};!function(){if("undefined"!=typeof window&&window.location&&window.location.search){var e=/\?.*&*nrvideo-debug=(.+)/i.exec(window.location.search);null!==e&&("true"===e[1]?i.level=i.Levels.ALL:i.level=e[1]),null!==/\?.*&*nrvideo-colors=false/i.exec(window.location.search)&&(i.colorful=!1)}}(),t.default=i},302:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(i(330)),n=o(i(568)),r=o(i(455)),a=o(i(51));function o(e){return e&&e.__esModule?e:{default:e}}class d extends n.default{constructor(e){super(),this.customData={},this.heartbeat=null,this.parentTracker=null,this._trackerReadyChrono=new r.default,this._trackerReadyChrono.start(),this._actionTable=a.default.ACTION_TABLE,this._actionAdTable=a.default.ACTION_AD_TABLE,e=e||{},this.setOptions(e)}setOptions(e){e&&(e.parentTracker&&(this.parentTracker=e.parentTracker),e.customData&&(this.customData=e.customData),e.heartbeat&&(this.heartbeat=e.heartbeat))}dispose(){this.unregisterListeners()}registerListeners(){}unregisterListeners(){}getHeartbeat(){return this.state._isAd?2e3:this.heartbeat?this.heartbeat:this.parentTracker&&this.parentTracker.heartbeat?this.parentTracker.heartbeat:3e4}startHeartbeat(){this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),Math.max(this.getHeartbeat(),2e3))}stopHeartbeat(){this._heartbeatInterval&&clearInterval(this._heartbeatInterval)}sendHeartbeat(e){this.sendVideoAction(d.Events.HEARTBEAT,e)}getAttributes(e,t){(e=e||{}).trackerName=this.getTrackerName(),e.trackerVersion=this.getTrackerVersion(),e.coreVersion=s.default.version,e.timeSinceTrackerReady=this._trackerReadyChrono.getDeltaTime();for(let t in this.customData)e[t]=this.customData[t];return null!=document.hidden&&(e.isBackgroundEvent=document.hidden),e}getTrackerVersion(){return s.default.version}getTrackerName(){return"base-tracker"}sendVideoAction(e,t){this.emit("VideoAction",e,this.getAttributes(t))}sendVideoAdAction(e,t){this.emit("VideoAdAction",e,this.getAttributes(t))}sendVideoErrorAction(e,t){let i=this.isAd()?"adError":"videoError";this.emit("VideoErrorAction",e,this.getAttributes(t,i))}sendVideoCustomAction(e,t){this.emit("VideoCustomAction",e,this.getAttributes(t,"customAction"))}}d.Events={HEARTBEAT:"HEARTBEAT"},t.default=d},324:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NRVideoHarvester=void 0;var s=a(i(51)),n=a(i(330)),r=i(347);function a(e){return e&&e.__esModule?e:{default:e}}const{INTERVAL:o,MAX_EVENTS_PER_BATCH:d,MAX_PAYLOAD_SIZE:l,MAX_BEACON_SIZE:h}=s.default;t.NRVideoHarvester=class{#e=!1;#t;#i=null;constructor(e){this.#t=e,window.addEventListener("pagehide",(()=>this.triggerHarvest({isFinalHarvest:!0})))}startTimer(){if(this.#e)return;this.#e=!0;const e=()=>{this.triggerHarvest({}),this.#e&&(this.#i=setTimeout(e,o))};this.#i=setTimeout(e,o)}stopTimer(){this.#e=!1,this.#i&&(clearTimeout(this.#i),this.#i=null)}triggerHarvest(e={}){if(!this.#t.isEmpty())try{const t=this.#t.drain(),i=e.isFinalHarvest?h:l,s=this.chunkEvents(t,i);s.forEach(((t,i)=>{const n=i===s.length-1;this.sendChunk(t,e,n)}))}catch(e){console.error("Error during harvest:",e)}}chunkEvents(e,t){const i=[];let s=[];for(const n of e)if(s.length>=d&&(i.push(s),s=[]),s.push(n),(0,r.getPayloadSize)({ins:s})>t){const e=s.pop();s.length>0&&i.push(s),s=[e]}return s.length>0&&i.push(s),i}sendChunk(e,t,i){const s=this.#s();if(!s)return void this.#t.postHarvestCleanup({retry:!1,status:0});const n={body:{ins:e}};(0,r.callApi)({url:s,payload:n,options:t},(t=>{t.retry&&(t.chunk=e),this.#t.postHarvestCleanup(t)}))}#s(){try{if(!window.NRVIDEO||!window.NRVIDEO.info)throw new Error("NRVIDEO info is not available.");const{beacon:e,licenseKey:t,applicationID:i,sa:s}=window.NRVIDEO.info;if(!e||!t||!i)throw new Error("Options object provided by New Relic is not correctly initialized");return`https://${e}/ins/1/${t}?a=${i}&v=${n.default.version}&ref=${window.location.href}&ca=VA`}catch(e){return console.error(e.message),null}}}},328:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=r(i(455)),n=r(i(144));function r(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(){this.reset(),this._createdAt=Date.now(),this._hb=!0,this._acc=0,this._bufferAcc=0}reset(){this._viewSession=null,this._viewCount=0,this._isAd=!1,this.numberOfErrors=0,this.numberOfAds=0,this.numberOfVideos=0,this.totalPlaytime=0,this.totalAdPlaytime=0,this.isAdBreak=!1,this.initialBufferingHappened=!1,this.resetFlags(),this.resetChronos()}resetFlags(){this.isPlayerReady=!1,this.isRequested=!1,this.isStarted=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isPlaying=!1}resetChronos(){this.timeSinceRequested=new s.default,this.timeSinceStarted=new s.default,this.timeSincePaused=new s.default,this.timeSinceSeekBegin=new s.default,this.timeSinceBufferBegin=new s.default,this.timeSinceAdBreakStart=new s.default,this.timeSinceLastDownload=new s.default,this.timeSinceLastHeartbeat=new s.default,this.timeSinceLastRenditionChange=new s.default,this.timeSinceLastAdQuartile=new s.default,this.timeSinceLastAd=new s.default,this.timeSinceResumed=new s.default,this.timeSinceSeekEnd=new s.default,this.playtimeSinceLastEvent=new s.default,this.customTimeSinceAttributes={},this.elapsedTime=new s.default,this.bufferElapsedTime=new s.default}isAd(){return this._isAd}setIsAd(e){this._isAd=e}setTimeSinceAttribute(e){this.customTimeSinceAttributes[e]=new s.default,this.customTimeSinceAttributes[e].start()}removeTimeSinceAttribute(e){delete this.customTimeSinceAttributes[e]}getViewSession(){if(!this._viewSession){let e=(new Date).getTime(),t=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this._viewSession=e+"-"+t}return this._viewSession}getViewId(){return this.getViewSession()+"-"+this._viewCount}getStateAttributes(e){e=e||{},this.isAd()?(this.isRequested&&(e.timeSinceAdRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastAdHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceAdStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSinceAdPaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceAdBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceAdSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),this.isAdBreak&&(e.timeSinceAdBreakBegin=this.timeSinceAdBreakStart.getDeltaTime()),e.numberOfAds=this.numberOfAds):(this.isRequested&&(e.timeSinceRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSincePaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),e.timeSinceLastAd=this.timeSinceLastAd.getDeltaTime(),e.numberOfVideos=this.numberOfVideos),e.numberOfErrors=this.numberOfErrors,this.isAd()||(this.playtimeSinceLastEvent.startTime>0?e.playtimeSinceLastEvent=this.playtimeSinceLastEvent.getDeltaTime():e.playtimeSinceLastEvent=0,this.isPlaying?this.playtimeSinceLastEvent.start():this.playtimeSinceLastEvent.reset(),this.totalPlaytime+=e.playtimeSinceLastEvent,e.totalPlaytime=this.totalPlaytime);for(const[t,i]of Object.entries(this.customTimeSinceAttributes))e[t]=i.getDeltaTime();return e}calculateBufferType(e){let t="";return t=e?"initial":this.isSeeking?"seek":this.isPaused?"pause":"connection",n.default.debug("Buffer Type = "+t),t}goViewCountUp(){this._viewCount++}goPlayerReady(){return!this.isPlayerReady&&(this.isPlayerReady=!0,!0)}goRequest(){return!this.isRequested&&(this.isRequested=!0,this.timeSinceLastAd.reset(),this.timeSinceRequested.start(),!0)}goStart(){return!(!this.isRequested||this.isStarted||(this.isAd()?this.numberOfAds++:this.numberOfVideos++,this.isStarted=!0,this.isPlaying=!0,this.timeSinceStarted.start(),this.playtimeSinceLastEvent.start(),0))}goEnd(){return!!this.isRequested&&(this.numberOfErrors=0,this.resetFlags(),this.timeSinceRequested.stop(),this.timeSinceStarted.stop(),this.playtimeSinceLastEvent.stop(),!0)}goPause(){return!(!this.isStarted||this.isPaused||(this.isPaused=!0,this.isPlaying=!1,this.timeSincePaused.start(),this.playtimeSinceLastEvent.stop(),this.timeSinceResumed.reset(),this.isBuffering&&(this._bufferAcc+=this.bufferElapsedTime.getDeltaTime()),this.elapsedTime.start(),0))}goResume(){return!(!this.isStarted||!this.isPaused||(this.isPaused=!1,this.isPlaying=!0,this.timeSincePaused.stop(),this.timeSinceResumed.start(),this._hb?(this._acc=this.elapsedTime.getDeltaTime(),this._hb=!1):(this.isBuffering&&this.bufferElapsedTime.start(),this._acc+=this.elapsedTime.getDeltaTime()),0))}goBufferStart(){return!(!this.isRequested||this.isBuffering||(this.isBuffering=!0,this.isPlaying=!1,this.timeSinceBufferBegin.start(),this.bufferElapsedTime.start(),0))}goBufferEnd(){return!(!this.isRequested||!this.isBuffering||(this.isBuffering=!1,this.isPlaying=!0,this.timeSinceBufferBegin.stop(),this._hb?(this._bufferAcc=this.bufferElapsedTime.getDeltaTime(),this._hb=!1):this._bufferAcc+=this.bufferElapsedTime.getDeltaTime(),0))}goSeekStart(){return!(!this.isStarted||this.isSeeking||(this.isSeeking=!0,this.isPlaying=!1,this.timeSinceSeekBegin.start(),this.timeSinceSeekEnd.reset(),0))}goSeekEnd(){return!(!this.isStarted||!this.isSeeking||(this.isSeeking=!1,this.isPlaying=!0,this.timeSinceSeekBegin.stop(),this.timeSinceSeekEnd.start(),0))}goAdBreakStart(){return!this.isAdBreak&&(this.isAdBreak=!0,this.timeSinceAdBreakStart.start(),!0)}goAdBreakEnd(){return!!this.isAdBreak&&(this.isRequested=!1,this.isAdBreak=!1,this.totalAdPlaytime=this.timeSinceAdBreakStart.getDeltaTime(),this.timeSinceAdBreakStart.stop(),!0)}goDownload(){this.timeSinceLastDownload.start()}goHeartbeat(){this.timeSinceLastHeartbeat.start()}goRenditionChange(){this.timeSinceLastRenditionChange.start()}goAdQuartile(){this.timeSinceLastAdQuartile.start()}goError(){this.isError=!0,this.numberOfErrors++}goLastAd(){this.timeSinceLastAd.start()}}},330:e=>{e.exports=JSON.parse('{"name":"@newrelic/video-core","version":"3.2.0-beta-1","description":"New Relic video tracking core library","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development","watch":"webpack --mode production --progress --color --watch","watch:dev":"webpack --progress --color --watch","clean":"rm -rf dist coverage doc","test":"nyc --reporter=html --reporter=text mocha --require @babel/register","doc":"jsdoc -c jsdoc.json -d documentation","deploy":"node scripts/deploy.js","third-party-updates":"oss third-party manifest --includeOptDeps && oss third-party notices --includeOptDeps && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"},"repository":{"type":"git","url":"https://github.com/newrelic/video-core-js"},"author":"Jordi Aguilar","contributors":["Andreu Santarén Llop"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.24.5","@babel/plugin-transform-modules-commonjs":"^7.24.1","@babel/preset-env":"^7.24.5","@babel/register":"^7.24.6","@newrelic/newrelic-oss-cli":"^0.1.2","aws-sdk":"^2.920.0","babel-loader":"^9.1.3","chai":"^4.3.4","diff":"^5.0.0","jsdom":"^25.0.1","mocha":"^10.4.0","nyc":"^15.1.0","sinon":"^2.4.1","webpack":"^5.91.0","webpack-cli":"^4.9.2"},"files":["THIRD_PARTY_NOTICES.md","dist","src","CHANGELOG.md","LICENSE","README.md","!test"],"publishConfig":{"access":"public"}}')},347:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callApi=function({url:e,payload:t,options:i={}},s){if(!e||!t||!s)return console.error("callApi: Missing required parameters"),void(s&&s({retry:!1,status:0}));let n;try{n=JSON.stringify(t.body)}catch(e){return console.error("callApi: Error serializing payload",e),void s({retry:!1,status:0})}if(i.isFinalHarvest&&navigator.sendBeacon)try{const t=navigator.sendBeacon(e,n);s({retry:!t,status:t?200:0})}catch(e){s({retry:!0,status:0})}else fetch(e,{method:"POST",body:n,headers:{"Content-Type":"application/json"},keepalive:i.isFinalHarvest}).then((e=>{const t=function(e){switch(e){case 408:case 429:case 500:return!0;case 401:case 403:case 404:return!1}return e>=502&&e<=504||e>=512&&e<=530}(e.status);s({retry:t,status:e.status,ok:e.ok})})).catch((()=>{s({retry:!0,status:0})}))},t.getPayloadSize=function(e){if(!e||"object"!=typeof e)return 0;try{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length/1048576}catch(e){return console.error("getPayloadSize: Error calculating payload size",e),0}}},399:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,n=(s=i(144))&&s.__esModule?s:{default:s},r=i(449),a=i(418);class o{static addTracker(e,t){(0,a.setAuthConfig)(t.info),e.on&&e.emit?(d.push(e),e.on("*",l),"function"==typeof e.trackerInit&&e.trackerInit()):n.default.error("Tried to load a non-tracker.",e)}static removeTracker(e){e.off("*",l),e.dispose();let t=d.indexOf(e);-1!==t&&d.splice(t,1)}static getTrackers(){return d}static send(e,t,i){i.timeSinceLoad=window.performance.now()/1e3,(0,r.recordEvent)(e,{actionName:t,...i})}static sendError(e){o.send("ERROR",e)}}let d=[];function l(e){let t=function(e){let t={};for(let i in e)null!==e[i]&&void 0!==e[i]&&(t[i]=e[i]);return t}(e.data);n.default.level<=n.default.Levels.DEBUG?n.default.notice("Sent",e.type,t):n.default.notice("Sent",e.type),o.send(e.eventType,e.type,t)}t.default=o},418:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setAuthConfig=function(e){try{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("setAuthConfig: info parameter must be a valid object");if(function(e){if(!e||"object"!=typeof e)return!1;const{licenseKey:t,appName:i,region:s,applicationID:n,beacon:r}=e;return!(!t||"string"!=typeof t||0===t.trim().length)&&(n?!!(r&&"string"==typeof r&&r.trim().length>0):!!(i&&"string"==typeof i&&i.trim().length>0&&s&&"string"==typeof s&&s.trim().length>0))}(e)){const{licenseKey:t,appName:i,region:s,beacon:n,sa:a,applicationID:o}=e;window.NRVIDEO=window.NRVIDEO||{};let d=n;if(!d&&s){if(!r[s])throw new Error(`setAuthConfig: Invalid region '${s}'. Valid regions: ${Object.keys(r).join(", ")}`);d=r[s]}return window.NRVIDEO.info={beacon:d,licenseKey:t,applicationID:o||null,appName:i||null,sa:a||0},!0}{const t=function(e){if(!e||"object"!=typeof e)return"info parameter must be a valid object";const{licenseKey:t,appName:i,region:s,applicationID:n,beacon:r}=e;if(!t||"string"!=typeof t||0===t.trim().length)return"licenseKey is required and must be a non-empty string";if(n){if(!r||"string"!=typeof r||0===r.trim().length)return"beacon URL is required when using applicationID"}else{if(!i||"string"!=typeof i||0===i.trim().length)return"appName is required when not using applicationID";if(!s||"string"!=typeof s||0===s.trim().length)return"region is required when not using applicationID"}return"configuration validation failed"}(e);throw new Error(`setAuthConfig: ${t}`)}}catch(e){return console.error("setAuthConfig:",e.message),!1}};var s,n=(s=i(51))&&s.__esModule?s:{default:s};const{COLLECTOR:r}=n.default},431:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NRVideoEventAggregator=void 0;var s,n=i(347),r=(s=i(51))&&s.__esModule?s:{default:s};const{MAX_EVENTS_PER_BATCH:a,MAX_PAYLOAD_SIZE:o}=r.default;t.NRVideoEventAggregator=class{#n=[];#r=[];isEmpty(){return 0===this.#n.length&&0===this.#r.length}drain(){const e=[...this.#r,...this.#n];return this.#n=[],this.#r=[],e}add(e){this.#n.push(e)}postHarvestCleanup(e){if(e.retry&&e.chunk?.length){for(;this.#r.length>0&&((0,n.getPayloadSize)(this.#r)+(0,n.getPayloadSize)(e.chunk)>o||this.#r.length+e.chunk.length>a);)this.#r.shift();this.#r.push(...e.chunk)}else this.#r=[]}}},449:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.recordEvent=function(e,t={}){if("string"!=typeof e||0===e.length||!o.includes(e))return console.warn("recordEvent: Invalid eventType provided:",e),!1;if(null!==t&&("object"!=typeof t||Array.isArray(t)))return console.warn("recordEvent: attributes must be a plain object"),!1;if(t=t||{},!window.NRVIDEO||!window.NRVIDEO.info)return console.error("recordEvent: NRVIDEO not properly initialized"),!1;try{const{appName:i}=window.NRVIDEO.info,s={...t,eventType:e,appName:i,timestamp:Date.now()},a=(0,r.getPayloadSize)(s);return a>d?(console.warn(`recordEvent: Event size (${a} bytes) exceeds maximum (${d} bytes)`),!1):(n.customEventAggregator.add(s),!0)}catch(e){return console.error("recordEvent: Error recording event:",e),!1}};var s,n=i(487),r=i(347),a=(s=i(51))&&s.__esModule?s:{default:s};const{VALID_EVENT_TYPES:o,MAX_EVENT_SIZE:d}=a.default},455:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{constructor(){this.reset()}reset(){this.startTime=0,this.stopTime=0,this.offset=0}getDeltaTime(){return this.startTime?this.offset+((new Date).getTime()-this.startTime):null}start(){this.startTime=(new Date).getTime(),this.stopTime=0}stop(){return this.stopTime=(new Date).getTime(),this.getDeltaTime()}clone(){var e=new i;return e.startTime=this.startTime,e.stopTime=this.stopTime,e.offset=this.offset,e}}t.default=i},487:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.customEventAggregator=void 0;var s=i(431),n=i(324);const r=t.customEventAggregator=new s.NRVideoEventAggregator;new n.NRVideoHarvester(r).startTimer()},568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{on(e,t){if(this._listeners=this._listeners||{},"function"==typeof t)return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t),this}off(e,t){if(this._listeners=this._listeners||{},this._listeners[e]){var i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}return this}emit(e,t,i){return this._listeners=this._listeners||{},i=i||{},Array.isArray(this._listeners[t])&&this._listeners[t].forEach((s=>{s.call(this,{eventType:e,type:t,data:i,target:this})})),Array.isArray(this._listeners["*"])&&this._listeners["*"].forEach((s=>{s.call(this,{eventType:e,type:t,data:i,target:this})})),this}}},793:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(i(144)),n=o(i(302)),r=o(i(328)),a=o(i(330));function o(e){return e&&e.__esModule?e:{default:e}}class d extends n.default{constructor(e,t){super(),this.state=new r.default,this.adsTracker=null,this._lastBufferType=null,this._userId=null,t=t||{},this.setOptions(t),e&&this.setPlayer(e,t.tag),s.default.notice("Tracker "+this.getTrackerName()+" v"+this.getTrackerVersion()+" is ready.")}setUserId(e){this._userId=e}setOptions(e){e&&(e.adsTracker&&this.setAdsTracker(e.adsTracker),"boolean"==typeof e.isAd&&this.setIsAd(e.isAd),n.default.prototype.setOptions.apply(this,arguments))}setPlayer(e,t){(this.player||this.tag)&&this.dispose(),"undefined"!=typeof document&&document.getElementById&&("string"==typeof e&&(e=document.getElementById(e)),"string"==typeof t&&(t=document.getElementById(t))),t=t||e,this.player=e,this.tag=t,this.registerListeners()}isAd(){return this.state.isAd()}setIsAd(e){this.state.setIsAd(e)}setAdsTracker(e){this.disposeAdsTracker(),e&&(this.adsTracker=e,this.adsTracker.setIsAd(!0),this.adsTracker.parentTracker=this,this.adsTracker.on("*",l.bind(this)))}disposeAdsTracker(){this.adsTracker&&(this.adsTracker.off("*",l),this.adsTracker.dispose())}dispose(){this.stopHeartbeat(),this.disposeAdsTracker(),this.unregisterListeners(),this.player=null,this.tag=null}registerListeners(){}unregisterListeners(){}getViewId(){return this.parentTracker?this.parentTracker.getViewId():this.state.getViewId()}getViewSession(){return this.parentTracker?this.parentTracker.getViewSession():this.state.getViewSession()}getVideoId(){return null}getTitle(){return null}isLive(){return null}getBitrate(){return null}getWebkitBitrate(){if(this.tag&&this.tag.webkitVideoDecodedByteCount){let e;if(this._lastWebkitBitrate){e=this.tag.webkitVideoDecodedByteCount;let t=e-this._lastWebkitBitrate,i=this.getHeartbeat()/1e3;e=Math.round(t/i*8)}return this._lastWebkitBitrate=this.tag.webkitVideoDecodedByteCount,e||null}}getRenditionName(){return null}getRenditionBitrate(){return null}getRenditionShift(e){let t,i=this.getRenditionBitrate();return this.isAd()?(t=this._lastAdRendition,e&&(this._lastAdRendition=i)):(t=this._lastRendition,e&&(this._lastRendition=i)),i&&t?i>t?"up":i<t?"down":null:null}getRenditionHeight(){return this.tag?this.tag.videoHeight:null}getRenditionWidth(){return this.tag?this.tag.videoWidth:null}getDuration(){return this.tag?this.tag.duration:null}getPlayhead(){return this.tag?this.tag.currentTime:null}getLanguage(){return null}getSrc(){return this.tag?this.tag.currentSrc:null}getPlayrate(){return this.tag?this.tag.playbackRate:null}isMuted(){return this.tag?this.tag.muted:null}isFullscreen(){return null}getCdn(){return null}getPlayerName(){return this.getTrackerName()}getPlayerVersion(){return a.default.version}getFps(){return null}isAutoplayed(){return this.tag?this.tag.autoplay:null}getPreload(){return this.tag?this.tag.preload:null}getAdQuartile(){return null}getAdPosition(){return this.parentTracker?this.parentTracker.state.isStarted?"mid":"pre":null}getAdPartner(){return null}getAdCreativeId(){return null}getInstrumentationProvider(){return null}getInstrumentationName(){return null}getInstrumentationVersion(){return null}getAttributes(e,t){if(void 0===(e=n.default.prototype.getAttributes.apply(this,arguments)).isAd&&(e.isAd=this.isAd()),e.viewSession=this.getViewSession(),e.viewId=this.getViewId(),e.playerName=this.getPlayerName(),e.playerVersion=this.getPlayerVersion(),e["instrumentation.provider"]=this.getInstrumentationProvider(),e["instrumentation.name"]=this.getInstrumentationName(),e["instrumentation.version"]=this.getInstrumentationVersion(),e["enduser.id"]=this._userId,e.src="Browser","customAction"===t)return e;try{e.pageUrl=window.location.href}catch(e){}this.isAd()?(e.adId=this.getVideoId(),e.adTitle=this.getTitle(),e.adSrc=this.getSrc(),e.adCdn=this.getCdn(),e.adBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.adRenditionName=this.getRenditionName(),e.adRenditionBitrate=this.getRenditionBitrate(),e.adRenditionHeight=this.getRenditionHeight(),e.adRenditionWidth=this.getRenditionWidth(),e.adDuration=this.getDuration(),e.adPlayhead=this.getPlayhead(),e.adLanguage=this.getLanguage(),e.adIsMuted=this.isMuted(),e.adFps=this.getFps(),e.adPosition=this.getAdPosition(),e.adCreativeId=this.getAdCreativeId(),e.adPartner=this.getAdPartner()):(e.contentId=this.getVideoId(),e.contentTitle=this.getTitle(),e.contentSrc=this.getSrc(),e.contentCdn=this.getCdn(),e.contentPlayhead=this.getPlayhead(),e.contentIsLive=this.isLive(),e.contentBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.contentRenditionName=this.getRenditionName(),e.contentRenditionBitrate=this.getRenditionBitrate(),e.contentRenditionHeight=this.getRenditionHeight(),e.contentRenditionWidth=this.getRenditionWidth(),e.contentDuration=this.getDuration(),e.contentLanguage=this.getLanguage(),e.contentPlayrate=this.getPlayrate(),e.contentIsFullscreen=this.isFullscreen(),e.contentIsMuted=this.isMuted(),e.contentIsAutoplayed=this.isAutoplayed(),e.contentPreload=this.getPreload(),e.contentFps=this.getFps(),null!=this.adsTracker&&this.adsTracker.state.totalAdPlaytime>0&&(e.totalAdPlaytime=this.adsTracker.state.totalAdPlaytime)),this.state.getStateAttributes(e);for(let t in this.customData)e[t]=this.customData[t];return e}sendCustom(e,t,i){i=i||{},this.sendVideoCustomAction(e,i),this.state.setTimeSinceAttribute(t)}sendPlayerReady(e){this.state.goPlayerReady()&&(e=e||{},this.sendVideoAction(d.Events.PLAYER_READY,e))}sendRequest(e){if(this.state.goRequest()){let t;this.isAd()?(t=d.Events.AD_REQUEST,this.sendVideoAdAction(t,e)):(t=d.Events.CONTENT_REQUEST,this.sendVideoAction(t,e))}}sendStart(e){if(this.state.goStart()){let t;this.isAd()?(t=d.Events.AD_START,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(t,e)):(t=d.Events.CONTENT_START,this.sendVideoAction(t,e)),this.startHeartbeat(),this.state.goHeartbeat()}}sendEnd(e){if(this.state.goEnd()){let t;e=e||{},this.isAd()?(t=d.Events.AD_END,e.timeSinceAdRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceAdStarted=this.state.timeSinceStarted.getDeltaTime(),this.parentTracker&&(this.parentTracker.state.isPlaying=!0)):(t=d.Events.CONTENT_END,e.timeSinceRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceStarted=this.state.timeSinceStarted.getDeltaTime()),this.stopHeartbeat(),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd(),this.state.goViewCountUp(),this.state.totalPlaytime=0}}sendPause(e){if(this.state.goPause()){let t=this.isAd()?d.Events.AD_PAUSE:d.Events.CONTENT_PAUSE;this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendResume(e){if(this.state.goResume()){let t;e=e||{},this.isAd()?(t=d.Events.AD_RESUME,e.timeSinceAdPaused=this.state.timeSincePaused.getDeltaTime()):(t=d.Events.CONTENT_RESUME,e.timeSincePaused=this.state.timeSincePaused.getDeltaTime()),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendBufferStart(e){if(this.state.goBufferStart()){let t;e=e||{},t=this.isAd()?d.Events.AD_BUFFER_START:d.Events.CONTENT_BUFFER_START,e=this.buildBufferAttributes(e),this._lastBufferType=e.bufferType,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendBufferEnd(e){if(this.state.goBufferEnd()){let t;e=e||{},this.isAd()?(t=d.Events.AD_BUFFER_END,e.timeSinceAdBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()):(t=d.Events.CONTENT_BUFFER_END,e.timeSinceBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()),e=this.buildBufferAttributes(e),null!=this._lastBufferType&&(e.bufferType=this._lastBufferType),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.state.initialBufferingHappened=!0}}buildBufferAttributes(e){return null==e.timeSinceStarted||e.timeSinceStarted<100?e.isInitialBuffering=!this.state.initialBufferingHappened:e.isInitialBuffering=!1,e.bufferType=this.state.calculateBufferType(e.isInitialBuffering),e.timeSinceResumed=this.state.timeSinceResumed.getDeltaTime(),e.timeSinceSeekEnd=this.state.timeSinceSeekEnd.getDeltaTime(),e}sendSeekStart(e){if(this.state.goSeekStart()){let t;t=this.isAd()?d.Events.AD_SEEK_START:d.Events.CONTENT_SEEK_START,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendSeekEnd(e){if(this.state.goSeekEnd()){let t;e=e||{},this.isAd()?(t=d.Events.AD_SEEK_END,e.timeSinceAdSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()):(t=d.Events.CONTENT_SEEK_END,e.timeSinceSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendDownload(e){(e=e||{}).state||s.default.warn("Called sendDownload without { state: xxxxx }."),this.sendVideoAction(d.Events.DOWNLOAD,e),this.state.goDownload()}sendError(e){(e=e||{}).isAd=this.isAd(),this.state.goError();let t=this.isAd()?d.Events.AD_ERROR:d.Events.CONTENT_ERROR;this.sendVideoErrorAction(t,e)}sendRenditionChanged(e){let t;(e=e||{}).timeSinceLastRenditionChange=this.state.timeSinceLastRenditionChange.getDeltaTime(),e.shift=this.getRenditionShift(!0),t=this.isAd()?d.Events.AD_RENDITION_CHANGE:d.Events.CONTENT_RENDITION_CHANGE,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.state.goRenditionChange()}sendHeartbeat(e){if(this.state.isRequested){let t,i=this.getHeartbeat();this.state._hb=!0,i=this.adjustElapsedTimeForPause(i),this.isAd()?(t=d.Events.AD_HEARTBEAT,"bitmovin-ads"===this.getPlayerName()?this.sendVideoAdAction(t,e):this.sendVideoAdAction(t,{elapsedTime:i,...e})):(t=d.Events.CONTENT_HEARTBEAT,this.sendVideoAction(t,{elapsedTime:i,...e})),this.state.goHeartbeat()}}adjustElapsedTimeForPause(e){return this.state._acc&&(e-=this.state._acc,this.state._acc=0),this.state.isPaused&&((e-=this.state.elapsedTime.getDeltaTime())<10&&(e=0),this.state.elapsedTime.start()),this.state._bufferAcc?(e-=this.state._bufferAcc,this.state._bufferAcc=0):this.state.isBuffering&&((e-=this.state.bufferElapsedTime.getDeltaTime())<5&&(e=0),this.state.bufferElapsedTime.start()),Math.max(0,e)}sendAdBreakStart(e){this.isAd()&&this.state.goAdBreakStart()&&(this.state.totalAdPlaytime=0,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(d.Events.AD_BREAK_START,e))}sendAdBreakEnd(e){this.isAd()&&this.state.goAdBreakEnd()&&((e=e||{}).timeSinceAdBreakBegin=this.state.timeSinceAdBreakStart.getDeltaTime(),this.sendVideoAdAction(d.Events.AD_BREAK_END,e),this.parentTracker&&(this.parentTracker.state.isPlaying=!0),this.stopHeartbeat(),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd())}sendAdQuartile(e){this.isAd()&&((e=e||{}).quartile||s.default.warn("Called sendAdQuartile without { quartile: xxxxx }."),e.timeSinceLastAdQuartile=this.state.timeSinceLastAdQuartile.getDeltaTime(),this.sendVideoAdAction(d.Events.AD_QUARTILE,e),this.state.goAdQuartile())}sendAdClick(e){this.isAd()&&((e=e||{}).url||s.default.warn("Called sendAdClick without { url: xxxxx }."),this.sendVideoAdAction(d.Events.AD_CLICK,e))}}function l(e){e.type!==d.Events.AD_ERROR?this.sendVideoAdAction(e.type,e.data):this.sendVideoErrorAction(e.type,e.data)}d.Events={PLAYER_READY:"PLAYER_READY",DOWNLOAD:"DOWNLOAD",ERROR:"ERROR",CONTENT_REQUEST:"CONTENT_REQUEST",CONTENT_START:"CONTENT_START",CONTENT_END:"CONTENT_END",CONTENT_PAUSE:"CONTENT_PAUSE",CONTENT_RESUME:"CONTENT_RESUME",CONTENT_SEEK_START:"CONTENT_SEEK_START",CONTENT_SEEK_END:"CONTENT_SEEK_END",CONTENT_BUFFER_START:"CONTENT_BUFFER_START",CONTENT_BUFFER_END:"CONTENT_BUFFER_END",CONTENT_HEARTBEAT:"CONTENT_HEARTBEAT",CONTENT_RENDITION_CHANGE:"CONTENT_RENDITION_CHANGE",CONTENT_ERROR:"CONTENT_ERROR",AD_REQUEST:"AD_REQUEST",AD_START:"AD_START",AD_END:"AD_END",AD_PAUSE:"AD_PAUSE",AD_RESUME:"AD_RESUME",AD_SEEK_START:"AD_SEEK_START",AD_SEEK_END:"AD_SEEK_END",AD_BUFFER_START:"AD_BUFFER_START",AD_BUFFER_END:"AD_BUFFER_END",AD_HEARTBEAT:"AD_HEARTBEAT",AD_RENDITION_CHANGE:"AD_RENDITION_CHANGE",AD_ERROR:"AD_ERROR",AD_BREAK_START:"AD_BREAK_START",AD_BREAK_END:"AD_BREAK_END",AD_QUARTILE:"AD_QUARTILE",AD_CLICK:"AD_CLICK"},t.default=d}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,i),r.exports}var s={};(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=c(i(399)),n=c(i(51)),r=c(i(455)),a=c(i(144)),o=c(i(568)),d=c(i(302)),l=c(i(793)),h=c(i(328)),u=i(330);function c(e){return e&&e.__esModule?e:{default:e}}const g={Constants:n.default,Chrono:r.default,Log:a.default,Emitter:o.default,Tracker:d.default,VideoTracker:l.default,VideoTrackerState:h.default,Core:t.default,version:u.version};e.default=g})(),module.exports.nrvideo=s})();
2
+ (()=>{"use strict";var e={28:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OptimizedHttpClient=void 0;var s,r=i(347),a=(s=i(144))&&s.__esModule?s:{default:s};class n{async send(e,t){const{url:i,payload:s,options:r={}}=e;try{if(!i||!s)throw new Error("URL and payload are required");const e={url:i,payload:s,options:r,callback:t};await this.executeRequest(e)}catch(e){a.default.error("Failed to send request:",e.message),t({retry:!1,status:0,error:e.message})}}async executeRequest(e){const{url:t,payload:i,options:s,callback:r}=e,a=Date.now();try{const r=JSON.stringify(i.body);if(s.isFinalHarvest&&navigator.sendBeacon){const i=await this.sendWithBeacon(t,r),s={success:i,status:i?204:0};return void this.handleRequestComplete(e,s,a)}const n=await this.fetchWithTimeout(t,{method:"POST",body:r,headers:{"Content-Type":"application/json"},keepalive:s.isFinalHarvest},1e4),d={success:n.ok,status:n.status,statusText:n.statusText};this.handleRequestComplete(e,d,a)}catch(t){const i={success:!1,status:0,error:t.message};this.handleRequestComplete(e,i,a)}}handleRequestComplete(e,t){const{callback:i}=e;i({retry:!t.success&&(0===t.status||(0,r.shouldRetry)(t.status)),status:t.status,error:t.error})}async sendWithBeacon(e,t){try{return navigator.sendBeacon(e,t)}catch(e){return a.default.warn("sendBeacon failed, falling back to fetch:",e.message),!1}}async fetchWithTimeout(e,t,i){const s=new AbortController,r=setTimeout(()=>s.abort(),i);try{const i=await fetch(e,{...t,signal:s.signal});return clearTimeout(r),i}catch(e){if(clearTimeout(r),"AbortError"===e.name)throw new Error(`Request timeout after ${i}ms`);throw e}}}t.OptimizedHttpClient=n,t.default=n},51:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{}i.AdPositions={PRE:"pre",MID:"mid",POST:"post"},i.COLLECTOR={US:["bam.nr-data.net","bam-cell.nr-data.net"],EU:"bam.eu01.nr-data.net",Staging:"staging-bam-cell.nr-data.net",GOV:"gov-bam.nr-data.net"},i.VALID_EVENT_TYPES=["VideoAction","VideoAdAction","VideoErrorAction","VideoCustomAction"],i.MAX_PAYLOAD_SIZE=1048576,i.MAX_BEACON_SIZE=61440,i.MAX_EVENTS_PER_BATCH=1e3,i.INTERVAL=1e4,t.default=i},144:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{static error(...e){s(e,i.Levels.ERROR,"darkred")}static warn(...e){s(e,i.Levels.WARNING,"darkorange")}static notice(...e){s([].slice.call(arguments),i.Levels.NOTICE,"darkcyan")}static debug(...e){s(e,i.Levels.DEBUG,"indigo")}static debugCommonVideoEvents(e,t,s){try{if(i.level<=i.Levels.DEBUG){s=s||function(e){i.debug("Event: "+e.type)};var r=["canplay","buffering","waiting","ended","play","playing","pause","resume","error","abort","seek","seeking","seeked","stalled","dispose","loadeddata","loadstart","loadedmetadata"];t&&(null===t[0]?(t.shift(),r=t):r=r.concat(t));for(var a=0;a<r.length;a++)"function"==typeof e?e.call(window,r[a],s):e.on?e.on(r[a],s):e.addEventListener?e.addEventListener(r[a],s):e.addEventHandler?e.addEventHandler(r[a],s):i.warn("debugCommonVideoEvents: No common listener function found for ",e)}}catch(e){i.warn(e)}}}function s(e,t,s){t=t||i.Levels.NOTICE,s=s||"darkcyan";var n,d,o=i.prefix;i.includeTime&&(o+="["+("0"+(n=new Date).getDate()).slice(-2)+":"+("0"+n.getMinutes()).slice(-2)+":"+("0"+n.getSeconds()).slice(-2)+"."+("00"+n.getMilliseconds()).slice(-3)+"] "),o+=function(e){return a[e]}(t)+":",i.level<=t&&t!==i.Levels.SILENT&&(!i.colorful||"undefined"!=typeof document&&document.documentMode?r(e,o):(d=t===i.Levels.ERROR&&console.error?console.error:t===i.Levels.WARNING&&console.warn?console.warn:t===i.Levels.DEBUG&&console.debug&&null==window.cast?console.debug:console.log,o="%c"+o,e.splice(0,0,o,"color: "+s),d.apply(console,e)))}function r(e,t){if(e instanceof Array)for(var i in e)r(e[i],t);else"string"==typeof e?console.log(t+" "+e):(console.log(t+"↵"),console.log(e))}i.Levels={SILENT:5,ERROR:4,WARNING:3,NOTICE:2,DEBUG:1,ALL:0},i.level=i.Levels.ERROR,i.colorful=!0,i.includeTime=!0,i.prefix="[nrvideo]";const a={4:"e",3:"w",2:"n",1:"d"};!function(){if("undefined"!=typeof window&&window.location&&window.location.search){var e=/\?.*&*nrvideo-debug=(.+)/i.exec(window.location.search);null!==e&&("true"===e[1]?i.level=i.Levels.ALL:i.level=e[1]),null!==/\?.*&*nrvideo-colors=false/i.exec(window.location.search)&&(i.colorful=!1)}}(),t.default=i},302:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=l(i(330)),r=l(i(568)),a=l(i(455)),n=l(i(51)),d=i(487),o=l(i(144));function l(e){return e&&e.__esModule?e:{default:e}}class u extends r.default{constructor(e){super(),this.customData={},this.heartbeat=null,this.parentTracker=null,this._trackerReadyChrono=new a.default,this._trackerReadyChrono.start(),this._actionTable=n.default.ACTION_TABLE,this._actionAdTable=n.default.ACTION_AD_TABLE,e=e||{},this.setOptions(e)}setOptions(e){e&&(e.parentTracker&&(this.parentTracker=e.parentTracker),e.customData&&(this.customData=e.customData),e.heartbeat&&(this.heartbeat=e.heartbeat))}dispose(){this.unregisterListeners()}registerListeners(){}unregisterListeners(){}getHeartbeat(){return this.state._isAd?2e3:this.heartbeat?this.heartbeat:this.parentTracker&&this.parentTracker.heartbeat?this.parentTracker.heartbeat:3e4}startHeartbeat(){this._heartbeatInterval=setInterval(this.sendHeartbeat.bind(this),Math.max(this.getHeartbeat(),2e3))}stopHeartbeat(){this._heartbeatInterval&&clearInterval(this._heartbeatInterval)}sendHeartbeat(e){this.sendVideoAction(u.Events.HEARTBEAT,e)}getAttributes(e,t){(e=e||{}).trackerName=this.getTrackerName(),e.trackerVersion=this.getTrackerVersion(),e.coreVersion=s.default.version,e.timeSinceTrackerReady=this._trackerReadyChrono.getDeltaTime();for(let t in this.customData)e[t]=this.customData[t];return null!=document.hidden&&(e.isBackgroundEvent=document.hidden),e}getTrackerVersion(){return s.default.version}getTrackerName(){return"base-tracker"}sendVideoAction(e,t){this.emit("VideoAction",e,this.getAttributes(t))}sendVideoAdAction(e,t){this.emit("VideoAdAction",e,this.getAttributes(t))}sendVideoErrorAction(e,t){let i=this.isAd()?"adError":"videoError";this.emit("VideoErrorAction",e,this.getAttributes(t,i))}sendVideoCustomAction(e,t){this.emit("VideoCustomAction",e,this.getAttributes(t,"customAction"))}setHarvestInterval(e){if(d.videoAnalyticsHarvester)try{d.videoAnalyticsHarvester.setHarvestInterval(e)}catch(e){return void o.default.error("Failed to set harvest interval:",e.message)}else o.default.error("VideoAnalyticsHarvester is not available")}}u.Events={HEARTBEAT:"HEARTBEAT"},t.default=u},328:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=a(i(455)),r=a(i(144));function a(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(){this.reset(),this._createdAt=Date.now(),this._hb=!0,this._acc=0,this._bufferAcc=0}reset(){this._viewSession=null,this._viewCount=0,this._isAd=!1,this.numberOfErrors=0,this.numberOfAds=0,this.numberOfVideos=0,this.totalPlaytime=0,this.totalAdPlaytime=0,this.isAdBreak=!1,this.initialBufferingHappened=!1,this.resetFlags(),this.resetChronos()}resetFlags(){this.isPlayerReady=!1,this.isRequested=!1,this.isStarted=!1,this.isPaused=!1,this.isSeeking=!1,this.isBuffering=!1,this.isPlaying=!1}resetChronos(){this.timeSinceRequested=new s.default,this.timeSinceStarted=new s.default,this.timeSincePaused=new s.default,this.timeSinceSeekBegin=new s.default,this.timeSinceBufferBegin=new s.default,this.timeSinceAdBreakStart=new s.default,this.timeSinceLastDownload=new s.default,this.timeSinceLastHeartbeat=new s.default,this.timeSinceLastRenditionChange=new s.default,this.timeSinceLastAdQuartile=new s.default,this.timeSinceLastAd=new s.default,this.timeSinceResumed=new s.default,this.timeSinceSeekEnd=new s.default,this.playtimeSinceLastEvent=new s.default,this.customTimeSinceAttributes={},this.elapsedTime=new s.default,this.bufferElapsedTime=new s.default}isAd(){return this._isAd}setIsAd(e){this._isAd=e}setTimeSinceAttribute(e){this.customTimeSinceAttributes[e]=new s.default,this.customTimeSinceAttributes[e].start()}removeTimeSinceAttribute(e){delete this.customTimeSinceAttributes[e]}getViewSession(){if(!this._viewSession){let e=(new Date).getTime(),t=Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2);this._viewSession=e+"-"+t}return this._viewSession}getViewId(){return this.getViewSession()+"-"+this._viewCount}getStateAttributes(e){e=e||{},this.isAd()?(this.isRequested&&(e.timeSinceAdRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastAdHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceAdStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSinceAdPaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceAdBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceAdSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),this.isAdBreak&&(e.timeSinceAdBreakBegin=this.timeSinceAdBreakStart.getDeltaTime()),e.numberOfAds=this.numberOfAds):(this.isRequested&&(e.timeSinceRequested=this.timeSinceRequested.getDeltaTime(),e.timeSinceLastHeartbeat=this.timeSinceLastHeartbeat.getDeltaTime()),this.isStarted&&(e.timeSinceStarted=this.timeSinceStarted.getDeltaTime()),this.isPaused&&(e.timeSincePaused=this.timeSincePaused.getDeltaTime()),this.isBuffering&&(e.timeSinceBufferBegin=this.timeSinceBufferBegin.getDeltaTime()),this.isSeeking&&(e.timeSinceSeekBegin=this.timeSinceSeekBegin.getDeltaTime()),e.timeSinceLastAd=this.timeSinceLastAd.getDeltaTime(),e.numberOfVideos=this.numberOfVideos),e.numberOfErrors=this.numberOfErrors,this.isAd()||(this.playtimeSinceLastEvent.startTime>0?e.playtimeSinceLastEvent=this.playtimeSinceLastEvent.getDeltaTime():e.playtimeSinceLastEvent=0,this.isPlaying?this.playtimeSinceLastEvent.start():this.playtimeSinceLastEvent.reset(),this.totalPlaytime+=e.playtimeSinceLastEvent,e.totalPlaytime=this.totalPlaytime);for(const[t,i]of Object.entries(this.customTimeSinceAttributes))e[t]=i.getDeltaTime();return e}calculateBufferType(e){let t="";return t=e?"initial":this.isSeeking?"seek":this.isPaused?"pause":"connection",r.default.debug("Buffer Type = "+t),t}goViewCountUp(){this._viewCount++}goPlayerReady(){return!this.isPlayerReady&&(this.isPlayerReady=!0,!0)}goRequest(){return!this.isRequested&&(this.isRequested=!0,this.timeSinceLastAd.reset(),this.timeSinceRequested.start(),!0)}goStart(){return!(!this.isRequested||this.isStarted||(this.isAd()?this.numberOfAds++:this.numberOfVideos++,this.isStarted=!0,this.isPlaying=!0,this.timeSinceStarted.start(),this.playtimeSinceLastEvent.start(),0))}goEnd(){return!!this.isRequested&&(this.numberOfErrors=0,this.resetFlags(),this.timeSinceRequested.stop(),this.timeSinceStarted.stop(),this.playtimeSinceLastEvent.stop(),!0)}goPause(){return!(!this.isStarted||this.isPaused||(this.isPaused=!0,this.isPlaying=!1,this.timeSincePaused.start(),this.playtimeSinceLastEvent.stop(),this.timeSinceResumed.reset(),this.isBuffering&&(this._bufferAcc+=this.bufferElapsedTime.getDeltaTime()),this.elapsedTime.start(),0))}goResume(){return!(!this.isStarted||!this.isPaused||(this.isPaused=!1,this.isPlaying=!0,this.timeSincePaused.stop(),this.timeSinceResumed.start(),this._hb?(this._acc=this.elapsedTime.getDeltaTime(),this._hb=!1):(this.isBuffering&&this.bufferElapsedTime.start(),this._acc+=this.elapsedTime.getDeltaTime()),0))}goBufferStart(){return!(!this.isRequested||this.isBuffering||(this.isBuffering=!0,this.isPlaying=!1,this.timeSinceBufferBegin.start(),this.bufferElapsedTime.start(),0))}goBufferEnd(){return!(!this.isRequested||!this.isBuffering||(this.isBuffering=!1,this.isPlaying=!0,this.timeSinceBufferBegin.stop(),this._hb?(this._bufferAcc=this.bufferElapsedTime.getDeltaTime(),this._hb=!1):this._bufferAcc+=this.bufferElapsedTime.getDeltaTime(),0))}goSeekStart(){return!(!this.isStarted||this.isSeeking||(this.isSeeking=!0,this.isPlaying=!1,this.timeSinceSeekBegin.start(),this.timeSinceSeekEnd.reset(),0))}goSeekEnd(){return!(!this.isStarted||!this.isSeeking||(this.isSeeking=!1,this.isPlaying=!0,this.timeSinceSeekBegin.stop(),this.timeSinceSeekEnd.start(),0))}goAdBreakStart(){return!this.isAdBreak&&(this.isAdBreak=!0,this.timeSinceAdBreakStart.start(),!0)}goAdBreakEnd(){return!!this.isAdBreak&&(this.isRequested=!1,this.isAdBreak=!1,this.totalAdPlaytime=this.timeSinceAdBreakStart.getDeltaTime(),this.timeSinceAdBreakStart.stop(),!0)}goDownload(){this.timeSinceLastDownload.start()}goHeartbeat(){this.timeSinceLastHeartbeat.start()}goRenditionChange(){this.timeSinceLastRenditionChange.start()}goAdQuartile(){this.timeSinceLastAdQuartile.start()}goError(){this.isError=!0,this.numberOfErrors++}goLastAd(){this.timeSinceLastAd.start()}}},330:e=>{e.exports=JSON.parse('{"name":"@newrelic/video-core","version":"4.0.0","description":"New Relic video tracking core library","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","scripts":{"build":"webpack --mode production","build:dev":"webpack --mode development","watch":"webpack --mode production --progress --color --watch","watch:dev":"webpack --progress --color --watch","clean":"rm -rf dist coverage doc","test":"nyc --reporter=html --reporter=text mocha --require @babel/register","doc":"jsdoc -c jsdoc.json -d documentation","deploy":"node scripts/deploy.js","third-party-updates":"oss third-party manifest --includeOptDeps && oss third-party notices --includeOptDeps && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"},"repository":{"type":"git","url":"https://github.com/newrelic/video-core-js"},"author":"Jordi Aguilar","contributors":["Andreu Santarén Llop","Malay Chandan","Bharat Sarsawat"],"license":"Apache-2.0","devDependencies":{"@babel/core":"^7.24.5","@babel/plugin-transform-modules-commonjs":"^7.24.1","@newrelic/newrelic-oss-cli":"^0.1.2","@babel/preset-env":"^7.24.5","@babel/register":"^7.24.6","aws-sdk":"^2.920.0","babel-loader":"^9.1.3","chai":"^4.3.4","diff":"^5.0.0","jsdom":"^25.0.1","mocha":"^10.4.0","nyc":"^15.1.0","sinon":"^2.4.1","webpack":"^5.91.0","webpack-cli":"^4.9.2"},"files":["THIRD_PARTY_NOTICES.md","dist","src","CHANGELOG.md","LICENSE","README.md","src","!test"],"publishConfig":{"access":"public"}}')},347:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildUrl=function(e){try{if(!window.NRVIDEO||!window.NRVIDEO.info)throw new Error("NRVIDEO info is not available.");let{beacon:t,licenseKey:i,applicationID:r}=window.NRVIDEO.info;if(!t||!i)throw new Error("Options object provided by New Relic is not correctly initialized");return r?`https://${e||t}/ins/1/${i}?a=${r}&v=${s.default.version}&ref=${window.location.href}&ca=VA`:`https://${e||t}/ins/1/${i}?&v=${s.default.version}&ref=${window.location.href}&ca=VA`}catch(e){return console.error(e.message),null}},t.compressPayload=function(e){const t=JSON.stringify(e),i=new Blob([t]).stream(),s=new CompressionStream("gzip"),r=i.pipeThrough(s);return new Response(r).blob()},t.dataSize=function(e){if("string"==typeof e&&e.length)return e.length;if("object"==typeof e){if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer&&e.byteLength)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob&&e.size)return e.size;if(!("undefined"!=typeof FormData&&e instanceof FormData))try{return function(e){try{return JSON.stringify(e,n())??""}catch(e){return r.default.error("Error stringifying value:",e.message),""}}(e).length}catch(e){return}}},t.decompressPayload=async function(e){try{let t;if(e instanceof Blob)t=e.stream();else if(e instanceof ArrayBuffer)t=new Blob([e]).stream();else{if(!(e instanceof Uint8Array))throw new Error("Unsupported compressed data type");t=new Blob([e]).stream()}const i=new DecompressionStream("gzip"),s=t.pipeThrough(i),r=new Response(s),a=await r.text();return JSON.parse(a)}catch(e){throw new Error(`Failed to decompress payload: ${e.message}`)}},t.shouldRetry=function(e){switch(e){case 408:case 429:case 500:return!0;case 401:case 403:case 404:return!1}return e>=502&&e<=504||e>=512&&e<=530};var s=a(i(330)),r=a(i(144));function a(e){return e&&e.__esModule?e:{default:e}}const n=()=>{const e=new WeakSet;return(t,i)=>{if("object"==typeof i&&null!==i){if(e.has(i))return;e.add(i)}return i}}},374:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HarvestScheduler=void 0;var s=i(431),r=i(413),a=i(28),n=i(347),d=l(i(51)),o=l(i(144));function l(e){return e&&e.__esModule?e:{default:e}}t.HarvestScheduler=class{constructor(e){this.eventBuffer=e,this.retryQueueHandler=new r.RetryQueueHandler,this.httpClient=new a.OptimizedHttpClient,this.fallBackUrl="",this.retryCount=0,this.eventBuffer instanceof s.NrVideoEventAggregator&&this.eventBuffer.setSmartHarvestCallback((e,t)=>this.triggerSmartHarvest(e,t)),this.isStarted=!1,this.currentTimerId=null,this.harvestCycle=d.default.INTERVAL,this.isHarvesting=!1,this.setupPageLifecycleHandlers()}startScheduler(){this.isStarted?o.default.warn("Harvest scheduler is already started"):(this.isStarted=!0,o.default.notice("Starting harvest scheduler",{harvestCycle:this.harvestCycle,eventBufferSize:this.eventBuffer?this.eventBuffer.size():0}),this.scheduleNextHarvest())}stopScheduler(){this.isStarted&&(this.isStarted=!1,this.currentTimerId&&(clearTimeout(this.currentTimerId),this.currentTimerId=null),o.default.notice("Harvest scheduler stopped"))}async triggerSmartHarvest(e,t){if(o.default.notice(`${e} harvest triggered at ${t}% threshold`,{type:e,threshold:t}),this.eventBuffer&&!this.eventBuffer.isEmpty()){this.currentTimerId&&(clearTimeout(this.currentTimerId),this.currentTimerId=null);try{await this.triggerHarvest({})}catch(t){o.default.error(`${e} harvest failed:`,t.message)}finally{this.isStarted&&this.scheduleNextHarvest()}}}scheduleNextHarvest(){if(!this.isStarted)return;const e=this.harvestCycle;this.currentTimerId=setTimeout(()=>this.onHarvestInterval(),e)}async onHarvestInterval(){try{const e=this.eventBuffer&&!this.eventBuffer.isEmpty(),t=this.retryQueueHandler&&this.retryQueueHandler.getQueueSize()>0;if(!e&&!t)return;await this.triggerHarvest({})}catch(e){o.default.error("Error during scheduled harvest:",e.message)}finally{this.scheduleNextHarvest()}}async triggerHarvest(e={}){if(this.isHarvesting)return{success:!1,reason:"harvest_in_progress"};this.isHarvesting=!0;try{let t=this.drainEvents(e);if(e.isFinalHarvest){const e=d.default.MAX_BEACON_SIZE;(0,n.dataSize)(t)>e&&(t=this.trimEventsToFit(t,e))}const i=await this.sendChunk(t,e,!0);return{success:i.success,totalChunks:1,results:[i]}}catch(e){return o.default.error("Harvest cycle failed:",e.message),this.handleHarvestFailure(e),{success:!1,error:e.message,consecutiveFailures:this.consecutiveFailures}}finally{this.isHarvesting=!1}}trimEventsToFit(e,t){if(0===e.length)return e;const i=[];let s=0;for(let r=e.length-1;r>=0;r--){const a=e[r],d=(0,n.dataSize)({ins:[a,...i]});d>t||(i.unshift(a),s=d)}const r=e.length-i.length;if(r>0){const a=e.slice(0,r);o.default.warn(`Discarded ${r} events to fit beacon size limit`,{originalCount:e.length,trimmedCount:i.length,finalSize:s,maxSize:t}),this.retryQueueHandler&&this.retryQueueHandler.addFailedEvents(a)}return i}drainEvents(){const e=this.eventBuffer.drain();let t=[...e],i=(0,n.dataSize)(e);if(this.retryQueueHandler&&this.retryQueueHandler.getQueueSize()>0){const e=d.default.MAX_PAYLOAD_SIZE-i,s=d.default.MAX_EVENTS_PER_BATCH-t.length;if(e>0&&s>0){const i=this.retryQueueHandler.getRetryEventsToFit(e,s);i.length>0&&(t=[...i,...t])}}return t}async sendChunk(e,t,i){const s={url:(0,n.buildUrl)(this.fallBackUrl),payload:{body:{ins:e}},options:{...t,isLastChunk:i}};return new Promise(t=>{this.httpClient.send(s,i=>{i.retry?this.handleRequestFailure(e):(this.retryCount=0,this.fallBackUrl=""),t({success:!i.retry,status:i.status,error:i.error,chunk:e,eventCount:e.length})})})}handleRequestFailure(e){this.retryQueueHandler.addFailedEvents(e),"US"===window.NRVIDEO?.info?.region&&(this.retryCount++,this.retryCount>5?(this.retryCount=0,this.fallBackUrl=""):this.retryCount>=2&&(this.fallBackUrl=d.default.COLLECTOR.US[1]))}handleHarvestFailure(e){this.consecutiveFailures++,o.default.warn("Harvest failure handled",{error:e.message,consecutiveFailures:this.consecutiveFailures})}updateHarvestInterval(e){"number"!=typeof e&&isNaN(e)?o.default.warn("Invalid newInterval provided to updateHarvestInterval"):e<1e3||e>3e5?o.default.warn("newInterval out of bounds (1000-300000), ignoring"):this.harvestCycle!==e&&(this.harvestCycle=e,o.default.notice("Updated harvestCycle:",this.harvestCycle),this.currentTimerId&&(clearTimeout(this.currentTimerId),this.currentTimerId=null),this.isStarted&&this.scheduleNextHarvest())}setupPageLifecycleHandlers(){let e=!1;const t=()=>{e||(e=!0,this.triggerHarvest({isFinalHarvest:!0,force:!0}))};document.addEventListener("visibilitychange",()=>{document.hidden&&t()}),window.addEventListener("pagehide",()=>{t()}),window.addEventListener("beforeunload",()=>{t()})}}},399:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,r=(s=i(144))&&s.__esModule?s:{default:s},a=i(449),n=i(659);class d{static addTracker(e,t){t?.info&&(0,n.setVideoConfig)(t.info),e.on&&e.emit?(o.push(e),e.on("*",l),"function"==typeof e.trackerInit&&e.trackerInit()):r.default.error("Tried to load a non-tracker.",e)}static removeTracker(e){e.off("*",l),e.dispose();let t=o.indexOf(e);-1!==t&&o.splice(t,1)}static getTrackers(){return o}static send(e,t,i){const s={actionName:t,...i};return(0,a.recordEvent)(e,s)}static sendError(e){return(0,a.recordEvent)("VideoErrorAction",{actionName:"ERROR",...e})}static async forceHarvest(){try{const{videoAnalyticsHarvester:e}=i(487);return await e.forceHarvest()}catch(e){return r.default.error("Failed to force harvest:",e.message),{success:!1,error:e.message}}}}let o=[];function l(e){try{let t=function(e){let t={};for(let i in e)null!==e[i]&&void 0!==e[i]&&(t[i]=e[i]);return t}(e.data);r.default.level<=r.default.Levels.DEBUG?r.default.notice("Sent",e.type,t):r.default.notice("Sent",e.type),d.send(e.eventType,e.type,t)}catch(e){r.default.error("Error in event handler:",e.message)}}t.default=d},413:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RetryQueueHandler=void 0;var s=n(i(144)),r=i(347),a=n(i(51));function n(e){return e&&e.__esModule?e:{default:e}}const{MAX_PAYLOAD_SIZE:d,MAX_EVENTS_PER_BATCH:o}=a.default;class l{constructor(){this.retryQueue=[],this.maxQueueSize=o,this.maxQueueSizeBytes=d}addFailedEvents(e){try{const t=Array.isArray(e)?e:[e];s.default.notice(`Adding ${t.length} failed events to retry queue`,{queueSizeBefore:this.retryQueue.length});for(const e of t){this.retryQueue.length>=this.maxQueueSize&&this.evictOldestEvent();const t=(0,r.dataSize)(e);for(;(0,r.dataSize)(this.retryQueue)+t>this.maxQueueSizeBytes;)this.evictOldestEvent();this.retryQueue.push({...e})}}catch(e){s.default.error("Failed to add events to retry queue:",e.message)}}discardEvent(e,t){s.default.warn("Discarded event",{reason:t,eventType:e.eventType})}evictOldestEvent(){if(this.retryQueue.length>0){const e=this.retryQueue.shift();this.discardEvent(e,"Queue full - evicted oldest")}}getRetryEventsToFit(e,t){const i=[];let s=0,a=0;for(let n=this.retryQueue.length-1;n>=0;n--){const d=this.retryQueue[n];if(a>=t)break;const o=(0,r.dataSize)(d);if(s+o>e)break;i.unshift(d),s+=o,a++,this.retryQueue.splice(n,1)}return i}getQueueSize(){return this.retryQueue.length}clear(){this.retryQueue=[]}}t.RetryQueueHandler=l,t.default=l},431:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NrVideoEventAggregator=void 0;var s=n(i(144)),r=n(i(51)),a=i(347);function n(e){return e&&e.__esModule?e:{default:e}}const{MAX_PAYLOAD_SIZE:d,MAX_EVENTS_PER_BATCH:o}=r.default;class l{constructor(){this.buffer=[],this.maxPayloadSize=d,this.maxEventsPerBatch=o,this.currentPayloadSize=0,this.totalEvents=0,this.smartHarvestPayloadThreshold=Math.floor(.6*this.maxPayloadSize),this.overflowPayloadThreshold=Math.floor(.9*this.maxPayloadSize),this.smartHarvestEventThreshold=Math.floor(.6*this.maxEventsPerBatch),this.overflowEventThreshold=Math.floor(.9*this.maxEventsPerBatch),this.onSmartHarvestTrigger=null}add(e){try{const t=(0,a.dataSize)(e),i=this.currentPayloadSize+t>=this.maxPayloadSize,s=this.totalEvents+1>=this.maxEventsPerBatch;return(i||s)&&this.makeRoom(t),this.buffer.push(e),this.totalEvents++,this.currentPayloadSize+=t,this.checkSmartHarvestTrigger(),!0}catch(e){return s.default.error("Failed to add event to buffer:",e.message),!1}}checkSmartHarvestTrigger(){const e=this.currentPayloadSize/this.maxPayloadSize,t=this.totalEvents/this.maxEventsPerBatch,i=this.currentPayloadSize>=this.overflowPayloadThreshold,r=this.totalEvents>=this.overflowEventThreshold;if(i||r){const r=i?`payload ${this.currentPayloadSize}/${this.maxPayloadSize} bytes (${Math.round(100*e)}%)`:`events ${this.totalEvents}/${this.maxEventsPerBatch} (${Math.round(100*t)}%)`;s.default.warn(`OVERFLOW PREVENTION: ${r} - Emergency harvest triggered`),this.onSmartHarvestTrigger&&"function"==typeof this.onSmartHarvestTrigger&&this.onSmartHarvestTrigger("overflow",90)}else{const e=this.currentPayloadSize>=this.smartHarvestPayloadThreshold,t=this.totalEvents>=this.smartHarvestEventThreshold;(e||t)&&this.onSmartHarvestTrigger&&"function"==typeof this.onSmartHarvestTrigger&&this.onSmartHarvestTrigger("smart",60)}}setSmartHarvestCallback(e){this.onSmartHarvestTrigger=e}drain(){try{const e=this.buffer.splice(0);return this.totalEvents=0,this.currentPayloadSize=0,e}catch(e){return s.default.error("Failed to drain events from buffer:",e.message),[]}}isEmpty(){return 0===this.totalEvents}size(){return this.totalEvents}clear(){this.buffer=[],this.totalEvents=0}makeRoom(e){if(e>this.maxPayloadSize)s.default.error("Event dropped: Event size exceeds maximum payload size.");else for(;(this.totalEvents>=this.maxEventsPerBatch||this.currentPayloadSize+e>=this.maxPayloadSize)&&this.buffer.length>0;){const e=this.buffer.shift(),t=(0,a.dataSize)(e);this.totalEvents--,this.currentPayloadSize-=t,s.default.warn("Event buffer full, oldest event removed.")}}}t.NrVideoEventAggregator=l,t.default=l},449:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.recordEvent=function(e,t={}){try{if(!r.default.VALID_EVENT_TYPES.includes(e))return a.default.warn("Invalid event type provided to recordEvent",{eventType:e}),!1;if(!window?.NRVIDEO?.info)return;const{appName:i,applicationID:n}=window.NRVIDEO.info,d={...t,eventType:e,...n?{}:{appName:i},timestamp:Date.now(),timeSinceLoad:window.performance?window.performance.now()/1e3:null};return s.videoAnalyticsHarvester.addEvent(d)}catch(e){return a.default.error("Failed to record event:",e.message),!1}};var s=i(487),r=n(i(51)),a=n(i(144));function n(e){return e&&e.__esModule?e:{default:e}}},455:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class i{constructor(){this.reset()}reset(){this.startTime=0,this.stopTime=0,this.offset=0}getDeltaTime(){return this.startTime?this.offset+((new Date).getTime()-this.startTime):null}start(){this.startTime=(new Date).getTime(),this.stopTime=0}stop(){return this.stopTime=(new Date).getTime(),this.getDeltaTime()}clone(){var e=new i;return e.startTime=this.startTime,e.stopTime=this.stopTime,e.offset=this.offset,e}}t.default=i},487:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.videoAnalyticsHarvester=void 0;var s,r=i(374),a=i(431),n=(s=i(144))&&s.__esModule?s:{default:s};const d=new class{constructor(){this.isInitialized=!1,this.harvestScheduler=null,this.eventBuffer=null}initialize(){if(this.isInitialized)n.default.warn("Video analytics agent already initialized");else try{this.eventBuffer=new a.NrVideoEventAggregator,this.harvestScheduler=new r.HarvestScheduler(this.eventBuffer),this.harvestScheduler.startScheduler(),this.isInitialized=!0,n.default.notice("Video analytics agent initialized successfully")}catch(e){n.default.error("Failed to initialize video analytics agent:",e.message)}}addEvent(e){this.isInitialized||(n.default.warn("Video analytics agent not initialized, initializing now"),this.initialize());try{return this.eventBuffer.add(e)}catch(e){return n.default.error("Failed to add event to harvesting system:",e.message),!1}}setHarvestInterval(e){this.isInitialized||this.initialize(),this.harvestScheduler.updateHarvestInterval(e)}};t.videoAnalyticsHarvester=d},568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=class{on(e,t){if(this._listeners=this._listeners||{},"function"==typeof t)return this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t),this}off(e,t){if(this._listeners=this._listeners||{},this._listeners[e]){var i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}return this}emit(e,t,i){return this._listeners=this._listeners||{},i=i||{},Array.isArray(this._listeners[t])&&this._listeners[t].forEach(s=>{s.call(this,{eventType:e,type:t,data:i,target:this})}),Array.isArray(this._listeners["*"])&&this._listeners["*"].forEach(s=>{s.call(this,{eventType:e,type:t,data:i,target:this})}),this}}},659:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.setVideoConfig=function(e){return o.setConfiguration(e)},t.videoConfiguration=void 0;var s=a(i(144)),r=a(i(51));function a(e){return e&&e.__esModule?e:{default:e}}const{COLLECTOR:n}=r.default;class d{setConfiguration(e){return this.initializeGlobalConfig(e),s.default.notice("Video analytics configuration initialized successfully"),!0}validateRequiredFields(e){if(!e||"object"!=typeof e)return s.default.error("Configuration must be an object"),!1;const{licenseKey:t,appName:i,region:r,applicationID:a,beacon:d}=e;if(!t)return s.default.error("licenseKey is required"),!1;if(a){if(!d)return s.default.error("beacon is required when applicationID is provided"),!1;if(!Object.values(n).flatMap(e=>e).includes(d))return s.default.error(`Invalid beacon: ${d}`),!1}else{if(!i||!r)return s.default.error("appName and region are required when applicationID is not provided"),!1;if(!n[r])return s.default.error(`Invalid region: ${r}. Valid regions are: ${Object.keys(n).join(", ")}`),!1}return!0}initializeGlobalConfig(e){if(!this.validateRequiredFields(e))return;let{licenseKey:t,appName:i,region:s,beacon:a,applicationID:d}=e;a="US"===s?r.default.COLLECTOR.US[0]:a||n[s],window.NRVIDEO={info:{...s?{region:s}:{},beacon:a,licenseKey:t,applicationID:d,...d?{}:{appName:i}}}}}const o=t.videoConfiguration=new d;t.default=d},793:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=d(i(144)),r=d(i(302)),a=d(i(328)),n=d(i(330));function d(e){return e&&e.__esModule?e:{default:e}}class o extends r.default{constructor(e,t){super(),this.state=new a.default,this.adsTracker=null,this._lastBufferType=null,this._userId=null,t=t||{},this.setOptions(t),e&&this.setPlayer(e,t.tag),s.default.notice("Tracker "+this.getTrackerName()+" v"+this.getTrackerVersion()+" is ready.")}setUserId(e){this._userId=e}setOptions(e){e&&(e.adsTracker&&this.setAdsTracker(e.adsTracker),"boolean"==typeof e.isAd&&this.setIsAd(e.isAd),r.default.prototype.setOptions.apply(this,arguments))}setPlayer(e,t){(this.player||this.tag)&&this.dispose(),"undefined"!=typeof document&&document.getElementById&&("string"==typeof e&&(e=document.getElementById(e)),"string"==typeof t&&(t=document.getElementById(t))),t=t||e,this.player=e,this.tag=t,this.registerListeners()}isAd(){return this.state.isAd()}setIsAd(e){this.state.setIsAd(e)}setAdsTracker(e){this.disposeAdsTracker(),e&&(this.adsTracker=e,this.adsTracker.setIsAd(!0),this.adsTracker.parentTracker=this,this.adsTracker.on("*",l.bind(this)))}disposeAdsTracker(){this.adsTracker&&(this.adsTracker.off("*",l),this.adsTracker.dispose())}dispose(){this.stopHeartbeat(),this.disposeAdsTracker(),this.unregisterListeners(),this.player=null,this.tag=null}registerListeners(){}unregisterListeners(){}getViewId(){return this.parentTracker?this.parentTracker.getViewId():this.state.getViewId()}getViewSession(){return this.parentTracker?this.parentTracker.getViewSession():this.state.getViewSession()}getVideoId(){return null}getTitle(){return null}isLive(){return null}getBitrate(){return null}getWebkitBitrate(){if(this.tag&&this.tag.webkitVideoDecodedByteCount){let e;if(this._lastWebkitBitrate){e=this.tag.webkitVideoDecodedByteCount;let t=e-this._lastWebkitBitrate,i=this.getHeartbeat()/1e3;e=Math.round(t/i*8)}return this._lastWebkitBitrate=this.tag.webkitVideoDecodedByteCount,e||null}}getRenditionName(){return null}getRenditionBitrate(){return null}getRenditionShift(e){let t,i=this.getRenditionBitrate();return this.isAd()?(t=this._lastAdRendition,e&&(this._lastAdRendition=i)):(t=this._lastRendition,e&&(this._lastRendition=i)),i&&t?i>t?"up":i<t?"down":null:null}getRenditionHeight(){return this.tag?this.tag.videoHeight:null}getRenditionWidth(){return this.tag?this.tag.videoWidth:null}getDuration(){return this.tag?this.tag.duration:null}getPlayhead(){return this.tag?this.tag.currentTime:null}getLanguage(){return null}getSrc(){return this.tag?this.tag.currentSrc:null}getPlayrate(){return this.tag?this.tag.playbackRate:null}isMuted(){return this.tag?this.tag.muted:null}isFullscreen(){return null}getCdn(){return null}getPlayerName(){return this.getTrackerName()}getPlayerVersion(){return n.default.version}getFps(){return null}isAutoplayed(){return this.tag?this.tag.autoplay:null}getPreload(){return this.tag?this.tag.preload:null}getAdQuartile(){return null}getAdPosition(){return this.parentTracker?this.parentTracker.state.isStarted?"mid":"pre":null}getAdPartner(){return null}getAdCreativeId(){return null}getInstrumentationProvider(){return null}getInstrumentationName(){return null}getInstrumentationVersion(){return null}getAttributes(e,t){if(void 0===(e=r.default.prototype.getAttributes.apply(this,arguments)).isAd&&(e.isAd=this.isAd()),e.viewSession=this.getViewSession(),e.viewId=this.getViewId(),e.playerName=this.getPlayerName(),e.playerVersion=this.getPlayerVersion(),e["instrumentation.provider"]=this.getInstrumentationProvider(),e["instrumentation.name"]=this.getInstrumentationName(),e["instrumentation.version"]=this.getInstrumentationVersion(),e["enduser.id"]=this._userId,e.src="Browser","customAction"===t)return e;try{e.pageUrl=window.location.href}catch(e){}this.isAd()?(e.adId=this.getVideoId(),e.adTitle=this.getTitle(),e.adSrc=this.getSrc(),e.adCdn=this.getCdn(),e.adBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.adRenditionName=this.getRenditionName(),e.adRenditionBitrate=this.getRenditionBitrate(),e.adRenditionHeight=this.getRenditionHeight(),e.adRenditionWidth=this.getRenditionWidth(),e.adDuration=this.getDuration(),e.adPlayhead=this.getPlayhead(),e.adLanguage=this.getLanguage(),e.adIsMuted=this.isMuted(),e.adFps=this.getFps(),e.adPosition=this.getAdPosition(),e.adCreativeId=this.getAdCreativeId(),e.adPartner=this.getAdPartner()):(e.contentId=this.getVideoId(),e.contentTitle=this.getTitle(),e.contentSrc=this.getSrc(),e.contentCdn=this.getCdn(),e.contentPlayhead=this.getPlayhead(),e.contentIsLive=this.isLive(),e.contentBitrate=this.getBitrate()||this.getWebkitBitrate()||this.getRenditionBitrate(),e.contentRenditionName=this.getRenditionName(),e.contentRenditionBitrate=this.getRenditionBitrate(),e.contentRenditionHeight=this.getRenditionHeight(),e.contentRenditionWidth=this.getRenditionWidth(),e.contentDuration=this.getDuration(),e.contentLanguage=this.getLanguage(),e.contentPlayrate=this.getPlayrate(),e.contentIsFullscreen=this.isFullscreen(),e.contentIsMuted=this.isMuted(),e.contentIsAutoplayed=this.isAutoplayed(),e.contentPreload=this.getPreload(),e.contentFps=this.getFps(),null!=this.adsTracker&&this.adsTracker.state.totalAdPlaytime>0&&(e.totalAdPlaytime=this.adsTracker.state.totalAdPlaytime)),this.state.getStateAttributes(e);for(let t in this.customData)e[t]=this.customData[t];return e}sendCustom(e,t,i){i=i||{},this.sendVideoCustomAction(e,i),this.state.setTimeSinceAttribute(t)}sendPlayerReady(e){this.state.goPlayerReady()&&(e=e||{},this.sendVideoAction(o.Events.PLAYER_READY,e))}sendRequest(e){if(this.state.goRequest()){let t;this.isAd()?(t=o.Events.AD_REQUEST,this.sendVideoAdAction(t,e)):(t=o.Events.CONTENT_REQUEST,this.sendVideoAction(t,e))}}sendStart(e){if(this.state.goStart()){let t;this.isAd()?(t=o.Events.AD_START,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(t,e)):(t=o.Events.CONTENT_START,this.sendVideoAction(t,e)),this.startHeartbeat(),this.state.goHeartbeat()}}sendEnd(e){if(this.state.goEnd()){let t;e=e||{},this.isAd()?(t=o.Events.AD_END,e.timeSinceAdRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceAdStarted=this.state.timeSinceStarted.getDeltaTime(),this.parentTracker&&(this.parentTracker.state.isPlaying=!0)):(t=o.Events.CONTENT_END,e.timeSinceRequested=this.state.timeSinceRequested.getDeltaTime(),e.timeSinceStarted=this.state.timeSinceStarted.getDeltaTime()),this.stopHeartbeat(),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd(),this.state.goViewCountUp(),this.state.totalPlaytime=0}}sendPause(e){if(this.state.goPause()){let t=this.isAd()?o.Events.AD_PAUSE:o.Events.CONTENT_PAUSE;this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendResume(e){if(this.state.goResume()){let t;e=e||{},this.isAd()?(t=o.Events.AD_RESUME,e.timeSinceAdPaused=this.state.timeSincePaused.getDeltaTime()):(t=o.Events.CONTENT_RESUME,e.timeSincePaused=this.state.timeSincePaused.getDeltaTime()),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendBufferStart(e){if(this.state.goBufferStart()){let t;e=e||{},t=this.isAd()?o.Events.AD_BUFFER_START:o.Events.CONTENT_BUFFER_START,e=this.buildBufferAttributes(e),this._lastBufferType=e.bufferType,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendBufferEnd(e){if(this.state.goBufferEnd()){let t;e=e||{},this.isAd()?(t=o.Events.AD_BUFFER_END,e.timeSinceAdBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()):(t=o.Events.CONTENT_BUFFER_END,e.timeSinceBufferBegin=this.state.timeSinceBufferBegin.getDeltaTime()),e=this.buildBufferAttributes(e),null!=this._lastBufferType&&(e.bufferType=this._lastBufferType),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.state.initialBufferingHappened=!0}}buildBufferAttributes(e){return null==e.timeSinceStarted||e.timeSinceStarted<100?e.isInitialBuffering=!this.state.initialBufferingHappened:e.isInitialBuffering=!1,e.bufferType=this.state.calculateBufferType(e.isInitialBuffering),e.timeSinceResumed=this.state.timeSinceResumed.getDeltaTime(),e.timeSinceSeekEnd=this.state.timeSinceSeekEnd.getDeltaTime(),e}sendSeekStart(e){if(this.state.goSeekStart()){let t;t=this.isAd()?o.Events.AD_SEEK_START:o.Events.CONTENT_SEEK_START,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendSeekEnd(e){if(this.state.goSeekEnd()){let t;e=e||{},this.isAd()?(t=o.Events.AD_SEEK_END,e.timeSinceAdSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()):(t=o.Events.CONTENT_SEEK_END,e.timeSinceSeekBegin=this.state.timeSinceSeekBegin.getDeltaTime()),this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e)}}sendDownload(e){(e=e||{}).state||s.default.warn("Called sendDownload without { state: xxxxx }."),this.sendVideoAction(o.Events.DOWNLOAD,e),this.state.goDownload()}sendError(e){(e=e||{}).isAd=this.isAd(),this.state.goError();let t=this.isAd()?o.Events.AD_ERROR:o.Events.CONTENT_ERROR;this.sendVideoErrorAction(t,e)}sendRenditionChanged(e){let t;(e=e||{}).timeSinceLastRenditionChange=this.state.timeSinceLastRenditionChange.getDeltaTime(),e.shift=this.getRenditionShift(!0),t=this.isAd()?o.Events.AD_RENDITION_CHANGE:o.Events.CONTENT_RENDITION_CHANGE,this.isAd()?this.sendVideoAdAction(t,e):this.sendVideoAction(t,e),this.state.goRenditionChange()}sendHeartbeat(e){if(this.state.isRequested){let t,i=this.getHeartbeat();this.state._hb=!0,i=this.adjustElapsedTimeForPause(i),this.isAd()?(t=o.Events.AD_HEARTBEAT,"bitmovin-ads"===this.getPlayerName()?this.sendVideoAdAction(t,e):this.sendVideoAdAction(t,{elapsedTime:i,...e})):(t=o.Events.CONTENT_HEARTBEAT,this.sendVideoAction(t,{elapsedTime:i,...e})),this.state.goHeartbeat()}}adjustElapsedTimeForPause(e){return this.state._acc&&(e-=this.state._acc,this.state._acc=0),this.state.isPaused&&((e-=this.state.elapsedTime.getDeltaTime())<10&&(e=0),this.state.elapsedTime.start()),this.state._bufferAcc?(e-=this.state._bufferAcc,this.state._bufferAcc=0):this.state.isBuffering&&((e-=this.state.bufferElapsedTime.getDeltaTime())<5&&(e=0),this.state.bufferElapsedTime.start()),Math.max(0,e)}sendAdBreakStart(e){this.isAd()&&this.state.goAdBreakStart()&&(this.state.totalAdPlaytime=0,this.parentTracker&&(this.parentTracker.state.isPlaying=!1),this.sendVideoAdAction(o.Events.AD_BREAK_START,e))}sendAdBreakEnd(e){this.isAd()&&this.state.goAdBreakEnd()&&((e=e||{}).timeSinceAdBreakBegin=this.state.timeSinceAdBreakStart.getDeltaTime(),this.sendVideoAdAction(o.Events.AD_BREAK_END,e),this.parentTracker&&(this.parentTracker.state.isPlaying=!0),this.stopHeartbeat(),this.parentTracker&&this.isAd()&&this.parentTracker.state.goLastAd())}sendAdQuartile(e){this.isAd()&&((e=e||{}).quartile||s.default.warn("Called sendAdQuartile without { quartile: xxxxx }."),e.timeSinceLastAdQuartile=this.state.timeSinceLastAdQuartile.getDeltaTime(),this.sendVideoAdAction(o.Events.AD_QUARTILE,e),this.state.goAdQuartile())}sendAdClick(e){this.isAd()&&((e=e||{}).url||s.default.warn("Called sendAdClick without { url: xxxxx }."),this.sendVideoAdAction(o.Events.AD_CLICK,e))}}function l(e){e.type!==o.Events.AD_ERROR?this.sendVideoAdAction(e.type,e.data):this.sendVideoErrorAction(e.type,e.data)}o.Events={PLAYER_READY:"PLAYER_READY",DOWNLOAD:"DOWNLOAD",ERROR:"ERROR",CONTENT_REQUEST:"CONTENT_REQUEST",CONTENT_START:"CONTENT_START",CONTENT_END:"CONTENT_END",CONTENT_PAUSE:"CONTENT_PAUSE",CONTENT_RESUME:"CONTENT_RESUME",CONTENT_SEEK_START:"CONTENT_SEEK_START",CONTENT_SEEK_END:"CONTENT_SEEK_END",CONTENT_BUFFER_START:"CONTENT_BUFFER_START",CONTENT_BUFFER_END:"CONTENT_BUFFER_END",CONTENT_HEARTBEAT:"CONTENT_HEARTBEAT",CONTENT_RENDITION_CHANGE:"CONTENT_RENDITION_CHANGE",CONTENT_ERROR:"CONTENT_ERROR",AD_REQUEST:"AD_REQUEST",AD_START:"AD_START",AD_END:"AD_END",AD_PAUSE:"AD_PAUSE",AD_RESUME:"AD_RESUME",AD_SEEK_START:"AD_SEEK_START",AD_SEEK_END:"AD_SEEK_END",AD_BUFFER_START:"AD_BUFFER_START",AD_BUFFER_END:"AD_BUFFER_END",AD_HEARTBEAT:"AD_HEARTBEAT",AD_RENDITION_CHANGE:"AD_RENDITION_CHANGE",AD_ERROR:"AD_ERROR",AD_BREAK_START:"AD_BREAK_START",AD_BREAK_END:"AD_BREAK_END",AD_QUARTILE:"AD_QUARTILE",AD_CLICK:"AD_CLICK"},t.default=o}},t={};function i(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,i),a.exports}var s={};(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=E(i(399)),r=E(i(51)),a=E(i(455)),n=E(i(144)),d=E(i(568)),o=E(i(302)),l=E(i(793)),u=E(i(328)),h=i(431),c=i(413),f=i(28),g=i(374),m=i(449),v=i(330);function E(e){return e&&e.__esModule?e:{default:e}}const A={Constants:r.default,Chrono:a.default,Log:n.default,Emitter:d.default,Tracker:o.default,VideoTracker:l.default,VideoTrackerState:u.default,Core:t.default,version:v.version,NrVideoEventAggregator:h.NrVideoEventAggregator,RetryQueueHandler:c.RetryQueueHandler,OptimizedHttpClient:f.OptimizedHttpClient,HarvestScheduler:g.HarvestScheduler,recordEvent:m.recordEvent};e.default=A})(),module.exports.nrvideo=s})();
3
3
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @license Apache-2.0
3
- * @newrelic/video-core 3.2.0-beta-1
3
+ * @newrelic/video-core 4.0.0
4
4
  * Copyright New Relic <http://newrelic.com/>
5
5
  * @author Jordi Aguilar
6
6
  */