bitmovin-analytics 2.30.0 → 2.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bitmovinanalytics.min.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* This source code and its use and distribution, is subject to the terms
|
|
6
6
|
* and conditions of the applicable license agreement.
|
|
7
7
|
*
|
|
8
|
-
* bitmovin-analytics version v2.
|
|
8
|
+
* bitmovin-analytics version v2.31.1
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmovin=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.analytics=t())}(self,(function(){return function(){var e={9363:function(e,t){var n;n={VERSION:"2.4.0",Result:{SUCCEEDED:1,NOTRANSITION:2,CANCELLED:3,PENDING:4},Error:{INVALID_TRANSITION:100,PENDING_TRANSITION:200,INVALID_CALLBACK:300},WILDCARD:"*",ASYNC:"async",create:function(e,t){var r="string"==typeof e.initial?{state:e.initial}:e.initial,i=e.terminal||e.final,a=t||e.target||{},o=e.events||[],s=e.callbacks||{},l={},u={},c=function(e){var t=Array.isArray(e.from)?e.from:e.from?[e.from]:[n.WILDCARD];l[e.name]=l[e.name]||{};for(var r=0;r<t.length;r++)u[t[r]]=u[t[r]]||[],u[t[r]].push(e.name),l[e.name][t[r]]=e.to||t[r];e.to&&(u[e.to]=u[e.to]||[])};r&&(r.event=r.event||"startup",c({name:r.event,from:"none",to:r.state}));for(var d=0;d<o.length;d++)c(o[d]);for(var E in l)l.hasOwnProperty(E)&&(a[E]=n.buildEvent(E,l[E]));for(var E in s)s.hasOwnProperty(E)&&(a[E]=s[E]);return a.current="none",a.is=function(e){return Array.isArray(e)?e.indexOf(this.current)>=0:this.current===e},a.can=function(e){return!this.transition&&void 0!==l[e]&&(l[e].hasOwnProperty(this.current)||l[e].hasOwnProperty(n.WILDCARD))},a.cannot=function(e){return!this.can(e)},a.transitions=function(){return(u[this.current]||[]).concat(u[n.WILDCARD]||[])},a.isFinished=function(){return this.is(i)},a.error=e.error||function(e,t,n,r,i,a,o){throw o||a},a.states=function(){return Object.keys(u).sort()},r&&!r.defer&&a[r.event](),a},doCallback:function(e,t,r,i,a,o){if(t)try{return t.apply(e,[r,i,a].concat(o))}catch(t){return e.error(r,i,a,o,n.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",t)}},beforeAnyEvent:function(e,t,r,i,a){return n.doCallback(e,e.onbeforeevent,t,r,i,a)},afterAnyEvent:function(e,t,r,i,a){return n.doCallback(e,e.onafterevent||e.onevent,t,r,i,a)},leaveAnyState:function(e,t,r,i,a){return n.doCallback(e,e.onleavestate,t,r,i,a)},enterAnyState:function(e,t,r,i,a){return n.doCallback(e,e.onenterstate||e.onstate,t,r,i,a)},changeState:function(e,t,r,i,a){return n.doCallback(e,e.onchangestate,t,r,i,a)},beforeThisEvent:function(e,t,r,i,a){return n.doCallback(e,e["onbefore"+t],t,r,i,a)},afterThisEvent:function(e,t,r,i,a){return n.doCallback(e,e["onafter"+t]||e["on"+t],t,r,i,a)},leaveThisState:function(e,t,r,i,a){return n.doCallback(e,e["onleave"+r],t,r,i,a)},enterThisState:function(e,t,r,i,a){return n.doCallback(e,e["onenter"+i]||e["on"+i],t,r,i,a)},beforeEvent:function(e,t,r,i,a){if(!1===n.beforeThisEvent(e,t,r,i,a)||!1===n.beforeAnyEvent(e,t,r,i,a))return!1},afterEvent:function(e,t,r,i,a){n.afterThisEvent(e,t,r,i,a),n.afterAnyEvent(e,t,r,i,a)},leaveState:function(e,t,r,i,a){var o=n.leaveThisState(e,t,r,i,a),s=n.leaveAnyState(e,t,r,i,a);return!1!==o&&!1!==s&&(n.ASYNC===o||n.ASYNC===s?n.ASYNC:void 0)},enterState:function(e,t,r,i,a){n.enterThisState(e,t,r,i,a),n.enterAnyState(e,t,r,i,a)},buildEvent:function(e,t){return function(){var r=this.current,i=t[r]||(t[n.WILDCARD]!=n.WILDCARD?t[n.WILDCARD]:r)||r,a=Array.prototype.slice.call(arguments);if(this.transition)return this.error(e,r,i,a,n.Error.PENDING_TRANSITION,"event "+e+" inappropriate because previous transition did not complete");if(this.cannot(e))return this.error(e,r,i,a,n.Error.INVALID_TRANSITION,"event "+e+" inappropriate in current state "+this.current);if(!1===n.beforeEvent(this,e,r,i,a))return n.Result.CANCELLED;if(r===i)return n.afterEvent(this,e,r,i,a),n.Result.NOTRANSITION;var o=this;this.transition=function(){return o.transition=null,o.current=i,n.enterState(o,e,r,i,a),n.changeState(o,e,r,i,a),n.afterEvent(o,e,r,i,a),n.Result.SUCCEEDED},this.transition.cancel=function(){o.transition=null,n.afterEvent(o,e,r,i,a)};var s=n.leaveState(this,e,r,i,a);return!1===s?(this.transition=null,n.Result.CANCELLED):n.ASYNC===s?n.Result.PENDING:this.transition?this.transition():void 0}}},e.exports&&(t=e.exports=n),t.StateMachine=n},2764:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="v2.30.0"},877:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Adapter=void 0;var r=n(6767),i=function(){function e(){}return e.prototype.getCurrentImpressionId=function(){if(this.guardAgainstNotInitializedAnalytics())return this.analytics.getCurrentImpressionId()},e.prototype.getUserId=function(){if(this.guardAgainstNotInitializedAnalytics())return this.analytics.getUserId()},e.prototype.setCustomData=function(e){this.guardAgainstNotInitializedAnalytics()&&this.internalAdapter.setCustomData(e)},e.prototype.setCustomDataOnce=function(e){this.guardAgainstNotInitializedAnalytics()&&this.analytics.setCustomDataOnce(e)},e.prototype.sourceChange=function(e){this.guardAgainstNotInitializedAnalytics()&&this.analytics.sourceChange(e)},e.prototype.hasPlayerAlreadyBeenAugmented=function(e){return e.__bitmovinAnalyticsHasBeenSetup},e.prototype.markPlayerInstanceAsAugmented=function(e){e.__bitmovinAnalyticsHasBeenSetup=!0},e.prototype.guardAgainstNotInitializedAnalytics=function(){return!!this.analytics||(r.logger.log("Bitmovin Analytics: Adapter hasn't been initialized yet"),!1)},e}();t.Adapter=i},4715:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(3159),u=n(8584),c=function(e){function t(t,n,r){var i=e.call(this)||this;if(i.hasPlayerAlreadyBeenAugmented(n))return o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i;var s=new u.SourceUrlProvider;return i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.AmazonIVSInternalAdapter(n,s,r),i.analytics=new a.Analytics(t,i.internalAdapter),i.wrapPlayerLoad(n,s),i}return i(t,e),t.prototype.wrapPlayerLoad=function(e,t){var n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.m3u8Url=r[0],n.apply(e,r)}},t}(s.Adapter);t.AmazonIVSAdapter=c},8760:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8Adapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(351),u=function(e){function t(t,n){var r=e.call(this)||this;if(r.hasPlayerAlreadyBeenAugmented(t))return o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r;r.markPlayerInstanceAsAugmented(t);var i=t.getConfig(),s=i.analytics;return void 0===s&&(s={}),s.playerKey=s.playerKey||i.key,r.internalAdapter=new l.Bitmovin8InternalAdapter(t,n),r.analytics=new a.Analytics(s,r.internalAdapter),t.analytics=r.analytics,r.wrapPlayerLoad(t,r.analytics),r}return i(t,e),t.prototype.wrapPlayerLoad=function(e,t){var n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(r.length>0){var a=r[0].analytics;t.sourceChange(a)}return n.apply(e,r)}},t}(s.Adapter);t.Bitmovin8Adapter=u},5531:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CAFv3Adapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(5109),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.CAFv3InternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.CAFv3Adapter=u},4921:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashjsAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(4827),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.DashjsInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.DashjsAdapter=u},2989:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLVideoElementAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(889),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.HTMLVideoElementInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.HTMLVideoElementAdapter=u},9894:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(7082),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.HlsInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.HlsAdapter=u},4009:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShakaAdapter=void 0;var a=n(2343),o=n(4057),s=n(6767),l=n(877),u=n(4102),c=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(s.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new u.ShakaInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i.wrapPlayerLoad(n),i)}return i(t,e),t.prototype.wrapPlayerLoad=function(e){var t=this,n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return new Promise((function(i,a){n.apply(e,r).then((function(e){return i(e)})).catch((function(e){var n,r={currentTime:0,code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:void 0,message:JSON.stringify({category:null==e?void 0:e.category,severity:null==e?void 0:e.severity}),data:{additionalData:JSON.stringify(null==e?void 0:e.data)}};t.internalAdapter.eventCallback(o.Event.ERROR,r),a(e)}))}))}},t}(l.Adapter);t.ShakaAdapter=c},5553:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(6038),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.VideojsInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.VideojsAdapter=u},558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8HttpRequestTrackingAdapter=void 0;var r=n(3382),i=n(8105),a=n(1700),o=function(){function e(e){var t=this;this.eventDispatcher=new r.EventDispatcher,this.playerExports=e.exports,e.on(this.playerExports.PlayerEvent.DownloadFinished,(function(e){return t.onDownloadFinished(e)}))}return e.prototype.subscribe=function(e){return this.eventDispatcher.subscribe(e)},e.prototype.unsubscribe=function(e){this.eventDispatcher.unsubscribe(e)},e.prototype.onDownloadFinished=function(e){var t,n,r;this.eventDispatcher.dispatch({httpRequest:{downloadTime:null!==(t=(0,a.calculateTimeWithUndefined)(null==e?void 0:e.downloadTime))&&void 0!==t?t:0,httpStatus:null!==(n=null==e?void 0:e.httpStatus)&&void 0!==n?n:0,success:null!==(r=null==e?void 0:e.success)&&void 0!==r&&r,timestamp:(0,a.getCurrentTimestamp)(),url:null==e?void 0:e.url,size:null==e?void 0:e.size,timeToFirstByte:(0,a.calculateTimeWithUndefined)(null==e?void 0:e.timeToFirstByte),type:this.mapHttpRequestType(null==e?void 0:e.downloadType)}})},e.prototype.mapHttpRequestType=function(e){switch(e){case this.playerExports.HttpRequestType.MANIFEST_DASH:return i.HttpRequestType.MANIFEST_DASH;case this.playerExports.HttpRequestType.MANIFEST_HLS_MASTER:return i.HttpRequestType.MANIFEST_HLS_MASTER;case this.playerExports.HttpRequestType.MANIFEST_HLS_VARIANT:return i.HttpRequestType.MANIFEST_HLS_VARIANT;case this.playerExports.HttpRequestType.MANIFEST_SMOOTH:return i.HttpRequestType.MANIFEST_SMOOTH;case this.playerExports.HttpRequestType.MANIFEST_ADS:return i.HttpRequestType.MANIFEST_ADS;case this.playerExports.HttpRequestType.MEDIA_AUDIO:return i.HttpRequestType.MEDIA_AUDIO;case this.playerExports.HttpRequestType.MEDIA_VIDEO:return i.HttpRequestType.MEDIA_VIDEO;case this.playerExports.HttpRequestType.MEDIA_SUBTITLES:return i.HttpRequestType.MEDIA_SUBTITLES;case this.playerExports.HttpRequestType.MEDIA_THUMBNAILS:return i.HttpRequestType.MEDIA_THUMBNAILS;case this.playerExports.HttpRequestType.DRM_LICENSE_WIDEVINE:return i.HttpRequestType.DRM_LICENSE_WIDEVINE;case this.playerExports.HttpRequestType.DRM_LICENSE_PLAYREADY:return i.HttpRequestType.DRM_LICENSE_PLAYREADY;case this.playerExports.HttpRequestType.DRM_LICENSE_FAIRPLAY:return i.HttpRequestType.DRM_LICENSE_FAIRPLAY;case this.playerExports.HttpRequestType.DRM_LICENSE_PRIMETIME:return i.HttpRequestType.DRM_LICENSE_PRIMETIME;case this.playerExports.HttpRequestType.DRM_LICENSE_CLEARKEY:return i.HttpRequestType.DRM_LICENSE_CLEARKEY;case this.playerExports.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY:return i.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY;case this.playerExports.HttpRequestType.KEY_HLS_AES:return i.HttpRequestType.KEY_HLS_AES;case this.playerExports.HttpRequestType.TIME_SYNC:return i.HttpRequestType.TIME_SYNC;default:return i.HttpRequestType.UNKNOWN}},e}();t.Bitmovin8HttpRequestTrackingAdapter=o},351:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8InternalAdapter=void 0;var o,s=n(3464),l=n(5032),u=n(9827),c=n(5939),d=n(8001),E=n(6087),p=n(4057),h=n(6473),A=n(2108),f=n(8458),m=n(3909),v=n(7999),T=n(2033),y=n(7444),S=n(6767),I=n(4960),g=n(558),_=n(8700),N=n(1340),C=n(9782),P=n(1078);!function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(o||(o={}));var R=function(e){function t(t,n){var r=e.call(this,n)||this;return r.player=t,r.onBeforeUnLoadEvent=!1,r.getPlayerVersion=function(){return r.player.version},r.getPlayerName=function(){return h.Player.BITMOVIN},r.getPlayerTech=function(){return r.player.getPlayerType()},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.stateMachine=new s.Bitmovin8AnalyticsStateMachine(r.stateMachineCallbacks,r.opts),r.speedMeter=new N.Bitmovin8SpeedMeterAdapter(t,new l.DownloadSpeedMeter).getDownloadSpeedMeter(),r.segmentTracker=new _.Bitmovin8SegmentTrackerAdapter(t,new u.SegmentTracker).getSegmentTracker(),r.httpRequestTrackingAdapter=new g.Bitmovin8HttpRequestTrackingAdapter(t),r.videoCompletionTracker=new c.default,r}return i(t,e),Object.defineProperty(t.prototype,"downloadSpeedInfo",{get:function(){return this.speedMeter.getInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"segments",{get:function(){return this.segmentTracker.getSegments()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adModule",{get:function(){return this._adModule},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsDeferredLicenseLoading",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){try{if(null!==this.player&&null!==this.player.getCurrentTime&&!this.isAdPlaying)return this.player.getCurrentTime()}catch(e){S.logger.warning("Analytics Collector attempted to access player, but player is not available anymore")}return this.lastTrackedCurrentTime?this.lastTrackedCurrentTime:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdPlaying",{get:function(){var e=this.player.ads&&this.player.ads.getActiveAd();return null!=e},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){this.registerPlayerEventListeners(),this.registerUnloadEventListeners(),this._adModule=new P.Bitmovin8AdModule(this.player,this.windowEventTracker);var t=new v.HttpRequestTracking([this.httpRequestTrackingAdapter]);return[new m.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new f.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],t)]},t.prototype.clearValues=function(){this.speedMeter.reset()},t.prototype.clearSegments=function(){this.segmentTracker.reset()},t.prototype.getAutoPlay=function(){return this.player.getConfig().playback&&this.player.getConfig().playback.autoplay||!1},t.prototype.getCurrentPlaybackInfo=function(){var t,n=a(a({},e.prototype.getCommonPlaybackInfo.call(this)),{size:this.player.getViewMode()===o.Fullscreen?A.PlayerSize.Fullscreen:A.PlayerSize.Window,playerTech:this.getPlayerTech(),isLive:this.player.isLive(),videoDuration:(0,T.normalizeVideoDuration)(this.videoDuration),streamFormat:this.player.getStreamType(),videoWindowWidth:this.player.getContainer().offsetWidth,videoWindowHeight:this.player.getContainer().offsetHeight,isMuted:this.player.isMuted(),isCasting:this.player.isCasting(),audioLanguage:null!=this.player.getAudio()?null===(t=this.player.getAudio())||void 0===t?void 0:t.lang:void 0,subtitleEnabled:!1,droppedFrames:null!=this.player.getSource()?this.player.getDroppedVideoFrames():0});return this.applySubtitleProperties(n),this.applyPlaybackQualityProperties(n),this.applyCastingProperties(n),this.applySourceProperties(n),n},t.prototype.sourceChange=function(e,t){this.stateMachine.sourceChange(e,t,this.currentTime)},t.prototype.onError=function(){this.clearSegments()},t.prototype.registerPlayerEventListeners=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,(function(t){e.segmentTracker.reset(),e.eventCallback(p.Event.SOURCE_UNLOADED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SourceLoaded,(function(t){e.videoCompletionTracker.reset(),e.resetSourceRelatedState(),e.videoDuration=e.player.getDuration(),e.videoCompletionTracker.setVideoDuration(e.player.getDuration()),e.eventCallback(p.Event.SOURCE_LOADED,{})})),this.player.on(this.player.exports.PlayerEvent.CastStarted,(function(t){e.eventCallback(p.Event.START_CAST,t)})),this.player.on(this.player.exports.PlayerEvent.CastStopped,(function(){e.eventCallback(p.Event.END_CAST,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Play,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(p.Event.PLAY,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Playing,(function(t){"advertising-api"!==t.issuer&&e.eventCallback(p.Event.PLAYING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Paused,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(p.Event.PAUSE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.TimeChanged,(function(t){e.isAdPlaying||(e.lastTrackedCurrentTime=e.player.getCurrentTime()),e.eventCallback(p.Event.TIMECHANGED,{currentTime:e.lastTrackedCurrentTime})})),this.player.on(this.player.exports.PlayerEvent.Seek,(function(t){e.allowSeeking(t)&&e.eventCallback(p.Event.SEEK,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Seeked,(function(){e.eventCallback(p.Event.SEEKED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.StallStarted,(function(){e.eventCallback(p.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.StallEnded,(function(){e.eventCallback(p.Event.END_BUFFERING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AudioPlaybackQualityChanged,(function(){var t=e.player.getPlaybackAudioData();e.qualityChangeService.shouldAllowAudioQualityChange(t.bitrate)&&(e.qualityChangeService.setAudioBitrate(t.bitrate),e.eventCallback(p.Event.AUDIO_CHANGE,{bitrate:t.bitrate,currentTime:e.currentTime,codec:t.codec}))})),this.player.on(this.player.exports.PlayerEvent.VideoPlaybackQualityChanged,(function(){var t=e.player.getPlaybackVideoData();e.qualityChangeService.shouldAllowVideoQualityChange(t.bitrate)&&(e.qualityChangeService.setVideoBitrate(t.bitrate),e.eventCallback(p.Event.VIDEO_CHANGE,{width:t.width,height:t.height,bitrate:t.bitrate,currentTime:e.currentTime,codec:t.codec}))})),this.player.on(this.player.exports.PlayerEvent.ViewModeChanged,(function(t){"fullscreen"===t.to?e.eventCallback(p.Event.START_FULLSCREEN,{currentTime:e.currentTime}):"fullscreen"===t.from&&e.eventCallback(p.Event.END_FULLSCREEN,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdStarted,(function(t){e.eventCallback(p.Event.START_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdFinished,(function(t){e.eventCallback(p.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdSkipped,(function(t){e.eventCallback(p.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdError,(function(t){e.eventCallback(p.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Muted,(function(){e.eventCallback(p.Event.MUTE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Unmuted,(function(){e.eventCallback(p.Event.UN_MUTE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Error,(function(t){e.eventCallback(p.Event.ERROR,{code:t.code,message:t.name,legacyData:t.data,currentTime:e.currentTime,data:{additionalData:JSON.stringify(t.data)}}),t.code!==E.ErrorCode.BITMOVIN_PLAYER_LICENSING_ERROR.code&&t.code!==E.ErrorCode.SETUP_MISSING_LICENSE_WHITELIST.code||e._onLicenseCallFailed.dispatch({})})),this.player.on(this.player.exports.PlayerEvent.PlaybackFinished,(function(){e.eventCallback(p.Event.PLAYBACK_FINISHED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.DownloadFinished,(function(t){0===t.downloadType.indexOf("drm/license/")&&(e.drmPerformanceInfo={drmType:t.downloadType.replace("drm/license/",""),drmLoadTime:1e3*t.downloadTime})})),this.player.on(this.player.exports.PlayerEvent.AudioChanged,(function(t){e.eventCallback(p.Event.AUDIOTRACK_CHANGED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SubtitleEnabled,(function(t){e.eventCallback(p.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SubtitleDisabled,(function(t){e.eventCallback(p.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.LicenseValidated,(function(t){t.data.analytics&&void 0!==t.data.analytics.key?e._onLicenseKeyReceived.dispatch({licenseKey:t.data.analytics.key}):e._onLicenseCallFailed.dispatch({})}))},t.prototype.registerUnloadEventListeners=function(){var e=this,t=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=e.lastTrackedCurrentTime;e.eventCallback(p.Event.UNLOAD,{currentTime:t})}e.release()};t=t.bind(!0),this.player.on(this.player.exports.PlayerEvent.Destroy,t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.applySourceProperties=function(e){var t=this.player.getSource();if(null!=t){e.videoTitle=t.title,e.mpdUrl=t.dash,e.m3u8Url=t.hls;var n=(0,y.getSourceInfoFromBitmovinSourceConfig)(t.progressive,this.player);e.progUrl=n.progUrl,"progressive"===this.player.getStreamType()&&(e.videoBitrate=n.progBitrate)}},t.prototype.applySubtitleProperties=function(e){var t;this.player.subtitles&&(t=this.player.subtitles.list().find((function(e){return!0===e.enabled}))),e.subtitleEnabled=null!=t,e.subtitleLanguage=null!=t?t.lang:null},t.prototype.applyPlaybackQualityProperties=function(e){var t=this.player.getPlaybackVideoData();null!==t&&(e.videoBitrate=t.bitrate,e.videoPlaybackHeight=t.height,e.videoPlaybackWidth=t.width,e.videoCodec=t.codec);var n=this.player.getPlaybackAudioData();null!==n&&(e.audioBitrate=n.bitrate,e.audioCodec=n.codec)},t.prototype.applyCastingProperties=function(e){var t=this.player.isCasting()||this.player.isAirplayActive()||!1;if(e.isCasting=t,t)if(this.player.isAirplayActive())e.castTech=d.CastTech.AirPlay;else{var n=this.player.getConfig().remotecontrol;if(null!=n)switch(n.type){case"googlecast":e.castTech=d.CastTech.GoogleCast;break;case"websocket":e.castTech=d.CastTech.WebSocket}}},t.prototype.allowSeeking=function(e){var t=e;return Math.abs(t.position-t.seekTarget)>I.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD},t}(C.InternalAdapter);t.Bitmovin8InternalAdapter=R},8700:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8SegmentTrackerAdapter=void 0;var r=n(1700),i=function(){function e(e,t){var n=this;this.handleSegmentPlaybackEvent=function(e){n.segmentTracker.removeSegment(e.url)},this.segmentTracker=t,e.on(e.exports.PlayerEvent.DownloadFinished,(function(e){return n.handleOnDownloadFinishEvent(e)})),e.on(e.exports.PlayerEvent.SegmentPlayback,(function(e){return n.handleSegmentPlaybackEvent(e)}))}return e.prototype.getSegmentTracker=function(){return this.segmentTracker},e.prototype.handleOnDownloadFinishEvent=function(e){if(0===e.downloadType.indexOf("media/video")){var t=e.url,n={name:r.getURLResourceName(t),url:t,timestamp:e.timestamp};this.segmentTracker.addSegment(n)}},e}();t.Bitmovin8SegmentTrackerAdapter=i},1340:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8SpeedMeterAdapter=void 0;var n=function(){function e(e,t){var n=this;this.meter=t,e.on(e.exports.PlayerEvent.DownloadFinished,(function(e){return n.handleOnDownloadFinishEvent(e)}))}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleOnDownloadFinishEvent=function(e){e.success&&0===e.downloadType.indexOf("media/video")&&this.meter.addMeasurement({duration:e.downloadTime,size:e.size,timeToFirstByte:e.timeToFirstByte,timestamp:new Date,httpStatus:e.httpStatus})},e}();t.Bitmovin8SpeedMeterAdapter=n},5109:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CAFv3InternalAdapter=void 0;var a=n(3395),o=n(4057),s=n(6473),l=n(8458),u=n(3909),c=n(2033),d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.context=t,r.getPlayerName=function(){return s.Player.CHROMECAST_SHAKA},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return!(!r.currentItem||!r.currentItem.autoplay)&&r.currentItem.autoplay},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.stateMachine=new a.HTML5AnalyticsStateMachine(r.stateMachineCallbacks,r.opts),r.playerManager=t.getPlayerManager(),r.isSeeking=!1,r}return i(t,e),t.prototype.initialize=function(e){return this.register(),[new u.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.getPlayerVersion=function(){return window.cast&&window.cast.framework?window.cast.framework.VERSION:"unknown"},t.prototype.sourceChange=function(e,t){this.stateMachine.sourceChange(e,t,this.playerManager.getCurrentTimeSec())},t.prototype.getCurrentPlaybackInfo=function(){var e=this.playerManager.getStats();return{isLive:this.getIsLive(),playerTech:this.getPlayerTech(),videoDuration:(0,c.normalizeVideoDuration)(this.mediaInformation?this.mediaInformation.duration:0),videoPlaybackHeight:e.height,videoPlaybackWidth:e.width,audioCodec:this.activeAudioTrack?this.activeAudioTrack.trackContentType:void 0,audioLanguage:this.activeAudioTrack?this.activeAudioTrack.language:void 0,subtitleLanguage:this.activeTextTracks?this.activeTextTracks.map((function(e){return e.language})).join(","):void 0,droppedFrames:0}},t.prototype.register=function(){var e=this;this.playerManager.addEventListener("PLAYER_LOADING",(function(t){e.eventCallback(o.Event.SETUP,{})})),this.playerManager.addEventListener("PLAYER_LOAD_COMPLETE",(function(t){var n=e.playerManager.getAudioTracksManager();e.activeAudioTrack=n.getActiveTrack();var r=e.playerManager.getTextTracksManager();e.activeTextTracks=r.getActiveTracks();var i=e.playerManager.getQueueManager();e.currentItem=i.getCurrentItem(),e.mediaInformation=t.media,e.eventCallback(o.Event.READY,{})})),this.playerManager.addEventListener("PLAY",(function(t){e.eventCallback(o.Event.PLAY,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("PAUSE",(function(t){e.onPaused(e.playerManager.getCurrentTimeSec())})),this.playerManager.addEventListener("ERROR",(function(t){var n=null!=t.error?t.error:void 0;e.eventCallback(o.Event.ERROR,{currentTime:e.playerManager.getCurrentTimeSec(),code:t.detailedErrorCode,message:t.reason,legacyData:n,data:{additionalData:JSON.stringify(n)}})})),this.playerManager.addEventListener("SEEKING",(function(t){e.isSeeking=!0,e.onPaused(t.currentMediaTime),e.eventCallback(o.Event.SEEK,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("SEEKED",(function(t){e.isSeeking=!1,e.eventCallback(o.Event.SEEKED,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("STALLED",(function(e){})),this.playerManager.addEventListener("BUFFERING",(function(t){!e.isSeeking&&t.isBuffering&&e.eventCallback(o.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.playerManager.addEventListener("TIME_UPDATE",(function(t){e.isSeeking||e.eventCallback(o.Event.TIMECHANGED,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("REQUEST_LOAD",(function(t){e.currentItem&&e.eventCallback(o.Event.PLAYLIST_TRANSITION,{currentTime:e.playerManager.getCurrentTimeSec()})}))},t.prototype.onPaused=function(e){this.eventCallback(o.Event.PAUSE,{currentTime:e})},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.playerManager.getCurrentTimeSec()},enumerable:!1,configurable:!0}),t.prototype.getIsLive=function(){return!(!this.mediaInformation||"LIVE"!==this.mediaInformation.streamType)||(!!this.playerManager.getLiveSeekableRange()||void 0)},t}(n(9782).InternalAdapter);t.CAFv3InternalAdapter=d},4827:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashjsInternalAdapter=void 0;var a=n(4057),o=n(9624),s=n(6473),l=n(8458),u=n(3909),c=n(6767),d=function(e){function t(t,n){var r=e.call(this,void 0,n)||this;return r.mediaPlayer=t,r.getPlayerName=function(){return s.Player.DASHJS},r.getPlayerVersion=function(){return r.mediaPlayer.getVersion()},r}return i(t,e),t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t);var r=null;try{r=this.mediaPlayer.getVideoElement()}catch(e){}return r?(this.setMediaElement(r),this.registerMediaElementEventsForDashJS()):this.mediaPlayer.on("manifestLoaded",(function(){try{r=n.mediaPlayer.getVideoElement(),n.setMediaElement(r),n.registerMediaElementEventsForDashJS()}catch(e){c.logger.errorMessageToUser("Something went wrong while getting underlying HTMLVideoElement. Not possible to attach adapter and initialize Bitmovin Analytics. Error: ",e),n.release()}}),this),[new u.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},t.prototype.registerMediaElementEventsForDashJS=function(){var e=this,t=this.mediaElement;t&&this.listenToMediaElementEvent("playing",(function(){var n=t.currentTime;e.needsFirstPlayIntent=!1,e.eventCallback(a.Event.TIMECHANGED,{currentTime:n})}))},t.prototype.getMIMEType=function(){return o.MIMETypes.DASH},t.prototype.getStreamURL=function(){if(this.mediaPlayer){var e=this.mediaPlayer.getSource();return e?e.toString():void 0}},t.prototype.getCurrentQualityLevelInfo=function(){if(!this.mediaPlayer)return null;try{var e=this.mediaPlayer.getBitrateInfoListFor("video")[this.mediaPlayer.getQualityFor("video")];return null==e?null:{width:e.width,height:e.height,bitrate:e.bitrate}}catch(e){c.logger.warning("Quality information not available")}return null},t}(n(3434).HTML5InternalAdapter);t.DashjsInternalAdapter=d},3434:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5InternalAdapter=void 0;var o=n(3395),s=n(5939),l=n(4057),u=n(9624),c=n(6473),d=n(2108),E=n(5001),p=n(2033),h=n(1700),A=n(1700),f=n(9782),m=n(6009);t.HTML5InternalAdapter=function(e){function t(t,n){var r=e.call(this,n)||this;return r.mediaElement=t,r.onBeforeUnLoadEvent=!1,r.previousMutedValue=!1,r.getPlayerName=function(){return c.Player.HTML5},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return!!r.mediaElement&&r.mediaElement.autoplay},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.isLive=function(){return!!r.mediaElement&&r.mediaElement.duration===1/0},r.initializeStateMachine(),r.mediaElEventHandlers=[],r.bufferingTimeout=void 0,r.isBuffering=!1,r.lastIsLiveStatus=!1,r.isPaused=!1,r.isSeeking=!1,r.previousMediaTime=0,r.previousClientTime=0,r.needsReadyEvent=!0,r.needsFirstPlayIntent=!0,r.mediaElementSet=!1,r.videoCompletionTracker=new s.default,r.playerStatisticsProvider=new m.default(t),r}return i(t,e),Object.defineProperty(t.prototype,"segments",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0,this.playerStatisticsProvider.reset()},t.prototype.initialize=function(e){return this.mediaElement&&this.setMediaElement(),this.registerWindowEvents(),[]},t.prototype.getStreamSources=function(e){if(!e)return{};switch(this.getStreamType()){case"hls":return{m3u8Url:e};case"dash":return{mpdUrl:e};default:return{progUrl:e}}},t.prototype.getCurrentPlaybackInfo=function(){var e=a(a(a({},this.getCommonPlaybackInfo()),this.getStreamSources(this.getStreamURL())),{streamFormat:this.getStreamType(),isLive:this.isLive(),size:(0,A.isVideoInFullscreen)()?d.PlayerSize.Fullscreen:d.PlayerSize.Window,playerTech:this.getPlayerTech(),droppedFrames:this.playerStatisticsProvider.getDroppedFrames()});this.mediaElement&&(e=a(a({},e),{videoDuration:(0,p.normalizeVideoDuration)(this.mediaElement.duration),isMuted:this.mediaElement.muted,videoWindowHeight:this.mediaElement.height,videoWindowWidth:this.mediaElement.width}));var t=this.getCurrentQualityLevelInfo();return t&&(e=a(a({},e),{videoPlaybackHeight:t.height,videoPlaybackWidth:t.width,videoBitrate:t.bitrate})),e},Object.defineProperty(t.prototype,"currentTime",{get:function(){if(!this.mediaElement)throw new Error("No media attached");return this.mediaElement.currentTime},enumerable:!1,configurable:!0}),t.prototype.setMediaElement=function(e){if(void 0===e&&(e=null),e&&this.mediaElement&&(this.unregisterMediaElement(),this.mediaElementSet=!1),e&&(this.mediaElement=e),!this.mediaElement)throw new Error("No media element owned");if(this.mediaElementSet)throw new Error("Media element already set (only call this once)");this.mediaElementSet=!0,this.registerMediaElement(),this.onMaybeReady()},t.prototype.getMIMEType=function(){var e=this.getStreamURL();if(e&&void 0!==e)return(0,u.getMIMETypeFromFileExtension)(e)},t.prototype.getStreamType=function(){var e=this.getMIMEType();if(e)return(0,E.getStreamTypeFromMIMEType)(e)},t.prototype.getStreamURL=function(){var e=this.mediaElement;if(e)return e.src},t.prototype.resetMedia=function(){this.mediaElement=void 0,this.mediaElEventHandlers=[],window.clearTimeout(this.bufferingTimeout)},t.prototype.registerMediaElement=function(){var e=this,t=this.mediaElement;t&&(this.wrapMediaElementLoad(t),this.listenToMediaElementEvent("loadstart",(function(){e.eventCallback(l.Event.READY,{})})),this.listenToMediaElementEvent("loadedmetadata",(function(){1===t.readyState&&(e.checkQualityLevelAttributes(!0),null!=e.mediaElement&&(e.videoCompletionTracker.reset(),e.videoCompletionTracker.setVideoDuration(e.mediaElement.duration),e.previousMutedValue=e.mediaElement.muted))})),this.listenToMediaElementEvent("play",(function(){var n=t.currentTime;e.needsFirstPlayIntent=!1,e.eventCallback(l.Event.PLAY,{currentTime:n})})),this.listenToMediaElementEvent("pause",(function(){e.onPaused()})),this.listenToMediaElementEvent("playing",(function(){clearTimeout(e.bufferingTimeout),e.isPaused=!1})),this.listenToMediaElementEvent("error",(function(){var n,r,i=t.currentTime,a=t.error;e.eventCallback(l.Event.ERROR,{currentTime:i,code:null!==(n=null==a?void 0:a.code)&&void 0!==n?n:void 0,message:null!==(r=null==a?void 0:a.message)&&void 0!==r?r:void 0,data:{}})})),this.listenToMediaElementEvent("volumechange",(function(){var n=t.muted,r=t.currentTime,i=t.volume,a=e.isAudioMuted(n,i);e.previousMutedValue!==a&&(a?e.eventCallback(l.Event.MUTE,{currentTime:r}):e.eventCallback(l.Event.UN_MUTE,{currentTime:r}),e.previousMutedValue=a)})),this.listenToMediaElementEvent("seeking",(function(){var n=t.currentTime;e.eventCallback(l.Event.SEEK,{currentTime:n})})),this.listenToMediaElementEvent("seeked",(function(){var n=t.currentTime;clearTimeout(e.bufferingTimeout),e.eventCallback(l.Event.SEEKED,{currentTime:n})})),this.listenToMediaElementEvent("timeupdate",(function(){var n=t.currentTime;e.isBuffering=!1,e.isSeeking=!1,e.needsFirstPlayIntent||(e.isPaused||e.eventCallback(l.Event.TIMECHANGED,{currentTime:n}),e.checkQualityLevelAttributes(),e.checkSeeking(),e.checkPlayheadProgress(),e.previousMediaTime=n)})),this.listenToMediaElementEvent("stalled",(function(){})),this.listenToMediaElementEvent("waiting",(function(){e.checkSeeking(),e.onBuffering()})))},t.prototype.listenToMediaElementEvent=function(e,t){if(!this.mediaElement)throw new Error("No media attached");var n=t.bind(this);this.mediaElEventHandlers.push({event:e,handler:n}),this.mediaElement.addEventListener(e,n,!1)},t.prototype.onMaybeReady=function(){this.needsReadyEvent&&this.mediaElement&&(this.needsReadyEvent=!1,this.getCurrentPlaybackInfo(),this.videoCompletionTracker.reset(),this.videoCompletionTracker.setVideoDuration(this.mediaElement.duration),this.eventCallback(l.Event.READY,{currentTime:this.currentTime}))},t.prototype.unregisterMediaElement=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement;this.mediaElEventHandlers.forEach((function(t){e.removeEventListener(t.event,t.handler)})),this.resetMedia()},t.prototype.onBuffering=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement.currentTime;this.isBuffering||this.isPaused&&!this.isSeeking||(this.isSeeking?this.eventCallback(l.Event.SEEK,{currentTime:e}):this.eventCallback(l.Event.START_BUFFERING,{currentTime:e}),this.isBuffering=!0)},t.prototype.onPaused=function(e){if(!this.isPaused){if(!this.mediaElement)throw new Error("No media attached");e||(e=this.mediaElement.currentTime),this.eventCallback(l.Event.PAUSE,{currentTime:e}),this.isPaused=!0}},t.prototype.registerWindowEvents=function(){this.windowEventTracker.addEventListener("beforeunload",this.onPageClose.bind(this)),this.windowEventTracker.addEventListener("unload",this.onPageClose.bind(this))},t.prototype.onPageClose=function(){if(!this.onBeforeUnLoadEvent){this.onBeforeUnLoadEvent=!0;var e=this.mediaElement,t=void 0;null!=e&&(t=e.currentTime),this.eventCallback(l.Event.UNLOAD,{currentTime:t})}this.release()},t.prototype.checkPlayheadProgress=function(){var e=this;if(!this.mediaElement)throw new Error("No media attached");var n=this.mediaElement;n.paused&&this.onPaused(),clearTimeout(this.bufferingTimeout),this.bufferingTimeout=window.setTimeout((function(){n.paused||n.ended&&!e.isBuffering||n.currentTime-e.previousMediaTime<t.BUFFERING_TIMECHANGED_TIMEOUT&&e.onBuffering()}),t.BUFFERING_TIMECHANGED_TIMEOUT)},t.prototype.checkQualityLevelAttributes=function(e){if(void 0===e&&(e=!1),!this.mediaElement)throw new Error("No media attached");var t=this.mediaElement,n=this.getCurrentQualityLevelInfo();if(n){var r=n.bitrate,i=n.width,a=n.height,o=this.isLive();if(o!==this.lastIsLiveStatus&&(this.lastIsLiveStatus=o),null!=r&&this.qualityChangeService.shouldAllowVideoQualityChange(r)){this.qualityChangeService.setVideoBitrate(r);var s={width:i,height:a,bitrate:r,currentTime:t.currentTime};e||this.eventCallback(l.Event.VIDEO_CHANGE,s)}}},t.prototype.sourceChange=function(e,t){this.stateMachine.sourceChange(e,t,this.mediaElement?this.mediaElement.currentTime:void 0)},t.prototype.getSelectedSubtitleFromMediaElement=function(e){if(null!=e.textTracks){for(var t=0,n=e.textTracks;t<n.length;t++){var r=n[t];if(null!=r.mode&&"showing"===r.mode){var i=null!=r.language&&r.language.length>0;return{enabled:i,language:i?r.language:void 0}}}return{enabled:!1}}},t.prototype.initializeStateMachine=function(){this.stateMachine=new o.HTML5AnalyticsStateMachine(this.stateMachineCallbacks,this.opts),this.stateMachine.callEvent(l.Event.SETUP,{},0)},t.prototype.wrapMediaElementLoad=function(e){var t=this,n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t.sourceChange({},h.getCurrentTimestamp()),n.apply(e,r)}},t.prototype.checkSeeking=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement.currentTime,t=Math.abs(e-this.previousMediaTime),n=(h.getCurrentTimestamp()-this.previousClientTime)/1e3;t>2*n&&(this.isSeeking=!0,this.onPaused(this.previousMediaTime+n)),this.previousClientTime=h.getCurrentTimestamp()},t.BUFFERING_TIMECHANGED_TIMEOUT=1e3,t}(f.InternalAdapter)},889:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLVideoElementInternalAdapter=void 0;var a=n(6473),o=n(1700),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.getPlayerName=function(){return a.Player.HTML5},r.getPlayerVersion=function(){var e=(0,o.getBrowserInfo)();return"".concat(e.name," ").concat(e.version)},r}return i(t,e),t.prototype.getStreamURL=function(){return this.mediaElement?this.mediaElement.currentSrc:void 0},t.prototype.getCurrentQualityLevelInfo=function(){return{bitrate:void 0,width:this.mediaElement?this.mediaElement.videoWidth:void 0,height:this.mediaElement?this.mediaElement.videoHeight:void 0}},t}(n(3434).HTML5InternalAdapter);t.HTMLVideoElementInternalAdapter=s},7082:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInternalAdapter=void 0;var o=n(5032),s=n(4057),l=n(9624),u=n(6473),c=n(8458),d=n(3909),E=n(3434),p=n(5003),h=function(e){function t(t,n){var r=e.call(this,void 0,n)||this;return r.hls=t,r.getPlayerName=function(){return u.Player.HLSJS},r.getPlayerVersion=function(){return r.hls.constructor.version},r.isLive=function(){var e=r.hls;if(!e.levels||!e.currentLevel)return!1;if(e.currentLevel<0)return!1;var t=e.levels[e.currentLevel];return!(!t||!t.details)&&t.details.live},r.onDestroying=function(){r.eventCallback(s.Event.SOURCE_UNLOADED,{}),r.release()},r.resetMedia(),r.speedMeter=new p.HlsSpeedMeterAdapter(t,new o.DownloadSpeedMeter).getDownloadSpeedMeter(),r}return i(t,e),Object.defineProperty(t.prototype,"downloadSpeedInfo",{get:function(){return this.speedMeter.getInfo()},enumerable:!1,configurable:!0}),t.prototype.initialize=function(t){return e.prototype.initialize.call(this,t),this.registerHlsEvents(),[new d.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new c.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},t.prototype.clearValues=function(){this.speedMeter.reset()},t.prototype.getCurrentQualityLevelInfo=function(){if(!this.hls.levels)return null;var e=this.hls.levels[this.hls.currentLevel];return e?{bitrate:e.bitrate,width:e.width,height:e.height}:null},t.prototype.getMIMEType=function(){return l.MIMETypes.HLS},t.prototype.getStreamURL=function(){return this.hls.url},t.prototype.registerHlsEvents=function(){this.hls.on("hlsMediaAttaching",this.onMediaAttaching.bind(this)),this.hls.on("hlsMediaDetaching",this.onMediaDetaching.bind(this)),this.hls.on("hlsManifestLoading",this.onManifestLoading.bind(this)),this.hls.on("hlsAudioTrackSwitched",this.onAudioTrackSwitched.bind(this)),this.hls.on("hlsSubtitleTrackSwitch",this.onSubtitleLanguageSwitched.bind(this)),this.hls.on("hlsDestroying",this.onDestroying.bind(this)),this.hls.on("hlsError",this.onHlsError.bind(this)),this.hls.media&&(this.onMediaAttaching(),this.onManifestLoading())},t.prototype.onMediaAttaching=function(){this.mediaElement||(this.mediaElement=this.hls.media,this.registerMediaElement(),this.onMaybeReady())},t.prototype.onMediaDetaching=function(){this.unregisterMediaElement()},t.prototype.onManifestLoading=function(){this.onMaybeReady()},t.prototype.getCurrentPlaybackInfo=function(){var t=this.getSelectedSubtitleLanguage();return a(a({},e.prototype.getCurrentPlaybackInfo.call(this)),{audioLanguage:this.getSelectedAudioLanguage(),subtitleEnabled:null!=t?t.enabled:void 0,subtitleLanguage:null!=t?t.language:void 0})},t.prototype.onHlsError=function(e,t){if(!t||t.fatal){var n=this.mediaElement,r=void 0;null!=n&&(r=n.currentTime);var i=null!=t?"".concat(t.type,": ").concat(t.details):void 0;this.eventCallback(s.Event.ERROR,{currentTime:r,code:this.getErrorCodeFromHlsErrorType(t.type),message:i,data:{}})}},t.prototype.onAudioTrackSwitched=function(e,t){var n,r=this.mediaElement;null!=r&&(n=r.currentTime),this.eventCallback(s.Event.AUDIOTRACK_CHANGED,{currentTime:n})},t.prototype.onSubtitleLanguageSwitched=function(e,t){var n,r=this.mediaElement;null!=r&&(n=r.currentTime),this.eventCallback(s.Event.SUBTITLE_CHANGE,{currentTime:n})},t.prototype.getErrorCodeFromHlsErrorType=function(e){switch(e){case"networkError":return 2;case"mediaError":return 3;case"keySystemError":return 4;case"muxError":return 5;default:return 1}},t.prototype.getSelectedAudioLanguage=function(){if(!(null==this.hls.audioTrack||this.hls.audioTrack<0))return this.hls.audioTracks[this.hls.audioTrack].lang},t.prototype.getSelectedSubtitleLanguage=function(){if(null!=this.hls.subtitleDisplay){var e=this.hls.subtitleTrack>=0&&!0===this.hls.subtitleDisplay;return{enabled:e,language:e?this.hls.subtitleTracks[this.hls.subtitleTrack].lang:void 0}}var t=this.hls.subtitleTrackController;if(null!=t&&null!=t.media)return this.getSelectedSubtitleFromMediaElement(t.media)},t}(E.HTML5InternalAdapter);t.HlsInternalAdapter=h},5003:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlsSpeedMeterAdapter=void 0;var n=function(){function e(e,t){var n=this;this.meter=t,e.on(e.constructor.Events.FRAG_LOADED,(function(e,t){return n.handleFragmentLoadedEvent(t)}))}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleFragmentLoadedEvent=function(e){"main"===e.frag.type&&this.meter.addMeasurement({duration:(e.stats.tload-e.stats.trequest)/1e3,size:e.stats.total,timeToFirstByte:(e.stats.tfirst-e.stats.trequest)/1e3,timestamp:new Date,httpStatus:e.networkDetails.status})},e}();t.HlsSpeedMeterAdapter=n},9782:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalAdapter=void 0;var i=n(3382),a=n(415),o=n(4057),s=n(3318),l=n(6767),u=n(1700),c=n(3068),d=function(){function e(e){var t=this;this.stateMachineCallbacks=r({},s.defaultStateMachineCallbacks),this.qualityChangeService=new a.default,this._onLicenseKeyReceived=new i.EventDispatcher,this._onLicenseCallFailed=new i.EventDispatcher,this.drmPerformanceInfo=void 0,this._windowEventTracker=new c.WindowEventTracker,this.eventCallback=function(e,n){n=n||{},t.stateMachine?t.stateMachine.callEvent(e,n,(0,u.getCurrentTimestamp)()):l.logger.log("Bitmovin Analytics: StateMachine isn't ready yet")},e||(e={starttime:void 0}),e.starttime||(e.starttime=(0,u.getCurrentTimestamp)()),this.opts=e}return Object.defineProperty(e.prototype,"windowEventTracker",{get:function(){return this._windowEventTracker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLicenseKeyReceived",{get:function(){return this._onLicenseKeyReceived},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLicenseCallFailed",{get:function(){return this._onLicenseCallFailed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"downloadSpeedInfo",{get:function(){return{segmentsDownloadCount:0,segmentsDownloadSize:0,segmentsDownloadTime:0,avgDownloadSpeed:0,minDownloadSpeed:0,maxDownloadSpeed:0,avgTimeToFirstByte:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segments",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.release=function(){this.stateMachine.resetIntervals(),this.stateMachineCallbacks.release(),this.resetSourceRelatedState(),this._windowEventTracker.release()},e.prototype.getCommonPlaybackInfo=function(){return{screenHeight:screen.height,screenWidth:screen.width}},e.prototype.clearValues=function(){},e.prototype.clearSegments=function(){},e.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0},e.prototype.setCustomData=function(e){var t=this.stateMachine.currentState;!this.stateMachine.currentState||"PAUSE"!==this.stateMachine.currentState&&"PLAYING"!==this.stateMachine.currentState?this.stateMachineCallbacks.customdatachange(void 0,void 0,{values:e}):(this.eventCallback(o.Event.CUSTOM_DATA_CHANGE,{currentTime:this.currentTime}),this.eventCallback(o.Event[t],{values:e,currentTime:this.currentTime}))},e.prototype.isAudioMuted=function(e,t){return e||t<.01},e}();t.InternalAdapter=d},4102:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShakaInternalAdapter=void 0;var a=n(4057),o=n(9624),s=n(6473),l=n(8458),u=n(3909),c=n(6767),d=function(e){function t(t,n){var r=e.call(this,t.getMediaElement(),n)||this;return r.player=t,r.getPlayerName=function(){return s.Player.SHAKA},r.getPlayerVersion=function(){return r.player.constructor.version},r.isLive=function(){return!!r.player&&r.player.isLive()},r.onUnloading=function(){r.eventCallback(a.Event.SOURCE_UNLOADED,{}),r.release()},r}return i(t,e),t.prototype.initialize=function(t){var n,r=this;e.prototype.initialize.call(this,t);try{n=this.player.getMediaElement()}catch(e){}if(null==n){var i=function(e){if("media-source"===e.state)try{r.player.removeEventListener("onstatechange",i),n=r.player.getMediaElement(),r.setMediaElement(n)}catch(e){c.logger.errorMessageToUser("Something went wrong while getting underlying HTMLVideoElement. Not possible to attach adapter and initialize Bitmovin Analytics. Error: ",e),r.release()}};this.player.addEventListener("onstatechange",i),this.player.addEventListener("unloading",this.onUnloading.bind(this))}else this.setMediaElement(n);return[new u.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},t.prototype.getMIMEType=function(){return o.MIMETypes.DASH},t.prototype.getStreamURL=function(){return this.player?this.player.getAssetUri():null},t.prototype.getCurrentQualityLevelInfo=function(){var e=this.player.getVariantTracks().filter((function(e){return e.active})).filter((function(e){return e.videoCodec||void 0!==e.videoId}))[0];return e?{bitrate:e.videoBandwidth||e.bandwidth,width:e.width,height:e.height}:null},t}(n(3434).HTML5InternalAdapter);t.ShakaInternalAdapter=d},6038:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsInternalAdapter=void 0;var o=n(5918),s=n(5939),l=n(6443),u=n(4057),c=n(9624),d=n(6473),E=n(2108),p=n(5001),h=n(8458),A=n(3909),f=n(2033),m=n(9065),v=function(e){function t(t,n){var r=e.call(this,n)||this;return r.player=t,r._subtitleInfo={enabled:!1},r.onBeforeUnLoadEvent=!1,r.previousTime=0,r.getPlayerVersion=function(){return window.videojs?window.videojs.VERSION:"unknown"},r.getPlayerName=function(){return d.Player.VIDEOJS},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return!0===r.player.autoplay()},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.stateMachine=new o.VideojsAnalyticsStateMachine(r.stateMachineCallbacks,r.opts),r.videoCompletionTracker=new s.default,r}return i(t,e),t.prototype.initialize=function(e){return this.register(),[new A.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new h.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.getStreamType=function(e){var t,n,r=(0,c.getMIMETypeFromFileExtension)(e);return r||(r=null===(n=(t=this.player).currentType)||void 0===n?void 0:n.call(t))?(0,p.getStreamTypeFromMIMEType)(r):void 0},t.prototype.getStreamSources=function(e){switch(this.getStreamType(e)){case"hls":return{m3u8Url:e};case"dash":return{mpdUrl:e};default:return{progUrl:e}}},t.prototype.getCurrentPlaybackInfo=function(){this.selectedAudioLanguage=this.getSelectedAudioTrackLanguage(this.player);var e=this.getCodecInfo(this.player.tech({IWillNotUseThisInPlugins:!0})),t=a(a(a({},this.getCommonPlaybackInfo()),this.getStreamSources(this.player.currentSrc())),{streamFormat:this.getStreamType(this.player.currentSrc()),isLive:this.player.duration()===1/0,size:this.player.isFullscreen()?E.PlayerSize.Fullscreen:E.PlayerSize.Window,playerTech:this.getPlayerTech(),isMuted:this.player.muted(),videoDuration:(0,f.normalizeVideoDuration)(this.player.duration()),videoWindowHeight:this.player.height(),videoWindowWidth:this.player.width(),videoPlaybackHeight:this.player.videoHeight(),videoPlaybackWidth:this.player.videoWidth(),audioLanguage:this.selectedAudioLanguage,subtitleEnabled:this._subtitleInfo.enabled,subtitleLanguage:this._subtitleInfo.language,videoCodec:null==e?void 0:e.videoCodec,audioCodec:null==e?void 0:e.audioCodec,droppedFrames:0}),n=this.getCurrentQualityLevelInfo();return n&&(t.videoPlaybackWidth=n.width||t.videoPlaybackWidth,t.videoPlaybackWidth=n.height||t.videoPlaybackHeight,t.videoBitrate=n.bitrate),t},t.prototype.getCurrentQualityLevelInfo=function(){return null},t.prototype.register=function(){var e=this,t=this;this.player.on("loadstart",(function(){t.eventCallback(u.Event.MANUAL_SOURCE_CHANGE,{config:{}})})),this.player.on("loadedmetadata",(function(){t.videoCompletionTracker.reset(),t.videoCompletionTracker.setVideoDuration(this.duration()),t.previousTime=0,t.eventCallback(u.Event.SOURCE_LOADED,{})})),this.player.ready((function(){t._subtitleInfo=t.getSubtitleInfo(this),t.eventCallback(u.Event.READY,{})})),this.player.on("play",(function(){t.eventCallback(u.Event.PLAY,{currentTime:this.currentTime()})})),this.player.on("pause",(function(){this.seeking()||t.eventCallback(u.Event.PAUSE,{currentTime:this.currentTime()})})),this.player.on("error",(function(){var e=this.error();t.eventCallback(u.Event.ERROR,{currentTime:this.currentTime(),code:e.code,message:e.message,data:{}})})),this.player.on("volumechange",(function(){var e=this.muted(),n=this.volume(),r=t.isAudioMuted(e,n);this.previousMutedValue!==r&&(r?t.eventCallback(u.Event.MUTE,{currentTime:this.currentTime()}):t.eventCallback(u.Event.UN_MUTE,{currentTime:this.currentTime()}),this.previousMutedValue=r)})),this.player.on("seeking",(function(){t.eventCallback(u.Event.SEEK,{currentTime:null!=t.previousTime?t.previousTime:this.currentTime()})})),this.player.on("seeked",(function(){t.eventCallback(u.Event.SEEKED,{currentTime:this.currentTime()})})),this.player.on("texttrackchange",(function(){var e=t.getSubtitleInfo(this),n=null==t._subtitleInfo||(0,m.isDifferentSubtitleInfo)(t._subtitleInfo,e);t._subtitleInfo=e,n&&t.eventCallback(u.Event.SUBTITLE_CHANGE,{currentTime:this.currentTime()})})),this.player.audioTracks().on("change",(function(){var e=t.getSelectedAudioTrackLanguage(t.player);null!=e&&e!==t.selectedAudioLanguage&&t.eventCallback(u.Event.AUDIOTRACK_CHANGED,{currentTime:t.player.currentTime()})})),this.player.on("stalled",(function(){t.eventCallback(u.Event.START_BUFFERING,{currentTime:this.currentTime()})})),this.player.on("waiting",(function(){t.eventCallback(u.Event.START_BUFFERING,{currentTime:this.currentTime()})})),this.player.on("timeupdate",(function(){this.seeking()||(t.previousTime=this.currentTime()),t.eventCallback(u.Event.TIMECHANGED,{currentTime:this.currentTime()});var e=this.tech({IWillNotUseThisInPlugins:!0});if(e.vhs||e.hls){var n=t.getMediaAttributes(e);if(!n||!n.bitrate)return;if(t.qualityChangeService.shouldAllowVideoQualityChange(n.bitrate)){var r={width:n.width,height:n.height,bitrate:n.bitrate,currentTime:this.currentTime()};t.eventCallback(u.Event.VIDEO_CHANGE,r),t.qualityChangeService.setVideoBitrate(n.bitrate)}}}));var n=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=void 0;null!=e.player&&(t=e.player.currentTime()),e.eventCallback(u.Event.UNLOAD,{currentTime:t})}e.release()};n=n.bind(this),this.player.on("dispose",n),this.windowEventTracker.addEventListener("beforeunload",n),this.windowEventTracker.addEventListener("unload",n)},t.prototype.sourceChange=function(e,t){this.videoCompletionTracker.reset(),this.videoCompletionTracker.setVideoDuration(this.player.duration()),this.previousTime=0,this.stateMachine.sourceChange(e,t,this.player.currentTime())},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.player.currentTime()},enumerable:!1,configurable:!0}),t.prototype.getSelectedAudioTrackLanguage=function(e){for(var t=0,n=e.audioTracks();t<n.length;t++){var r=n[t];if(r.enabled)return r.language}},t.prototype.getSubtitleInfo=function(e){for(var t,n=!1,r=0,i=e.textTracks()||[];r<i.length;r++){var a=i[r];if("showing"===a.mode){n=!0,t=a.language;break}}return{enabled:n,language:t}},t.prototype.getMediaAttributes=function(e){var t;if(e&&(e.vhs?t=e.vhs:e.hls&&(t=e.hls),t&&t.playlists&&"function"==typeof t.playlists.media)){var n=t.playlists.media();if(n){var r=n.attributes;if(r&&0!==Object.keys(r).length)return{bitrate:r.BANDWIDTH,width:(r.RESOLUTION||{}).width,height:(r.RESOLUTION||{}).height,codecs:r.CODECS}}}},t.prototype.getCodecInfo=function(e){var t=this.getMediaAttributes(e);if(t&&t.codecs){var n=t.codecs.split(",");if(n)return{videoCodec:n.find((function(e){return l.isVideoCodec(e)})),audioCodec:n.find((function(e){return l.isAudioCodec(e)}))}}},t}(n(9782).InternalAdapter);t.VideojsInternalAdapter=v},4334:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdCallbacks=void 0;var n=function(){this.onAdStarted=function(e){},this.onAdFinished=function(e){},this.onAdBreakStarted=function(e){},this.onAdBreakFinished=function(e){},this.onAdClicked=function(e){},this.onAdError=function(e){},this.onAdManifestLoaded=function(e){},this.onAdQuartile=function(e){},this.onAdSkipped=function(e){},this.onPlay=function(e){},this.onPause=function(e){},this.onBeforeUnload=function(){}};t.AdCallbacks=n},1078:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AdModule=void 0;var r=n(4334),i=function(){function e(e,t){var n=this;this.player=e,this.windowEventTracker=t,this.adCallbacks=new r.AdCallbacks,this.isLinearAdActive=function(){return n.player.ads&&n.player.ads.isLinearAdActive()||!1},this.getContainer=function(){return n.player.getContainer()},this.getAdModuleInfo=function(){return n.player.ads?n.player.ads.getModuleInfo():{name:void 0,version:void 0}},this.currentTime=function(){return n.player.getCurrentTime()},this.register()}return e.prototype.register=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.Play,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPlay(t.issuer)})),this.player.on(this.player.exports.PlayerEvent.Paused,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPause(t.issuer)})),this.player.on(this.player.exports.PlayerEvent.AdStarted,(function(t){e.adCallbacks.onAdStarted(t)})),this.player.on(this.player.exports.PlayerEvent.AdFinished,(function(t){e.adCallbacks.onAdFinished(t)})),this.player.on(this.player.exports.PlayerEvent.AdBreakStarted,(function(t){e.adCallbacks.onAdBreakStarted(t)})),this.player.on(this.player.exports.PlayerEvent.AdBreakFinished,(function(t){e.adCallbacks.onAdBreakFinished(t)})),this.player.on(this.player.exports.PlayerEvent.AdClicked,(function(t){e.adCallbacks.onAdClicked(t)})),this.player.on(this.player.exports.PlayerEvent.AdQuartile,(function(t){e.adCallbacks.onAdQuartile(t)})),this.player.on(this.player.exports.PlayerEvent.AdSkipped,(function(t){e.adCallbacks.onAdSkipped(t)})),this.player.on(this.player.exports.PlayerEvent.AdError,(function(t){e.adCallbacks.onAdError(t)})),this.player.on(this.player.exports.PlayerEvent.AdManifestLoaded,(function(t){e.adCallbacks.onAdManifestLoaded(t)}));var t=function(){e.adCallbacks.onBeforeUnload()};this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},e}();t.Bitmovin8AdModule=i},3159:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSInternalAdapter=void 0;var o=n(7659),s=n(978),l=n(6473),u=n(2108),c=n(5001),d=n(2033),E=n(1700),p=n(9782),h=n(6009),A=n(6872),f=n(7222),m=n(2772),v=n(1660),T=n(8977),y=n(8611),S=n(1976),I=n(4163),g=function(e){function t(t,n,r){var i=e.call(this,r)||this;i.player=t,i.sourceUrlProvider=n,i.supportsDeferredLicenseLoading=!1,i.getPlayerVersion=function(){return i.player.getVersion()},i.getPlayerName=function(){return l.Player.AMAZON_IVS},i.getPlayerTech=function(){return"html5"},i.getAutoPlay=function(){return i.player.isAutoplay()},i.getDrmPerformanceInfo=function(){};var a=new T.AmazonIVSPlayerContext(t),u=new s.HeartbeatService(59700,a),c=new o.AmazonIVSStateMachine(i.stateMachineCallbacks,u,i.opts);u.setListener(c),i.stateMachine=c;var d=new v.VideoStartupService(i,a),E=new f.PauseEventDispatcher(i,a),p=new m.PlaybackService(i,a,E,i.qualityChangeService),S=new A.ErrorService(i,a);return i.listener=new y.AmazonIVSPlayerListener(d,p,S),i.playerStatisticsProvider=new h.default(t.getHTMLVideoElement()),i.windowEventListener=new I.WindowEventListener(i.windowEventTracker,i,a),i}return i(t,e),t.prototype.initialize=function(e){var t=this;return this.listener.startMonitoring(this.player),this.windowEventListener.startMonitoring(),S.default.RELEASE.subscribe((function(){t.release()})),[]},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.player.getPosition()},enumerable:!1,configurable:!0}),t.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0,this.playerStatisticsProvider.reset()},t.prototype.getCurrentPlaybackInfo=function(){var e=this.player.getHTMLVideoElement();return a(a(a({droppedFrames:this.playerStatisticsProvider.getDroppedFrames(),isLive:this.player.getDuration()===1/0,isMuted:this.player.isMuted(),playerTech:this.getPlayerTech(),videoWindowWidth:e.clientWidth,videoWindowHeight:e.clientHeight,videoPlaybackHeight:e.videoHeight,videoPlaybackWidth:e.videoWidth,videoBitrate:this.player.getQuality().bitrate,videoDuration:(0,d.normalizeVideoDuration)(this.player.getDuration()),size:E.isVideoInFullscreen()?u.PlayerSize.Fullscreen:u.PlayerSize.Window},this.getVideoAndAudioCodecs()),this.getCommonPlaybackInfo()),{streamFormat:c.StreamTypes.hls,m3u8Url:this.sourceUrlProvider.m3u8Url})},t.prototype.sourceChange=function(e,t){throw new Error("Method not implemented.")},t.prototype.getVideoAndAudioCodecs=function(){var e=this.player.getQuality().codecs.split(",");return 2==e.length?{videoCodec:e[0],audioCodec:e[1]}:{}},t}(p.InternalAdapter);t.AmazonIVSInternalAdapter=g},6872:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorService=void 0;var r=n(4057),i=function(){function e(e,t){this.dispatcher=e,this.playerContext=t}return e.prototype.onError=function(e){var t={currentTime:this.playerContext.position,code:e.code,message:e.message,data:{exceptionMessage:e.message,exceptionStacktrace:[e.source]}};this.dispatcher.eventCallback(r.Event.ERROR,t)},e}();t.ErrorService=i},7222:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PauseEventDispatcher=void 0;var r,i=n(4057);!function(e){e[e.IDLE=0]="IDLE",e[e.PAUSE_SCHEDULED=1]="PAUSE_SCHEDULED",e[e.PAUSE_CANCELLED=2]="PAUSE_CANCELLED"}(r||(r={}));var a=function(){function e(e,t){this.dispatcher=e,this.playerContext=t,this.EVENT_DELAY_MS=10,this.state=r.IDLE}return e.prototype.cancelPause=function(){this.state==r.PAUSE_SCHEDULED&&(this.state=r.PAUSE_CANCELLED)},e.prototype.schedulePauseEvent=function(){var e=this;if(this.state!=r.PAUSE_SCHEDULED){this.state=r.PAUSE_SCHEDULED;var t={currentTime:this.playerContext.position};setTimeout((function(){e.triggerPause(t),e.state=r.IDLE}),this.EVENT_DELAY_MS,this)}},e.prototype.triggerPause=function(e){this.state!=r.PAUSE_CANCELLED&&this.dispatcher.eventCallback(i.Event.PAUSE,e)},e}();t.PauseEventDispatcher=a},2772:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackService=void 0;var r=n(4057),i=function(){function e(e,t,n,r){this.dispatcher=e,this.playerContext=t,this.pauseDispatcher=n,this.qualityChangeService=r,this.ignorePause=!1}return e.prototype.onStartupPlaying=function(){var e=this;this.ignorePause=!0,setTimeout((function(){e.ignorePause=!1}),100)},e.prototype.onPause=function(){this.ignorePause||this.pauseDispatcher.schedulePauseEvent()},e.prototype.onPlaying=function(){this.pauseDispatcher.cancelPause(),this.playing()},e.prototype.onRebuffering=function(){this.pauseDispatcher.cancelPause(),this.startBuffering()},e.prototype.onQualityChange=function(e){this.qualityChange(e)},e.prototype.startBuffering=function(){var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.START_BUFFERING,{currentTime:e})},e.prototype.playing=function(){var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.PLAYING,{currentTime:e})},e.prototype.qualityChange=function(e){if(this.qualityChangeService.shouldAllowVideoQualityChange(e.bitrate)){this.qualityChangeService.setVideoBitrate(e.bitrate);var t=this.playerContext.position;this.dispatcher.eventCallback(r.Event.VIDEO_CHANGE,{currentTime:t})}},e}();t.PlaybackService=i},1660:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartupService=void 0;var r,i=n(4057);!function(e){e[e.SETUP=0]="SETUP",e[e.IDLE=1]="IDLE",e[e.STARTUP=2]="STARTUP",e[e.STARTUP_FINISHED=3]="STARTUP_FINISHED"}(r||(r={}));var a=function(){function e(e,t){this.dispatcher=e,this.playerContext=t,this.state=r.SETUP}return Object.defineProperty(e.prototype,"finishedStartup",{get:function(){return this.state==r.STARTUP_FINISHED},enumerable:!1,configurable:!0}),e.prototype.onInitialized=function(){this.finishSetup()},e.prototype.onPlay=function(){this.startStartup()},e.prototype.onPlaying=function(){this.finishStartup()},e.prototype.finishSetup=function(){this.state=r.IDLE;var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.READY,{currentTime:e})},e.prototype.startStartup=function(){if(this.state==r.IDLE){this.state=r.STARTUP;var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.PLAY,{currentTime:e})}},e.prototype.finishStartup=function(){if(this.state==r.STARTUP){this.state=r.STARTUP_FINISHED;var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.PLAYING,{currentTime:e})}},e}();t.VideoStartupService=a},8977:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerContext=void 0;var n=function(){function e(e){this.player=e}return Object.defineProperty(e.prototype,"position",{get:function(){return this.player.getPosition()},enumerable:!1,configurable:!0}),e}();t.AmazonIVSPlayerContext=n},8611:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerListener=t.IVS_PLAYER_EVENT=void 0;var r=n(6767);t.IVS_PLAYER_EVENT={DURATION_CHANGED:"PlayerDurationChanged",ERROR:"PlayerError",INITIALIZED:"PlayerInitialized",QUALITY_CHANGED:"PlayerQualityChanged",REBUFFERING:"PlayerRebuffering",SEEK_COMPLETED:"PlayerSeekCompleted",TIME_UPDATE:"PlayerTimeUpdate",PLAYBACK_RATE_CHANGED:"PlayerPlaybackRateChanged",PLAYBACK_BLOCKED:"PlayerPlaybackBlocked"};var i=function(){function e(e,t,n){this.videoStartupService=e,this.playbackService=t,this.errorService=n}return e.prototype.onRebuffering=function(){r.logger.log("onRebuffering"),this.playbackService.onRebuffering()},e.prototype.onDurationChanged=function(e){r.logger.log("onDurationChanged: "+e)},e.prototype.onError=function(e){r.logger.log("onError: "+e),this.errorService.onError(e)},e.prototype.onInitialized=function(){r.logger.log("onInitialized"),this.videoStartupService.finishedStartup||this.videoStartupService.onInitialized()},e.prototype.onQualityChanged=function(e){r.logger.log("onQualityChanged: "+e),this.videoStartupService.finishedStartup&&this.playbackService.onQualityChange(e)},e.prototype.onSeekCompleted=function(e){r.logger.log("onSeekCompleted: "+e)},e.prototype.onTimeUpdate=function(e){r.logger.log("onTimeUpdate: "+e)},e.prototype.onPlay=function(e){this.videoStartupService.finishedStartup?r.logger.log("onPlay:",e):this.videoStartupService.onPlay()},e.prototype.onPause=function(e){this.videoStartupService.finishedStartup&&(r.logger.log("onPause:",e),this.playbackService.onPause())},e.prototype.onPlaying=function(e){r.logger.log("onPlaying:",e),this.videoStartupService.finishedStartup?this.playbackService.onPlaying():(this.videoStartupService.onPlaying(),this.playbackService.onStartupPlaying())},e.prototype.startMonitoring=function(e){this.startMonitoringIVSPlayer(e),this.startMonitoringHTMLVideoElement(e.getHTMLVideoElement())},e.prototype.startMonitoringHTMLVideoElement=function(e){e.addEventListener("play",this.onPlay.bind(this)),e.addEventListener("playing",this.onPlaying.bind(this)),e.addEventListener("pause",this.onPause.bind(this))},e.prototype.startMonitoringIVSPlayer=function(e){e.addEventListener(t.IVS_PLAYER_EVENT.REBUFFERING,this.onRebuffering.bind(this)),e.addEventListener(t.IVS_PLAYER_EVENT.DURATION_CHANGED,this.onDurationChanged.bind(this)),e.addEventListener(t.IVS_PLAYER_EVENT.ERROR,this.onError.bind(this)),e.addEventListener(t.IVS_PLAYER_EVENT.INITIALIZED,this.onInitialized.bind(this)),e.addEventListener(t.IVS_PLAYER_EVENT.QUALITY_CHANGED,this.onQualityChanged.bind(this)),e.addEventListener(t.IVS_PLAYER_EVENT.SEEK_COMPLETED,this.onSeekCompleted.bind(this)),e.addEventListener(t.IVS_PLAYER_EVENT.TIME_UPDATE,this.onTimeUpdate.bind(this))},e}();t.AmazonIVSPlayerListener=i},8584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceUrlProvider=void 0;var n=function(){};t.SourceUrlProvider=n},1976:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r="RELEASE",i=function(){function e(){var e;this.observer=((e={})[r]=[],e)}return e.prototype.subscribe=function(e,t){this.observer[e].push(t)},e.prototype.trigger=function(e){this.observer[e].forEach((function(e){e()}))},e}(),a=new i,o={RELEASE:(n=r,{subscribe:function(e){a.subscribe(n,e)},trigger:function(){a.trigger(n)}})};t.default=o},4163:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventListener=void 0;var r,i=n(4057),a=n(1976);!function(e){e[e.IDLE=0]="IDLE",e[e.UNLOADED=1]="UNLOADED"}(r||(r={}));var o=function(){function e(e,t,n){var o=this;this.windowEventTracker=e,this.dispatcher=t,this.playerContext=n,this.state=r.IDLE,this.onPageUnload=function(){o.state==r.IDLE&&(o.dispatcher.eventCallback(i.Event.UNLOAD,{currentTime:o.playerContext.position}),o.state=r.UNLOADED,a.default.RELEASE.trigger())}}return e.prototype.startMonitoring=function(){this.windowEventTracker.addEventListener("beforeunload",this.onPageUnload),this.windowEventTracker.addEventListener("unload",this.onPageUnload)},e}();t.WindowEventListener=o},6009:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.videoElement=e,this.previousTotalDroppedFrames=0}return e.prototype.getDroppedFrames=function(){if(null==this.videoElement)return 0;var e=this.videoElement.getVideoPlaybackQuality().droppedVideoFrames,t=e-this.previousTotalDroppedFrames;return this.previousTotalDroppedFrames=e,t},e.prototype.reset=function(){this.previousTotalDroppedFrames=0},e}();t.default=n},4984:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsStateMachine=void 0;var i=n(6087),a=n(4057),o=n(8829),s=n(4960),l=n(1700),u=[3e3,5e3,1e4,3e4,59700],c=function(){function e(e,t){this.stateMachineCallbacks=e,this.onEnterStateTimestamp=0,this.videoStartupTimeoutMs=s.ANALYTICS_VIDEOSTART_TIMEOUT,this.rebufferTimeoutMs=s.ANALYTICS_REBUFFER_TIMEOUT,this.currentRebufferingIntervalIndex=0,this.stateMachine=this.createStateMachine(t)}return Object.defineProperty(e.prototype,"currentState",{get:function(){return this.stateMachine.current},enumerable:!1,configurable:!0}),e.prototype.resetIntervals=function(){this.clearVideoStartTimeout(),this.clearRebufferingTimeoutHandle(!0),this.clearRebufferingHeartbeatHandle()},e.prototype.startRebufferingHeartbeatInterval=function(e){var t=this;void 0===e&&(e=!0),this.resetRebufferingHelpers(e),this.startRebufferingTimeoutHandle(),this.rebufferingHeartbeatIntervalHandle=window.setInterval((function(){if("rebuffering"===t.stateMachine.current.toLowerCase()){var e=(new Date).getTime(),n=e-t.onEnterStateTimestamp;t.stateMachineCallbacks.heartbeat(n,t.stateMachine.current.toLowerCase(),{buffered:n}),t.onEnterStateTimestamp=e,t.currentRebufferingIntervalIndex=Math.min(t.currentRebufferingIntervalIndex+1,u.length-1),t.startRebufferingHeartbeatInterval(!1)}else t.resetRebufferingHelpers()}),u[this.currentRebufferingIntervalIndex])},e.prototype.resetRebufferingHelpers=function(e){void 0===e&&(e=!0),e&&(this.currentRebufferingIntervalIndex=0),this.clearRebufferingHeartbeatHandle(),this.clearRebufferingTimeoutHandle(e)},e.prototype.clearRebufferingHeartbeatHandle=function(){null!=this.rebufferingHeartbeatIntervalHandle&&(window.clearInterval(this.rebufferingHeartbeatIntervalHandle),this.rebufferingHeartbeatIntervalHandle=void 0)},e.prototype.startRebufferingTimeoutHandle=function(){var e=this;this.currentRebufferingIntervalIndex>0||(this.rebufferingTimeoutHandle=window.setTimeout((function(){e.callEvent(a.Event.ERROR,r(r({},i.ErrorCode.BUFFERING_TIMEOUT_REACHED),{data:{additionalData:"StateMachine timed out after ".concat(e.rebufferTimeoutMs," ms of consecutive buffering.")}}),l.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.rebufferTimeoutMs))},e.prototype.clearRebufferingTimeoutHandle=function(e){e&&null!=this.rebufferingTimeoutHandle&&(window.clearTimeout(this.rebufferingTimeoutHandle),this.rebufferingTimeoutHandle=void 0)},e.prototype.getVideoStartupFailedEventData=function(e,t,n){return{currentTime:e,reason:this.getReasonForVideoStartFailure(t)}},e.prototype.getReasonForVideoStartFailure=function(e){switch(e){case a.Event.ERROR:return o.VideoStartFailedReason.PLAYER_ERROR;case a.Event.UNLOAD:return o.VideoStartFailedReason.PAGE_CLOSED;case a.Event.VIDEOSTART_TIMEOUT:return o.VideoStartFailedReason.TIMEOUT;default:return o.VideoStartFailedReason.UNKNOWN}},e.prototype.setVideoStartTimeout=function(){var e=this;null!=this.videoStartTimeout&&this.clearVideoStartTimeout(),this.videoStartTimeout=window.setTimeout((function(){e.callEvent(a.Event.VIDEOSTART_TIMEOUT,{},l.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.videoStartupTimeoutMs)},e.prototype.clearVideoStartTimeout=function(){window.clearTimeout(this.videoStartTimeout),this.videoStartTimeout=void 0},e}();t.AnalyticsStateMachine=c},3464:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AnalyticsStateMachine=void 0;var a,o=n(9363),s=n(4057),l=n(6692),u=n(6767),c=n(1700),d=n(4984);!function(e){e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PLAY_SEEKING="PLAY_SEEKING",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.END="END",e.ERROR="ERROR",e.AD_STARTUP="AD_STARTUP",e.AD_READY="AD_READY",e.AD_PAUSE="AD_PAUSE",e.AD_PLAYING="AD_PLAYING",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.SOURCE_CHANGING="SOURCE_CHANGING",e.INITIAL_SOURCE_CHANGE="INITIAL_SOURCE_CHANGE",e.SOURCE_LOADED="SOURCE_LOADED",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(a||(a={}));var E=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.debuggingStates=[],r.enabledDebugging=!1,r.sourceChange=function(e,t,n){r.callEvent(s.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},r.seekTimestamp=0,r.seekedTimestamp=0,r.seekStarted=!1,r.seekEnded=!1,r}return i(t,e),t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.getAllStates=function(){return Object.keys(a).map((function(e){return a[e]}))},t.prototype.createStateMachine=function(e){var t=this;return o.create({initial:a.SETUP,error:function(e,t,n,r,i,a){u.logger.error("Error in statemachine: "+a)},events:[{name:s.Event.SOURCE_LOADED,from:[a.SETUP,a.ERROR,a.SOURCE_CHANGING,a.INITIAL_SOURCE_CHANGE],to:a.READY},{name:s.Event.PLAY,from:a.READY,to:a.STARTUP},{name:s.Event.PLAYING,from:a.READY,to:a.PLAYING},{name:s.Event.READY,from:a.READY,to:a.READY},{name:s.Event.VIDEO_CHANGE,from:a.READY,to:a.READY},{name:s.Event.AUDIO_CHANGE,from:a.READY,to:a.READY},{name:s.Event.ERROR,from:[a.STARTUP,a.AD_STARTUP],to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.UNLOAD,from:[a.STARTUP,a.AD_STARTUP],to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.VIDEOSTART_TIMEOUT,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.PLAY,from:a.STARTUP,to:a.STARTUP},{name:s.Event.PLAYING,from:a.STARTUP,to:a.STARTUP},{name:s.Event.TIMECHANGED,from:a.STARTUP,to:a.PLAYING},{name:s.Event.START_BUFFERING,from:a.STARTUP,to:a.STARTUP},{name:s.Event.END_BUFFERING,from:a.STARTUP,to:a.STARTUP},{name:s.Event.VIDEO_CHANGE,from:a.STARTUP,to:a.STARTUP},{name:s.Event.AUDIO_CHANGE,from:a.STARTUP,to:a.STARTUP},{name:s.Event.READY,from:a.STARTUP,to:a.STARTUP},{name:s.Event.PLAYING,from:a.PLAYING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.PLAYING,to:a.PLAYING},{name:s.Event.END_BUFFERING,from:a.PLAYING,to:a.PLAYING},{name:s.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:s.Event.END_BUFFERING,from:a.REBUFFERING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.REBUFFERING,to:a.REBUFFERING},{name:s.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:s.Event.PAUSE,from:a.REBUFFERING,to:a.PAUSE},{name:s.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITYCHANGE},{name:s.Event.AUDIO_CHANGE,from:a.PLAYING,to:a.QUALITYCHANGE},{name:s.Event.VIDEO_CHANGE,from:a.QUALITYCHANGE,to:a.QUALITYCHANGE},{name:s.Event.AUDIO_CHANGE,from:a.QUALITYCHANGE,to:a.QUALITYCHANGE},{name:"FINISH_QUALITYCHANGE",from:a.QUALITYCHANGE,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.AUDIO_CHANGE,from:a.PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.VIDEO_CHANGE,from:a.QUALITYCHANGE_PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.AUDIO_CHANGE,from:a.QUALITYCHANGE_PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:"FINISH_QUALITYCHANGE_PAUSE",from:a.QUALITYCHANGE_PAUSE,to:a.PAUSE},{name:s.Event.SEEK,from:a.PLAYING,to:a.PLAY_SEEKING},{name:s.Event.PLAY,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.PLAYING,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEKED,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEK,from:a.END_PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.PLAYING,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:s.Event.SEEK,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.AUDIO_CHANGE,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.VIDEO_CHANGE,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.START_BUFFERING,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.END_BUFFERING,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.START_BUFFERING,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.END_BUFFERING,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEKED,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.PLAY,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEK,from:a.PAUSE,to:a.PAUSE},{name:s.Event.SEEKED,from:a.PAUSE,to:a.PAUSE},{name:s.Event.SEEKED,from:a.PLAYING,to:a.PLAYING},{name:s.Event.END,from:a.PLAY_SEEKING,to:a.END},{name:s.Event.END,from:a.PLAYING,to:a.END},{name:s.Event.END,from:a.PAUSE,to:a.END},{name:s.Event.SEEK,from:a.END,to:a.END},{name:s.Event.SEEKED,from:a.END,to:a.END},{name:s.Event.TIMECHANGED,from:a.END,to:a.END},{name:s.Event.END_BUFFERING,from:a.END,to:a.END},{name:s.Event.START_BUFFERING,from:a.END,to:a.END},{name:s.Event.END,from:a.END,to:a.END},{name:s.Event.PLAY,from:a.END,to:a.STARTUP},{name:s.Event.ERROR,from:this.getAllStatesBut([a.STARTUP]),to:a.ERROR},{name:s.Event.UNLOAD,from:this.getAllStatesBut([a.STARTUP,a.AD_STARTUP]),to:a.END},{name:s.Event.CUSTOM_DATA_CHANGE,from:[a.PLAYING,a.PAUSE],to:a.CUSTOMDATACHANGE},{name:s.Event.PLAYING,from:a.CUSTOMDATACHANGE,to:a.PLAYING},{name:s.Event.PAUSE,from:a.CUSTOMDATACHANGE,to:a.PAUSE},{name:s.Event.SUBTITLE_CHANGE,from:a.PLAYING,to:a.SUBTITLE_CHANGING},{name:s.Event.SUBTITLE_CHANGE,from:a.PAUSE,to:a.PAUSE},{name:s.Event.SUBTITLE_CHANGE,from:a.REBUFFERING,to:a.REBUFFERING},{name:s.Event.SUBTITLE_CHANGE,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SUBTITLE_CHANGE,from:a.SUBTITLE_CHANGING,to:a.SUBTITLE_CHANGING},{name:s.Event.TIMECHANGED,from:a.SUBTITLE_CHANGING,to:a.PLAYING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.PLAYING,to:a.AUDIOTRACK_CHANGING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.PAUSE,to:a.PAUSE},{name:s.Event.AUDIOTRACK_CHANGED,from:a.REBUFFERING,to:a.REBUFFERING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.AUDIOTRACK_CHANGING,to:a.AUDIOTRACK_CHANGING},{name:s.Event.TIMECHANGED,from:a.AUDIOTRACK_CHANGING,to:a.PLAYING},{name:s.Event.START_AD,from:a.STARTUP,to:a.AD_STARTUP},{name:s.Event.END_AD,from:a.AD_STARTUP,to:a.STARTUP},{name:s.Event.PLAY,from:a.AD_STARTUP,to:a.AD_STARTUP},{name:s.Event.PAUSE,from:a.AD_STARTUP,to:a.AD_STARTUP},{name:s.Event.START_AD,from:a.READY,to:a.AD_READY},{name:s.Event.END_AD,from:a.AD_READY,to:a.STARTUP},{name:s.Event.PLAY,from:a.AD_READY,to:a.AD_READY},{name:s.Event.PAUSE,from:a.AD_READY,to:a.AD_READY},{name:s.Event.START_AD,from:a.PAUSE,to:a.AD_PAUSE},{name:s.Event.END_AD,from:a.AD_PAUSE,to:a.PAUSE},{name:s.Event.PLAY,from:a.AD_PAUSE,to:a.AD_PAUSE},{name:s.Event.PAUSE,from:a.AD_PAUSE,to:a.AD_PAUSE},{name:s.Event.START_AD,from:a.PLAYING,to:a.AD_PLAYING},{name:s.Event.END_AD,from:a.AD_PLAYING,to:a.PLAYING},{name:s.Event.PLAY,from:a.AD_PLAYING,to:a.AD_PLAYING},{name:s.Event.PAUSE,from:a.AD_PLAYING,to:a.AD_PLAYING},{name:s.Event.END,from:a.AD_PLAYING,to:a.END},{name:s.Event.TIMECHANGED,from:a.AD_STARTUP,to:a.AD_STARTUP},{name:s.Event.TIMECHANGED,from:a.AD_READY,to:a.AD_READY},{name:s.Event.TIMECHANGED,from:a.AD_PAUSE,to:a.AD_PAUSE},{name:s.Event.TIMECHANGED,from:a.AD_PLAYING,to:a.AD_PLAYING},{name:s.Event.END_AD,from:a.PLAYING,to:a.PLAYING},{name:s.Event.END_AD,from:a.PAUSE,to:a.PAUSE},{name:s.Event.END_AD,from:a.READY,to:a.READY},{name:s.Event.END_AD,from:a.STARTUP,to:a.STARTUP},{name:s.Event.MUTE,from:a.READY,to:a.MUTING_READY},{name:s.Event.UN_MUTE,from:a.READY,to:a.MUTING_READY},{name:"FINISH_MUTING",from:a.MUTING_READY,to:a.READY},{name:s.Event.MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:s.Event.UN_MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:"FINISH_MUTING",from:a.MUTING_PLAY,to:a.PLAYING},{name:s.Event.MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:s.Event.UN_MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:"FINISH_MUTING",from:a.MUTING_PAUSE,to:a.PAUSE},{name:s.Event.START_CAST,from:[a.READY,a.PAUSE,a.PLAYING],to:a.CASTING},{name:s.Event.PAUSE,from:a.CASTING,to:a.CASTING},{name:s.Event.PLAY,from:a.CASTING,to:a.CASTING},{name:s.Event.PLAYING,from:a.CASTING,to:a.CASTING},{name:s.Event.TIMECHANGED,from:a.CASTING,to:a.CASTING},{name:s.Event.MUTE,from:a.CASTING,to:a.CASTING},{name:s.Event.UN_MUTE,from:a.CASTING,to:a.CASTING},{name:s.Event.SEEK,from:a.CASTING,to:a.CASTING},{name:s.Event.SEEKED,from:a.CASTING,to:a.CASTING},{name:s.Event.END_CAST,from:a.CASTING,to:a.READY},{name:s.Event.SEEK,from:a.READY,to:a.READY},{name:s.Event.SEEKED,from:a.READY,to:a.READY},{name:s.Event.SEEKED,from:a.STARTUP,to:a.STARTUP},{name:s.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut([a.SETUP]),to:a.SOURCE_CHANGING},{name:s.Event.MANUAL_SOURCE_CHANGE,from:a.SETUP,to:a.INITIAL_SOURCE_CHANGE},{name:s.Event.SOURCE_UNLOADED,from:this.getAllStates(),to:a.SOURCE_CHANGING},{name:s.Event.VIDEO_CHANGE,from:a.REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.AUDIO_CHANGE,from:a.REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.VIDEO_CHANGE,from:a.QUALITYCHANGE_REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.AUDIO_CHANGE,from:a.QUALITYCHANGE_REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:a.QUALITYCHANGE_REBUFFERING,to:a.REBUFFERING}],callbacks:{onbeforeevent:function(e,t,n,r,i){if(t===a.REBUFFERING&&n===a.QUALITYCHANGE_REBUFFERING)return!1},onafterevent:function(e,n,r,i,o){e===s.Event.MANUAL_SOURCE_CHANGE&&n===a.SETUP?t.stateMachineCallbacks.initialSourceChange(o):e===s.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(o),r===a.QUALITYCHANGE_PAUSE&&t.stateMachine.FINISH_QUALITYCHANGE_PAUSE(i),r===a.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(i),r===a.QUALITYCHANGE_REBUFFERING&&t.stateMachine.FINISH_QUALITYCHANGE_REBUFFERING(i),r!==a.MUTING_READY&&r!==a.MUTING_PLAY&&r!==a.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(i)},onenterstate:function(n,r,i,o,l){"none"===r&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=o||(new Date).getTime(),u.logger.log("[ENTER ".concat(o,"] ").concat((0,u.padRight)(i,20)," EVENT: ").concat((0,u.padRight)(n,20)," from: ").concat((0,u.padRight)(r,14))),!l||i===a.END_PLAY_SEEKING||r===a.PLAY_SEEKING||r===a.AD_STARTUP||r===a.AD_READY||r===a.AD_PLAYING||r===a.AD_PAUSE||n===s.Event.SEEK&&r===a.END_PLAY_SEEKING||t.stateMachineCallbacks.setVideoTimeStartFromEvent(l),n===s.Event.START_CAST&&i===a.CASTING&&t.stateMachineCallbacks.startCasting(o,l),i===a.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onleavestate:function(e,n,r,i,o){if(n===a.REBUFFERING&&t.resetRebufferingHelpers(),i){u.logger.log("[LEAVE ".concat(i,"] ").concat((0,u.padRight)(n,20)," EVENT: ").concat((0,u.padRight)(e,20)," to: ").concat((0,u.padRight)(r,20))),t.addStatesToLog(e,n,r,i,o);var l=i-t.onEnterStateTimestamp;o&&r!==a.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(o),o&&e!==s.Event.END_AD&&(t.lastTrackedVideoEndObject=o),n!==a.READY&&n!==a.AD_STARTUP||r!==a.STARTUP?n!==a.STARTUP||r!==a.PLAYING&&r!==a.AD_STARTUP||t.clearVideoStartTimeout():t.setVideoStartTimeout();var d=String(n).toLowerCase();if(r===a.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var E=t.getVideoStartupFailedEventData(i,e,o),p=e!==s.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(E,p)}else if(n===a.END_PLAY_SEEKING){var h=t.seekedTimestamp-t.seekTimestamp;t.seekStarted&&t.seekEnded&&e!==s.Event.SEEK&&(t.seekStarted=t.seekEnded=!1,t.stateMachineCallbacks.end_play_seeking(h,d))}else if(e===s.Event.UNLOAD)t.stateMachineCallbacks.unload(l,d);else if(n===a.AD_PAUSE||n===a.AD_READY||n===a.AD_PLAYING||n===a.AD_STARTUP)t.stateMachineCallbacks.setVideoTimeStartFromEvent(t.lastTrackedVideoEndObject),t.stateMachineCallbacks.setVideoTimeEndFromEvent(t.lastTrackedVideoEndObject),t.stateMachineCallbacks.ad(l,"ad");else if(e===s.Event.START_AD&&n===a.STARTUP)(0,c.noOp)();else if(e===s.Event.SOURCE_LOADED&&n===a.INITIAL_SOURCE_CHANGE)(0,c.noOp)();else if(n!==a.ERROR){var A=t.stateMachineCallbacks[d];if("function"==typeof A)try{A(l,d,o)}catch(e){u.logger.error("Exception occured in State Machine callback "+d,o,e)}else u.logger.error("Could not find callback function for "+d)}o&&r!==a.END_PLAY_SEEKING&&n!==a.PLAY_SEEKING&&r!==a.PLAY_SEEKING&&n!==a.AD_STARTUP&&n!==a.AD_READY&&n!==a.AD_PLAYING&&n!==a.AD_PAUSE&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(o),e===s.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(o):e===s.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(o):e===s.Event.MUTE?t.stateMachineCallbacks.mute():e===s.Event.UN_MUTE&&t.stateMachineCallbacks.unMute()}},onseek:function(e,n,r,i){t.seekStarted||(t.seekTimestamp=i,t.seekStarted=!0)},onseeked:function(e,n,r,i){t.seekedTimestamp=i,t.seekEnded=!0},ontimechanged:function(e,n,r,i,a){if("PLAYING"===t.stateMachine.current){var o=i-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=i,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))}},onplayerError:function(e,n,r,i,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];if(r)try{r.call(this.stateMachine,n,t)}catch(n){u.logger.error("Exception occured in State Machine callback "+e,r,t,n)}else u.logger.log("Ignored Event: "+e)},t.prototype.addStatesToLog=function(e,t,n,r,i){this.enabledDebugging&&this.debuggingStates.push(new l.EventDebugging(e,t,n,r,i))},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t}(d.AnalyticsStateMachine);t.Bitmovin8AnalyticsStateMachine=E},3395:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5AnalyticsStateMachine=void 0;var o,s=n(9363),l=n(4057),u=n(6767),c=n(1700),d=n(4984);!function(e){e.INITIALIZED="INITIALIZED",e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PAUSED_SEEKING="PAUSED_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.END="END",e.ERROR="ERROR",e.AD="AD",e.SOURCE_CHANGING="SOURCE_CHANGING",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(o||(o={}));var E=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.sourceChange=function(e,t,n){r.callEvent(l.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},r.seekStartedAt=null,r.createStateMachine(n),r}return i(t,e),t.prototype.getAllStates=function(){return a(a([],Object.keys(o).map((function(e){return o[e]})),!0),["FINISH_QUALITYCHANGE_PAUSE","FINISH_QUALITYCHANGE","FINISH_QUALITYCHANGE_REBUFFERING"],!1)},t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.createStateMachine=function(e){var t=this;return s.create({initial:o.INITIALIZED,error:function(e,t,n,r,i,a){u.logger.error("Error in statemachine: "+a)},events:[{name:l.Event.SETUP,from:o.INITIALIZED,to:o.SETUP},{name:l.Event.SETUP,from:o.SETUP,to:o.SETUP},{name:l.Event.TIMECHANGED,from:o.SETUP,to:o.SETUP},{name:l.Event.READY,from:[o.SETUP,o.ERROR,o.END,o.SOURCE_CHANGING],to:o.READY},{name:l.Event.READY,from:o.READY,to:o.READY},{name:l.Event.READY,from:o.STARTUP,to:o.STARTUP},{name:l.Event.PLAY,from:o.READY,to:o.STARTUP},{name:l.Event.ERROR,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.UNLOAD,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.VIDEOSTART_TIMEOUT,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.START_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.END_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.VIDEO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.TIMECHANGED,from:o.READY,to:o.STARTUP},{name:l.Event.TIMECHANGED,from:o.STARTUP,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.SEEKED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.END_BUFFERING,from:o.PLAYING,to:o.PLAYING},{name:l.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},{name:l.Event.START_BUFFERING,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.PLAY,from:o.REBUFFERING,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.REBUFFERING,to:o.PLAYING},{name:l.Event.SEEK,from:o.STARTUP,to:o.STARTUP},{name:l.Event.PLAY,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:l.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.PAUSE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:"FINISH_QUALITYCHANGE",from:o.QUALITYCHANGE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:"FINISH_QUALITYCHANGE_PAUSE",from:o.QUALITYCHANGE_PAUSE,to:o.PAUSE},{name:l.Event.SEEK,from:o.PAUSE,to:o.PAUSED_SEEKING},{name:l.Event.SEEK,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.AUDIO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.START_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.END_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.SEEKED,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:l.Event.TIMECHANGED,from:o.PAUSED_SEEKING,to:o.PLAYING},{name:l.Event.PAUSE,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:l.Event.END,from:o.PAUSED_SEEKING,to:o.END},{name:l.Event.END,from:o.PLAYING,to:o.END},{name:l.Event.END,from:o.PAUSE,to:o.END},{name:l.Event.PAUSE,from:o.END,to:o.END},{name:l.Event.SEEK,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.END,to:o.END},{name:l.Event.TIMECHANGED,from:o.END,to:o.END},{name:l.Event.END_BUFFERING,from:o.END,to:o.END},{name:l.Event.START_BUFFERING,from:o.END,to:o.END},{name:l.Event.END,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.SEEK,from:o.PLAYING,to:o.PLAYING},{name:l.Event.PLAY,from:o.END,to:o.PLAYING},{name:l.Event.ERROR,from:this.getAllStatesBut([o.STARTUP]),to:o.ERROR},{name:l.Event.PAUSE,from:o.ERROR,to:o.ERROR},{name:l.Event.UNLOAD,from:this.getAllStatesBut([o.STARTUP]),to:o.END},{name:l.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGING},{name:l.Event.SUBTITLE_CHANGE,from:o.PAUSE,to:o.PAUSE},{name:l.Event.SUBTITLE_CHANGE,from:o.READY,to:o.READY},{name:l.Event.SUBTITLE_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.SUBTITLE_CHANGE,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.SUBTITLE_CHANGE,from:o.SUBTITLE_CHANGING,to:o.SUBTITLE_CHANGING},{name:l.Event.TIMECHANGED,from:o.SUBTITLE_CHANGING,to:o.PLAYING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.AUDIOTRACK_CHANGED,from:o.READY,to:o.READY},{name:l.Event.AUDIOTRACK_CHANGED,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIOTRACK_CHANGED,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.AUDIOTRACK_CHANGING,to:o.AUDIOTRACK_CHANGING},{name:l.Event.TIMECHANGED,from:o.AUDIOTRACK_CHANGING,to:o.PLAYING},{name:l.Event.START_AD,from:o.PLAYING,to:o.AD},{name:l.Event.END_AD,from:o.AD,to:o.PLAYING},{name:l.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:l.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:l.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:l.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:l.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:l.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:l.Event.START_CAST,from:[o.READY,o.PAUSE],to:o.CASTING},{name:l.Event.PAUSE,from:o.CASTING,to:o.CASTING},{name:l.Event.PLAY,from:o.CASTING,to:o.CASTING},{name:l.Event.TIMECHANGED,from:o.CASTING,to:o.CASTING},{name:l.Event.MUTE,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEK,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEKED,from:o.CASTING,to:o.CASTING},{name:l.Event.END_CAST,from:o.CASTING,to:o.READY},{name:l.Event.SEEK,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.STARTUP,to:o.STARTUP},{name:l.Event.SOURCE_LOADED,from:this.getAllStates(),to:o.SETUP},{name:l.Event.SOURCE_UNLOADED,from:this.getAllStates(),to:o.SOURCE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStates(),to:o.SOURCE_CHANGING},{name:l.Event.TIMECHANGED,from:o.SOURCE_CHANGING,to:o.SOURCE_CHANGING},{name:l.Event.PAUSE,from:o.SOURCE_CHANGING,to:o.SOURCE_CHANGING},{name:l.Event.VIDEO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:o.QUALITYCHANGE_REBUFFERING,to:o.REBUFFERING},{name:l.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:l.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:l.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE},{name:l.Event.PLAYLIST_TRANSITION,from:this.getAllStates(),to:o.READY}],callbacks:{onenterstate:function(n,r,i,a,s){"none"===r&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=a||c.getCurrentTimestamp(),u.logger.log("[ENTER ".concat(a,"] ").concat((0,u.padRight)(i,20)," EVENT: ").concat((0,u.padRight)(n,20)," from: ").concat((0,u.padRight)(r,14))),s&&i!==o.PAUSED_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===l.Event.START_CAST&&i===o.CASTING&&t.stateMachineCallbacks.startCasting(a,s),i===o.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onafterevent:function(e,n,r,i,a){e===l.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(a),e===l.Event.PLAYLIST_TRANSITION&&t.stateMachineCallbacks.playlistTransition(a),r===o.QUALITYCHANGE_PAUSE&&t.stateMachine.FINISH_QUALITYCHANGE_PAUSE(i),r===o.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(i),r===o.QUALITYCHANGE_REBUFFERING&&t.stateMachine.FINISH_QUALITYCHANGE_REBUFFERING(i),r!==o.MUTING_READY&&r!==o.MUTING_PLAY&&r!==o.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(i)},onleavestate:function(e,n,r,i,a){if(n===o.REBUFFERING&&t.resetRebufferingHelpers(),i&&(n!==o.ERROR||e!==l.Event.MANUAL_SOURCE_CHANGE&&e!==l.Event.SOURCE_UNLOADED)){u.logger.log("[LEAVE ".concat(i,"] ").concat((0,u.padRight)(n,20)," EVENT: ").concat((0,u.padRight)(e,20)," to: ").concat((0,u.padRight)(r,20)));var s=i-t.onEnterStateTimestamp;a&&r!==o.PAUSED_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),n===o.READY&&r===o.STARTUP?t.setVideoStartTimeout():n===o.STARTUP&&r===o.PLAYING&&t.clearVideoStartTimeout();var c=String(n).toLowerCase();if(r===o.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var d=t.getVideoStartupFailedEventData(i,e,a),E=e!==l.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(d,E)}else if(n===o.PAUSED_SEEKING){var p=i-t.seekStartedAt;t.seekStartedAt=null,t.stateMachineCallbacks[c](p,c,a)}else if(e===l.Event.UNLOAD)t.stateMachineCallbacks.unload(s,c);else if(n===o.PAUSE&&r!==o.PAUSED_SEEKING)t.stateMachineCallbacks.setVideoTimeStartFromEvent(e),t.stateMachineCallbacks.pause(s,c);else{var h=t.stateMachineCallbacks[c];"function"==typeof h?h(s,c,a):u.logger.error("Could not find callback function for "+c)}a&&r!==o.PAUSED_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),e===l.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(a):e===l.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(a):e===l.Event.MUTE?t.stateMachineCallbacks.mute():e===l.Event.UN_MUTE&&t.stateMachineCallbacks.unMute()}},onseek:function(e,n,r,i){t.seekStartedAt=t.seekStartedAt||i},ontimechanged:function(e,n,r,i,a){var o=i-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=i,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))},onplayerError:function(e,n,r,i,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];r?r.call(this.stateMachine,n,t):u.logger.log("Ignored Event: "+e)},t}(d.AnalyticsStateMachine);t.HTML5AnalyticsStateMachine=E},5918:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsAnalyticsStateMachine=void 0;var o,s=n(9363),l=n(4057),u=n(6767),c=n(4984);!function(e){e.AD="AD",e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PAUSED_SEEKING="PAUSED_SEEKING",e.PLAY_SEEKING="PLAY_SEEKING",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.SOURCE_CHANGING="SOURCE_CHANGING",e.END="END",e.ERROR="ERROR",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.AUDIOTRACK_CHANGED_PLAYING="AUDIOTRACK_CHANGED_PLAYING",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.SUBTITLE_CHANGED_PLAYING="SUBTITLE_CHANGED_PLAYING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(o||(o={}));var d=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.sourceChange=function(e,t,n){r.callEvent(l.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},r.seekTimestamp=0,r.seekedTimestamp=0,r}return i(t,e),t.prototype.getAllStates=function(){return a(a([],Object.keys(o).map((function(e){return o[e]})),!0),["FINISH_PLAY_SEEKING","PLAY_SEEK","FINISH_QUALITYCHANGE_PAUSE","FINISH_QUALITYCHANGE","FINISH_QUALITYCHANGE_REBUFFERING"],!1)},t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return t!==e}))},t.prototype.createStateMachine=function(e){var t=this;return s.create({initial:o.SETUP,error:function(e,t,n,r,i,a){u.logger.error("Error in statemachine: "+a)},events:[{name:l.Event.SOURCE_LOADED,from:[o.SETUP,o.ERROR,o.SOURCE_CHANGING],to:o.READY},{name:l.Event.TIMECHANGED,from:o.SETUP,to:o.SETUP},{name:l.Event.SOURCE_LOADED,from:o.READY,to:o.READY},{name:l.Event.READY,from:[o.SETUP,o.ERROR],to:o.READY},{name:l.Event.PLAY,from:o.READY,to:o.STARTUP},{name:l.Event.ERROR,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.UNLOAD,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.VIDEOSTART_TIMEOUT,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.START_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.END_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.VIDEO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.TIMECHANGED,from:o.STARTUP,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.END_BUFFERING,from:o.PLAYING,to:o.PLAYING},{name:l.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},{name:l.Event.START_BUFFERING,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.TIMECHANGED,from:o.REBUFFERING,to:o.PLAYING},{name:l.Event.SEEK,from:o.STARTUP,to:o.STARTUP},{name:l.Event.SEEK,from:o.PLAYING,to:o.PLAY_SEEKING},{name:l.Event.TIMECHANGED,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.TIMECHANGED,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:l.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},{name:l.Event.TIMECHANGED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:"FINISH_QUALITYCHANGE",from:o.QUALITYCHANGE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:"FINISH_QUALITYCHANGE_PAUSE",from:o.QUALITYCHANGE_PAUSE,to:o.PAUSE},{name:l.Event.SEEK,from:o.PAUSE,to:o.PAUSED_SEEKING},{name:l.Event.SEEK,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.AUDIO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.START_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.END_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.SEEKED,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSED_SEEKING,to:o.PLAYING},{name:l.Event.PAUSE,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:"PLAY_SEEK",from:o.PAUSE,to:o.PLAY_SEEKING},{name:"PLAY_SEEK",from:o.PAUSED_SEEKING,to:o.PLAY_SEEKING},{name:"PLAY_SEEK",from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.SEEK,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.AUDIO_CHANGE,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.VIDEO_CHANGE,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.START_BUFFERING,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.END_BUFFERING,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.SEEKED,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.SEEKED,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.START_BUFFERING,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.END_BUFFERING,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SEEKED,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.TIMECHANGED,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.END,from:o.PLAY_SEEKING,to:o.END},{name:l.Event.END,from:o.PAUSED_SEEKING,to:o.END},{name:l.Event.END,from:o.PLAYING,to:o.END},{name:l.Event.END,from:o.PAUSE,to:o.END},{name:l.Event.SEEK,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.END,to:o.END},{name:l.Event.TIMECHANGED,from:o.END,to:o.END},{name:l.Event.END_BUFFERING,from:o.END,to:o.END},{name:l.Event.START_BUFFERING,from:o.END,to:o.END},{name:l.Event.END,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.PLAY,from:o.END,to:o.PLAYING},{name:l.Event.ERROR,from:this.getAllStatesBut(o.STARTUP),to:o.ERROR},{name:l.Event.PAUSE,from:o.ERROR,to:o.ERROR},{name:l.Event.SEEK,from:o.END_PLAY_SEEKING,to:o.PLAY_SEEKING},{name:"FINISH_PLAY_SEEKING",from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.UNLOAD,from:this.getAllStatesBut(o.STARTUP),to:o.END},{name:l.Event.START_AD,from:o.PLAYING,to:o.AD},{name:l.Event.END_AD,from:o.AD,to:o.PLAYING},{name:l.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:l.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:l.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:l.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:l.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:l.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:l.Event.START_CAST,from:[o.READY,o.PAUSE],to:o.CASTING},{name:l.Event.PAUSE,from:o.CASTING,to:o.CASTING},{name:l.Event.PLAY,from:o.CASTING,to:o.CASTING},{name:l.Event.TIMECHANGED,from:o.CASTING,to:o.CASTING},{name:l.Event.MUTE,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEK,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEKED,from:o.CASTING,to:o.CASTING},{name:l.Event.END_CAST,from:o.CASTING,to:o.READY},{name:l.Event.SEEK,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGED_PLAYING},{name:"FINISH_AUDIOTRACK_CHANGING",from:o.AUDIOTRACK_CHANGED_PLAYING,to:o.PLAYING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.AUDIOTRACK_CHANGED,from:o.READY,to:o.READY},{name:l.Event.AUDIOTRACK_CHANGED,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.AUDIOTRACK_CHANGING,to:o.AUDIOTRACK_CHANGING},{name:l.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGED_PLAYING},{name:"FINISH_SUBTITLE_CHANGING",from:o.SUBTITLE_CHANGED_PLAYING,to:o.PLAYING},{name:l.Event.SUBTITLE_CHANGE,from:o.PAUSE,to:o.PAUSE},{name:l.Event.SUBTITLE_CHANGE,from:o.READY,to:o.READY},{name:l.Event.SUBTITLE_CHANGE,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.SUBTITLE_CHANGE,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SUBTITLE_CHANGE,from:o.SUBTITLE_CHANGING,to:o.SUBTITLE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut(o.READY),to:o.SOURCE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:o.READY,to:o.READY},{name:l.Event.MANUAL_SOURCE_CHANGE,from:o.SETUP,to:o.SETUP},{name:l.Event.TIMECHANGED,from:o.SOURCE_CHANGING,to:o.SOURCE_CHANGING},{name:l.Event.VIDEO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:o.QUALITYCHANGE_REBUFFERING,to:o.REBUFFERING},{name:l.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:l.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:l.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE}],callbacks:{onafterevent:function(e,n,r,i){r===o.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(i),r!==o.MUTING_READY&&r!==o.MUTING_PLAY&&r!==o.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(i),r===o.AUDIOTRACK_CHANGED_PLAYING&&t.stateMachine.FINISH_AUDIOTRACK_CHANGING(i),r===o.SUBTITLE_CHANGED_PLAYING&&t.stateMachine.FINISH_SUBTITLE_CHANGING(i)},onenterstate:function(n,r,i,a,s){"none"===r&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=a||(new Date).getTime(),u.logger.log("[ENTER] "+(0,u.padRight)(i,20)+"EVENT: "+(0,u.padRight)(n,20)+" from "+(0,u.padRight)(r,14)),s&&i!==o.PAUSED_SEEKING&&i!==o.PLAY_SEEKING&&i!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===l.Event.SEEK&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===l.Event.SEEKED&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(s),"PLAY_SEEK"===n&&i===o.PLAY_SEEKING&&i!==o.PLAY_SEEKING&&i!==o.END_PLAY_SEEKING&&(t.seekTimestamp=t.onEnterStateTimestamp),n===l.Event.START_CAST&&i===o.CASTING&&t.stateMachineCallbacks.startCasting(a,s),i===o.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onleavestate:function(e,n,r,i,a){if(n===o.REBUFFERING&&t.resetRebufferingHelpers(),i){u.logger.log("[LEAVE] ".concat((0,u.padRight)(n,20)," EVENT: ").concat((0,u.padRight)(e,20)," to ").concat((0,u.padRight)(r,20)));var s=i-t.onEnterStateTimestamp;if(a&&r!==o.PAUSED_SEEKING&&r!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),"PLAY_SEEK"===e&&n===o.PAUSE)return!0;n===o.READY&&r===o.STARTUP?t.setVideoStartTimeout():n!==o.STARTUP||r!==o.PLAYING&&r!==o.EXIT_BEFORE_VIDEOSTART||t.clearVideoStartTimeout();var c=String(n).toLowerCase();if(r===o.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var d=t.getVideoStartupFailedEventData(i,e,a),E=e!==l.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(d,E)}else if(n===o.PAUSED_SEEKING){var p=i-t.seekTimestamp;t.stateMachineCallbacks.paused_seeking(p,c)}else if(n===o.END_PLAY_SEEKING){p=t.seekedTimestamp-t.seekTimestamp;t.stateMachineCallbacks.end_play_seeking(p,c)}else if(e===l.Event.UNLOAD)t.stateMachineCallbacks.unload(s,c);else if(n===o.PAUSE&&r!==o.PAUSED_SEEKING)t.stateMachineCallbacks.setVideoTimeStartFromEvent(e),t.stateMachineCallbacks.pause(s,c);else{var h=t.stateMachineCallbacks[c];if("function"==typeof h)h(s,c,a);else null==[o.MUTING_PAUSE,o.MUTING_PLAY,o.AUDIOTRACK_CHANGED_PLAYING,o.SUBTITLE_CHANGED_PLAYING].find((function(e){return n===e}))&&u.logger.error("Could not find callback function for "+c)}a&&r!==o.PAUSED_SEEKING&&r!==o.PLAY_SEEKING&&r!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),e===l.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(a):e===l.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(a):e===l.Event.MUTE?t.stateMachineCallbacks.mute():e===l.Event.UN_MUTE?t.stateMachineCallbacks.unMute():e===l.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(a)}},onseek:function(e,n,r,i){t.seekTimestamp=i},onseeked:function(e,n,r,i){t.seekedTimestamp=i},ontimechanged:function(e,n,r,i,a){var o=i-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=i,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))},onplayerError:function(e,n,r,i,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];r?r.call(this.stateMachine,n,t):u.logger.log("Ignored Event: "+e)},t}(c.AnalyticsStateMachine);t.VideojsAnalyticsStateMachine=d},7659:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSStateMachine=void 0;var a,o=n(9363),s=n(4057),l=n(6767),u=n(1700),c=n(4984);!function(e){e.SETUP="SETUP",e.READY="READY",e.STARTUP="STARTUP",e.PLAYING="PLAYING",e.PAUSE="PAUSE",e.REBUFFERING="REBUFFERING",e.EXIT_BEFORE_VIDEOSTARTUP="EXIT_BEFORE_VIDEOSTARTUP",e.ERROR="ERROR",e.UNLOADED="UNLOADED",e.QUALITY_CHANGE="QUALITY_CHANGE"}(a||(a={}));var d=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.heartbeatService=n,i.getStateHandler=function(){var e;return(e={})[a.SETUP]={onenterstate:function(){},onleavestate:function(e){i.stateMachineCallbacks.setup(e,a.SETUP.toLowerCase())}},e[a.READY]={onenterstate:function(){},onleavestate:function(){}},e[a.STARTUP]={onenterstate:function(){i.setVideoStartTimeout()},onleavestate:function(e,t){i.clearVideoStartTimeout(),t==a.PLAYING&&i.stateMachineCallbacks.startup(e,a.STARTUP.toLowerCase())}},e[a.PLAYING]={onenterstate:function(){i.heartbeatService.startHeartbeat()},onleavestate:function(e){i.heartbeatService.stopHeartbeat(),i.stateMachineCallbacks.playing(e,a.PLAYING.toLowerCase())}},e[a.PAUSE]={onenterstate:function(){},onleavestate:function(e){i.stateMachineCallbacks.pause(e,a.PAUSE.toLowerCase())}},e[a.REBUFFERING]={onenterstate:function(){i.startRebufferingHeartbeatInterval()},onleavestate:function(e){i.resetRebufferingHelpers(),i.stateMachineCallbacks.rebuffering(e,a.REBUFFERING.toLowerCase())}},e[a.EXIT_BEFORE_VIDEOSTARTUP]={onenterstate:function(e,t){var n={reason:i.getReasonForVideoStartFailure(e)},r=e===s.Event.ERROR,a=!r;i.stateMachineCallbacks.videoStartFailed(n,a),r&&i.stateMachineCallbacks.error(t)},onleavestate:function(){}},e[a.ERROR]={onenterstate:function(e,t){i.stateMachineCallbacks.error(t)},onleavestate:function(){}},e[a.UNLOADED]={onenterstate:function(){i.stateMachineCallbacks.unload(0,a.UNLOADED)},onleavestate:function(){}},e[a.QUALITY_CHANGE]={onenterstate:function(e,t){i.stateMachine.FINISH_QUALITYCHANGE(i.onEnterStateTimestamp,t)},onleavestate:function(){i.stateMachineCallbacks.qualitychange(0,a.QUALITY_CHANGE.toLowerCase())}},e},i}return i(t,e),t.prototype.createStateMachine=function(e){var t=this;return this.onEnterStateTimestamp=e.starttime,o.StateMachine.create({initial:a.SETUP,error:function(e,t,n,r,i,a){l.logger.error("Error in statemachine: "+a)},events:[{name:s.Event.READY,from:a.SETUP,to:a.READY},{name:s.Event.PLAY,from:a.READY,to:a.STARTUP},{name:s.Event.PLAYING,from:a.STARTUP,to:a.PLAYING},{name:s.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:s.Event.PLAYING,from:a.PAUSE,to:a.PLAYING},{name:s.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:s.Event.UNLOAD,from:a.PLAYING,to:a.UNLOADED},{name:s.Event.PLAYING,from:a.ERROR,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITY_CHANGE},{name:"FINISH_QUALITYCHANGE",from:a.QUALITY_CHANGE,to:a.PLAYING},{name:s.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:s.Event.PLAYING,from:a.REBUFFERING,to:a.PLAYING},{name:s.Event.VIDEOSTART_TIMEOUT,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTARTUP},{name:s.Event.ERROR,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTARTUP},{name:s.Event.UNLOAD,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTARTUP},{name:s.Event.ERROR,from:p([a.STARTUP,a.EXIT_BEFORE_VIDEOSTARTUP]),to:a.ERROR},E(s.Event.PAUSE).in(a.PAUSE),E(s.Event.PAUSE).in(a.STARTUP),E(s.Event.PAUSE).in(a.REBUFFERING),E(s.Event.PLAY).in(a.PLAYING),E(s.Event.PLAYING).in(a.PLAYING),E(s.Event.START_BUFFERING).in(a.PAUSE),E(s.Event.START_BUFFERING).in(a.REBUFFERING),E(s.Event.VIDEOSTART_TIMEOUT).in(a.PLAYING),E(s.Event.VIDEOSTART_TIMEOUT).in(a.PAUSE),E(s.Event.UNLOAD).in(a.READY),E(s.Event.VIDEO_CHANGE).in(a.QUALITY_CHANGE),E(s.Event.VIDEO_CHANGE).in(a.STARTUP),E(s.Event.VIDEO_CHANGE).in(a.REBUFFERING),E(s.Event.VIDEO_CHANGE).in(a.PAUSE),E(s.Event.VIDEO_CHANGE).in(a.ERROR),E(s.Event.VIDEO_CHANGE).in(a.EXIT_BEFORE_VIDEOSTARTUP),E(s.Event.VIDEO_CHANGE).in(a.READY)],callbacks:{onenterstate:function(e,n,r,i,a){"none"!=n&&void 0!==r&&void 0!==e&&(a&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),l.logger.log("[ENTER ".concat(i,"] EVENT: ").concat(e," \nfrom: ").concat(n,"\t to: ").concat(r)),t.onEnterStateTimestamp=i||u.getCurrentTimestamp(),t.getStateHandler()[r].onenterstate(e,a))},onleavestate:function(e,n,r,i,a){if(i&&"none"!=n&&void 0!==n&&void 0!==r){a&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a);var o=i-t.onEnterStateTimestamp;t.getStateHandler()[n].onleavestate(o,r)}}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];r?r.call(this.stateMachine,n,t):l.logger.log("Ignored Event: "+e)},t.prototype.sourceChange=function(e,t,n){this.callEvent(s.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},t.prototype.onHeartbeat=function(e){this.stateMachineCallbacks.setVideoTimeEndFromEvent(e);var t=u.getCurrentTimestamp(),n=t-this.onEnterStateTimestamp;this.stateMachineCallbacks.heartbeat(n,"playing",{played:n}),this.onEnterStateTimestamp=t,this.stateMachineCallbacks.setVideoTimeStartFromEvent(e)},t}(c.AnalyticsStateMachine);t.AmazonIVSStateMachine=d;var E=function(e){return{in:function(t){return{name:e,from:t,to:t}}}},p=function(e){return h().filter((function(t){return e.indexOf(t)<0}))},h=function(){return Object.keys(a).map((function(e){return a[e]}))}},978:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=void 0;var n=function(){function e(e,t){this.heartbeatIntervalMs=e,this.playerContext=t}return e.prototype.setListener=function(e){this.listener=e},e.prototype.startHeartbeat=function(){var e=this;void 0!==this.heartbeatInterval&&this.clearHeartbeat(),this.heartbeatInterval=window.setInterval((function(){var t,n={currentTime:e.playerContext.position};null===(t=e.listener)||void 0===t||t.onHeartbeat(n)}),this.heartbeatIntervalMs)},e.prototype.stopHeartbeat=function(){this.clearHeartbeat()},e.prototype.clearHeartbeat=function(){window.clearTimeout(this.heartbeatInterval),this.heartbeatInterval=void 0},e}();t.HeartbeatService=n},2498:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalytics=void 0;var i,a=n(2764),o=n(5464),s=n(1834),l=n(5014),u=n(6767),c=n(1700),d=n(3871);!function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(i||(i={}));t.AdAnalytics=function(){function e(e,t){var n=this;this.onBeforeUnLoadEvent=!1,this.adManifestLoadedEvents=[],this.isPlaying=!1,this.adPodPosition=0,this.analytics=e,this.adapter=t,this.adapter.adCallbacks.onAdStarted=function(e){return n.onAdStarted(e)},this.adapter.adCallbacks.onAdFinished=function(e){return n.onAdFinished(e)},this.adapter.adCallbacks.onAdBreakStarted=function(e){return n.onAdBreakStarted(e)},this.adapter.adCallbacks.onAdBreakFinished=function(e){return n.onAdBreakFinished(e)},this.adapter.adCallbacks.onAdClicked=function(e){return n.onAdClicked(e)},this.adapter.adCallbacks.onAdError=function(e){return n.onAdError(e)},this.adapter.adCallbacks.onAdManifestLoaded=function(e){return n.onAdManifestLoaded(e)},this.adapter.adCallbacks.onPlay=function(){return n.onPlay()},this.adapter.adCallbacks.onPause=function(){return n.onPause()},this.adapter.adCallbacks.onBeforeUnload=function(){return n.onBeforeUnload()},this.adapter.adCallbacks.onAdSkipped=function(e){return n.onAdSkipped(e)},this.adapter.adCallbacks.onAdQuartile=function(e){return n.onAdQuartile(e)},this.viewportTracker=new d.ViewportTracker(this.adapter.getContainer(),(function(){return n.onIntersectionChanged()}),.5)}return e.prototype.release=function(){this.clearCurrentTimeInterval(),this.viewportTracker.dispose()},e.prototype.onIntersectionChanged=function(){this.activeAdSample&&(this.isContainerInViewport()?this.enterViewportTimestamp=c.getCurrentTimestamp():this.enterViewportTimestamp&&(this.activeAdSample.timeInViewport=(this.activeAdSample.timeInViewport||0)+c.getCurrentTimestamp()-this.enterViewportTimestamp))},e.prototype.isContainerInViewport=function(){return!this.viewportTracker||this.viewportTracker.isInViewport()},e.prototype.onPlay=function(){if(this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample){var e=c.getCurrentTimestamp();this.beginPlayingTimestamp=e,this.enterViewportTimestamp=e,this.isPlaying=!0}},e.prototype.onPause=function(){this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample&&(this.updatePlayingTime(this.activeAdSample),this.isPlaying=!1)},e.prototype.onAdManifestLoaded=function(e){var t=e.adConfig;t&&t.tag&&"vmap"===t.tag.type?this.sendAnalyticsRequest(new s.AdBreakSample(e.adConfig,e)):e.adBreak&&this.adManifestLoadedEvents.push(e)},e.prototype.onAdBreakStarted=function(e){this.adPodPosition=0,this.activeAdBreakSample=new s.AdBreakSample(e.adBreak,this.getAdManifestLoadedEvent(e.adBreak)),this.adStartupTimestamp=c.getCurrentTimestamp()},e.prototype.onAdBreakFinished=function(e){this.resetActiveAd(),this.activeAdBreakSample=void 0},e.prototype.onAdStarted=function(e){e.ad.isLinear&&(this.resetActiveAd(),this.activeAdSample=new l.AdSample(e.ad),this.currentTime=void 0,this.activeAdSample.adStartupTime=this.adStartupTimestamp?c.getCurrentTimestamp()-this.adStartupTimestamp:void 0,this.startAd(this.activeAdSample))},e.prototype.onAdFinished=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=r({},this.activeAdSample);t.completed=1,this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.adDuration)}},e.prototype.onAdSkipped=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=r({},this.activeAdSample);t.skipped=1,t.skipPosition=this.currentTime,t.skipPercentage=c.calculatePercentage(this.activeAdSample.skipPosition,this.activeAdSample.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.skipPosition)}},e.prototype.onAdError=function(e){var t,n,r,i=this,a=(t=e.data||{adBreak:void 0,adConfig:void 0,code:void 0,message:void 0}).adConfig,o=t.adBreak,l=t.code,u=t.message,d=new s.AdBreakSample(o||a,o?this.getAdManifestLoadedEvent(o):void 0);d.errorCode=l||e.code,d.errorData=JSON.stringify(e.data),d.errorMessage=u||e.name,this.activeAdSample&&o&&o.ads&&o.ads.includes((function(e){return e.id===i.activeAdSample.adId}))&&(r=(n=this.activeAdSample).errorPosition=this.currentTime,n.errorPercentage=c.calculatePercentage(n.errorPosition,n.adDuration)),this.completeAd(d,n,r)},e.prototype.onAdClicked=function(e){this.activeAdSample&&(this.activeAdSample.adClickthroughUrl=e.clickThroughUrl,this.activeAdSample.clicked=1,this.activeAdSample.clickPosition=this.currentTime,this.activeAdSample.clickPercentage=c.calculatePercentage(this.activeAdSample.clickPosition,this.activeAdSample.adDuration))},e.prototype.onAdQuartile=function(e){this.activeAdSample&&(e.quartile===i.FIRST_QUARTILE?this.activeAdSample.quartile1=1:e.quartile===i.MIDPOINT?this.activeAdSample.midpoint=1:e.quartile===i.THIRD_QUARTILE&&(this.activeAdSample.quartile3=1))},e.prototype.onBeforeUnload=function(){if(!this.onBeforeUnLoadEvent&&(this.onBeforeUnLoadEvent=!0,this.activeAdSample&&this.activeAdBreakSample)){var e=r({},this.activeAdSample);e.closed=1,e.closePosition=this.currentTime,e.closePercentage=c.calculatePercentage(e.closePosition,e.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,e,e.closePosition)}},e.prototype.createNewAdAnalyticsSample=function(e){var t=this.adapter.getAdModuleInfo();return r(r({},new o.AdAnalyticsSample(e)),{analyticsVersion:a.VERSION,adModule:t.name,adModuleVersion:t.version,playerStartupTime:this.analytics.playerStartupTime,pageLoadTime:this.analytics.pageLoadTime,autoplay:this.analytics.autoplay,pageLoadType:c.getPageLoadType()})},e.prototype.getAdManifestLoadedEvent=function(e){if(e)return this.adManifestLoadedEvents.find((function(t){return t.adBreak&&t.adBreak.id===e.id}))},e.prototype.sendAnalyticsRequest=function(e,t){var n=r(r(r({},this.createNewAdAnalyticsSample(this.analytics.sample)),e),t||new l.AdSample);n.time=c.getCurrentTimestamp(),n.adImpressionId=c.generateUUID(),n.percentageInViewport=c.calculatePercentage(n.timeInViewport,n.timePlayed),this.analytics.backend.sendAdRequest(n)},e.prototype.updatePlayingTime=function(e){var t=c.getCurrentTimestamp();this.beginPlayingTimestamp&&this.isPlaying&&(void 0!==e.timePlayed&&(e.timePlayed+=t-this.beginPlayingTimestamp),this.isContainerInViewport()&&this.enterViewportTimestamp&&void 0!==e.timeInViewport&&(e.timeInViewport+=t-this.enterViewportTimestamp))},e.prototype.startAd=function(t){var n=this;t.started=1,t.timePlayed=0,t.timeInViewport=0,t.adPodPosition=this.adPodPosition;var r=c.getCurrentTimestamp();this.beginPlayingTimestamp=r,this.enterViewportTimestamp=this.isContainerInViewport()?r:void 0,this.isPlaying=!0,this.currentTime=0,this.adPodPosition++,this.currentTimeInterval=window.setInterval((function(){try{t&&void 0!==t.adDuration&&t.adDuration>0&&n.adapter.isLinearAdActive()&&(n.currentTime=c.calculateTime(Math.max(n.adapter.currentTime(),0)))}catch(e){u.logger.log("AdStarted monitoring interval failed and got cleared",e),n.resetActiveAd()}}),e.TIMEOUT_CURRENT_TIME_INTERVAL)},e.prototype.completeAd=function(e,t,n){void 0===t&&(t=new l.AdSample),t.exitPosition=n,t.playPercentage=c.calculatePercentage(t.exitPosition,t.adDuration),this.adStartupTimestamp=c.getCurrentTimestamp(),this.updatePlayingTime(t),this.isPlaying=!1,this.sendAnalyticsRequest(e,t)},e.prototype.resetActiveAd=function(){this.clearCurrentTimeInterval(),this.activeAdSample=void 0},e.prototype.clearCurrentTimeInterval=function(){window.clearInterval(this.currentTimeInterval),delete this.currentTime},e.MODULE_NAME="ads",e.TIMEOUT_CURRENT_TIME_INTERVAL=100,e}()},2343:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var i=n(2764),a=n(6087),o=n(2108),s=n(9962),l=n(1942),u=n(5216),c=n(6767),d=n(1700),E=n(2498),p=n(4189),h=n(3382),A=n(4441),f=n(2228);t.Analytics=function(){function e(e,t,n){void 0===n&&(n=new p.BackendFactory);var i=this;this.pageLoadTime=0,this.playerStartupTime=0,this.videoStartupTime=0,this.autoplay=void 0,this.droppedSampleFrames=0,this.startupTime=0,this.featureManager=new s.FeatureManager,this.onErrorDetailEventDispatcher=new h.EventDispatcher,this.authenticationCallback={authenticationCompleted:function(e,t){i.featureManager.configureFeatures(e,t)}},this.guardAgainstMissingVideoTitle=function(e,t){e&&t&&e.title&&!t.title&&c.logger.error("The new analytics configuration does not contain the field title")},this.guardAgainstMissingIsLive=function(e,t){null!=e&&null!=t&&e.isLive&&null==t.isLive&&c.logger.error("The new analytics configuration does not contain the field `isLive`. It will default to `false` which might be unintended? Once stream playback information is available the type will be populated.")},this.sourceChange=function(e){c.logger.log("Processing Source Change for Analytics",e),i.guardAgainstMissingVideoTitle(i.config,e),i.guardAgainstMissingIsLive(i.config,e);var t=i.getMergedAnalyticsConfig(e);i.adapter.sourceChange(t,d.getCurrentTimestamp())},this.setCustomDataOnce=function(e){var t=r({},i.config);i.setState("customdatachange"),i.changeCustomData(e),i.sendAnalyticsRequestAndClearValues(),i.config=r({},t),i.setConfigParameters()},this.setCustomData=function(e){i.adapter.setCustomData(e)},this.getCurrentImpressionId=function(){return i.sample.impressionId},this.getUserId=function(){return i.sessionHandler.userId},this.changeCustomData=function(e){var t,n;i.config=r(r({},i.config),(t=e,n={},l.customDataValuesKeys.forEach((function(e){t[e]&&(n[e]=t[e])})),n)),i.setConfigParameters()};var a=this;this.config=this.buildDefaultAnalyticsConfigValues(e),this.errorDetailTrackingSettingsProvider={get domain(){return a.getDomain(a.config)},get licenseKey(){var e;return null!==(e=a.config.key)&&void 0!==e?e:""},get impressionId(){var e;return null!==(e=a.getCurrentImpressionId())&&void 0!==e?e:""},get collectorConfig(){return a.config.config}},this.adapter=t,this.backendFactory=n,this.sessionHandler=new f.SessionPersistenceHandler(e);var o=this.adapter.onLicenseKeyReceived.subscribe((function(e){i.config.key||(i.config.key=e.licenseKey),o()}));this.sample=this.setupSample(),this.init(),this.setupStateMachineCallbacks();var u=this.adapter.initialize(this);this.featureManager.registerFeatures(u),this.adapter.adModule&&(this.adAnalytics=new E.AdAnalytics(this,this.adapter.adModule)),this.checkForErrorsInConfig(e)}return Object.defineProperty(e.prototype,"version",{get:function(){return i.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorDetailSubscribable",{get:function(){return this.onErrorDetailEventDispatcher},enumerable:!1,configurable:!0}),e.prototype.getPlayerInformationFromAdapter=function(){var e=this.config.player||this.adapter.getPlayerName();return{player:e,version:e+"-"+this.adapter.getPlayerVersion(),playerTech:this.adapter.getPlayerTech()}},e.prototype.updateSamplesToCastClientConfig=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];this.updateSampleToCastClientConfig(i,t)}},e.prototype.updateSampleToCastClientConfig=function(e,t){var n=t.config,r=t.userId,i=t.impressionId,a=t.domain,o=t.path,s=t.language,l=t.userAgent;e.impressionId=i,e.userId=r,e.userAgent=l,e.domain=a,e.path=o,e.language=s,this.setConfigParameters(e,n)},e.prototype.init=function(){!0===this.adapter.supportsDeferredLicenseLoading||""!==this.config.key&&d.validString(this.config.key)?(c.logger.setLogging(this.config.debug||!1),this.featureManager.resetFeatures(),this.backend=this.createBackend(this.config),this.videoStartupTime=0,this.setConfigParameters(),this.generateNewImpressionId(),this.setUserId(),this.adapter.videoCompletionTracker&&this.adapter.videoCompletionTracker.reset(),this.adapter.qualityChangeService.resetValues()):c.logger.error("Invalid analytics license key provided")},e.prototype.release=function(){var e;this.backend=new A.NoOpBackend,null===(e=this.adAnalytics)||void 0===e||e.release(),this.adapter.qualityChangeService.stopResetInterval()},e.prototype.setConfigParameters=function(e,t){void 0===e&&(e=this.sample),void 0===t&&(t=this.config),e.key=t.key,e.playerKey=t.playerKey,t.player&&(e.player=t.player),e.domain=this.getDomainFromConfig(t)||d.sanitizePath(window.location.hostname),e.cdnProvider=t.cdnProvider,e.videoId=t.videoId,e.videoTitle=t.title,e.customUserId=null!=t.userId?t.userId:t.customUserId,d.transferCustomDataFields(t,e),e.experimentName=t.experimentName},e.prototype.generateNewImpressionId=function(){this.sample.impressionId=d.generateUUID()},e.prototype.setUserId=function(){this.sample.userId=this.sessionHandler.userId},e.prototype.setupStateMachineCallbacks=function(){var e=this;this.adapter.stateMachineCallbacks.setup=function(t,n){if(c.logger.log("Setup bitmovin analytics "+e.sample.analyticsVersion+" with impressionId: "+e.sample.impressionId),e.setDuration(t),e.setState(n),e.playerStartupTime=e.sample.playerStartupTime=t,window.performance&&window.performance.timing){var r=d.getCurrentTimestamp()-window.performance.timing.navigationStart;e.pageLoadTime=e.sample.pageLoadTime=r}e.startupTime=t,e.sendAnalyticsRequestAndClearValues(),e.sample.pageLoadTime=0},this.adapter.stateMachineCallbacks.startup=function(t,n){e.setDuration(t),e.videoStartupTime=e.sample.videoStartupTime=t,e.sample.supportedVideoCodecs=u.CodecHelper.supportedVideoFormats,e.setState(n),e.startupTime>0&&(e.startupTime+=t),e.sample.startupTime=e.startupTime,e.autoplay=e.sample.autoplay=e.adapter.getAutoPlay();var r=e.adapter.getDrmPerformanceInfo();null!=r&&(e.sample.drmType=r.drmType,e.sample.drmLoadTime=r.drmLoadTime),e.sendAnalyticsRequestAndClearValues(),e.sample.autoplay=void 0},this.adapter.stateMachineCallbacks.playing=function(t,n){e.setDuration(t),e.setState(n),e.sample.played=t,e.setCompletionValues(),e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.unload=function(t,n){var r=e.sample.videoTimeStart;"playing"===n&&(e.setDuration(t),e.setState(n),e.sample.played=t,e.setCompletionValues(),e.sendUnloadRequest(),d.validNumber(e.sample.videoTimeEnd)&&(r=e.sample.videoTimeEnd)),e.videoStartupTime>0&&(e.setVideoTimeStart(r),e.setVideoTimeEnd(r),e.clearValues(),e.setState("closed"),e.sendUnloadRequest())},this.adapter.stateMachineCallbacks.heartbeat=function(t,n,i){e.setState(n),e.setDuration(t),e.sample=r(r({},e.sample),i),"playing"===n&&e.setCompletionValues(),e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.qualitychange=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.qualitychange_pause=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.qualitychange_rebuffering=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.videoChange=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setPlaybackVideoPropertiesFromEvent(t)},this.adapter.stateMachineCallbacks.audioChange=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setPlaybackAudioPropertiesFromEvent(t)},this.adapter.stateMachineCallbacks.audiotrack_changing=function(){e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.pause=function(t,n){e.setDuration(t),e.setState(n),e.sample.paused=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.paused_seeking=function(t,n){e.setDuration(t),e.setState(n),e.sample.seeked=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.end_play_seeking=function(t,n){e.setState(n),e.setDuration(t),e.sample.seeked=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.rebuffering=function(t,n){e.setDuration(t),e.setState(n),e.sample.buffered=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.videoStartFailed=function(t,n){void 0===n&&(n=!0),e.setState("startup"),e.sample.videoStartFailed=!0,e.sample.videoStartFailedReason=t.reason.reason,null!=t.reason.errorCode&&(e.sample.errorCode=t.reason.errorCode.code,e.sample.errorMessage=t.reason.errorCode.message,n&&e.onErrorDetailEventDispatcher.dispatch(r({},t.reason.errorCode))),n&&e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.error=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setState("error"),e.sample.errorCode=t.code,e.sample.errorMessage=t.message,e.sample.errorData=JSON.stringify(t.legacyData);var n=e.adapter.segments.map((function(e){return e.name}));e.sample.errorSegments=n,e.adapter.onError&&e.adapter.onError(),e.onErrorDetailEventDispatcher.dispatch({code:t.code,message:t.message,errorData:t.data}),e.sendAnalyticsRequestAndClearValues(),delete e.sample.errorCode,delete e.sample.errorMessage,delete e.sample.errorData},this.adapter.stateMachineCallbacks.ad=function(t,n){e.setDuration(t),e.setState(n),e.sample.ad=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.mute=function(){e.sample.isMuted=!0},this.adapter.stateMachineCallbacks.unMute=function(){e.sample.isMuted=!1},this.adapter.stateMachineCallbacks.subtitle_changing=function(){e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent=function(t){d.validNumber(t.currentTime)&&e.setVideoTimeEnd(d.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent=function(t){d.validNumber(t.currentTime)&&e.setVideoTimeStart(d.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.manualSourceChange=function(t){e.adapter.resetSourceRelatedState(),e.sample=e.setupSample(),e.startupTime=0,e.config=Object.keys(t.config).length>0?t.config:e.config,e.init()},this.adapter.stateMachineCallbacks.playlistTransition=function(t){e.sample=e.setupSample(),e.startupTime=0,e.init()},this.adapter.stateMachineCallbacks.initialSourceChange=function(t){e.config=t.config,e.setConfigParameters()},this.adapter.stateMachineCallbacks.end=function(){e.sample=e.setupSample(),e.startupTime=0,e.init()},this.adapter.stateMachineCallbacks.release=function(){e.release()},this.adapter.stateMachineCallbacks.customdatachange=function(t,n,r){r&&r.values&&e.changeCustomData(r.values)}},e.prototype.setDuration=function(e){this.sample.duration=e},e.prototype.setState=function(e){this.sample.state=e},e.prototype.setPlaybackVideoPropertiesFromEvent=function(e){d.validNumber(e.width)&&(this.sample.videoPlaybackWidth=e.width),d.validNumber(e.height)&&(this.sample.videoPlaybackHeight=e.height),d.validNumber(e.bitrate)&&(this.sample.videoBitrate=e.bitrate),d.validString(e.codec)&&(this.sample.videoCodec=e.codec)},e.prototype.setPlaybackAudioPropertiesFromEvent=function(e){d.validNumber(e.bitrate)&&(this.sample.audioBitrate=e.bitrate),d.validString(e.codec)&&(this.sample.audioCodec=e.codec)},e.prototype.setPlaybackInfoFromAdapter=function(){var e=this.adapter.getCurrentPlaybackInfo();e&&(this.sample.isLive=this.getIsLiveFromConfigOrPlaybackInfo(this.config,e.isLive),d.validString(e.size)&&(this.sample.size=e.size),d.validString(e.playerTech)&&(this.sample.playerTech=e.playerTech),d.validNumber(e.videoDuration)&&(this.sample.videoDuration=d.calculateTime(e.videoDuration||0)),d.validString(e.streamFormat)&&(this.sample.streamFormat=e.streamFormat),d.validString(e.mpdUrl)&&(this.sample.mpdUrl=e.mpdUrl),d.validString(e.m3u8Url)&&(this.sample.m3u8Url=e.m3u8Url),d.validString(e.progUrl)&&(this.sample.progUrl=e.progUrl),d.validNumber(e.videoWindowWidth)&&(this.sample.videoWindowWidth=e.videoWindowWidth),d.validNumber(e.videoWindowHeight)&&(this.sample.videoWindowHeight=e.videoWindowHeight),d.validNumber(e.screenHeight)&&(this.sample.screenHeight=e.screenHeight),d.validNumber(e.screenWidth)&&(this.sample.screenWidth=e.screenWidth),d.validNumber(e.videoPlaybackHeight)&&(this.sample.videoPlaybackHeight=e.videoPlaybackHeight),d.validNumber(e.videoPlaybackWidth)&&(this.sample.videoPlaybackWidth=e.videoPlaybackWidth),d.validNumber(e.videoBitrate)&&(this.sample.videoBitrate=e.videoBitrate),d.validNumber(e.audioBitrate)&&(this.sample.audioBitrate=e.audioBitrate),d.validBoolean(e.isMuted)&&(this.sample.isMuted=e.isMuted),d.validBoolean(e.isCasting)&&(this.sample.isCasting=e.isCasting),d.validString(e.castTech)&&(this.sample.castTech=e.castTech),d.validString(e.videoTitle)&&!this.config.title&&(this.sample.videoTitle=e.videoTitle),d.validString(e.audioCodec)&&(this.sample.audioCodec=e.audioCodec),d.validString(e.videoCodec)&&(this.sample.videoCodec=e.videoCodec),d.validString(e.audioLanguage)&&(this.sample.audioLanguage=e.audioLanguage),d.validBoolean(e.subtitleEnabled)&&(this.sample.subtitleEnabled=e.subtitleEnabled),d.validString(e.subtitleLanguage)?this.sample.subtitleLanguage=e.subtitleLanguage:this.sample.subtitleLanguage=void 0,d.validNumber(e.droppedFrames)&&(this.sample.droppedFrames=Math.max(e.droppedFrames-this.droppedSampleFrames,0),this.droppedSampleFrames=e.droppedFrames))},e.prototype.setupSample=function(){return this.droppedSampleFrames=0,r({platform:"web",playerStartupTime:0,pageLoadType:d.getPageLoadType(),path:d.sanitizePath(window.location.pathname),language:navigator.language||navigator.userLanguage,userAgent:navigator.userAgent,screenWidth:screen.width,screenHeight:screen.height,isLive:!1,videoDuration:0,size:o.PlayerSize.Window,time:0,videoWindowWidth:0,videoWindowHeight:0,droppedFrames:0,played:0,buffered:0,paused:0,ad:0,seeked:0,videoPlaybackWidth:0,videoPlaybackHeight:0,videoBitrate:0,audioBitrate:0,videoTimeStart:0,videoTimeEnd:0,videoStartupTime:0,duration:0,startupTime:0,analyticsVersion:i.VERSION,pageLoadTime:0,completedTotal:0},this.getPlayerInformationFromAdapter())},e.prototype.sendAnalyticsRequest=function(){this.setPlaybackInfoFromAdapter(),this.sample.time=d.getCurrentTimestamp(),this.sample.downloadSpeedInfo=this.adapter.downloadSpeedInfo;var e=r({},this.sample);this.backend.sendRequest(e)},e.prototype.sendAnalyticsRequestAndClearValues=function(){this.sendAnalyticsRequest(),this.clearValues()},e.prototype.sendUnloadRequest=function(){this.backend.sendUnloadRequest(this.sample)},e.prototype.sendAnalyticsRequestSynchronous=function(){this.backend.sendRequestSynchronous(this.sample)},e.prototype.clearValues=function(){this.sample.ad=0,this.sample.paused=0,this.sample.played=0,this.sample.seeked=0,this.sample.buffered=0,this.sample.playerStartupTime=0,this.sample.videoStartupTime=0,this.sample.startupTime=0,this.sample.castTech=void 0,this.sample.duration=0,this.sample.droppedFrames=0,this.sample.drmLoadTime=void 0,this.sample.videoStartFailed=void 0,this.sample.videoStartFailedReason=void 0,this.sample.completed=void 0,this.adapter.clearValues()},e.prototype.getIsLiveFromConfigOrPlaybackInfo=function(e,t){return null==t?e.isLive||!1:!!d.validBoolean(t)&&t},e.prototype.getMergedCollectorConfig=function(e,t){void 0===t&&(t=this.config);var n=(t||{}).config;return null!=e&&(n=r(r(r({},n),{enabled:!0}),e.config)),n},e.prototype.getMergedAnalyticsConfig=function(e,t){void 0===t&&(t=this.config);var n=this.getMergedCollectorConfig(e,t);return r(r(r({},t),e),{config:n})},e.prototype.buildDefaultAnalyticsConfigValues=function(e){return d.validBoolean(e.isLive)||(e.isLive=!1),e},e.prototype.checkForErrorsInConfig=function(e){null!=e.customUserId&&null!=e.userId&&c.logger.warning("Configuration Warning: \nCustomUserId and UserId are set in the config \nValue of UserId will be used in sample \nPlease only use one configuartion field to set your userId")},e.prototype.getDomainFromConfig=function(e){var t=e.config;return null!=t&&null!=t.origin?t.origin:void 0},e.prototype.createBackend=function(e){var t=this.getDomain(e);return this.backendFactory.createBackend(e,{key:e.key,domain:t,version:i.VERSION},this.adapter,this.authenticationCallback)},e.prototype.getDomain=function(e){return this.getDomainFromConfig(e)||d.sanitizePath(window.location.hostname)},e.prototype.setCompletionValues=function(){if(this.adapter.videoCompletionTracker){var e=this.adapter.videoCompletionTracker.addWatched({start:this.sample.videoTimeStart,end:this.sample.videoTimeEnd}),t=this.adapter.videoCompletionTracker.getCompletionPercentage();Number.isNaN(e)||Number.isNaN(t)||(this.sample.completed=e,this.sample.completedTotal=t)}},e.prototype.setVideoTimeStart=function(e){this.sample.videoTimeStart=e},e.prototype.setVideoTimeEnd=function(e){this.sample.videoTimeEnd=e},e.prototype.sendQualityChange=function(e,t){this.adapter.qualityChangeService.startResetInterval(),this.adapter.qualityChangeService.increaseCounter(),this.adapter.qualityChangeService.isQualityChangeEventEnabled()?(this.setDuration(t),this.setState(e),this.sendAnalyticsRequestAndClearValues()):(this.setDuration(t),this.adapter.stateMachineCallbacks.error(r(r({},a.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED),{legacyData:void 0,currentTime:void 0,data:{}})))},e.version=i.VERSION,e.LICENSE_CALL_PENDING_TIMEOUT=200,e.PAGE_LOAD_TYPE_TIMEOUT=200,e.CAST_RECEIVER_CONFIG_MESSAGE="CAST_RECEIVER_CONFIG_MESSAGE",e}()},4189:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFactory=void 0;var r=n(5182),i=n(4960),a=n(9334),o=n(7817),s=n(7291),l=n(4441),u=n(8210),c=function(){function e(){}return e.prototype.createBackend=function(e,t,n,r){if(!this.isEnabled(e))return new l.NoOpBackend;var i=this.createInnerBackend(e,t,n,r);return this.decorateWithDebuggingBackend(e,i)},e.prototype.decorateWithDebuggingBackend=function(e,t){return e.debug?new a.DebuggingBackend(e,t):t},e.prototype.decorateWithBackendFromConfigIfAvailable=function(e,t){return void 0!==e&&void 0!==e.config&&void 0!==e.config.wrapBackend?e.config.wrapBackend(t):t},e.prototype.isEnabled=function(e){return void 0===e.config||!1!==e.config.enabled},e.prototype.createInnerBackend=function(e,t,n,a){var l=e.config&&e.config.backendUrl||i.ANALYTICS_BACKEND_BASE_URL,c=new o.LicenseCheckingBackend(t,r.LicenseCall,l,n,a);c=this.decorateWithBackendFromConfigIfAvailable(e,c);var d=new u.SequenceNumberBackend(c);return new s.LongPlaytimeFilteringBackend(d)},e}();t.BackendFactory=c},9334:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggingBackend=void 0;var r=n(6767),i=function(){function e(e,t){this.underlying=t,e.debug&&e.debug.fields&&(this.debugFields=e.debug.fields)}return e.prototype.sendRequest=function(e){this.printFields(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.printFields(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.printFields(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.printFields=function(e){if(this.debugFields&&this.debugFields.length){var t={};this.debugFields.forEach((function(n){return t[n]=e[n]})),r.logger.logTable([t])}},e}();t.DebuggingBackend=i},5032:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadSpeedMeter=void 0;var r=n(9711),i=n(9730),a=function(){function e(){this.measures=[]}return e.prototype.reset=function(){this.measures=[]},e.prototype.addMeasurement=function(e){if(!(e.httpStatus>=400)){var t=new i.Measure(e),n=r.Converter.bitsToBytes(3e8);t.speed>=n||this.measures.push(t)}},e.prototype.getInfo=function(){return{segmentsDownloadCount:this.measures.length,segmentsDownloadSize:this.measures.map((function(e){return e.size})).reduce(this.add,0),segmentsDownloadTime:Math.ceil(1e3*this.totalTime()),avgDownloadSpeed:this.avgSpeed(),minDownloadSpeed:this.minSpeed(),maxDownloadSpeed:this.maxSpeed(),avgTimeToFirstByte:this.avgTimeToFirstByte()}},e.prototype.add=function(e,t){return e+t},e.prototype.avgSpeed=function(){if(0===this.measures.length)return 0;var e=this.speeds().reduce((function(e,t){return e+t}),0),t=this.measures.length;return this.bytePerSecondToBitPerSecond(e/t)},e.prototype.bytePerSecondToBitPerSecond=function(e){return r.Converter.bytesToBits(e)},e.prototype.minSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.min.apply(Math,this.speeds()))},e.prototype.speeds=function(){return this.measures.map((function(e){return e.speed}))},e.prototype.maxSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.max.apply(Math,this.speeds()))},e.prototype.totalTime=function(){return 0===this.measures.length?0:this.measures.reduce((function(e,t){return e+t.duration}),0)},e.prototype.avgTimeToFirstByte=function(){if(0===this.measures.length)return 0;var e=this.measures.reduce((function(e,t){return e+1e3*t.timeToFirstByte}),0)/this.measures.length;return Math.ceil(e)},e}();t.DownloadSpeedMeter=a},3382:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0;var n=function(){function e(){this.callbacks=[]}return e.prototype.subscribe=function(e){var t=this;return this.callbacks.push(e),function(){return t.unsubscribe(e)}},e.prototype.dispatch=function(e){this.callbacks.slice(0).forEach((function(t){t(e)}))},e.prototype.unsubscribe=function(e){var t=this.callbacks.indexOf(e);t>-1&&this.callbacks.splice(t,1)},Object.defineProperty(e.prototype,"subscriberCount",{get:function(){return this.callbacks.length},enumerable:!1,configurable:!0}),e}();t.EventDispatcher=n},7817:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckingBackend=void 0;var i=n(4449),a=n(6767),o=n(4960),s=n(4441),l=n(5684),u=n(7639),c=function(){function e(e,t,n,i,a){var u=this;this.licenseCall=t,this.backendBaseUrl=n,this.adapter=i,this.authenticationCallback=a,this.licenseKeyReceived=function(e){clearTimeout(u.licenseLazyLoadingTimeoutHandle),u.unsubscribeFromAdapter(),u.info.key=e.licenseKey,u.promise=u.wrapLicenseCheckPromiseWithCallback(u.performLicenseCheck(),u.authenticationCallback)},this.licenseCallFailed=function(){clearTimeout(u.licenseLazyLoadingTimeoutHandle),u.unsubscribeFromAdapter(),u.backend=new s.NoOpBackend,u.authenticationCallback.authenticationCompleted(!1,void 0)},this.licenseLazyLoadingTimeout=function(){u.unsubscribeFromAdapter(),u.backend=new s.NoOpBackend,u.authenticationCallback.authenticationCompleted(!1,void 0)},this.info=r({},e),this.backend=new l.QueueBackend,this.licenseCall=t,void 0!==e.key&&""!==e.key?this.promise=this.wrapLicenseCheckPromiseWithCallback(this.performLicenseCheck(),this.authenticationCallback):!0===i.supportsDeferredLicenseLoading?(i.onLicenseKeyReceived.subscribe(this.licenseKeyReceived),i.onLicenseCallFailed.subscribe(this.licenseCallFailed),this.licenseLazyLoadingTimeoutHandle=window.setTimeout(this.licenseLazyLoadingTimeout,o.ANALYTICS_LICENSECALL_TIMEOUT)):(a.authenticationCompleted(!1,void 0),this.backend=new s.NoOpBackend)}return e.prototype.performLicenseCheck=function(){var e=this,t=this.info,n=t.key,r=t.domain,o=t.version;if(!n||""===n){var l={status:i.LicensingResult.Denied,message:"No license key provided"};return this.backend=new s.NoOpBackend,Promise.resolve(l)}return this.licenseCall(n,r,o,this.backendBaseUrl).then((function(t){if(t.status!==i.LicensingResult.Granted)throw new Error(t.message);var r=new u.RemoteBackend(!0,e.backendBaseUrl,n);return e.backend.flushTo(r),e.backend=r,t})).catch((function(t){return"Ignoring Impression due to DNT Header being set"===t.message?a.logger.error("License Check for Bitmovin Analytics failed because of",t):a.logger.errorMessageToUser("License Check for Bitmovin Analytics failed because of",t),e.backend=new s.NoOpBackend,{status:i.LicensingResult.Denied,message:t.message}}))},e.prototype.sendRequest=function(e){this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.unsubscribeFromAdapter=function(){this.adapter.onLicenseKeyReceived.unsubscribe(this.licenseKeyReceived),this.adapter.onLicenseCallFailed.unsubscribe(this.licenseCallFailed)},e.prototype.wrapLicenseCheckPromiseWithCallback=function(e,t){return e.then((function(e){return t.authenticationCompleted(e.status===i.LicensingResult.Granted,e.features),e}))},e}();t.LicenseCheckingBackend=c},7291:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPlaytimeFilteringBackend=void 0;var n=function(){function e(e){this.backend=e}return e.prototype.sendRequest=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.isPlayedAboveThreshold=function(e){return(null==e.played?0:e.played)>=9e4},e}();t.LongPlaytimeFilteringBackend=n},9730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Measure=void 0;var n=function(){function e(e){this.download=e}return Object.defineProperty(e.prototype,"speed",{get:function(){return this.download.size/this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.download.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeToFirstByte",{get:function(){return this.download.timeToFirstByte},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestamp",{get:function(){return this.download.timestamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpStatus",{get:function(){return this.download.httpStatus},enumerable:!1,configurable:!0}),e}();t.Measure=n},4441:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpBackend=void 0;var n=function(){function e(){}return e.prototype.sendRequest=function(e){},e.prototype.sendUnloadRequest=function(e){},e.prototype.sendRequestSynchronous=function(e){},e.prototype.sendAdRequest=function(e){},e}();t.NoOpBackend=n},415:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4960),i=n(4960),a=function(){function e(e){void 0===e&&(e=r.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD),this.qualityChangeThreshold=e,this.qualityChangeCount=0,this.previousVideoBitrate=0,this.previousAudioBitrate=0}return e.prototype.resetValues=function(){this.qualityChangeCount=0,this.previousAudioBitrate=0,this.previousVideoBitrate=0,this.stopResetInterval()},e.prototype.isQualityChangeEventEnabled=function(){return this.qualityChangeCount<=this.qualityChangeThreshold},e.prototype.increaseCounter=function(){this.qualityChangeCount++},e.prototype.shouldAllowVideoQualityChange=function(e){return null!=e&&!isNaN(e)&&this.previousVideoBitrate!==e&&this.isQualityChangeEventEnabled()},e.prototype.setVideoBitrate=function(e){this.previousVideoBitrate=e},e.prototype.shouldAllowAudioQualityChange=function(e){return null!=e&&!isNaN(e)&&this.previousAudioBitrate!==e&&this.isQualityChangeEventEnabled()},e.prototype.setAudioBitrate=function(e){this.previousAudioBitrate=e},e.prototype.startResetInterval=function(){var e=this;void 0===this.resetIntervalId&&(this.resetIntervalId=window.setInterval((function(){e.resetCounter()}),i.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL))},e.prototype.stopResetInterval=function(){void 0!==this.resetIntervalId&&(window.clearInterval(this.resetIntervalId),delete this.resetIntervalId)},e.prototype.resetCounter=function(){this.qualityChangeCount=0},e}();t.default=a},5684:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueBackend=void 0;var n=function(){function e(){this.queue=[],this.unloadQueue=[],this.syncQueue=[],this.adQueue=[]}return e.prototype.sendRequest=function(e){this.queue.push(e)},e.prototype.sendUnloadRequest=function(e){this.unloadQueue.push(e)},e.prototype.sendRequestSynchronous=function(e){this.syncQueue.push(e)},e.prototype.sendAdRequest=function(e){this.adQueue.push(e)},e.prototype.flushTo=function(e){this.queue.forEach((function(t){e.sendRequest(t)})),this.unloadQueue.forEach((function(t){e.sendUnloadRequest(t)})),this.syncQueue.forEach((function(t){e.sendRequestSynchronous(t)})),this.adQueue.forEach((function(t){e.sendAdRequest(t)}))},e}();t.QueueBackend=n},7639:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBackend=void 0;var r=n(1632),i=n(1700),a=function(){function e(e,t,n){this.licenseKey=n,this.hasAdModule=e,this.analyticsCall=new r.AnalyticsCall(t)}return e.prototype.sendRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequest(e,i.noOp)},e.prototype.sendUnloadRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequestSynchronous(e,i.noOp)},e.prototype.sendAdRequest=function(e){e.key=this.licenseKey,this.hasAdModule&&this.analyticsCall.sendAdRequest(e)},e}();t.RemoteBackend=a},9827:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTracker=void 0;var n=function(){function e(){this.segments=[]}return e.prototype.reset=function(){this.segments=[]},e.prototype.addSegment=function(e){this.segments.push(e)},e.prototype.removeSegment=function(e){this.segments=this.segments.filter((function(t){return t.url!==e}))},e.prototype.getSegments=function(){return this.segments},e}();t.SegmentTracker=n},8210:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceNumberBackend=void 0;var n=function(){function e(e){this.sequenceNumber=0,this.underlying=e}return e.prototype.sendRequest=function(e){this.updateSampleBeforeSending(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.updateSampleBeforeSending(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.updateSampleBeforeSending(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.updateSampleBeforeSending=function(e){e.sequenceNumber=this.sequenceNumber++},e}();t.SequenceNumberBackend=n},2228:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionPersistenceHandler=t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME=void 0;var r=n(1700);t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME="bitmovin_analytics_uuid";var i=function(){function e(e){var t=e.config;this.cookiesEnabled=null==t||!1!==t.cookiesEnabled,null!=t&&null!=t.cookiesDomain?this.cookiesDomain=t.cookiesDomain:this.cookiesDomain=null,this.cookiesEnabled||this.ensureNoCookiePresent(),this.userId=this.setupUserId()}return e.prototype.setupUserId=function(){var e=r.getCookie(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME);return r.isNullOrEmptyString(e)&&(e=this.createAndSetNewUserId()),e},e.prototype.createAndSetNewUserId=function(){var e=r.generateUUID();return this.writeCookie(e),e},e.prototype.ensureNoCookiePresent=function(){var e=r.getCookie(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME);if(!r.isNullOrEmptyString(e)){var n="".concat(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;");document.cookie=n}},e.prototype.writeCookie=function(e){if(this.cookiesEnabled){var n="".concat(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME,"=").concat(e,'; path=/; expires="Mon, 31 Dec 2029 23:00:00 GMT"; max-age=315400000');null!=this.cookiesDomain&&(n+="; domain=".concat(this.cookiesDomain)),document.cookie=n}},e}();t.SessionPersistenceHandler=i},5939:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.Overlapping=1]="Overlapping",e[e.FirstContainedInSecond=2]="FirstContainedInSecond",e[e.SecondContainedInFirst=3]="SecondContainedInFirst"}(n||(n={}));var r=function(){function e(){this.watched=[],this.videoDuration=null}return e.prototype.reset=function(){this.watched=[]},e.prototype.setVideoDuration=function(e){this.videoDuration=1e3*e},e.prototype.addWatched=function(e){if(null==this.videoDuration)throw new Error("no video duration set for completion tracker");this.watched.push(e);var t=this.mergeWatched(this.watched);return(this.getDuration(e)-t)/this.videoDuration},e.prototype.getCompletionPercentage=function(){if(null==this.videoDuration)throw new Error("no video duration set for completion tracker");for(var e=0,t=0,n=this.watched;t<n.length;t++){var r=n[t];e+=this.getDuration(r)}return e/this.videoDuration},e.prototype.mergeWatched=function(e){for(var t=0;t<e.length;t++)for(var r=e[t],i=t+1;i<e.length;i++){var a=e[i],o=0,s=this.getOverlappingType(r,a);if(s===n.Overlapping?(this.mergeAndReplace(r,t,a,i),o=this.getOverlappingTimespan(r,a)):s===n.FirstContainedInSecond?(this.watched.splice(t,1),o=this.getDuration(r)):s===n.SecondContainedInFirst&&(this.watched.splice(i,1),o=this.getDuration(a)),s!==n.None)return o+this.mergeWatched(this.watched)}return 0},e.prototype.getOverlappingType=function(e,t){return this.isMomentInTimespan(e.end,t)&&e.start<t.start||this.isMomentInTimespan(e.start,t)&&e.end>t.end?n.Overlapping:this.isMomentInTimespan(e.start,t)&&this.isMomentInTimespan(e.end,t)?n.FirstContainedInSecond:this.isMomentInTimespan(t.start,e)&&this.isMomentInTimespan(t.end,e)?n.SecondContainedInFirst:n.None},e.prototype.isMomentInTimespan=function(e,t){return e>=t.start&&e<t.end},e.prototype.mergeAndReplace=function(e,t,n,r){var i=e.end>n.end?e.end:n.end,a={start:e.start<n.start?e.start:n.start,end:i};this.watched.splice(t,1,a),this.watched.splice(r,1)},e.prototype.getOverlappingTimespan=function(e,t){return(e.end<t.end?e.end:t.end)-(e.start>=t.start?e.start:t.start)},e.prototype.getDuration=function(e){return Math.abs(e.end-e.start)},e}();t.default=r},1325:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CdnProvider=void 0,function(e){e.CLOUDFLARE="cloudflare",e.AKAMAI="akamai",e.FASTLY="fastly",e.MAXCDN="maxcdn",e.CLOUDFRONT="cloudfront",e.CHINACACHE="chinacache",e.BITGRAVITY="bitgravity"}(n||(t.CdnProvider=n={}))},8001:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CastTech=void 0,function(e){e.AirPlay="AirPlay",e.WebSocket="WebSocket",e.GoogleCast="GoogleCast"}(n||(t.CastTech=n={}))},6443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAudioCodec=t.isVideoCodec=void 0;var n=["avc1","avc3","hvc1","av01","av1","hev1","vp9"],r=["mp4a","ec-3","ac-3","opus","audio/mp4"];t.isVideoCodec=function(e){return!!e&&-1!==n.findIndex((function(t){return e.startsWith(t)}))},t.isAudioCodec=function(e){return!!e&&-1!==r.findIndex((function(t){return e.startsWith(t)}))}},6087:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0;t.ErrorCode=function(){function e(e,t){this.code=e,this.message=t}return e.BITMOVIN_PLAYER_LICENSING_ERROR=new e(1103,""),e.SETUP_MISSING_LICENSE_WHITELIST=new e(1105,""),e.QUALITY_CHANGE_THRESHOLD_EXCEEDED=new e(1e4,"ANALYTICS_QUALITY_CHANGE_THRESHOLD_EXCEEDED"),e.BUFFERING_TIMEOUT_REACHED=new e(10001,"ANALYTICS_BUFFERING_TIMEOUT_REACHED"),e.VIDEO_STARTUP_TIMEOUT_REACHED=new e(10002,"ANALYTICS_VIDEOSTART_TIMEOUT_REACHED"),e}()},4057:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0,function(e){e.SETUP="setup",e.READY="ready",e.SOURCE_LOADED="sourceLoaded",e.PLAY="play",e.PLAYING="playing",e.PAUSE="pause",e.TIMECHANGED="timechanged",e.SEEK="seek",e.SEEKED="seeked",e.START_CAST="startCasting",e.END_CAST="endCasting",e.START_BUFFERING="startBuffering",e.END_BUFFERING="endBuffering",e.AUDIOTRACK_CHANGED="audioTrackChanged",e.AUDIO_CHANGE="audioChange",e.VIDEO_CHANGE="videoChange",e.START_FULLSCREEN="startFullscreen",e.END_FULLSCREEN="endFullscreen",e.START_AD="adStart",e.SUBTITLE_CHANGE="subtitleChange",e.END_AD="adEnd",e.MUTE="mute",e.UN_MUTE="unMute",e.ERROR="playerError",e.PLAYBACK_FINISHED="end",e.SCREEN_RESIZE="resize",e.UNLOAD="unload",e.END="end",e.SOURCE_UNLOADED="sourceUnloaded",e.MANUAL_SOURCE_CHANGE="manualSourceChangeInitiated",e.VIDEOSTART_TIMEOUT="VIDEOSTART_TIMEOUT",e.CUSTOM_DATA_CHANGE="customDataChange",e.PLAYLIST_TRANSITION="playlistTransition"}(n||(t.Event=n={}))},9624:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMIMETypeFromFileExtension=t.MIMETypes=void 0;var r=n(1700),i="video/mp4",a="video/webm",o="application/x-mpegURL",s="application/dash+xml";t.MIMETypes={MP4:i,WEBM:a,HLS:o,DASH:s},t.getMIMETypeFromFileExtension=function(e){return e=e.split(/[?#]/)[0].toLowerCase(),(0,r.endsWith)(e,".m3u8")?o:(0,r.endsWith)(e,".mp4")||(0,r.endsWith)(e,".m4v")||(0,r.endsWith)(e,".m4a")?i:(0,r.endsWith)(e,".webm")?a:(0,r.endsWith)(e,".mpd")?s:void 0}},8900:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_LOAD_TYPE=void 0,function(e){e[e.FOREGROUND=1]="FOREGROUND",e[e.BACKGROUND=2]="BACKGROUND"}(n||(t.PAGE_LOAD_TYPE=n={}))},6473:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0,function(e){e.BITMOVIN="bitmovin",e.JW="jw",e.RADIANT="radiant",e.VIDEOJS="videojs",e.HLSJS="hlsjs",e.SHAKA="shaka",e.DASHJS="dashjs",e.HTML5="html5",e.CHROMECAST_SHAKA="chromecast-shaka",e.AMAZON_IVS="amazonivs"}(n||(t.Player=n={}))},2108:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSize=void 0,function(e){e.Window="WINDOW",e.Fullscreen="FULLSCREEN"}(n||(t.PlayerSize=n={}))},5001:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getStreamTypeFromMIMEType=t.StreamTypes=void 0;var i,a=n(9624),o=a.MIMETypes.MP4,s=a.MIMETypes.WEBM,l=a.MIMETypes.HLS,u=a.MIMETypes.DASH,c=((r={})[o]="progressive",r[s]="progressive",r[l]="hls",r[u]="dash",r);!function(e){e.prog="progressive",e.hls="hls",e.dash="dash"}(i||(t.StreamTypes=i={})),t.getStreamTypeFromMIMEType=function(e){return c[e]}},8829:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartFailedReason=void 0;var r=n(6087);t.VideoStartFailedReason=function(){function e(e,t){this.reason=e,this.errorCode=t}return e.PAGE_CLOSED=new e("PAGE_CLOSED",null),e.PLAYER_ERROR=new e("PLAYER_ERROR",null),e.TIMEOUT=new e("TIMEOUT",r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED),e.UNKNOWN=new e("UNKNOWN",null),e}()},5086:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Feature=void 0;var n=function(){function e(){this._config=void 0,this._isEnabled=!0}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),e.prototype.disable=function(){this._isEnabled=!1,this.disabled()},e.prototype.configure=function(e,t){return null!=t&&(this._config=this.extractConfig(t)),this.configured(e,this._config),this._config},e}();t.Feature=n},9962:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureManager=void 0;var r=n(6767),i=function(){function e(){this.features=[]}return e.prototype.registerFeatures=function(e){this.features=e},e.prototype.unregisterFeatures=function(){this.features.forEach((function(e){return e.disable()})),this.features=[]},e.prototype.resetFeatures=function(){this.features.forEach((function(e){return e.reset()}))},e.prototype.configureFeatures=function(e,t){this.features=this.features.filter((function(n){var i=n.configure(e,t);return!(!e||!0!==(null==i?void 0:i.enabled))||(r.logger.log("Disabling feature ".concat(n.constructor.name," as it isn't enabled according to license callback.")),n.disable(),!1)})),this.features.forEach((function(e){return e.enabled()}))},e}();t.FeatureManager=i},8458:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailBackend=void 0;var a=n(6332),o=n(4960),s=n(1700);t.ErrorDetailBackend=function(){function e(e){var t;this._queue=[],this._enabled=!1,this.backendUrl=(0,s.joinUrls)(null!==(t=null==e?void 0:e.backendUrl)&&void 0!==t?t:o.ANALYTICS_BACKEND_BASE_URL,"/analytics/error")}return Object.defineProperty(e.prototype,"queue",{get:function(){return this._queue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!1,configurable:!0}),e.copyErrorDetailTruncateStringsAndUrls=function(e,t,n){var i,a,o=this;return r(r({},e),{message:null===(i=e.message)||void 0===i?void 0:i.substr(0,t),data:this.copyErrorDataTruncateStrings(e.data,t),httpRequests:null===(a=e.httpRequests)||void 0===a?void 0:a.map((function(e){return o.copyHttpRequestTruncateUrls(e,n)}))})},e.copyHttpRequestTruncateUrls=function(e,t){var n,i;return r(r({},e),{url:null===(n=e.url)||void 0===n?void 0:n.substr(0,t),lastRedirectLocation:null===(i=e.lastRedirectLocation)||void 0===i?void 0:i.substr(0,t)})},e.copyErrorDataTruncateStrings=function(e,t){var n,i;return r(r({},e),{exceptionMessage:null===(n=e.exceptionMessage)||void 0===n?void 0:n.substr(0,t),additionalData:null===(i=e.additionalData)||void 0===i?void 0:i.substr(0,t)})},e.copyErrorDetailTruncateHttpRequests=function(e,t){var n;return r(r({},e),{httpRequests:null===(n=e.httpRequests)||void 0===n?void 0:n.slice(-t)})},e.prototype.limitHttpRequestsOfQueuedErrorDetails=function(t){var n=this;this._queue.forEach((function(r,i){n._queue[i]=e.copyErrorDetailTruncateHttpRequests(r,t)}))},e.prototype.send=function(t){var n=e.copyErrorDetailTruncateStringsAndUrls(t,e.MAX_STRING_LENGTH,e.MAX_URL_LENGTH);this.enabled?(0,a.post)(this.backendUrl,n,(function(){})):this._queue.push(n)},e.prototype.flush=function(){for(var e=i([],this._queue,!0),t=e.shift();null!=t;)this.removeFromQueue(t),this.send(t),t=e.shift()},e.prototype.clear=function(){this._queue.splice(0,this._queue.length)},e.prototype.removeFromQueue=function(e){var t=this._queue.findIndex((function(t){return t===e}));t>=0&&this._queue.splice(t,1)},e.MAX_URL_LENGTH=450,e.MAX_STRING_LENGTH=400,e}()},3909:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailTracking=void 0;var o=n(2764),s=n(6767),l=n(1700),u=function(e){function t(t,n,r,i){var u=e.call(this)||this;return u.settingsProvider=t,u.backend=n,u.subscribables=r,u.httpRequestTracking=i,u.errorIndex=0,u.onErrorHandler=function(e){var t,n;try{if(!u.isEnabled)return;var r=null===(t=u.httpRequestTracking)||void 0===t?void 0:t.httpRequests,i=null==r?void 0:a([],r,!0),c=u.errorIndex;u.errorIndex++;var d={platform:"web",licenseKey:u.settingsProvider.licenseKey,domain:u.settingsProvider.domain,impressionId:u.settingsProvider.impressionId,analyticsVersion:o.VERSION,errorId:c,timestamp:(0,l.getCurrentTimestamp)(),code:e.code,message:e.message,data:null!==(n=e.errorData)&&void 0!==n?n:{additionalData:void 0,exceptionMessage:void 0,exceptionStacktrace:void 0},httpRequests:i};s.logger.log("ErrorDetailTracking.onError: ".concat(JSON.stringify(d))),u.backend.send(d)}catch(e){s.logger.error("ErrorDetailTracking.onError: Error in handler",e)}},r.forEach((function(e){return e.subscribe(u.onErrorHandler)})),u}return i(t,e),t.prototype.reset=function(){var e;null===(e=this.httpRequestTracking)||void 0===e||e.reset(),this.errorIndex=0},t.prototype.enabled=function(){this.backend.enabled=!0,this.backend.flush()},t.prototype.disabled=function(){var e,t=this;this.errorIndex=0,null===(e=this.httpRequestTracking)||void 0===e||e.disable(),this.backend.clear(),this.subscribables.forEach((function(e){return e.unsubscribe(t.onErrorHandler)}))},t.prototype.configured=function(e,t){var n,r,i=Math.max(null!==(n=null==t?void 0:t.numberOfHttpRequests)&&void 0!==n?n:0,0);null===(r=this.httpRequestTracking)||void 0===r||r.configure(i),this.backend.limitHttpRequestsOfQueuedErrorDetails(i)},t.prototype.extractConfig=function(e){return e.errorDetails},t}(n(5086).Feature);t.ErrorDetailTracking=u},7999:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTracking=void 0;var r=n(6767),i=n(127);t.HttpRequestTracking=function(){function e(t){var n=this;this.subscribables=t,this._maxRequests=e.DEFAULT_MAX_REQUESTS,this._httpRequestQueue=new i.Queue,this.onDownloadFinishedHandler=function(e){try{n.addRequest(e.httpRequest)}catch(e){r.logger.error("HttpRequestTracking.onDownloadFinished: Error in handler",e)}},t.forEach((function(e){return e.subscribe(n.onDownloadFinishedHandler)}))}return Object.defineProperty(e.prototype,"maxRequests",{get:function(){return this._maxRequests},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpRequests",{get:function(){return this._httpRequestQueue.items},enumerable:!1,configurable:!0}),e.prototype.configure=function(e){this._maxRequests=e,this._httpRequestQueue.limit(e)},e.prototype.disable=function(){var e=this;this.subscribables.forEach((function(t){return t.unsubscribe(e.onDownloadFinishedHandler)})),this._httpRequestQueue.clear()},e.prototype.reset=function(){this._httpRequestQueue.clear()},e.prototype.addRequest=function(e){this._httpRequestQueue.offer(e),this._httpRequestQueue.limit(this._maxRequests)},e.DEFAULT_MAX_REQUESTS=10,e}()},8105:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestType=void 0,function(e){e.DRM_LICENSE_WIDEVINE="DRM_LICENSE_WIDEVINE",e.DRM_OTHER="DRM_OTHER",e.MEDIA_THUMBNAILS="MEDIA_THUMBNAILS",e.MEDIA_VIDEO="MEDIA_VIDEO",e.MEDIA_AUDIO="MEDIA_AUDIO",e.MEDIA_PROGRESSIVE="MEDIA_PROGRESSIVE",e.MEDIA_SUBTITLES="MEDIA_SUBTITLES",e.MANIFEST_DASH="MANIFEST_DASH",e.MANIFEST_HLS="MANIFEST_HLS",e.MANIFEST_HLS_MASTER="MANIFEST_HLS_MASTER",e.MANIFEST_HLS_VARIANT="DRM_LICENSMANIFEST_HLS_VARIANTE_WIDEVINE",e.MANIFEST_SMOOTH="MANIFEST_SMOOTH",e.MANIFEST="MANIFEST",e.KEY_HLS_AES="KEY_HLS_AES",e.UNKNOWN="UNKNOWN",e.TIME_SYNC="TIME_SYNC",e.DRM_CERTIFICATE_FAIRPLAY="DRM_CERTIFICATE_FAIRPLAY",e.DRM_LICENSE_CLEARKEY="DRM_LICENSE_CLEARKEY",e.DRM_LICENSE_PRIMETIME="DRM_LICENSE_PRIMETIME",e.DRM_LICENSE_FAIRPLAY="DRM_LICENSE_FAIRPLAY",e.DRM_LICENSE_PLAYREADY="DRM_LICENSE_PLAYREADY",e.MANIFEST_ADS="MANIFEST_ADS"}(n||(t.HttpRequestType=n={}))},7256:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModule=void 0;var r=n(8760);
|
|
11
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmovin=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.analytics=t())}(self,(function(){return function(){var e={9363:function(e,t){var n;n={VERSION:"2.4.0",Result:{SUCCEEDED:1,NOTRANSITION:2,CANCELLED:3,PENDING:4},Error:{INVALID_TRANSITION:100,PENDING_TRANSITION:200,INVALID_CALLBACK:300},WILDCARD:"*",ASYNC:"async",create:function(e,t){var r="string"==typeof e.initial?{state:e.initial}:e.initial,i=e.terminal||e.final,a=t||e.target||{},o=e.events||[],s=e.callbacks||{},l={},u={},c=function(e){var t=Array.isArray(e.from)?e.from:e.from?[e.from]:[n.WILDCARD];l[e.name]=l[e.name]||{};for(var r=0;r<t.length;r++)u[t[r]]=u[t[r]]||[],u[t[r]].push(e.name),l[e.name][t[r]]=e.to||t[r];e.to&&(u[e.to]=u[e.to]||[])};r&&(r.event=r.event||"startup",c({name:r.event,from:"none",to:r.state}));for(var d=0;d<o.length;d++)c(o[d]);for(var E in l)l.hasOwnProperty(E)&&(a[E]=n.buildEvent(E,l[E]));for(var E in s)s.hasOwnProperty(E)&&(a[E]=s[E]);return a.current="none",a.is=function(e){return Array.isArray(e)?e.indexOf(this.current)>=0:this.current===e},a.can=function(e){return!this.transition&&void 0!==l[e]&&(l[e].hasOwnProperty(this.current)||l[e].hasOwnProperty(n.WILDCARD))},a.cannot=function(e){return!this.can(e)},a.transitions=function(){return(u[this.current]||[]).concat(u[n.WILDCARD]||[])},a.isFinished=function(){return this.is(i)},a.error=e.error||function(e,t,n,r,i,a,o){throw o||a},a.states=function(){return Object.keys(u).sort()},r&&!r.defer&&a[r.event](),a},doCallback:function(e,t,r,i,a,o){if(t)try{return t.apply(e,[r,i,a].concat(o))}catch(t){return e.error(r,i,a,o,n.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",t)}},beforeAnyEvent:function(e,t,r,i,a){return n.doCallback(e,e.onbeforeevent,t,r,i,a)},afterAnyEvent:function(e,t,r,i,a){return n.doCallback(e,e.onafterevent||e.onevent,t,r,i,a)},leaveAnyState:function(e,t,r,i,a){return n.doCallback(e,e.onleavestate,t,r,i,a)},enterAnyState:function(e,t,r,i,a){return n.doCallback(e,e.onenterstate||e.onstate,t,r,i,a)},changeState:function(e,t,r,i,a){return n.doCallback(e,e.onchangestate,t,r,i,a)},beforeThisEvent:function(e,t,r,i,a){return n.doCallback(e,e["onbefore"+t],t,r,i,a)},afterThisEvent:function(e,t,r,i,a){return n.doCallback(e,e["onafter"+t]||e["on"+t],t,r,i,a)},leaveThisState:function(e,t,r,i,a){return n.doCallback(e,e["onleave"+r],t,r,i,a)},enterThisState:function(e,t,r,i,a){return n.doCallback(e,e["onenter"+i]||e["on"+i],t,r,i,a)},beforeEvent:function(e,t,r,i,a){if(!1===n.beforeThisEvent(e,t,r,i,a)||!1===n.beforeAnyEvent(e,t,r,i,a))return!1},afterEvent:function(e,t,r,i,a){n.afterThisEvent(e,t,r,i,a),n.afterAnyEvent(e,t,r,i,a)},leaveState:function(e,t,r,i,a){var o=n.leaveThisState(e,t,r,i,a),s=n.leaveAnyState(e,t,r,i,a);return!1!==o&&!1!==s&&(n.ASYNC===o||n.ASYNC===s?n.ASYNC:void 0)},enterState:function(e,t,r,i,a){n.enterThisState(e,t,r,i,a),n.enterAnyState(e,t,r,i,a)},buildEvent:function(e,t){return function(){var r=this.current,i=t[r]||(t[n.WILDCARD]!=n.WILDCARD?t[n.WILDCARD]:r)||r,a=Array.prototype.slice.call(arguments);if(this.transition)return this.error(e,r,i,a,n.Error.PENDING_TRANSITION,"event "+e+" inappropriate because previous transition did not complete");if(this.cannot(e))return this.error(e,r,i,a,n.Error.INVALID_TRANSITION,"event "+e+" inappropriate in current state "+this.current);if(!1===n.beforeEvent(this,e,r,i,a))return n.Result.CANCELLED;if(r===i)return n.afterEvent(this,e,r,i,a),n.Result.NOTRANSITION;var o=this;this.transition=function(){return o.transition=null,o.current=i,n.enterState(o,e,r,i,a),n.changeState(o,e,r,i,a),n.afterEvent(o,e,r,i,a),n.Result.SUCCEEDED},this.transition.cancel=function(){o.transition=null,n.afterEvent(o,e,r,i,a)};var s=n.leaveState(this,e,r,i,a);return!1===s?(this.transition=null,n.Result.CANCELLED):n.ASYNC===s?n.Result.PENDING:this.transition?this.transition():void 0}}},e.exports&&(t=e.exports=n),t.StateMachine=n},2764:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="v2.31.1"},877:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Adapter=void 0;var r=n(6767),i=function(){function e(){}return e.prototype.getCurrentImpressionId=function(){if(this.guardAgainstNotInitializedAnalytics())return this.analytics.getCurrentImpressionId()},e.prototype.getUserId=function(){if(this.guardAgainstNotInitializedAnalytics())return this.analytics.getUserId()},e.prototype.setCustomData=function(e){this.guardAgainstNotInitializedAnalytics()&&this.internalAdapter.setCustomData(e)},e.prototype.setCustomDataOnce=function(e){this.guardAgainstNotInitializedAnalytics()&&this.analytics.setCustomDataOnce(e)},e.prototype.sourceChange=function(e){this.guardAgainstNotInitializedAnalytics()&&this.analytics.sourceChange(e)},e.prototype.hasPlayerAlreadyBeenAugmented=function(e){return e.__bitmovinAnalyticsHasBeenSetup},e.prototype.markPlayerInstanceAsAugmented=function(e){e.__bitmovinAnalyticsHasBeenSetup=!0},e.prototype.guardAgainstNotInitializedAnalytics=function(){return!!this.analytics||(r.logger.log("Bitmovin Analytics: Adapter hasn't been initialized yet"),!1)},e}();t.Adapter=i},4715:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(3159),u=n(8584),c=function(e){function t(t,n,r){var i=e.call(this)||this;if(i.hasPlayerAlreadyBeenAugmented(n))return o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i;var s=new u.SourceUrlProvider;return i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.AmazonIVSInternalAdapter(n,s,r),i.analytics=new a.Analytics(t,i.internalAdapter),i.wrapPlayerLoad(n,s),i}return i(t,e),t.prototype.wrapPlayerLoad=function(e,t){var n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.m3u8Url=r[0],n.apply(e,r)}},t}(s.Adapter);t.AmazonIVSAdapter=c},8760:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8Adapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(351),u=function(e){function t(t,n){var r=e.call(this)||this;if(r.hasPlayerAlreadyBeenAugmented(t))return o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r;r.markPlayerInstanceAsAugmented(t);var i=t.getConfig(),s=i.analytics;return void 0===s&&(s={}),s.playerKey=s.playerKey||i.key,r.internalAdapter=new l.Bitmovin8InternalAdapter(t,n),r.analytics=new a.Analytics(s,r.internalAdapter),t.analytics=r.analytics,r.wrapPlayerLoad(t,r.analytics),r}return i(t,e),t.prototype.wrapPlayerLoad=function(e,t){var n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(r.length>0){var a=r[0].analytics;t.sourceChange(a)}return n.apply(e,r)}},t}(s.Adapter);t.Bitmovin8Adapter=u},5531:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CAFv3Adapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(5109),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.CAFv3InternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.CAFv3Adapter=u},4921:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashjsAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(4827),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.DashjsInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.DashjsAdapter=u},2989:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLVideoElementAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(889),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.HTMLVideoElementInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.HTMLVideoElementAdapter=u},9894:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(7082),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.HlsInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.HlsAdapter=u},4009:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShakaAdapter=void 0;var a=n(2343),o=n(4057),s=n(6767),l=n(877),u=n(4102),c=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(s.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new u.ShakaInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i.wrapPlayerLoad(n),i)}return i(t,e),t.prototype.wrapPlayerLoad=function(e){var t=this,n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return new Promise((function(i,a){n.apply(e,r).then((function(e){return i(e)})).catch((function(e){var n,r={currentTime:0,code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:void 0,message:JSON.stringify({category:null==e?void 0:e.category,severity:null==e?void 0:e.severity}),data:{additionalData:JSON.stringify(null==e?void 0:e.data)}};t.internalAdapter.eventCallback(o.Event.ERROR,r),a(e)}))}))}},t}(l.Adapter);t.ShakaAdapter=c},5553:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsAdapter=void 0;var a=n(2343),o=n(6767),s=n(877),l=n(6038),u=function(e){function t(t,n,r){var i=e.call(this)||this;return i.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i):(i.markPlayerInstanceAsAugmented(n),i.internalAdapter=new l.VideojsInternalAdapter(n,r),i.analytics=new a.Analytics(t,i.internalAdapter),i)}return i(t,e),t}(s.Adapter);t.VideojsAdapter=u},558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8HttpRequestTrackingAdapter=void 0;var r=n(3382),i=n(8105),a=n(1700),o=function(){function e(e){var t=this;this.eventDispatcher=new r.EventDispatcher,this.playerExports=e.exports,e.on(this.playerExports.PlayerEvent.DownloadFinished,(function(e){return t.onDownloadFinished(e)}))}return e.prototype.subscribe=function(e){return this.eventDispatcher.subscribe(e)},e.prototype.unsubscribe=function(e){this.eventDispatcher.unsubscribe(e)},e.prototype.onDownloadFinished=function(e){var t,n,r;this.eventDispatcher.dispatch({httpRequest:{downloadTime:null!==(t=(0,a.calculateTimeWithUndefined)(null==e?void 0:e.downloadTime))&&void 0!==t?t:0,httpStatus:null!==(n=null==e?void 0:e.httpStatus)&&void 0!==n?n:0,success:null!==(r=null==e?void 0:e.success)&&void 0!==r&&r,timestamp:(0,a.getCurrentTimestamp)(),url:null==e?void 0:e.url,size:null==e?void 0:e.size,timeToFirstByte:(0,a.calculateTimeWithUndefined)(null==e?void 0:e.timeToFirstByte),type:this.mapHttpRequestType(null==e?void 0:e.downloadType)}})},e.prototype.mapHttpRequestType=function(e){switch(e){case this.playerExports.HttpRequestType.MANIFEST_DASH:return i.HttpRequestType.MANIFEST_DASH;case this.playerExports.HttpRequestType.MANIFEST_HLS_MASTER:return i.HttpRequestType.MANIFEST_HLS_MASTER;case this.playerExports.HttpRequestType.MANIFEST_HLS_VARIANT:return i.HttpRequestType.MANIFEST_HLS_VARIANT;case this.playerExports.HttpRequestType.MANIFEST_SMOOTH:return i.HttpRequestType.MANIFEST_SMOOTH;case this.playerExports.HttpRequestType.MANIFEST_ADS:return i.HttpRequestType.MANIFEST_ADS;case this.playerExports.HttpRequestType.MEDIA_AUDIO:return i.HttpRequestType.MEDIA_AUDIO;case this.playerExports.HttpRequestType.MEDIA_VIDEO:return i.HttpRequestType.MEDIA_VIDEO;case this.playerExports.HttpRequestType.MEDIA_SUBTITLES:return i.HttpRequestType.MEDIA_SUBTITLES;case this.playerExports.HttpRequestType.MEDIA_THUMBNAILS:return i.HttpRequestType.MEDIA_THUMBNAILS;case this.playerExports.HttpRequestType.DRM_LICENSE_WIDEVINE:return i.HttpRequestType.DRM_LICENSE_WIDEVINE;case this.playerExports.HttpRequestType.DRM_LICENSE_PLAYREADY:return i.HttpRequestType.DRM_LICENSE_PLAYREADY;case this.playerExports.HttpRequestType.DRM_LICENSE_FAIRPLAY:return i.HttpRequestType.DRM_LICENSE_FAIRPLAY;case this.playerExports.HttpRequestType.DRM_LICENSE_PRIMETIME:return i.HttpRequestType.DRM_LICENSE_PRIMETIME;case this.playerExports.HttpRequestType.DRM_LICENSE_CLEARKEY:return i.HttpRequestType.DRM_LICENSE_CLEARKEY;case this.playerExports.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY:return i.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY;case this.playerExports.HttpRequestType.KEY_HLS_AES:return i.HttpRequestType.KEY_HLS_AES;case this.playerExports.HttpRequestType.TIME_SYNC:return i.HttpRequestType.TIME_SYNC;default:return i.HttpRequestType.UNKNOWN}},e}();t.Bitmovin8HttpRequestTrackingAdapter=o},351:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8InternalAdapter=void 0;var o,s=n(3464),l=n(5032),u=n(9827),c=n(5939),d=n(8001),E=n(6087),p=n(4057),h=n(6473),A=n(2108),f=n(8458),m=n(3909),v=n(7999),T=n(2033),S=n(7444),y=n(6767),I=n(4960),g=n(558),_=n(8700),N=n(1340),C=n(9782),P=n(1078);!function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(o||(o={}));var R=function(e){function t(t,n){var r=e.call(this,n)||this;return r.player=t,r.onBeforeUnLoadEvent=!1,r.getPlayerVersion=function(){return r.player.version},r.getPlayerName=function(){return h.Player.BITMOVIN},r.getPlayerTech=function(){return r.player.getPlayerType()},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.stateMachine=new s.Bitmovin8AnalyticsStateMachine(r.stateMachineCallbacks,r.opts),r.speedMeter=new N.Bitmovin8SpeedMeterAdapter(t,new l.DownloadSpeedMeter).getDownloadSpeedMeter(),r.segmentTracker=new _.Bitmovin8SegmentTrackerAdapter(t,new u.SegmentTracker).getSegmentTracker(),r.httpRequestTrackingAdapter=new g.Bitmovin8HttpRequestTrackingAdapter(t),r.videoCompletionTracker=new c.default,r}return i(t,e),Object.defineProperty(t.prototype,"downloadSpeedInfo",{get:function(){return this.speedMeter.getInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"segments",{get:function(){return this.segmentTracker.getSegments()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adModule",{get:function(){return this._adModule},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsDeferredLicenseLoading",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){try{if(null!==this.player&&null!==this.player.getCurrentTime&&!this.isAdPlaying)return this.player.getCurrentTime()}catch(e){y.logger.warning("Analytics Collector attempted to access player, but player is not available anymore")}return this.lastTrackedCurrentTime?this.lastTrackedCurrentTime:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdPlaying",{get:function(){var e=this.player.ads&&this.player.ads.getActiveAd();return null!=e},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){this.registerPlayerEventListeners(),this.registerUnloadEventListeners(),this._adModule=new P.Bitmovin8AdModule(this.player,this.windowEventTracker);var t=new v.HttpRequestTracking([this.httpRequestTrackingAdapter]);return[new m.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new f.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],t)]},t.prototype.clearValues=function(){this.speedMeter.reset()},t.prototype.clearSegments=function(){this.segmentTracker.reset()},t.prototype.getAutoPlay=function(){return this.player.getConfig().playback&&this.player.getConfig().playback.autoplay||!1},t.prototype.getCurrentPlaybackInfo=function(){var t,n=a(a({},e.prototype.getCommonPlaybackInfo.call(this)),{size:this.player.getViewMode()===o.Fullscreen?A.PlayerSize.Fullscreen:A.PlayerSize.Window,playerTech:this.getPlayerTech(),isLive:this.player.isLive(),videoDuration:(0,T.normalizeVideoDuration)(this.videoDuration),streamFormat:this.player.getStreamType(),videoWindowWidth:this.player.getContainer().offsetWidth,videoWindowHeight:this.player.getContainer().offsetHeight,isMuted:this.player.isMuted(),isCasting:this.player.isCasting(),audioLanguage:null!=this.player.getAudio()?null===(t=this.player.getAudio())||void 0===t?void 0:t.lang:void 0,subtitleEnabled:!1,droppedFrames:null!=this.player.getSource()?this.player.getDroppedVideoFrames():0});return this.applySubtitleProperties(n),this.applyPlaybackQualityProperties(n),this.applyCastingProperties(n),this.applySourceProperties(n),n},t.prototype.sourceChange=function(e,t){this.stateMachine.sourceChange(e,t,this.currentTime)},t.prototype.onError=function(){this.clearSegments()},t.prototype.registerPlayerEventListeners=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,(function(t){e.segmentTracker.reset(),e.eventCallback(p.Event.SOURCE_UNLOADED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SourceLoaded,(function(t){e.videoCompletionTracker.reset(),e.resetSourceRelatedState(),e.videoDuration=e.player.getDuration(),e.videoCompletionTracker.setVideoDuration(e.player.getDuration()),e.eventCallback(p.Event.SOURCE_LOADED,{})})),this.player.on(this.player.exports.PlayerEvent.CastStarted,(function(t){e.eventCallback(p.Event.START_CAST,t)})),this.player.on(this.player.exports.PlayerEvent.CastStopped,(function(){e.eventCallback(p.Event.END_CAST,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Play,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(p.Event.PLAY,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Playing,(function(t){"advertising-api"!==t.issuer&&e.eventCallback(p.Event.PLAYING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Paused,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(p.Event.PAUSE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.TimeChanged,(function(t){e.isAdPlaying||(e.lastTrackedCurrentTime=e.player.getCurrentTime()),e.eventCallback(p.Event.TIMECHANGED,{currentTime:e.lastTrackedCurrentTime})})),this.player.on(this.player.exports.PlayerEvent.Seek,(function(t){e.allowSeeking(t)&&e.eventCallback(p.Event.SEEK,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Seeked,(function(){e.eventCallback(p.Event.SEEKED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.StallStarted,(function(){e.eventCallback(p.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.StallEnded,(function(){e.eventCallback(p.Event.END_BUFFERING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AudioPlaybackQualityChanged,(function(){var t=e.player.getPlaybackAudioData();e.qualityChangeService.shouldAllowAudioQualityChange(t.bitrate)&&(e.qualityChangeService.setAudioBitrate(t.bitrate),e.eventCallback(p.Event.AUDIO_CHANGE,{bitrate:t.bitrate,currentTime:e.currentTime,codec:t.codec}))})),this.player.on(this.player.exports.PlayerEvent.VideoPlaybackQualityChanged,(function(){var t=e.player.getPlaybackVideoData();e.qualityChangeService.shouldAllowVideoQualityChange(t.bitrate)&&(e.qualityChangeService.setVideoBitrate(t.bitrate),e.eventCallback(p.Event.VIDEO_CHANGE,{width:t.width,height:t.height,bitrate:t.bitrate,currentTime:e.currentTime,codec:t.codec}))})),this.player.on(this.player.exports.PlayerEvent.ViewModeChanged,(function(t){"fullscreen"===t.to?e.eventCallback(p.Event.START_FULLSCREEN,{currentTime:e.currentTime}):"fullscreen"===t.from&&e.eventCallback(p.Event.END_FULLSCREEN,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdStarted,(function(t){e.eventCallback(p.Event.START_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdFinished,(function(t){e.eventCallback(p.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdSkipped,(function(t){e.eventCallback(p.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdError,(function(t){e.eventCallback(p.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Muted,(function(){e.eventCallback(p.Event.MUTE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Unmuted,(function(){e.eventCallback(p.Event.UN_MUTE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Error,(function(t){e.eventCallback(p.Event.ERROR,{code:t.code,message:t.name,legacyData:t.data,currentTime:e.currentTime,data:{additionalData:JSON.stringify(t.data)}}),t.code!==E.ErrorCode.BITMOVIN_PLAYER_LICENSING_ERROR.code&&t.code!==E.ErrorCode.SETUP_MISSING_LICENSE_WHITELIST.code||e._onLicenseCallFailed.dispatch({})})),this.player.on(this.player.exports.PlayerEvent.PlaybackFinished,(function(){e.eventCallback(p.Event.PLAYBACK_FINISHED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.DownloadFinished,(function(t){0===t.downloadType.indexOf("drm/license/")&&(e.drmPerformanceInfo={drmType:t.downloadType.replace("drm/license/",""),drmLoadTime:1e3*t.downloadTime})})),this.player.on(this.player.exports.PlayerEvent.AudioChanged,(function(t){e.eventCallback(p.Event.AUDIOTRACK_CHANGED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SubtitleEnabled,(function(t){e.eventCallback(p.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SubtitleDisabled,(function(t){e.eventCallback(p.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.LicenseValidated,(function(t){t.data.analytics&&void 0!==t.data.analytics.key?e._onLicenseKeyReceived.dispatch({licenseKey:t.data.analytics.key}):e._onLicenseCallFailed.dispatch({})}))},t.prototype.registerUnloadEventListeners=function(){var e=this,t=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=e.lastTrackedCurrentTime;e.eventCallback(p.Event.UNLOAD,{currentTime:t})}e.release()};t=t.bind(!0),this.player.on(this.player.exports.PlayerEvent.Destroy,t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.applySourceProperties=function(e){var t=this.player.getSource();if(null!=t){e.videoTitle=t.title,e.mpdUrl=t.dash,e.m3u8Url=t.hls;var n=(0,S.getSourceInfoFromBitmovinSourceConfig)(t.progressive,this.player);e.progUrl=n.progUrl,"progressive"===this.player.getStreamType()&&(e.videoBitrate=n.progBitrate)}},t.prototype.applySubtitleProperties=function(e){var t;this.player.subtitles&&(t=this.player.subtitles.list().find((function(e){return!0===e.enabled}))),e.subtitleEnabled=null!=t,e.subtitleLanguage=null!=t?t.lang:null},t.prototype.applyPlaybackQualityProperties=function(e){var t=this.player.getPlaybackVideoData();null!==t&&(e.videoBitrate=t.bitrate,e.videoPlaybackHeight=t.height,e.videoPlaybackWidth=t.width,e.videoCodec=t.codec);var n=this.player.getPlaybackAudioData();null!==n&&(e.audioBitrate=n.bitrate,e.audioCodec=n.codec)},t.prototype.applyCastingProperties=function(e){var t=this.player.isCasting()||this.player.isAirplayActive()||!1;if(e.isCasting=t,t)if(this.player.isAirplayActive())e.castTech=d.CastTech.AirPlay;else{var n=this.player.getConfig().remotecontrol;if(null!=n)switch(n.type){case"googlecast":e.castTech=d.CastTech.GoogleCast;break;case"websocket":e.castTech=d.CastTech.WebSocket}}},t.prototype.allowSeeking=function(e){var t=e;return Math.abs(t.position-t.seekTarget)>I.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD},t}(C.InternalAdapter);t.Bitmovin8InternalAdapter=R},8700:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8SegmentTrackerAdapter=void 0;var r=n(1700),i=function(){function e(e,t){var n=this;this.handleSegmentPlaybackEvent=function(e){n.segmentTracker.removeSegment(e.url)},this.segmentTracker=t,e.on(e.exports.PlayerEvent.DownloadFinished,(function(e){return n.handleOnDownloadFinishEvent(e)})),e.on(e.exports.PlayerEvent.SegmentPlayback,(function(e){return n.handleSegmentPlaybackEvent(e)}))}return e.prototype.getSegmentTracker=function(){return this.segmentTracker},e.prototype.handleOnDownloadFinishEvent=function(e){if(0===e.downloadType.indexOf("media/video")){var t=e.url,n={name:r.getURLResourceName(t),url:t,timestamp:e.timestamp};this.segmentTracker.addSegment(n)}},e}();t.Bitmovin8SegmentTrackerAdapter=i},1340:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8SpeedMeterAdapter=void 0;var n=function(){function e(e,t){var n=this;this.meter=t,e.on(e.exports.PlayerEvent.DownloadFinished,(function(e){return n.handleOnDownloadFinishEvent(e)}))}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleOnDownloadFinishEvent=function(e){e.success&&0===e.downloadType.indexOf("media/video")&&this.meter.addMeasurement({duration:e.downloadTime,size:e.size,timeToFirstByte:e.timeToFirstByte,timestamp:new Date,httpStatus:e.httpStatus})},e}();t.Bitmovin8SpeedMeterAdapter=n},5109:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CAFv3InternalAdapter=void 0;var a=n(3395),o=n(4057),s=n(6473),l=n(8458),u=n(3909),c=n(2033),d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.context=t,r.getPlayerName=function(){return s.Player.CHROMECAST_SHAKA},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return!(!r.currentItem||!r.currentItem.autoplay)&&r.currentItem.autoplay},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.stateMachine=new a.HTML5AnalyticsStateMachine(r.stateMachineCallbacks,r.opts),r.playerManager=t.getPlayerManager(),r.isSeeking=!1,r}return i(t,e),t.prototype.initialize=function(e){return this.register(),[new u.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.getPlayerVersion=function(){return window.cast&&window.cast.framework?window.cast.framework.VERSION:"unknown"},t.prototype.sourceChange=function(e,t){this.stateMachine.sourceChange(e,t,this.playerManager.getCurrentTimeSec())},t.prototype.getCurrentPlaybackInfo=function(){var e=this.playerManager.getStats();return{isLive:this.getIsLive(),playerTech:this.getPlayerTech(),videoDuration:(0,c.normalizeVideoDuration)(this.mediaInformation?this.mediaInformation.duration:0),videoPlaybackHeight:e.height,videoPlaybackWidth:e.width,audioCodec:this.activeAudioTrack?this.activeAudioTrack.trackContentType:void 0,audioLanguage:this.activeAudioTrack?this.activeAudioTrack.language:void 0,subtitleLanguage:this.activeTextTracks?this.activeTextTracks.map((function(e){return e.language})).join(","):void 0,droppedFrames:0}},t.prototype.register=function(){var e=this;this.playerManager.addEventListener("PLAYER_LOADING",(function(t){e.eventCallback(o.Event.SETUP,{})})),this.playerManager.addEventListener("PLAYER_LOAD_COMPLETE",(function(t){var n=e.playerManager.getAudioTracksManager();e.activeAudioTrack=n.getActiveTrack();var r=e.playerManager.getTextTracksManager();e.activeTextTracks=r.getActiveTracks();var i=e.playerManager.getQueueManager();e.currentItem=i.getCurrentItem(),e.mediaInformation=t.media,e.eventCallback(o.Event.READY,{})})),this.playerManager.addEventListener("PLAY",(function(t){e.eventCallback(o.Event.PLAY,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("PAUSE",(function(t){e.onPaused(e.playerManager.getCurrentTimeSec())})),this.playerManager.addEventListener("ERROR",(function(t){var n=null!=t.error?t.error:void 0;e.eventCallback(o.Event.ERROR,{currentTime:e.playerManager.getCurrentTimeSec(),code:t.detailedErrorCode,message:t.reason,legacyData:n,data:{additionalData:JSON.stringify(n)}})})),this.playerManager.addEventListener("SEEKING",(function(t){e.isSeeking=!0,e.onPaused(t.currentMediaTime),e.eventCallback(o.Event.SEEK,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("SEEKED",(function(t){e.isSeeking=!1,e.eventCallback(o.Event.SEEKED,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("STALLED",(function(e){})),this.playerManager.addEventListener("BUFFERING",(function(t){!e.isSeeking&&t.isBuffering&&e.eventCallback(o.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.playerManager.addEventListener("TIME_UPDATE",(function(t){e.isSeeking||e.eventCallback(o.Event.TIMECHANGED,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("REQUEST_LOAD",(function(t){e.currentItem&&e.eventCallback(o.Event.PLAYLIST_TRANSITION,{currentTime:e.playerManager.getCurrentTimeSec()})}))},t.prototype.onPaused=function(e){this.eventCallback(o.Event.PAUSE,{currentTime:e})},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.playerManager.getCurrentTimeSec()},enumerable:!1,configurable:!0}),t.prototype.getIsLive=function(){return!(!this.mediaInformation||"LIVE"!==this.mediaInformation.streamType)||(!!this.playerManager.getLiveSeekableRange()||void 0)},t}(n(9782).InternalAdapter);t.CAFv3InternalAdapter=d},4827:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashjsInternalAdapter=void 0;var a=n(4057),o=n(9624),s=n(6473),l=n(8458),u=n(3909),c=n(6767),d=function(e){function t(t,n){var r=e.call(this,void 0,n)||this;return r.mediaPlayer=t,r.getPlayerName=function(){return s.Player.DASHJS},r.getPlayerVersion=function(){return r.mediaPlayer.getVersion()},r}return i(t,e),t.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t);var r=null;try{r=this.mediaPlayer.getVideoElement()}catch(e){}return r?(this.setMediaElement(r),this.registerMediaElementEventsForDashJS()):this.mediaPlayer.on("manifestLoaded",(function(){try{r=n.mediaPlayer.getVideoElement(),n.setMediaElement(r),n.registerMediaElementEventsForDashJS()}catch(e){c.logger.errorMessageToUser("Something went wrong while getting underlying HTMLVideoElement. Not possible to attach adapter and initialize Bitmovin Analytics. Error: ",e),n.release()}}),this),[new u.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},t.prototype.registerMediaElementEventsForDashJS=function(){var e=this,t=this.mediaElement;t&&this.listenToMediaElementEvent("playing",(function(){var n=t.currentTime;e.needsFirstPlayIntent=!1,e.eventCallback(a.Event.TIMECHANGED,{currentTime:n})}))},t.prototype.getMIMEType=function(){return o.MIMETypes.DASH},t.prototype.getStreamURL=function(){if(this.mediaPlayer){var e=this.mediaPlayer.getSource();return e?e.toString():void 0}},t.prototype.getCurrentQualityLevelInfo=function(){if(!this.mediaPlayer)return null;try{var e=this.mediaPlayer.getBitrateInfoListFor("video")[this.mediaPlayer.getQualityFor("video")];return null==e?null:{width:e.width,height:e.height,bitrate:e.bitrate}}catch(e){c.logger.warning("Quality information not available")}return null},t}(n(3434).HTML5InternalAdapter);t.DashjsInternalAdapter=d},3434:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5InternalAdapter=void 0;var o=n(3395),s=n(5939),l=n(4057),u=n(9624),c=n(6473),d=n(2108),E=n(5001),p=n(2033),h=n(1700),A=n(1700),f=n(9782),m=n(6009);t.HTML5InternalAdapter=function(e){function t(t,n){var r=e.call(this,n)||this;return r.mediaElement=t,r.onBeforeUnLoadEvent=!1,r.previousMutedValue=!1,r.getPlayerName=function(){return c.Player.HTML5},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return!!r.mediaElement&&r.mediaElement.autoplay},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.isLive=function(){return!!r.mediaElement&&r.mediaElement.duration===1/0},r.initializeStateMachine(),r.mediaElEventHandlers=[],r.bufferingTimeout=void 0,r.isBuffering=!1,r.lastIsLiveStatus=!1,r.isPaused=!1,r.isSeeking=!1,r.previousMediaTime=0,r.previousClientTime=0,r.needsReadyEvent=!0,r.needsFirstPlayIntent=!0,r.mediaElementSet=!1,r.videoCompletionTracker=new s.default,r.playerStatisticsProvider=new m.default(t),r}return i(t,e),Object.defineProperty(t.prototype,"segments",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0,this.playerStatisticsProvider.reset()},t.prototype.initialize=function(e){return this.mediaElement&&this.setMediaElement(),this.registerWindowEvents(),[]},t.prototype.getStreamSources=function(e){if(!e)return{};switch(this.getStreamType()){case"hls":return{m3u8Url:e};case"dash":return{mpdUrl:e};default:return{progUrl:e}}},t.prototype.getCurrentPlaybackInfo=function(){var e=a(a(a({},this.getCommonPlaybackInfo()),this.getStreamSources(this.getStreamURL())),{streamFormat:this.getStreamType(),isLive:this.isLive(),size:(0,A.isVideoInFullscreen)()?d.PlayerSize.Fullscreen:d.PlayerSize.Window,playerTech:this.getPlayerTech(),droppedFrames:this.playerStatisticsProvider.getDroppedFrames()});this.mediaElement&&(e=a(a({},e),{videoDuration:(0,p.normalizeVideoDuration)(this.mediaElement.duration),isMuted:this.mediaElement.muted,videoWindowHeight:this.mediaElement.height,videoWindowWidth:this.mediaElement.width}));var t=this.getCurrentQualityLevelInfo();return t&&(e=a(a({},e),{videoPlaybackHeight:t.height,videoPlaybackWidth:t.width,videoBitrate:t.bitrate})),e},Object.defineProperty(t.prototype,"currentTime",{get:function(){if(!this.mediaElement)throw new Error("No media attached");return this.mediaElement.currentTime},enumerable:!1,configurable:!0}),t.prototype.setMediaElement=function(e){if(void 0===e&&(e=null),e&&this.mediaElement&&(this.unregisterMediaElement(),this.mediaElementSet=!1),e&&(this.mediaElement=e),!this.mediaElement)throw new Error("No media element owned");if(this.mediaElementSet)throw new Error("Media element already set (only call this once)");this.mediaElementSet=!0,this.registerMediaElement(),this.onMaybeReady()},t.prototype.getMIMEType=function(){var e=this.getStreamURL();if(e&&void 0!==e)return(0,u.getMIMETypeFromFileExtension)(e)},t.prototype.getStreamType=function(){var e=this.getMIMEType();if(e)return(0,E.getStreamTypeFromMIMEType)(e)},t.prototype.getStreamURL=function(){var e=this.mediaElement;if(e)return e.src},t.prototype.resetMedia=function(){this.mediaElement=void 0,this.mediaElEventHandlers=[],window.clearTimeout(this.bufferingTimeout)},t.prototype.registerMediaElement=function(){var e=this,t=this.mediaElement;t&&(this.wrapMediaElementLoad(t),this.listenToMediaElementEvent("loadstart",(function(){e.eventCallback(l.Event.READY,{})})),this.listenToMediaElementEvent("loadedmetadata",(function(){1===t.readyState&&(e.checkQualityLevelAttributes(!0),null!=e.mediaElement&&(e.videoCompletionTracker.reset(),e.videoCompletionTracker.setVideoDuration(e.mediaElement.duration),e.previousMutedValue=e.mediaElement.muted))})),this.listenToMediaElementEvent("play",(function(){var n=t.currentTime;e.needsFirstPlayIntent=!1,e.eventCallback(l.Event.PLAY,{currentTime:n})})),this.listenToMediaElementEvent("pause",(function(){e.onPaused()})),this.listenToMediaElementEvent("playing",(function(){clearTimeout(e.bufferingTimeout),e.isPaused=!1})),this.listenToMediaElementEvent("error",(function(){var n,r,i=t.currentTime,a=t.error;e.eventCallback(l.Event.ERROR,{currentTime:i,code:null!==(n=null==a?void 0:a.code)&&void 0!==n?n:void 0,message:null!==(r=null==a?void 0:a.message)&&void 0!==r?r:void 0,data:{}})})),this.listenToMediaElementEvent("volumechange",(function(){var n=t.muted,r=t.currentTime,i=t.volume,a=e.isAudioMuted(n,i);e.previousMutedValue!==a&&(a?e.eventCallback(l.Event.MUTE,{currentTime:r}):e.eventCallback(l.Event.UN_MUTE,{currentTime:r}),e.previousMutedValue=a)})),this.listenToMediaElementEvent("seeking",(function(){var n=t.currentTime;e.eventCallback(l.Event.SEEK,{currentTime:n})})),this.listenToMediaElementEvent("seeked",(function(){var n=t.currentTime;clearTimeout(e.bufferingTimeout),e.eventCallback(l.Event.SEEKED,{currentTime:n})})),this.listenToMediaElementEvent("timeupdate",(function(){var n=t.currentTime;e.isBuffering=!1,e.isSeeking=!1,e.needsFirstPlayIntent||(e.isPaused||e.eventCallback(l.Event.TIMECHANGED,{currentTime:n}),e.checkQualityLevelAttributes(),e.checkSeeking(),e.checkPlayheadProgress(),e.previousMediaTime=n)})),this.listenToMediaElementEvent("stalled",(function(){})),this.listenToMediaElementEvent("waiting",(function(){e.checkSeeking(),e.onBuffering()})))},t.prototype.listenToMediaElementEvent=function(e,t){if(!this.mediaElement)throw new Error("No media attached");var n=t.bind(this);this.mediaElEventHandlers.push({event:e,handler:n}),this.mediaElement.addEventListener(e,n,!1)},t.prototype.onMaybeReady=function(){this.needsReadyEvent&&this.mediaElement&&(this.needsReadyEvent=!1,this.getCurrentPlaybackInfo(),this.videoCompletionTracker.reset(),this.videoCompletionTracker.setVideoDuration(this.mediaElement.duration),this.eventCallback(l.Event.READY,{currentTime:this.currentTime}))},t.prototype.unregisterMediaElement=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement;this.mediaElEventHandlers.forEach((function(t){e.removeEventListener(t.event,t.handler)})),this.resetMedia()},t.prototype.onBuffering=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement.currentTime;this.isBuffering||this.isPaused&&!this.isSeeking||(this.isSeeking?this.eventCallback(l.Event.SEEK,{currentTime:e}):this.eventCallback(l.Event.START_BUFFERING,{currentTime:e}),this.isBuffering=!0)},t.prototype.onPaused=function(e){if(!this.isPaused){if(!this.mediaElement)throw new Error("No media attached");e||(e=this.mediaElement.currentTime),this.eventCallback(l.Event.PAUSE,{currentTime:e}),this.isPaused=!0}},t.prototype.registerWindowEvents=function(){this.windowEventTracker.addEventListener("beforeunload",this.onPageClose.bind(this)),this.windowEventTracker.addEventListener("unload",this.onPageClose.bind(this))},t.prototype.onPageClose=function(){if(!this.onBeforeUnLoadEvent){this.onBeforeUnLoadEvent=!0;var e=this.mediaElement,t=void 0;null!=e&&(t=e.currentTime),this.eventCallback(l.Event.UNLOAD,{currentTime:t})}this.release()},t.prototype.checkPlayheadProgress=function(){var e=this;if(!this.mediaElement)throw new Error("No media attached");var n=this.mediaElement;n.paused&&this.onPaused(),clearTimeout(this.bufferingTimeout),this.bufferingTimeout=window.setTimeout((function(){n.paused||n.ended&&!e.isBuffering||n.currentTime-e.previousMediaTime<t.BUFFERING_TIMECHANGED_TIMEOUT&&e.onBuffering()}),t.BUFFERING_TIMECHANGED_TIMEOUT)},t.prototype.checkQualityLevelAttributes=function(e){if(void 0===e&&(e=!1),!this.mediaElement)throw new Error("No media attached");var t=this.mediaElement,n=this.getCurrentQualityLevelInfo();if(n){var r=n.bitrate,i=n.width,a=n.height,o=this.isLive();if(o!==this.lastIsLiveStatus&&(this.lastIsLiveStatus=o),null!=r&&this.qualityChangeService.shouldAllowVideoQualityChange(r)){this.qualityChangeService.setVideoBitrate(r);var s={width:i,height:a,bitrate:r,currentTime:t.currentTime};e||this.eventCallback(l.Event.VIDEO_CHANGE,s)}}},t.prototype.sourceChange=function(e,t){this.stateMachine.sourceChange(e,t,this.mediaElement?this.mediaElement.currentTime:void 0)},t.prototype.getSelectedSubtitleFromMediaElement=function(e){if(null!=e.textTracks){for(var t=0,n=e.textTracks;t<n.length;t++){var r=n[t];if(null!=r.mode&&"showing"===r.mode){var i=null!=r.language&&r.language.length>0;return{enabled:i,language:i?r.language:void 0}}}return{enabled:!1}}},t.prototype.initializeStateMachine=function(){this.stateMachine=new o.HTML5AnalyticsStateMachine(this.stateMachineCallbacks,this.opts),this.stateMachine.callEvent(l.Event.SETUP,{},0)},t.prototype.wrapMediaElementLoad=function(e){var t=this,n=e.load;e.load=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t.sourceChange({},h.getCurrentTimestamp()),n.apply(e,r)}},t.prototype.checkSeeking=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement.currentTime,t=Math.abs(e-this.previousMediaTime),n=(h.getCurrentTimestamp()-this.previousClientTime)/1e3;t>2*n&&(this.isSeeking=!0,this.onPaused(this.previousMediaTime+n)),this.previousClientTime=h.getCurrentTimestamp()},t.BUFFERING_TIMECHANGED_TIMEOUT=1e3,t}(f.InternalAdapter)},889:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLVideoElementInternalAdapter=void 0;var a=n(6473),o=n(1700),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.getPlayerName=function(){return a.Player.HTML5},r.getPlayerVersion=function(){var e=(0,o.getBrowserInfo)();return"".concat(e.name," ").concat(e.version)},r}return i(t,e),t.prototype.getStreamURL=function(){return this.mediaElement?this.mediaElement.currentSrc:void 0},t.prototype.getCurrentQualityLevelInfo=function(){return{bitrate:void 0,width:this.mediaElement?this.mediaElement.videoWidth:void 0,height:this.mediaElement?this.mediaElement.videoHeight:void 0}},t}(n(3434).HTML5InternalAdapter);t.HTMLVideoElementInternalAdapter=s},7082:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInternalAdapter=void 0;var o=n(5032),s=n(4057),l=n(9624),u=n(6473),c=n(8458),d=n(3909),E=n(3434),p=n(5003),h=function(e){function t(t,n){var r=e.call(this,void 0,n)||this;return r.hls=t,r.getPlayerName=function(){return u.Player.HLSJS},r.getPlayerVersion=function(){return r.hls.constructor.version},r.isLive=function(){var e=r.hls;if(!e.levels||!e.currentLevel)return!1;if(e.currentLevel<0)return!1;var t=e.levels[e.currentLevel];return!(!t||!t.details)&&t.details.live},r.onDestroying=function(){r.eventCallback(s.Event.SOURCE_UNLOADED,{}),r.release()},r.resetMedia(),r.speedMeter=new p.HlsSpeedMeterAdapter(t,new o.DownloadSpeedMeter).getDownloadSpeedMeter(),r}return i(t,e),Object.defineProperty(t.prototype,"downloadSpeedInfo",{get:function(){return this.speedMeter.getInfo()},enumerable:!1,configurable:!0}),t.prototype.initialize=function(t){return e.prototype.initialize.call(this,t),this.registerHlsEvents(),[new d.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new c.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},t.prototype.clearValues=function(){this.speedMeter.reset()},t.prototype.getCurrentQualityLevelInfo=function(){if(!this.hls.levels)return null;var e=this.hls.levels[this.hls.currentLevel];return e?{bitrate:e.bitrate,width:e.width,height:e.height}:null},t.prototype.getMIMEType=function(){return l.MIMETypes.HLS},t.prototype.getStreamURL=function(){return this.hls.url},t.prototype.registerHlsEvents=function(){this.hls.on("hlsMediaAttaching",this.onMediaAttaching.bind(this)),this.hls.on("hlsMediaDetaching",this.onMediaDetaching.bind(this)),this.hls.on("hlsManifestLoading",this.onManifestLoading.bind(this)),this.hls.on("hlsAudioTrackSwitched",this.onAudioTrackSwitched.bind(this)),this.hls.on("hlsSubtitleTrackSwitch",this.onSubtitleLanguageSwitched.bind(this)),this.hls.on("hlsDestroying",this.onDestroying.bind(this)),this.hls.on("hlsError",this.onHlsError.bind(this)),this.hls.media&&(this.onMediaAttaching(),this.onManifestLoading())},t.prototype.onMediaAttaching=function(){this.mediaElement||(this.mediaElement=this.hls.media,this.registerMediaElement(),this.onMaybeReady())},t.prototype.onMediaDetaching=function(){this.unregisterMediaElement()},t.prototype.onManifestLoading=function(){this.onMaybeReady()},t.prototype.getCurrentPlaybackInfo=function(){var t=this.getSelectedSubtitleLanguage();return a(a({},e.prototype.getCurrentPlaybackInfo.call(this)),{audioLanguage:this.getSelectedAudioLanguage(),subtitleEnabled:null!=t?t.enabled:void 0,subtitleLanguage:null!=t?t.language:void 0})},t.prototype.onHlsError=function(e,t){if(!t||t.fatal){var n=this.mediaElement,r=void 0;null!=n&&(r=n.currentTime);var i=null!=t?"".concat(t.type,": ").concat(t.details):void 0;this.eventCallback(s.Event.ERROR,{currentTime:r,code:this.getErrorCodeFromHlsErrorType(t.type),message:i,data:{}})}},t.prototype.onAudioTrackSwitched=function(e,t){var n,r=this.mediaElement;null!=r&&(n=r.currentTime),this.eventCallback(s.Event.AUDIOTRACK_CHANGED,{currentTime:n})},t.prototype.onSubtitleLanguageSwitched=function(e,t){var n,r=this.mediaElement;null!=r&&(n=r.currentTime),this.eventCallback(s.Event.SUBTITLE_CHANGE,{currentTime:n})},t.prototype.getErrorCodeFromHlsErrorType=function(e){switch(e){case"networkError":return 2;case"mediaError":return 3;case"keySystemError":return 4;case"muxError":return 5;default:return 1}},t.prototype.getSelectedAudioLanguage=function(){if(!(null==this.hls.audioTrack||this.hls.audioTrack<0))return this.hls.audioTracks[this.hls.audioTrack].lang},t.prototype.getSelectedSubtitleLanguage=function(){if(null!=this.hls.subtitleDisplay){var e=this.hls.subtitleTrack>=0&&!0===this.hls.subtitleDisplay;return{enabled:e,language:e?this.hls.subtitleTracks[this.hls.subtitleTrack].lang:void 0}}var t=this.hls.subtitleTrackController;if(null!=t&&null!=t.media)return this.getSelectedSubtitleFromMediaElement(t.media)},t}(E.HTML5InternalAdapter);t.HlsInternalAdapter=h},5003:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlsSpeedMeterAdapter=void 0;var n=function(){function e(e,t){var n=this;this.meter=t,e.on(e.constructor.Events.FRAG_LOADED,(function(e,t){return n.handleFragmentLoadedEvent(t)}))}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleFragmentLoadedEvent=function(e){"main"===e.frag.type&&this.meter.addMeasurement({duration:(e.stats.tload-e.stats.trequest)/1e3,size:e.stats.total,timeToFirstByte:(e.stats.tfirst-e.stats.trequest)/1e3,timestamp:new Date,httpStatus:e.networkDetails.status})},e}();t.HlsSpeedMeterAdapter=n},9782:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalAdapter=void 0;var i=n(3382),a=n(415),o=n(4057),s=n(3318),l=n(6767),u=n(1700),c=n(3068),d=function(){function e(e){var t=this;this.stateMachineCallbacks=r({},s.defaultStateMachineCallbacks),this.qualityChangeService=new a.default,this._onLicenseKeyReceived=new i.EventDispatcher,this._onLicenseCallFailed=new i.EventDispatcher,this.drmPerformanceInfo=void 0,this._windowEventTracker=new c.WindowEventTracker,this.eventCallback=function(e,n){n=n||{},t.stateMachine?t.stateMachine.callEvent(e,n,(0,u.getCurrentTimestamp)()):l.logger.log("Bitmovin Analytics: StateMachine isn't ready yet")},e||(e={starttime:void 0}),e.starttime||(e.starttime=(0,u.getCurrentTimestamp)()),this.opts=e}return Object.defineProperty(e.prototype,"windowEventTracker",{get:function(){return this._windowEventTracker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLicenseKeyReceived",{get:function(){return this._onLicenseKeyReceived},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLicenseCallFailed",{get:function(){return this._onLicenseCallFailed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"downloadSpeedInfo",{get:function(){return{segmentsDownloadCount:0,segmentsDownloadSize:0,segmentsDownloadTime:0,avgDownloadSpeed:0,minDownloadSpeed:0,maxDownloadSpeed:0,avgTimeToFirstByte:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segments",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.release=function(){this.stateMachine.resetIntervals(),this.stateMachineCallbacks.release(),this.resetSourceRelatedState(),this._windowEventTracker.release()},e.prototype.getCommonPlaybackInfo=function(){return{screenHeight:screen.height,screenWidth:screen.width}},e.prototype.clearValues=function(){},e.prototype.clearSegments=function(){},e.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0},e.prototype.setCustomData=function(e){var t=this.stateMachine.currentState;!this.stateMachine.currentState||"PAUSE"!==this.stateMachine.currentState&&"PLAYING"!==this.stateMachine.currentState?this.stateMachineCallbacks.customdatachange(void 0,void 0,{values:e}):(this.eventCallback(o.Event.CUSTOM_DATA_CHANGE,{currentTime:this.currentTime}),this.eventCallback(o.Event[t],{values:e,currentTime:this.currentTime}))},e.prototype.isAudioMuted=function(e,t){return e||t<.01},e}();t.InternalAdapter=d},4102:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShakaInternalAdapter=void 0;var a=n(4057),o=n(9624),s=n(6473),l=n(8458),u=n(3909),c=n(6767),d=function(e){function t(t,n){var r=e.call(this,t.getMediaElement(),n)||this;return r.player=t,r.getPlayerName=function(){return s.Player.SHAKA},r.getPlayerVersion=function(){return r.player.constructor.version},r.isLive=function(){return!!r.player&&r.player.isLive()},r.onUnloading=function(){r.eventCallback(a.Event.SOURCE_UNLOADED,{}),r.release()},r}return i(t,e),t.prototype.initialize=function(t){var n,r=this;e.prototype.initialize.call(this,t);try{n=this.player.getMediaElement()}catch(e){}if(null==n){var i=function(e){if("media-source"===e.state)try{r.player.removeEventListener("onstatechange",i),n=r.player.getMediaElement(),r.setMediaElement(n)}catch(e){c.logger.errorMessageToUser("Something went wrong while getting underlying HTMLVideoElement. Not possible to attach adapter and initialize Bitmovin Analytics. Error: ",e),r.release()}};this.player.addEventListener("onstatechange",i),this.player.addEventListener("unloading",this.onUnloading.bind(this))}else this.setMediaElement(n);return[new u.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},t.prototype.getMIMEType=function(){return o.MIMETypes.DASH},t.prototype.getStreamURL=function(){return this.player?this.player.getAssetUri():null},t.prototype.getCurrentQualityLevelInfo=function(){var e=this.player.getVariantTracks().filter((function(e){return e.active})).filter((function(e){return e.videoCodec||void 0!==e.videoId}))[0];return e?{bitrate:e.videoBandwidth||e.bandwidth,width:e.width,height:e.height}:null},t}(n(3434).HTML5InternalAdapter);t.ShakaInternalAdapter=d},6038:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsInternalAdapter=void 0;var o=n(5918),s=n(5939),l=n(6443),u=n(4057),c=n(9624),d=n(6473),E=n(2108),p=n(5001),h=n(8458),A=n(3909),f=n(2033),m=n(9065),v=function(e){function t(t,n){var r=e.call(this,n)||this;return r.player=t,r._subtitleInfo={enabled:!1},r.onBeforeUnLoadEvent=!1,r.previousTime=0,r.getPlayerVersion=function(){return window.videojs?window.videojs.VERSION:"unknown"},r.getPlayerName=function(){return d.Player.VIDEOJS},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return!0===r.player.autoplay()},r.getDrmPerformanceInfo=function(){return r.drmPerformanceInfo},r.stateMachine=new o.VideojsAnalyticsStateMachine(r.stateMachineCallbacks,r.opts),r.videoCompletionTracker=new s.default,r}return i(t,e),t.prototype.initialize=function(e){return this.register(),[new A.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new h.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.getStreamType=function(e){var t,n,r=(0,c.getMIMETypeFromFileExtension)(e);return r||(r=null===(n=(t=this.player).currentType)||void 0===n?void 0:n.call(t))?(0,p.getStreamTypeFromMIMEType)(r):void 0},t.prototype.getStreamSources=function(e){switch(this.getStreamType(e)){case"hls":return{m3u8Url:e};case"dash":return{mpdUrl:e};default:return{progUrl:e}}},t.prototype.getCurrentPlaybackInfo=function(){this.selectedAudioLanguage=this.getSelectedAudioTrackLanguage(this.player);var e=this.getCodecInfo(this.player.tech({IWillNotUseThisInPlugins:!0})),t=a(a(a({},this.getCommonPlaybackInfo()),this.getStreamSources(this.player.currentSrc())),{streamFormat:this.getStreamType(this.player.currentSrc()),isLive:this.player.duration()===1/0,size:this.player.isFullscreen()?E.PlayerSize.Fullscreen:E.PlayerSize.Window,playerTech:this.getPlayerTech(),isMuted:this.player.muted(),videoDuration:(0,f.normalizeVideoDuration)(this.player.duration()),videoWindowHeight:this.player.height(),videoWindowWidth:this.player.width(),videoPlaybackHeight:this.player.videoHeight(),videoPlaybackWidth:this.player.videoWidth(),audioLanguage:this.selectedAudioLanguage,subtitleEnabled:this._subtitleInfo.enabled,subtitleLanguage:this._subtitleInfo.language,videoCodec:null==e?void 0:e.videoCodec,audioCodec:null==e?void 0:e.audioCodec,droppedFrames:0}),n=this.getCurrentQualityLevelInfo();return n&&(t.videoPlaybackWidth=n.width||t.videoPlaybackWidth,t.videoPlaybackWidth=n.height||t.videoPlaybackHeight,t.videoBitrate=n.bitrate),t},t.prototype.getCurrentQualityLevelInfo=function(){return null},t.prototype.register=function(){var e=this,t=this;this.player.on("loadstart",(function(){t.eventCallback(u.Event.MANUAL_SOURCE_CHANGE,{config:{}})})),this.player.on("loadedmetadata",(function(){t.videoCompletionTracker.reset(),t.videoCompletionTracker.setVideoDuration(this.duration()),t.previousTime=0,t.eventCallback(u.Event.SOURCE_LOADED,{})})),this.player.ready((function(){t._subtitleInfo=t.getSubtitleInfo(this),t.eventCallback(u.Event.READY,{})})),this.player.on("play",(function(){t.eventCallback(u.Event.PLAY,{currentTime:this.currentTime()})})),this.player.on("pause",(function(){this.seeking()||t.eventCallback(u.Event.PAUSE,{currentTime:this.currentTime()})})),this.player.on("error",(function(){var e=this.error();t.eventCallback(u.Event.ERROR,{currentTime:this.currentTime(),code:e.code,message:e.message,data:{}})})),this.player.on("volumechange",(function(){var e=this.muted(),n=this.volume(),r=t.isAudioMuted(e,n);this.previousMutedValue!==r&&(r?t.eventCallback(u.Event.MUTE,{currentTime:this.currentTime()}):t.eventCallback(u.Event.UN_MUTE,{currentTime:this.currentTime()}),this.previousMutedValue=r)})),this.player.on("seeking",(function(){t.eventCallback(u.Event.SEEK,{currentTime:null!=t.previousTime?t.previousTime:this.currentTime()})})),this.player.on("seeked",(function(){t.eventCallback(u.Event.SEEKED,{currentTime:this.currentTime()})})),this.player.on("texttrackchange",(function(){var e=t.getSubtitleInfo(this),n=null==t._subtitleInfo||(0,m.isDifferentSubtitleInfo)(t._subtitleInfo,e);t._subtitleInfo=e,n&&t.eventCallback(u.Event.SUBTITLE_CHANGE,{currentTime:this.currentTime()})})),this.player.audioTracks().on("change",(function(){var e=t.getSelectedAudioTrackLanguage(t.player);null!=e&&e!==t.selectedAudioLanguage&&t.eventCallback(u.Event.AUDIOTRACK_CHANGED,{currentTime:t.player.currentTime()})})),this.player.on("stalled",(function(){t.eventCallback(u.Event.START_BUFFERING,{currentTime:this.currentTime()})})),this.player.on("waiting",(function(){t.eventCallback(u.Event.START_BUFFERING,{currentTime:this.currentTime()})})),this.player.on("timeupdate",(function(){this.seeking()||(t.previousTime=this.currentTime()),t.eventCallback(u.Event.TIMECHANGED,{currentTime:this.currentTime()});var e=this.tech({IWillNotUseThisInPlugins:!0});if(e.vhs||e.hls){var n=t.getMediaAttributes(e);if(!n||!n.bitrate)return;if(t.qualityChangeService.shouldAllowVideoQualityChange(n.bitrate)){var r={width:n.width,height:n.height,bitrate:n.bitrate,currentTime:this.currentTime()};t.eventCallback(u.Event.VIDEO_CHANGE,r),t.qualityChangeService.setVideoBitrate(n.bitrate)}}}));var n=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=void 0;null!=e.player&&(t=e.player.currentTime()),e.eventCallback(u.Event.UNLOAD,{currentTime:t})}e.release()};n=n.bind(this),this.player.on("dispose",n),this.windowEventTracker.addEventListener("beforeunload",n),this.windowEventTracker.addEventListener("unload",n)},t.prototype.sourceChange=function(e,t){this.videoCompletionTracker.reset(),this.videoCompletionTracker.setVideoDuration(this.player.duration()),this.previousTime=0,this.stateMachine.sourceChange(e,t,this.player.currentTime())},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.player.currentTime()},enumerable:!1,configurable:!0}),t.prototype.getSelectedAudioTrackLanguage=function(e){for(var t=0,n=e.audioTracks();t<n.length;t++){var r=n[t];if(r.enabled)return r.language}},t.prototype.getSubtitleInfo=function(e){for(var t,n=!1,r=0,i=e.textTracks()||[];r<i.length;r++){var a=i[r];if("showing"===a.mode){n=!0,t=a.language;break}}return{enabled:n,language:t}},t.prototype.getMediaAttributes=function(e){var t;if(e&&(e.vhs?t=e.vhs:e.hls&&(t=e.hls),t&&t.playlists&&"function"==typeof t.playlists.media)){var n=t.playlists.media();if(n){var r=n.attributes;if(r&&0!==Object.keys(r).length)return{bitrate:r.BANDWIDTH,width:(r.RESOLUTION||{}).width,height:(r.RESOLUTION||{}).height,codecs:r.CODECS}}}},t.prototype.getCodecInfo=function(e){var t=this.getMediaAttributes(e);if(t&&t.codecs){var n=t.codecs.split(",");if(n)return{videoCodec:n.find((function(e){return l.isVideoCodec(e)})),audioCodec:n.find((function(e){return l.isAudioCodec(e)}))}}},t}(n(9782).InternalAdapter);t.VideojsInternalAdapter=v},4334:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdCallbacks=void 0;var n=function(){this.onAdStarted=function(e){},this.onAdFinished=function(e){},this.onAdBreakStarted=function(e){},this.onAdBreakFinished=function(e){},this.onAdClicked=function(e){},this.onAdError=function(e){},this.onAdManifestLoaded=function(e){},this.onAdQuartile=function(e){},this.onAdSkipped=function(e){},this.onPlay=function(e){},this.onPause=function(e){},this.onBeforeUnload=function(){}};t.AdCallbacks=n},1078:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AdModule=void 0;var r=n(4334),i=function(){function e(e,t){var n=this;this.player=e,this.windowEventTracker=t,this.adCallbacks=new r.AdCallbacks,this.isLinearAdActive=function(){return n.player.ads&&n.player.ads.isLinearAdActive()||!1},this.getContainer=function(){return n.player.getContainer()},this.getAdModuleInfo=function(){return n.player.ads?n.player.ads.getModuleInfo():{name:void 0,version:void 0}},this.currentTime=function(){return n.player.getCurrentTime()},this.register()}return e.prototype.register=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.Play,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPlay(t.issuer)})),this.player.on(this.player.exports.PlayerEvent.Paused,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPause(t.issuer)})),this.player.on(this.player.exports.PlayerEvent.AdStarted,(function(t){e.adCallbacks.onAdStarted(t)})),this.player.on(this.player.exports.PlayerEvent.AdFinished,(function(t){e.adCallbacks.onAdFinished(t)})),this.player.on(this.player.exports.PlayerEvent.AdBreakStarted,(function(t){e.adCallbacks.onAdBreakStarted(t)})),this.player.on(this.player.exports.PlayerEvent.AdBreakFinished,(function(t){e.adCallbacks.onAdBreakFinished(t)})),this.player.on(this.player.exports.PlayerEvent.AdClicked,(function(t){e.adCallbacks.onAdClicked(t)})),this.player.on(this.player.exports.PlayerEvent.AdQuartile,(function(t){e.adCallbacks.onAdQuartile(t)})),this.player.on(this.player.exports.PlayerEvent.AdSkipped,(function(t){e.adCallbacks.onAdSkipped(t)})),this.player.on(this.player.exports.PlayerEvent.AdError,(function(t){e.adCallbacks.onAdError(t)})),this.player.on(this.player.exports.PlayerEvent.AdManifestLoaded,(function(t){e.adCallbacks.onAdManifestLoaded(t)}));var t=function(){e.adCallbacks.onBeforeUnload()};this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},e}();t.Bitmovin8AdModule=i},3159:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSInternalAdapter=void 0;var o=n(7659),s=n(978),l=n(6473),u=n(2108),c=n(5001),d=n(2033),E=n(1700),p=n(9782),h=n(6009),A=n(8977),f=n(6279),m=n(1976),v=n(4163),T=function(e){function t(t,n,r){var i=e.call(this,r)||this;i.player=t,i.sourceUrlProvider=n,i.supportsDeferredLicenseLoading=!1,i.getPlayerVersion=function(){return i.player.getVersion()},i.getPlayerName=function(){return l.Player.AMAZON_IVS},i.getPlayerTech=function(){return"html5"},i.getAutoPlay=function(){return i.player.isAutoplay()},i.getDrmPerformanceInfo=function(){};var a=new A.AmazonIVSPlayerContext(t),u=new s.HeartbeatService(59700,a),c=new o.AmazonIVSStateMachine(i.stateMachineCallbacks,u,i.opts);return u.setListener(c),i.stateMachine=c,i.listener=f.AmazonIVSPlayerEventListener.create(i,a,i.qualityChangeService),i.playerStatisticsProvider=new h.default(t.getHTMLVideoElement()),i.windowEventListener=new v.WindowEventListener(i.windowEventTracker,i,a),i}return i(t,e),t.prototype.initialize=function(e){var t=this;return this.listener.startMonitoring(this.player),this.windowEventListener.startMonitoring(),m.default.RELEASE.subscribe((function(){t.release()})),[]},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.player.getPosition()},enumerable:!1,configurable:!0}),t.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0,this.playerStatisticsProvider.reset()},t.prototype.getCurrentPlaybackInfo=function(){var e=this.player.getHTMLVideoElement();return a(a(a({droppedFrames:this.playerStatisticsProvider.getDroppedFrames(),isLive:this.player.getDuration()===1/0,isMuted:this.player.isMuted(),playerTech:this.getPlayerTech(),videoWindowWidth:e.clientWidth,videoWindowHeight:e.clientHeight,videoPlaybackHeight:e.videoHeight,videoPlaybackWidth:e.videoWidth,videoBitrate:this.player.getQuality().bitrate,videoDuration:(0,d.normalizeVideoDuration)(this.player.getDuration()),size:E.isVideoInFullscreen()?u.PlayerSize.Fullscreen:u.PlayerSize.Window},this.getVideoAndAudioCodecs()),this.getCommonPlaybackInfo()),{streamFormat:c.StreamTypes.hls,m3u8Url:this.sourceUrlProvider.m3u8Url})},t.prototype.sourceChange=function(e,t){throw new Error("Method not implemented.")},t.prototype.getVideoAndAudioCodecs=function(){var e=this.player.getQuality().codecs.split(",");return 2==e.length?{videoCodec:e[0],audioCodec:e[1]}:{}},t}(p.InternalAdapter);t.AmazonIVSInternalAdapter=T},6872:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorService=void 0;var r=n(4057),i=function(){function e(e,t){this.dispatcher=e,this.playerContext=t}return e.prototype.onError=function(e){var t={currentTime:this.playerContext.position,code:e.code,message:e.message,data:{exceptionMessage:e.message,exceptionStacktrace:[e.source]}};this.dispatcher.eventCallback(r.Event.ERROR,t)},e}();t.ErrorService=i},7222:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PauseEventDispatcher=void 0;var r,i=n(4057);!function(e){e[e.IDLE=0]="IDLE",e[e.PAUSE_SCHEDULED=1]="PAUSE_SCHEDULED",e[e.PAUSE_CANCELLED=2]="PAUSE_CANCELLED"}(r||(r={}));var a=function(){function e(e,t){this.dispatcher=e,this.playerContext=t,this.EVENT_DELAY_MS=10,this.state=r.IDLE}return e.prototype.cancelPause=function(){this.state==r.PAUSE_SCHEDULED&&(this.state=r.PAUSE_CANCELLED)},e.prototype.schedulePauseEvent=function(){var e=this;if(this.state!=r.PAUSE_SCHEDULED){this.state=r.PAUSE_SCHEDULED;var t={currentTime:this.playerContext.position};setTimeout((function(){e.triggerPause(t),e.state=r.IDLE}),this.EVENT_DELAY_MS,this)}},e.prototype.triggerPause=function(e){this.state!=r.PAUSE_CANCELLED&&this.dispatcher.eventCallback(i.Event.PAUSE,e)},e}();t.PauseEventDispatcher=a},2772:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackService=void 0;var r=n(4057),i=n(7222),a=function(){function e(e,t,n,r){this.dispatcher=e,this.playerContext=t,this.pauseDispatcher=n,this.qualityChangeService=r,this.ignorePause=!1}return e.prototype.onStartupPlaying=function(){var e=this;this.ignorePause=!0,setTimeout((function(){e.ignorePause=!1}),100)},e.prototype.onPause=function(){this.ignorePause||this.pauseDispatcher.schedulePauseEvent()},e.prototype.onPlaying=function(){this.pauseDispatcher.cancelPause(),this.playing()},e.prototype.onRebuffering=function(){this.pauseDispatcher.cancelPause(),this.startBuffering()},e.prototype.onQualityChange=function(e){this.qualityChange(e)},e.prototype.onSeek=function(){this.seek()},e.prototype.onSeeked=function(){this.seeked()},e.prototype.startBuffering=function(){var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.START_BUFFERING,{currentTime:e})},e.prototype.playing=function(){var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.PLAYING,{currentTime:e})},e.prototype.qualityChange=function(e){if(this.qualityChangeService.shouldAllowVideoQualityChange(e.bitrate)){this.qualityChangeService.setVideoBitrate(e.bitrate);var t=this.playerContext.position;this.dispatcher.eventCallback(r.Event.VIDEO_CHANGE,{currentTime:t})}},e.prototype.seek=function(){if(this.pauseDispatcher.cancelPause(),!this.playerContext.isLive){var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.SEEK,{currentTime:e})}},e.prototype.seeked=function(){if(this.pauseDispatcher.cancelPause(),!this.playerContext.isLive){var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.SEEKED,{currentTime:e})}},e.create=function(t,n,r){return new e(t,n,new i.PauseEventDispatcher(t,n),r)},e}();t.PlaybackService=a},1660:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartupService=void 0;var r,i=n(4057);!function(e){e[e.SETUP=0]="SETUP",e[e.IDLE=1]="IDLE",e[e.STARTUP=2]="STARTUP",e[e.STARTUP_FINISHED=3]="STARTUP_FINISHED"}(r||(r={}));var a=function(){function e(e,t){this.dispatcher=e,this.playerContext=t,this.state=r.SETUP}return Object.defineProperty(e.prototype,"finishedStartup",{get:function(){return this.state==r.STARTUP_FINISHED},enumerable:!1,configurable:!0}),e.prototype.onInitialized=function(){this.finishSetup()},e.prototype.onPlay=function(){this.startStartup()},e.prototype.onPlaying=function(){this.finishStartup()},e.prototype.finishSetup=function(){this.state=r.IDLE;var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.READY,{currentTime:e})},e.prototype.startStartup=function(){if(this.state==r.IDLE){this.state=r.STARTUP;var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.PLAY,{currentTime:e})}},e.prototype.finishStartup=function(){if(this.state==r.STARTUP){this.state=r.STARTUP_FINISHED;var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.PLAYING,{currentTime:e})}},e}();t.VideoStartupService=a},8977:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerContext=void 0;var n=function(){function e(e){this.player=e}return Object.defineProperty(e.prototype,"position",{get:function(){return this.player.getPosition()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLive",{get:function(){return this.player.getDuration()===1/0},enumerable:!1,configurable:!0}),e}();t.AmazonIVSPlayerContext=n},5004:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerEventHandler=void 0;var r=n(6767),i=n(6872),a=n(2772),o=n(1660),s=function(){function e(e,t,n){this.videoStartupService=e,this.playbackService=t,this.errorService=n}return e.prototype.onRebuffering=function(){r.logger.log("onRebuffering"),this.playbackService.onRebuffering()},e.prototype.onDurationChanged=function(e){r.logger.log("onDurationChanged: "+e)},e.prototype.onError=function(e){r.logger.log("onError: "+e),this.errorService.onError(e)},e.prototype.onInitialized=function(){r.logger.log("onInitialized"),this.videoStartupService.finishedStartup||this.videoStartupService.onInitialized()},e.prototype.onQualityChanged=function(e){r.logger.log("onQualityChanged: "+e),this.videoStartupService.finishedStartup&&this.playbackService.onQualityChange(e)},e.prototype.onTimeUpdate=function(e){r.logger.log("onTimeUpdate: "+e)},e.prototype.onPlay=function(e){this.videoStartupService.finishedStartup?r.logger.log("onPlay:",e):this.videoStartupService.onPlay()},e.prototype.onPause=function(e){this.videoStartupService.finishedStartup&&(r.logger.log("onPause:",e),this.playbackService.onPause())},e.prototype.onPlaying=function(e){r.logger.log("onPlaying:",e),this.videoStartupService.finishedStartup?this.playbackService.onPlaying():(this.videoStartupService.onPlaying(),this.playbackService.onStartupPlaying())},e.prototype.onSeek=function(){this.videoStartupService.finishedStartup&&this.playbackService.onSeek()},e.prototype.onSeeked=function(){this.videoStartupService.finishedStartup&&this.playbackService.onSeeked()},e.create=function(t,n,r){return new e(new o.VideoStartupService(t,n),a.PlaybackService.create(t,n,r),new i.ErrorService(t,n))},e}();t.AmazonIVSPlayerEventHandler=s},6279:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerEventListener=t.IVS_PLAYER_EVENT=void 0;var r=n(5004);t.IVS_PLAYER_EVENT={DURATION_CHANGED:"PlayerDurationChanged",ERROR:"PlayerError",INITIALIZED:"PlayerInitialized",QUALITY_CHANGED:"PlayerQualityChanged",REBUFFERING:"PlayerRebuffering",SEEK_COMPLETED:"PlayerSeekCompleted",TIME_UPDATE:"PlayerTimeUpdate",PLAYBACK_RATE_CHANGED:"PlayerPlaybackRateChanged",PLAYBACK_BLOCKED:"PlayerPlaybackBlocked"};var i=function(){function e(e){this.eventHandler=e}return e.prototype.startMonitoring=function(e){this.startMonitoringIVSPlayer(e),this.startMonitoringHTMLVideoElement(e.getHTMLVideoElement())},e.prototype.startMonitoringHTMLVideoElement=function(e){e.addEventListener("play",this.eventHandler.onPlay.bind(this.eventHandler)),e.addEventListener("playing",this.eventHandler.onPlaying.bind(this.eventHandler)),e.addEventListener("pause",this.eventHandler.onPause.bind(this.eventHandler)),e.addEventListener("seeking",this.eventHandler.onSeek.bind(this.eventHandler)),e.addEventListener("seeked",this.eventHandler.onSeeked.bind(this.eventHandler))},e.prototype.startMonitoringIVSPlayer=function(e){e.addEventListener(t.IVS_PLAYER_EVENT.REBUFFERING,this.eventHandler.onRebuffering.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.DURATION_CHANGED,this.eventHandler.onDurationChanged.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.ERROR,this.eventHandler.onError.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.INITIALIZED,this.eventHandler.onInitialized.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.QUALITY_CHANGED,this.eventHandler.onQualityChanged.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.TIME_UPDATE,this.eventHandler.onTimeUpdate.bind(this.eventHandler))},e.create=function(t,n,i){return new e(r.AmazonIVSPlayerEventHandler.create(t,n,i))},e}();t.AmazonIVSPlayerEventListener=i},8584:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceUrlProvider=void 0;var n=function(){};t.SourceUrlProvider=n},1976:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r="RELEASE",i=function(){function e(){var e;this.observer=((e={})[r]=[],e)}return e.prototype.subscribe=function(e,t){this.observer[e].push(t)},e.prototype.trigger=function(e){this.observer[e].forEach((function(e){e()}))},e}(),a=new i,o={RELEASE:(n=r,{subscribe:function(e){a.subscribe(n,e)},trigger:function(){a.trigger(n)}})};t.default=o},4163:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventListener=void 0;var r,i=n(4057),a=n(1976);!function(e){e[e.IDLE=0]="IDLE",e[e.UNLOADED=1]="UNLOADED"}(r||(r={}));var o=function(){function e(e,t,n){var o=this;this.windowEventTracker=e,this.dispatcher=t,this.playerContext=n,this.state=r.IDLE,this.onPageUnload=function(){o.state==r.IDLE&&(o.dispatcher.eventCallback(i.Event.UNLOAD,{currentTime:o.playerContext.position}),o.state=r.UNLOADED,a.default.RELEASE.trigger())}}return e.prototype.startMonitoring=function(){this.windowEventTracker.addEventListener("beforeunload",this.onPageUnload),this.windowEventTracker.addEventListener("unload",this.onPageUnload)},e}();t.WindowEventListener=o},6009:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.videoElement=e,this.previousTotalDroppedFrames=0}return e.prototype.getDroppedFrames=function(){if(null==this.videoElement)return 0;var e=this.videoElement.getVideoPlaybackQuality().droppedVideoFrames,t=e-this.previousTotalDroppedFrames;return this.previousTotalDroppedFrames=e,t},e.prototype.reset=function(){this.previousTotalDroppedFrames=0},e}();t.default=n},4984:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsStateMachine=void 0;var i=n(6087),a=n(4057),o=n(8829),s=n(4960),l=n(1700),u=[3e3,5e3,1e4,3e4,59700],c=function(){function e(e,t){this.stateMachineCallbacks=e,this.onEnterStateTimestamp=0,this.videoStartupTimeoutMs=s.ANALYTICS_VIDEOSTART_TIMEOUT,this.rebufferTimeoutMs=s.ANALYTICS_REBUFFER_TIMEOUT,this.currentRebufferingIntervalIndex=0,this.stateMachine=this.createStateMachine(t)}return Object.defineProperty(e.prototype,"currentState",{get:function(){return this.stateMachine.current},enumerable:!1,configurable:!0}),e.prototype.resetIntervals=function(){this.clearVideoStartTimeout(),this.clearRebufferingTimeoutHandle(!0),this.clearRebufferingHeartbeatHandle()},e.prototype.startRebufferingHeartbeatInterval=function(e){var t=this;void 0===e&&(e=!0),this.resetRebufferingHelpers(e),this.startRebufferingTimeoutHandle(),this.rebufferingHeartbeatIntervalHandle=window.setInterval((function(){if("rebuffering"===t.stateMachine.current.toLowerCase()){var e=(new Date).getTime(),n=e-t.onEnterStateTimestamp;t.stateMachineCallbacks.heartbeat(n,t.stateMachine.current.toLowerCase(),{buffered:n}),t.onEnterStateTimestamp=e,t.currentRebufferingIntervalIndex=Math.min(t.currentRebufferingIntervalIndex+1,u.length-1),t.startRebufferingHeartbeatInterval(!1)}else t.resetRebufferingHelpers()}),u[this.currentRebufferingIntervalIndex])},e.prototype.resetRebufferingHelpers=function(e){void 0===e&&(e=!0),e&&(this.currentRebufferingIntervalIndex=0),this.clearRebufferingHeartbeatHandle(),this.clearRebufferingTimeoutHandle(e)},e.prototype.clearRebufferingHeartbeatHandle=function(){null!=this.rebufferingHeartbeatIntervalHandle&&(window.clearInterval(this.rebufferingHeartbeatIntervalHandle),this.rebufferingHeartbeatIntervalHandle=void 0)},e.prototype.startRebufferingTimeoutHandle=function(){var e=this;this.currentRebufferingIntervalIndex>0||(this.rebufferingTimeoutHandle=window.setTimeout((function(){e.callEvent(a.Event.ERROR,r(r({},i.ErrorCode.BUFFERING_TIMEOUT_REACHED),{data:{additionalData:"StateMachine timed out after ".concat(e.rebufferTimeoutMs," ms of consecutive buffering.")}}),l.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.rebufferTimeoutMs))},e.prototype.clearRebufferingTimeoutHandle=function(e){e&&null!=this.rebufferingTimeoutHandle&&(window.clearTimeout(this.rebufferingTimeoutHandle),this.rebufferingTimeoutHandle=void 0)},e.prototype.getVideoStartupFailedEventData=function(e,t,n){return{currentTime:e,reason:this.getReasonForVideoStartFailure(t)}},e.prototype.getReasonForVideoStartFailure=function(e){switch(e){case a.Event.ERROR:return o.VideoStartFailedReason.PLAYER_ERROR;case a.Event.UNLOAD:return o.VideoStartFailedReason.PAGE_CLOSED;case a.Event.VIDEOSTART_TIMEOUT:return o.VideoStartFailedReason.TIMEOUT;default:return o.VideoStartFailedReason.UNKNOWN}},e.prototype.setVideoStartTimeout=function(){var e=this;null!=this.videoStartTimeout&&this.clearVideoStartTimeout(),this.videoStartTimeout=window.setTimeout((function(){e.callEvent(a.Event.VIDEOSTART_TIMEOUT,{},l.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.videoStartupTimeoutMs)},e.prototype.clearVideoStartTimeout=function(){window.clearTimeout(this.videoStartTimeout),this.videoStartTimeout=void 0},e}();t.AnalyticsStateMachine=c},3464:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AnalyticsStateMachine=void 0;var a,o=n(9363),s=n(4057),l=n(6692),u=n(6767),c=n(1700),d=n(4984);!function(e){e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PLAY_SEEKING="PLAY_SEEKING",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.END="END",e.ERROR="ERROR",e.AD_STARTUP="AD_STARTUP",e.AD_READY="AD_READY",e.AD_PAUSE="AD_PAUSE",e.AD_PLAYING="AD_PLAYING",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.SOURCE_CHANGING="SOURCE_CHANGING",e.INITIAL_SOURCE_CHANGE="INITIAL_SOURCE_CHANGE",e.SOURCE_LOADED="SOURCE_LOADED",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(a||(a={}));var E=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.debuggingStates=[],r.enabledDebugging=!1,r.sourceChange=function(e,t,n){r.callEvent(s.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},r.seekTimestamp=0,r.seekedTimestamp=0,r.seekStarted=!1,r.seekEnded=!1,r}return i(t,e),t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.getAllStates=function(){return Object.keys(a).map((function(e){return a[e]}))},t.prototype.createStateMachine=function(e){var t=this;return o.create({initial:a.SETUP,error:function(e,t,n,r,i,a){u.logger.error("Error in statemachine: "+a)},events:[{name:s.Event.SOURCE_LOADED,from:[a.SETUP,a.ERROR,a.SOURCE_CHANGING,a.INITIAL_SOURCE_CHANGE],to:a.READY},{name:s.Event.PLAY,from:a.READY,to:a.STARTUP},{name:s.Event.PLAYING,from:a.READY,to:a.PLAYING},{name:s.Event.READY,from:a.READY,to:a.READY},{name:s.Event.VIDEO_CHANGE,from:a.READY,to:a.READY},{name:s.Event.AUDIO_CHANGE,from:a.READY,to:a.READY},{name:s.Event.ERROR,from:[a.STARTUP,a.AD_STARTUP],to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.UNLOAD,from:[a.STARTUP,a.AD_STARTUP],to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.VIDEOSTART_TIMEOUT,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.PLAY,from:a.STARTUP,to:a.STARTUP},{name:s.Event.PLAYING,from:a.STARTUP,to:a.STARTUP},{name:s.Event.TIMECHANGED,from:a.STARTUP,to:a.PLAYING},{name:s.Event.START_BUFFERING,from:a.STARTUP,to:a.STARTUP},{name:s.Event.END_BUFFERING,from:a.STARTUP,to:a.STARTUP},{name:s.Event.VIDEO_CHANGE,from:a.STARTUP,to:a.STARTUP},{name:s.Event.AUDIO_CHANGE,from:a.STARTUP,to:a.STARTUP},{name:s.Event.READY,from:a.STARTUP,to:a.STARTUP},{name:s.Event.PLAYING,from:a.PLAYING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.PLAYING,to:a.PLAYING},{name:s.Event.END_BUFFERING,from:a.PLAYING,to:a.PLAYING},{name:s.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:s.Event.END_BUFFERING,from:a.REBUFFERING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.REBUFFERING,to:a.REBUFFERING},{name:s.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:s.Event.PAUSE,from:a.REBUFFERING,to:a.PAUSE},{name:s.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITYCHANGE},{name:s.Event.AUDIO_CHANGE,from:a.PLAYING,to:a.QUALITYCHANGE},{name:s.Event.VIDEO_CHANGE,from:a.QUALITYCHANGE,to:a.QUALITYCHANGE},{name:s.Event.AUDIO_CHANGE,from:a.QUALITYCHANGE,to:a.QUALITYCHANGE},{name:"FINISH_QUALITYCHANGE",from:a.QUALITYCHANGE,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.AUDIO_CHANGE,from:a.PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.VIDEO_CHANGE,from:a.QUALITYCHANGE_PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.AUDIO_CHANGE,from:a.QUALITYCHANGE_PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:"FINISH_QUALITYCHANGE_PAUSE",from:a.QUALITYCHANGE_PAUSE,to:a.PAUSE},{name:s.Event.SEEK,from:a.PLAYING,to:a.PLAY_SEEKING},{name:s.Event.PLAY,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.PLAYING,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEKED,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEK,from:a.END_PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.PLAYING,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:s.Event.SEEK,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.AUDIO_CHANGE,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.VIDEO_CHANGE,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.START_BUFFERING,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.END_BUFFERING,from:a.PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.START_BUFFERING,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.END_BUFFERING,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEKED,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.PLAY,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEK,from:a.PAUSE,to:a.PAUSE},{name:s.Event.SEEKED,from:a.PAUSE,to:a.PAUSE},{name:s.Event.SEEKED,from:a.PLAYING,to:a.PLAYING},{name:s.Event.END,from:a.PLAY_SEEKING,to:a.END},{name:s.Event.END,from:a.PLAYING,to:a.END},{name:s.Event.END,from:a.PAUSE,to:a.END},{name:s.Event.SEEK,from:a.END,to:a.END},{name:s.Event.SEEKED,from:a.END,to:a.END},{name:s.Event.TIMECHANGED,from:a.END,to:a.END},{name:s.Event.END_BUFFERING,from:a.END,to:a.END},{name:s.Event.START_BUFFERING,from:a.END,to:a.END},{name:s.Event.END,from:a.END,to:a.END},{name:s.Event.PLAY,from:a.END,to:a.STARTUP},{name:s.Event.ERROR,from:this.getAllStatesBut([a.STARTUP]),to:a.ERROR},{name:s.Event.UNLOAD,from:this.getAllStatesBut([a.STARTUP,a.AD_STARTUP]),to:a.END},{name:s.Event.CUSTOM_DATA_CHANGE,from:[a.PLAYING,a.PAUSE],to:a.CUSTOMDATACHANGE},{name:s.Event.PLAYING,from:a.CUSTOMDATACHANGE,to:a.PLAYING},{name:s.Event.PAUSE,from:a.CUSTOMDATACHANGE,to:a.PAUSE},{name:s.Event.SUBTITLE_CHANGE,from:a.PLAYING,to:a.SUBTITLE_CHANGING},{name:s.Event.SUBTITLE_CHANGE,from:a.PAUSE,to:a.PAUSE},{name:s.Event.SUBTITLE_CHANGE,from:a.REBUFFERING,to:a.REBUFFERING},{name:s.Event.SUBTITLE_CHANGE,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SUBTITLE_CHANGE,from:a.SUBTITLE_CHANGING,to:a.SUBTITLE_CHANGING},{name:s.Event.TIMECHANGED,from:a.SUBTITLE_CHANGING,to:a.PLAYING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.PLAYING,to:a.AUDIOTRACK_CHANGING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.PAUSE,to:a.PAUSE},{name:s.Event.AUDIOTRACK_CHANGED,from:a.REBUFFERING,to:a.REBUFFERING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.END_PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.AUDIOTRACK_CHANGING,to:a.AUDIOTRACK_CHANGING},{name:s.Event.TIMECHANGED,from:a.AUDIOTRACK_CHANGING,to:a.PLAYING},{name:s.Event.START_AD,from:a.STARTUP,to:a.AD_STARTUP},{name:s.Event.END_AD,from:a.AD_STARTUP,to:a.STARTUP},{name:s.Event.PLAY,from:a.AD_STARTUP,to:a.AD_STARTUP},{name:s.Event.PAUSE,from:a.AD_STARTUP,to:a.AD_STARTUP},{name:s.Event.START_AD,from:a.READY,to:a.AD_READY},{name:s.Event.END_AD,from:a.AD_READY,to:a.STARTUP},{name:s.Event.PLAY,from:a.AD_READY,to:a.AD_READY},{name:s.Event.PAUSE,from:a.AD_READY,to:a.AD_READY},{name:s.Event.START_AD,from:a.PAUSE,to:a.AD_PAUSE},{name:s.Event.END_AD,from:a.AD_PAUSE,to:a.PAUSE},{name:s.Event.PLAY,from:a.AD_PAUSE,to:a.AD_PAUSE},{name:s.Event.PAUSE,from:a.AD_PAUSE,to:a.AD_PAUSE},{name:s.Event.START_AD,from:a.PLAYING,to:a.AD_PLAYING},{name:s.Event.END_AD,from:a.AD_PLAYING,to:a.PLAYING},{name:s.Event.PLAY,from:a.AD_PLAYING,to:a.AD_PLAYING},{name:s.Event.PAUSE,from:a.AD_PLAYING,to:a.AD_PLAYING},{name:s.Event.END,from:a.AD_PLAYING,to:a.END},{name:s.Event.TIMECHANGED,from:a.AD_STARTUP,to:a.AD_STARTUP},{name:s.Event.TIMECHANGED,from:a.AD_READY,to:a.AD_READY},{name:s.Event.TIMECHANGED,from:a.AD_PAUSE,to:a.AD_PAUSE},{name:s.Event.TIMECHANGED,from:a.AD_PLAYING,to:a.AD_PLAYING},{name:s.Event.END_AD,from:a.PLAYING,to:a.PLAYING},{name:s.Event.END_AD,from:a.PAUSE,to:a.PAUSE},{name:s.Event.END_AD,from:a.READY,to:a.READY},{name:s.Event.END_AD,from:a.STARTUP,to:a.STARTUP},{name:s.Event.MUTE,from:a.READY,to:a.MUTING_READY},{name:s.Event.UN_MUTE,from:a.READY,to:a.MUTING_READY},{name:"FINISH_MUTING",from:a.MUTING_READY,to:a.READY},{name:s.Event.MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:s.Event.UN_MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:"FINISH_MUTING",from:a.MUTING_PLAY,to:a.PLAYING},{name:s.Event.MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:s.Event.UN_MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:"FINISH_MUTING",from:a.MUTING_PAUSE,to:a.PAUSE},{name:s.Event.START_CAST,from:[a.READY,a.PAUSE,a.PLAYING],to:a.CASTING},{name:s.Event.PAUSE,from:a.CASTING,to:a.CASTING},{name:s.Event.PLAY,from:a.CASTING,to:a.CASTING},{name:s.Event.PLAYING,from:a.CASTING,to:a.CASTING},{name:s.Event.TIMECHANGED,from:a.CASTING,to:a.CASTING},{name:s.Event.MUTE,from:a.CASTING,to:a.CASTING},{name:s.Event.UN_MUTE,from:a.CASTING,to:a.CASTING},{name:s.Event.SEEK,from:a.CASTING,to:a.CASTING},{name:s.Event.SEEKED,from:a.CASTING,to:a.CASTING},{name:s.Event.END_CAST,from:a.CASTING,to:a.READY},{name:s.Event.SEEK,from:a.READY,to:a.READY},{name:s.Event.SEEKED,from:a.READY,to:a.READY},{name:s.Event.SEEKED,from:a.STARTUP,to:a.STARTUP},{name:s.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut([a.SETUP]),to:a.SOURCE_CHANGING},{name:s.Event.MANUAL_SOURCE_CHANGE,from:a.SETUP,to:a.INITIAL_SOURCE_CHANGE},{name:s.Event.SOURCE_UNLOADED,from:this.getAllStates(),to:a.SOURCE_CHANGING},{name:s.Event.VIDEO_CHANGE,from:a.REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.AUDIO_CHANGE,from:a.REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.VIDEO_CHANGE,from:a.QUALITYCHANGE_REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.AUDIO_CHANGE,from:a.QUALITYCHANGE_REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:a.QUALITYCHANGE_REBUFFERING,to:a.REBUFFERING}],callbacks:{onbeforeevent:function(e,t,n,r,i){if(t===a.REBUFFERING&&n===a.QUALITYCHANGE_REBUFFERING)return!1},onafterevent:function(e,n,r,i,o){e===s.Event.MANUAL_SOURCE_CHANGE&&n===a.SETUP?t.stateMachineCallbacks.initialSourceChange(o):e===s.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(o),r===a.QUALITYCHANGE_PAUSE&&t.stateMachine.FINISH_QUALITYCHANGE_PAUSE(i),r===a.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(i),r===a.QUALITYCHANGE_REBUFFERING&&t.stateMachine.FINISH_QUALITYCHANGE_REBUFFERING(i),r!==a.MUTING_READY&&r!==a.MUTING_PLAY&&r!==a.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(i)},onenterstate:function(n,r,i,o,l){"none"===r&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=o||(new Date).getTime(),u.logger.log("[ENTER ".concat(o,"] ").concat((0,u.padRight)(i,20)," EVENT: ").concat((0,u.padRight)(n,20)," from: ").concat((0,u.padRight)(r,14))),!l||i===a.END_PLAY_SEEKING||r===a.PLAY_SEEKING||r===a.AD_STARTUP||r===a.AD_READY||r===a.AD_PLAYING||r===a.AD_PAUSE||n===s.Event.SEEK&&r===a.END_PLAY_SEEKING||t.stateMachineCallbacks.setVideoTimeStartFromEvent(l),n===s.Event.START_CAST&&i===a.CASTING&&t.stateMachineCallbacks.startCasting(o,l),i===a.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onleavestate:function(e,n,r,i,o){if(n===a.REBUFFERING&&t.resetRebufferingHelpers(),i){u.logger.log("[LEAVE ".concat(i,"] ").concat((0,u.padRight)(n,20)," EVENT: ").concat((0,u.padRight)(e,20)," to: ").concat((0,u.padRight)(r,20))),t.addStatesToLog(e,n,r,i,o);var l=i-t.onEnterStateTimestamp;o&&r!==a.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(o),o&&e!==s.Event.END_AD&&(t.lastTrackedVideoEndObject=o),n!==a.READY&&n!==a.AD_STARTUP||r!==a.STARTUP?n!==a.STARTUP||r!==a.PLAYING&&r!==a.AD_STARTUP||t.clearVideoStartTimeout():t.setVideoStartTimeout();var d=String(n).toLowerCase();if(r===a.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var E=t.getVideoStartupFailedEventData(i,e,o),p=e!==s.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(E,p)}else if(n===a.END_PLAY_SEEKING){var h=t.seekedTimestamp-t.seekTimestamp;t.seekStarted&&t.seekEnded&&e!==s.Event.SEEK&&(t.seekStarted=t.seekEnded=!1,t.stateMachineCallbacks.end_play_seeking(h,d))}else if(e===s.Event.UNLOAD)t.stateMachineCallbacks.unload(l,d);else if(n===a.AD_PAUSE||n===a.AD_READY||n===a.AD_PLAYING||n===a.AD_STARTUP)t.stateMachineCallbacks.setVideoTimeStartFromEvent(t.lastTrackedVideoEndObject),t.stateMachineCallbacks.setVideoTimeEndFromEvent(t.lastTrackedVideoEndObject),t.stateMachineCallbacks.ad(l,"ad");else if(e===s.Event.START_AD&&n===a.STARTUP)(0,c.noOp)();else if(e===s.Event.SOURCE_LOADED&&n===a.INITIAL_SOURCE_CHANGE)(0,c.noOp)();else if(n!==a.ERROR){var A=t.stateMachineCallbacks[d];if("function"==typeof A)try{A(l,d,o)}catch(e){u.logger.error("Exception occured in State Machine callback "+d,o,e)}else u.logger.error("Could not find callback function for "+d)}o&&r!==a.END_PLAY_SEEKING&&n!==a.PLAY_SEEKING&&r!==a.PLAY_SEEKING&&n!==a.AD_STARTUP&&n!==a.AD_READY&&n!==a.AD_PLAYING&&n!==a.AD_PAUSE&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(o),e===s.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(o):e===s.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(o):e===s.Event.MUTE?t.stateMachineCallbacks.mute():e===s.Event.UN_MUTE&&t.stateMachineCallbacks.unMute()}},onseek:function(e,n,r,i){t.seekStarted||(t.seekTimestamp=i,t.seekStarted=!0)},onseeked:function(e,n,r,i){t.seekedTimestamp=i,t.seekEnded=!0},ontimechanged:function(e,n,r,i,a){if("PLAYING"===t.stateMachine.current){var o=i-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=i,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))}},onplayerError:function(e,n,r,i,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];if(r)try{r.call(this.stateMachine,n,t)}catch(n){u.logger.error("Exception occured in State Machine callback "+e,r,t,n)}else u.logger.log("Ignored Event: "+e)},t.prototype.addStatesToLog=function(e,t,n,r,i){this.enabledDebugging&&this.debuggingStates.push(new l.EventDebugging(e,t,n,r,i))},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t}(d.AnalyticsStateMachine);t.Bitmovin8AnalyticsStateMachine=E},3395:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5AnalyticsStateMachine=void 0;var o,s=n(9363),l=n(4057),u=n(6767),c=n(1700),d=n(4984);!function(e){e.INITIALIZED="INITIALIZED",e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PAUSED_SEEKING="PAUSED_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.END="END",e.ERROR="ERROR",e.AD="AD",e.SOURCE_CHANGING="SOURCE_CHANGING",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(o||(o={}));var E=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.sourceChange=function(e,t,n){r.callEvent(l.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},r.seekStartedAt=null,r.createStateMachine(n),r}return i(t,e),t.prototype.getAllStates=function(){return a(a([],Object.keys(o).map((function(e){return o[e]})),!0),["FINISH_QUALITYCHANGE_PAUSE","FINISH_QUALITYCHANGE","FINISH_QUALITYCHANGE_REBUFFERING"],!1)},t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.createStateMachine=function(e){var t=this;return s.create({initial:o.INITIALIZED,error:function(e,t,n,r,i,a){u.logger.error("Error in statemachine: "+a)},events:[{name:l.Event.SETUP,from:o.INITIALIZED,to:o.SETUP},{name:l.Event.SETUP,from:o.SETUP,to:o.SETUP},{name:l.Event.TIMECHANGED,from:o.SETUP,to:o.SETUP},{name:l.Event.READY,from:[o.SETUP,o.ERROR,o.END,o.SOURCE_CHANGING],to:o.READY},{name:l.Event.READY,from:o.READY,to:o.READY},{name:l.Event.READY,from:o.STARTUP,to:o.STARTUP},{name:l.Event.PLAY,from:o.READY,to:o.STARTUP},{name:l.Event.ERROR,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.UNLOAD,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.VIDEOSTART_TIMEOUT,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.START_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.END_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.VIDEO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.TIMECHANGED,from:o.READY,to:o.STARTUP},{name:l.Event.TIMECHANGED,from:o.STARTUP,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.SEEKED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.END_BUFFERING,from:o.PLAYING,to:o.PLAYING},{name:l.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},{name:l.Event.START_BUFFERING,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.PLAY,from:o.REBUFFERING,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.REBUFFERING,to:o.PLAYING},{name:l.Event.SEEK,from:o.STARTUP,to:o.STARTUP},{name:l.Event.PLAY,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:l.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.PAUSE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:"FINISH_QUALITYCHANGE",from:o.QUALITYCHANGE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:"FINISH_QUALITYCHANGE_PAUSE",from:o.QUALITYCHANGE_PAUSE,to:o.PAUSE},{name:l.Event.SEEK,from:o.PAUSE,to:o.PAUSED_SEEKING},{name:l.Event.SEEK,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.AUDIO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.START_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.END_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.SEEKED,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:l.Event.TIMECHANGED,from:o.PAUSED_SEEKING,to:o.PLAYING},{name:l.Event.PAUSE,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:l.Event.END,from:o.PAUSED_SEEKING,to:o.END},{name:l.Event.END,from:o.PLAYING,to:o.END},{name:l.Event.END,from:o.PAUSE,to:o.END},{name:l.Event.PAUSE,from:o.END,to:o.END},{name:l.Event.SEEK,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.END,to:o.END},{name:l.Event.TIMECHANGED,from:o.END,to:o.END},{name:l.Event.END_BUFFERING,from:o.END,to:o.END},{name:l.Event.START_BUFFERING,from:o.END,to:o.END},{name:l.Event.END,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.SEEK,from:o.PLAYING,to:o.PLAYING},{name:l.Event.PLAY,from:o.END,to:o.PLAYING},{name:l.Event.ERROR,from:this.getAllStatesBut([o.STARTUP]),to:o.ERROR},{name:l.Event.PAUSE,from:o.ERROR,to:o.ERROR},{name:l.Event.UNLOAD,from:this.getAllStatesBut([o.STARTUP]),to:o.END},{name:l.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGING},{name:l.Event.SUBTITLE_CHANGE,from:o.PAUSE,to:o.PAUSE},{name:l.Event.SUBTITLE_CHANGE,from:o.READY,to:o.READY},{name:l.Event.SUBTITLE_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.SUBTITLE_CHANGE,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.SUBTITLE_CHANGE,from:o.SUBTITLE_CHANGING,to:o.SUBTITLE_CHANGING},{name:l.Event.TIMECHANGED,from:o.SUBTITLE_CHANGING,to:o.PLAYING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.AUDIOTRACK_CHANGED,from:o.READY,to:o.READY},{name:l.Event.AUDIOTRACK_CHANGED,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIOTRACK_CHANGED,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.AUDIOTRACK_CHANGING,to:o.AUDIOTRACK_CHANGING},{name:l.Event.TIMECHANGED,from:o.AUDIOTRACK_CHANGING,to:o.PLAYING},{name:l.Event.START_AD,from:o.PLAYING,to:o.AD},{name:l.Event.END_AD,from:o.AD,to:o.PLAYING},{name:l.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:l.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:l.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:l.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:l.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:l.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:l.Event.START_CAST,from:[o.READY,o.PAUSE],to:o.CASTING},{name:l.Event.PAUSE,from:o.CASTING,to:o.CASTING},{name:l.Event.PLAY,from:o.CASTING,to:o.CASTING},{name:l.Event.TIMECHANGED,from:o.CASTING,to:o.CASTING},{name:l.Event.MUTE,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEK,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEKED,from:o.CASTING,to:o.CASTING},{name:l.Event.END_CAST,from:o.CASTING,to:o.READY},{name:l.Event.SEEK,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.STARTUP,to:o.STARTUP},{name:l.Event.SOURCE_LOADED,from:this.getAllStates(),to:o.SETUP},{name:l.Event.SOURCE_UNLOADED,from:this.getAllStates(),to:o.SOURCE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStates(),to:o.SOURCE_CHANGING},{name:l.Event.TIMECHANGED,from:o.SOURCE_CHANGING,to:o.SOURCE_CHANGING},{name:l.Event.PAUSE,from:o.SOURCE_CHANGING,to:o.SOURCE_CHANGING},{name:l.Event.VIDEO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:o.QUALITYCHANGE_REBUFFERING,to:o.REBUFFERING},{name:l.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:l.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:l.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE},{name:l.Event.PLAYLIST_TRANSITION,from:this.getAllStates(),to:o.READY}],callbacks:{onenterstate:function(n,r,i,a,s){"none"===r&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=a||c.getCurrentTimestamp(),u.logger.log("[ENTER ".concat(a,"] ").concat((0,u.padRight)(i,20)," EVENT: ").concat((0,u.padRight)(n,20)," from: ").concat((0,u.padRight)(r,14))),s&&i!==o.PAUSED_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===l.Event.START_CAST&&i===o.CASTING&&t.stateMachineCallbacks.startCasting(a,s),i===o.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onafterevent:function(e,n,r,i,a){e===l.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(a),e===l.Event.PLAYLIST_TRANSITION&&t.stateMachineCallbacks.playlistTransition(a),r===o.QUALITYCHANGE_PAUSE&&t.stateMachine.FINISH_QUALITYCHANGE_PAUSE(i),r===o.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(i),r===o.QUALITYCHANGE_REBUFFERING&&t.stateMachine.FINISH_QUALITYCHANGE_REBUFFERING(i),r!==o.MUTING_READY&&r!==o.MUTING_PLAY&&r!==o.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(i)},onleavestate:function(e,n,r,i,a){if(n===o.REBUFFERING&&t.resetRebufferingHelpers(),i&&(n!==o.ERROR||e!==l.Event.MANUAL_SOURCE_CHANGE&&e!==l.Event.SOURCE_UNLOADED)){u.logger.log("[LEAVE ".concat(i,"] ").concat((0,u.padRight)(n,20)," EVENT: ").concat((0,u.padRight)(e,20)," to: ").concat((0,u.padRight)(r,20)));var s=i-t.onEnterStateTimestamp;a&&r!==o.PAUSED_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),n===o.READY&&r===o.STARTUP?t.setVideoStartTimeout():n===o.STARTUP&&r===o.PLAYING&&t.clearVideoStartTimeout();var c=String(n).toLowerCase();if(r===o.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var d=t.getVideoStartupFailedEventData(i,e,a),E=e!==l.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(d,E)}else if(n===o.PAUSED_SEEKING){var p=i-t.seekStartedAt;t.seekStartedAt=null,t.stateMachineCallbacks[c](p,c,a)}else if(e===l.Event.UNLOAD)t.stateMachineCallbacks.unload(s,c);else if(n===o.PAUSE&&r!==o.PAUSED_SEEKING)t.stateMachineCallbacks.setVideoTimeStartFromEvent(e),t.stateMachineCallbacks.pause(s,c);else{var h=t.stateMachineCallbacks[c];"function"==typeof h?h(s,c,a):u.logger.error("Could not find callback function for "+c)}a&&r!==o.PAUSED_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),e===l.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(a):e===l.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(a):e===l.Event.MUTE?t.stateMachineCallbacks.mute():e===l.Event.UN_MUTE&&t.stateMachineCallbacks.unMute()}},onseek:function(e,n,r,i){t.seekStartedAt=t.seekStartedAt||i},ontimechanged:function(e,n,r,i,a){var o=i-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=i,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))},onplayerError:function(e,n,r,i,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];r?r.call(this.stateMachine,n,t):u.logger.log("Ignored Event: "+e)},t}(d.AnalyticsStateMachine);t.HTML5AnalyticsStateMachine=E},5918:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsAnalyticsStateMachine=void 0;var o,s=n(9363),l=n(4057),u=n(6767),c=n(4984);!function(e){e.AD="AD",e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PAUSED_SEEKING="PAUSED_SEEKING",e.PLAY_SEEKING="PLAY_SEEKING",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.SOURCE_CHANGING="SOURCE_CHANGING",e.END="END",e.ERROR="ERROR",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.AUDIOTRACK_CHANGED_PLAYING="AUDIOTRACK_CHANGED_PLAYING",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.SUBTITLE_CHANGED_PLAYING="SUBTITLE_CHANGED_PLAYING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(o||(o={}));var d=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.sourceChange=function(e,t,n){r.callEvent(l.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},r.seekTimestamp=0,r.seekedTimestamp=0,r}return i(t,e),t.prototype.getAllStates=function(){return a(a([],Object.keys(o).map((function(e){return o[e]})),!0),["FINISH_PLAY_SEEKING","PLAY_SEEK","FINISH_QUALITYCHANGE_PAUSE","FINISH_QUALITYCHANGE","FINISH_QUALITYCHANGE_REBUFFERING"],!1)},t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return t!==e}))},t.prototype.createStateMachine=function(e){var t=this;return s.create({initial:o.SETUP,error:function(e,t,n,r,i,a){u.logger.error("Error in statemachine: "+a)},events:[{name:l.Event.SOURCE_LOADED,from:[o.SETUP,o.ERROR,o.SOURCE_CHANGING],to:o.READY},{name:l.Event.TIMECHANGED,from:o.SETUP,to:o.SETUP},{name:l.Event.SOURCE_LOADED,from:o.READY,to:o.READY},{name:l.Event.READY,from:[o.SETUP,o.ERROR],to:o.READY},{name:l.Event.PLAY,from:o.READY,to:o.STARTUP},{name:l.Event.ERROR,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.UNLOAD,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.VIDEOSTART_TIMEOUT,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:l.Event.START_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.END_BUFFERING,from:o.STARTUP,to:o.STARTUP},{name:l.Event.VIDEO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIO_CHANGE,from:o.STARTUP,to:o.STARTUP},{name:l.Event.TIMECHANGED,from:o.STARTUP,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.END_BUFFERING,from:o.PLAYING,to:o.PLAYING},{name:l.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},{name:l.Event.START_BUFFERING,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.TIMECHANGED,from:o.REBUFFERING,to:o.PLAYING},{name:l.Event.SEEK,from:o.STARTUP,to:o.STARTUP},{name:l.Event.SEEK,from:o.PLAYING,to:o.PLAY_SEEKING},{name:l.Event.TIMECHANGED,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.TIMECHANGED,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:l.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},{name:l.Event.TIMECHANGED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE,to:o.QUALITYCHANGE},{name:"FINISH_QUALITYCHANGE",from:o.QUALITYCHANGE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:"FINISH_QUALITYCHANGE_PAUSE",from:o.QUALITYCHANGE_PAUSE,to:o.PAUSE},{name:l.Event.SEEK,from:o.PAUSE,to:o.PAUSED_SEEKING},{name:l.Event.SEEK,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.AUDIO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.VIDEO_CHANGE,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.START_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.END_BUFFERING,from:o.PAUSED_SEEKING,to:o.PAUSED_SEEKING},{name:l.Event.SEEKED,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSED_SEEKING,to:o.PLAYING},{name:l.Event.PAUSE,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:"PLAY_SEEK",from:o.PAUSE,to:o.PLAY_SEEKING},{name:"PLAY_SEEK",from:o.PAUSED_SEEKING,to:o.PLAY_SEEKING},{name:"PLAY_SEEK",from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.SEEK,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.AUDIO_CHANGE,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.VIDEO_CHANGE,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.START_BUFFERING,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.END_BUFFERING,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.SEEKED,from:o.PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.SEEKED,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.START_BUFFERING,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.END_BUFFERING,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SEEKED,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.TIMECHANGED,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.END,from:o.PLAY_SEEKING,to:o.END},{name:l.Event.END,from:o.PAUSED_SEEKING,to:o.END},{name:l.Event.END,from:o.PLAYING,to:o.END},{name:l.Event.END,from:o.PAUSE,to:o.END},{name:l.Event.SEEK,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.END,to:o.END},{name:l.Event.TIMECHANGED,from:o.END,to:o.END},{name:l.Event.END_BUFFERING,from:o.END,to:o.END},{name:l.Event.START_BUFFERING,from:o.END,to:o.END},{name:l.Event.END,from:o.END,to:o.END},{name:l.Event.SEEKED,from:o.PLAYING,to:o.PLAYING},{name:l.Event.PLAY,from:o.END,to:o.PLAYING},{name:l.Event.ERROR,from:this.getAllStatesBut(o.STARTUP),to:o.ERROR},{name:l.Event.PAUSE,from:o.ERROR,to:o.ERROR},{name:l.Event.SEEK,from:o.END_PLAY_SEEKING,to:o.PLAY_SEEKING},{name:"FINISH_PLAY_SEEKING",from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.UNLOAD,from:this.getAllStatesBut(o.STARTUP),to:o.END},{name:l.Event.START_AD,from:o.PLAYING,to:o.AD},{name:l.Event.END_AD,from:o.AD,to:o.PLAYING},{name:l.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:l.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:l.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:l.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:l.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:l.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:l.Event.START_CAST,from:[o.READY,o.PAUSE],to:o.CASTING},{name:l.Event.PAUSE,from:o.CASTING,to:o.CASTING},{name:l.Event.PLAY,from:o.CASTING,to:o.CASTING},{name:l.Event.TIMECHANGED,from:o.CASTING,to:o.CASTING},{name:l.Event.MUTE,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEK,from:o.CASTING,to:o.CASTING},{name:l.Event.SEEKED,from:o.CASTING,to:o.CASTING},{name:l.Event.END_CAST,from:o.CASTING,to:o.READY},{name:l.Event.SEEK,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.READY,to:o.READY},{name:l.Event.SEEKED,from:o.STARTUP,to:o.STARTUP},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGED_PLAYING},{name:"FINISH_AUDIOTRACK_CHANGING",from:o.AUDIOTRACK_CHANGED_PLAYING,to:o.PLAYING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PAUSE,to:o.PAUSE},{name:l.Event.AUDIOTRACK_CHANGED,from:o.READY,to:o.READY},{name:l.Event.AUDIOTRACK_CHANGED,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.AUDIOTRACK_CHANGING,to:o.AUDIOTRACK_CHANGING},{name:l.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGED_PLAYING},{name:"FINISH_SUBTITLE_CHANGING",from:o.SUBTITLE_CHANGED_PLAYING,to:o.PLAYING},{name:l.Event.SUBTITLE_CHANGE,from:o.PAUSE,to:o.PAUSE},{name:l.Event.SUBTITLE_CHANGE,from:o.READY,to:o.READY},{name:l.Event.SUBTITLE_CHANGE,from:o.REBUFFERING,to:o.REBUFFERING},{name:l.Event.SUBTITLE_CHANGE,from:o.END_PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SUBTITLE_CHANGE,from:o.SUBTITLE_CHANGING,to:o.SUBTITLE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut(o.READY),to:o.SOURCE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:o.READY,to:o.READY},{name:l.Event.MANUAL_SOURCE_CHANGE,from:o.SETUP,to:o.SETUP},{name:l.Event.TIMECHANGED,from:o.SOURCE_CHANGING,to:o.SOURCE_CHANGING},{name:l.Event.VIDEO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.VIDEO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:l.Event.AUDIO_CHANGE,from:o.QUALITYCHANGE_REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:o.QUALITYCHANGE_REBUFFERING,to:o.REBUFFERING},{name:l.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:l.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:l.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE}],callbacks:{onafterevent:function(e,n,r,i){r===o.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(i),r!==o.MUTING_READY&&r!==o.MUTING_PLAY&&r!==o.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(i),r===o.AUDIOTRACK_CHANGED_PLAYING&&t.stateMachine.FINISH_AUDIOTRACK_CHANGING(i),r===o.SUBTITLE_CHANGED_PLAYING&&t.stateMachine.FINISH_SUBTITLE_CHANGING(i)},onenterstate:function(n,r,i,a,s){"none"===r&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=a||(new Date).getTime(),u.logger.log("[ENTER] "+(0,u.padRight)(i,20)+"EVENT: "+(0,u.padRight)(n,20)+" from "+(0,u.padRight)(r,14)),s&&i!==o.PAUSED_SEEKING&&i!==o.PLAY_SEEKING&&i!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===l.Event.SEEK&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===l.Event.SEEKED&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(s),"PLAY_SEEK"===n&&i===o.PLAY_SEEKING&&i!==o.PLAY_SEEKING&&i!==o.END_PLAY_SEEKING&&(t.seekTimestamp=t.onEnterStateTimestamp),n===l.Event.START_CAST&&i===o.CASTING&&t.stateMachineCallbacks.startCasting(a,s),i===o.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onleavestate:function(e,n,r,i,a){if(n===o.REBUFFERING&&t.resetRebufferingHelpers(),i){u.logger.log("[LEAVE] ".concat((0,u.padRight)(n,20)," EVENT: ").concat((0,u.padRight)(e,20)," to ").concat((0,u.padRight)(r,20)));var s=i-t.onEnterStateTimestamp;if(a&&r!==o.PAUSED_SEEKING&&r!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),"PLAY_SEEK"===e&&n===o.PAUSE)return!0;n===o.READY&&r===o.STARTUP?t.setVideoStartTimeout():n!==o.STARTUP||r!==o.PLAYING&&r!==o.EXIT_BEFORE_VIDEOSTART||t.clearVideoStartTimeout();var c=String(n).toLowerCase();if(r===o.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var d=t.getVideoStartupFailedEventData(i,e,a),E=e!==l.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(d,E)}else if(n===o.PAUSED_SEEKING){var p=i-t.seekTimestamp;t.stateMachineCallbacks.paused_seeking(p,c)}else if(n===o.END_PLAY_SEEKING){p=t.seekedTimestamp-t.seekTimestamp;t.stateMachineCallbacks.end_play_seeking(p,c)}else if(e===l.Event.UNLOAD)t.stateMachineCallbacks.unload(s,c);else if(n===o.PAUSE&&r!==o.PAUSED_SEEKING)t.stateMachineCallbacks.setVideoTimeStartFromEvent(e),t.stateMachineCallbacks.pause(s,c);else{var h=t.stateMachineCallbacks[c];if("function"==typeof h)h(s,c,a);else null==[o.MUTING_PAUSE,o.MUTING_PLAY,o.AUDIOTRACK_CHANGED_PLAYING,o.SUBTITLE_CHANGED_PLAYING].find((function(e){return n===e}))&&u.logger.error("Could not find callback function for "+c)}a&&r!==o.PAUSED_SEEKING&&r!==o.PLAY_SEEKING&&r!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),e===l.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(a):e===l.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(a):e===l.Event.MUTE?t.stateMachineCallbacks.mute():e===l.Event.UN_MUTE?t.stateMachineCallbacks.unMute():e===l.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(a)}},onseek:function(e,n,r,i){t.seekTimestamp=i},onseeked:function(e,n,r,i){t.seekedTimestamp=i},ontimechanged:function(e,n,r,i,a){var o=i-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=i,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))},onplayerError:function(e,n,r,i,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];r?r.call(this.stateMachine,n,t):u.logger.log("Ignored Event: "+e)},t}(c.AnalyticsStateMachine);t.VideojsAnalyticsStateMachine=d},7659:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSStateMachine=void 0;var a,o=n(9363),s=n(4057),l=n(6767),u=n(1700),c=n(4984);!function(e){e.SETUP="SETUP",e.READY="READY",e.STARTUP="STARTUP",e.PLAYING="PLAYING",e.PAUSE="PAUSE",e.REBUFFERING="REBUFFERING",e.EXIT_BEFORE_VIDEOSTARTUP="EXIT_BEFORE_VIDEOSTARTUP",e.ERROR="ERROR",e.UNLOADED="UNLOADED",e.QUALITY_CHANGE="QUALITY_CHANGE",e.SEEKING="SEEKING"}(a||(a={}));var d=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.heartbeatService=n,i.getStateHandler=function(){var e;return(e={})[a.SETUP]={onenterstate:function(){},onleavestate:function(e){i.stateMachineCallbacks.setup(e,a.SETUP.toLowerCase())}},e[a.READY]={onenterstate:function(){},onleavestate:function(){}},e[a.STARTUP]={onenterstate:function(){i.setVideoStartTimeout()},onleavestate:function(e,t){i.clearVideoStartTimeout(),t==a.PLAYING&&i.stateMachineCallbacks.startup(e,a.STARTUP.toLowerCase())}},e[a.PLAYING]={onenterstate:function(){i.heartbeatService.startHeartbeat()},onleavestate:function(e){i.heartbeatService.stopHeartbeat(),i.stateMachineCallbacks.playing(e,a.PLAYING.toLowerCase())}},e[a.PAUSE]={onenterstate:function(){},onleavestate:function(e){i.stateMachineCallbacks.pause(e,a.PAUSE.toLowerCase())}},e[a.REBUFFERING]={onenterstate:function(){i.startRebufferingHeartbeatInterval()},onleavestate:function(e){i.resetRebufferingHelpers(),i.stateMachineCallbacks.rebuffering(e,a.REBUFFERING.toLowerCase())}},e[a.EXIT_BEFORE_VIDEOSTARTUP]={onenterstate:function(e,t){var n={reason:i.getReasonForVideoStartFailure(e)},r=e===s.Event.ERROR,a=!r;i.stateMachineCallbacks.videoStartFailed(n,a),r&&i.stateMachineCallbacks.error(t)},onleavestate:function(){}},e[a.ERROR]={onenterstate:function(e,t){i.stateMachineCallbacks.error(t)},onleavestate:function(){}},e[a.UNLOADED]={onenterstate:function(){i.stateMachineCallbacks.unload(0,a.UNLOADED)},onleavestate:function(){}},e[a.QUALITY_CHANGE]={onenterstate:function(e,t){i.stateMachine.FINISH_QUALITYCHANGE(i.onEnterStateTimestamp,t)},onleavestate:function(){i.stateMachineCallbacks.qualitychange(0,a.QUALITY_CHANGE.toLowerCase())}},e[a.SEEKING]={onenterstate:function(){},onleavestate:function(e){i.stateMachineCallbacks.end_play_seeking(e,a.SEEKING.toLowerCase())}},e},i}return i(t,e),t.prototype.createStateMachine=function(e){var t=this;return this.onEnterStateTimestamp=e.starttime,o.StateMachine.create({initial:a.SETUP,error:function(e,t,n,r,i,a){l.logger.error("Error in statemachine: "+a)},events:[{name:s.Event.READY,from:a.SETUP,to:a.READY},{name:s.Event.PLAY,from:a.READY,to:a.STARTUP},{name:s.Event.PLAYING,from:a.STARTUP,to:a.PLAYING},{name:s.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:s.Event.PLAYING,from:a.PAUSE,to:a.PLAYING},{name:s.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:s.Event.UNLOAD,from:a.PLAYING,to:a.UNLOADED},{name:s.Event.PLAYING,from:a.ERROR,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITY_CHANGE},{name:"FINISH_QUALITYCHANGE",from:a.QUALITY_CHANGE,to:a.PLAYING},{name:s.Event.SEEK,from:a.PLAYING,to:a.SEEKING},{name:s.Event.SEEKED,from:a.SEEKING,to:a.PLAYING},{name:s.Event.PAUSE,from:a.SEEKING,to:a.PAUSE},{name:s.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:s.Event.PLAYING,from:a.REBUFFERING,to:a.PLAYING},{name:s.Event.VIDEOSTART_TIMEOUT,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTARTUP},{name:s.Event.ERROR,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTARTUP},{name:s.Event.UNLOAD,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTARTUP},{name:s.Event.ERROR,from:p([a.STARTUP,a.EXIT_BEFORE_VIDEOSTARTUP]),to:a.ERROR},E(s.Event.PAUSE).in(a.PAUSE),E(s.Event.PAUSE).in(a.STARTUP),E(s.Event.PAUSE).in(a.REBUFFERING),E(s.Event.PLAY).in(a.PLAYING),E(s.Event.PLAYING).in(a.PLAYING),E(s.Event.START_BUFFERING).in(a.PAUSE),E(s.Event.START_BUFFERING).in(a.REBUFFERING),E(s.Event.VIDEOSTART_TIMEOUT).in(a.PLAYING),E(s.Event.VIDEOSTART_TIMEOUT).in(a.PAUSE),E(s.Event.VIDEOSTART_TIMEOUT).in(a.SEEKING),E(s.Event.UNLOAD).in(a.READY),E(s.Event.UNLOAD).in(a.SEEKING),E(s.Event.VIDEO_CHANGE).in(a.QUALITY_CHANGE),E(s.Event.VIDEO_CHANGE).in(a.STARTUP),E(s.Event.VIDEO_CHANGE).in(a.REBUFFERING),E(s.Event.VIDEO_CHANGE).in(a.PAUSE),E(s.Event.VIDEO_CHANGE).in(a.ERROR),E(s.Event.VIDEO_CHANGE).in(a.EXIT_BEFORE_VIDEOSTARTUP),E(s.Event.VIDEO_CHANGE).in(a.READY),E(s.Event.VIDEO_CHANGE).in(a.SEEKING),E(s.Event.SEEK).in(a.SEEKING),E(s.Event.SEEK).in(a.PAUSE),E(s.Event.SEEKED).in(a.PAUSE),E(s.Event.SEEK).in(a.QUALITY_CHANGE),E(s.Event.SEEKED).in(a.QUALITY_CHANGE),E(s.Event.SEEK).in(a.REBUFFERING),E(s.Event.SEEKED).in(a.REBUFFERING),E(s.Event.SEEK).in(a.ERROR),E(s.Event.SEEKED).in(a.ERROR),E(s.Event.SEEK).in(a.STARTUP),E(s.Event.SEEKED).in(a.STARTUP),E(s.Event.SEEK).in(a.READY),E(s.Event.SEEKED).in(a.READY),E(s.Event.SEEK).in(a.EXIT_BEFORE_VIDEOSTARTUP),E(s.Event.SEEKED).in(a.EXIT_BEFORE_VIDEOSTARTUP)],callbacks:{onenterstate:function(e,n,r,i,a){"none"!=n&&void 0!==r&&void 0!==e&&(a&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),l.logger.log("[ENTER ".concat(i,"] EVENT: ").concat(e," \nfrom: ").concat(n,"\t to: ").concat(r)),t.onEnterStateTimestamp=i||u.getCurrentTimestamp(),t.getStateHandler()[r].onenterstate(e,a))},onleavestate:function(e,n,r,i,a){if(i&&"none"!=n&&void 0!==n&&void 0!==r){a&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a);var o=i-t.onEnterStateTimestamp;t.getStateHandler()[n].onleavestate(o,r)}}}})},t.prototype.callEvent=function(e,t,n){var r=this.stateMachine[e];r?r.call(this.stateMachine,n,t):l.logger.log("Ignored Event: "+e)},t.prototype.sourceChange=function(e,t,n){this.callEvent(s.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:n},t)},t.prototype.onHeartbeat=function(e){this.stateMachineCallbacks.setVideoTimeEndFromEvent(e);var t=u.getCurrentTimestamp(),n=t-this.onEnterStateTimestamp;this.stateMachineCallbacks.heartbeat(n,"playing",{played:n}),this.onEnterStateTimestamp=t,this.stateMachineCallbacks.setVideoTimeStartFromEvent(e)},t}(c.AnalyticsStateMachine);t.AmazonIVSStateMachine=d;var E=function(e){return{in:function(t){return{name:e,from:t,to:t}}}},p=function(e){return h().filter((function(t){return e.indexOf(t)<0}))},h=function(){return Object.keys(a).map((function(e){return a[e]}))}},978:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=void 0;var n=function(){function e(e,t){this.heartbeatIntervalMs=e,this.playerContext=t}return e.prototype.setListener=function(e){this.listener=e},e.prototype.startHeartbeat=function(){var e=this;void 0!==this.heartbeatInterval&&this.clearHeartbeat(),this.heartbeatInterval=window.setInterval((function(){var t,n={currentTime:e.playerContext.position};null===(t=e.listener)||void 0===t||t.onHeartbeat(n)}),this.heartbeatIntervalMs)},e.prototype.stopHeartbeat=function(){this.clearHeartbeat()},e.prototype.clearHeartbeat=function(){window.clearTimeout(this.heartbeatInterval),this.heartbeatInterval=void 0},e}();t.HeartbeatService=n},2498:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalytics=void 0;var i,a=n(2764),o=n(5464),s=n(1834),l=n(5014),u=n(6767),c=n(1700),d=n(3871);!function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(i||(i={}));t.AdAnalytics=function(){function e(e,t){var n=this;this.onBeforeUnLoadEvent=!1,this.adManifestLoadedEvents=[],this.isPlaying=!1,this.adPodPosition=0,this.analytics=e,this.adapter=t,this.adapter.adCallbacks.onAdStarted=function(e){return n.onAdStarted(e)},this.adapter.adCallbacks.onAdFinished=function(e){return n.onAdFinished(e)},this.adapter.adCallbacks.onAdBreakStarted=function(e){return n.onAdBreakStarted(e)},this.adapter.adCallbacks.onAdBreakFinished=function(e){return n.onAdBreakFinished(e)},this.adapter.adCallbacks.onAdClicked=function(e){return n.onAdClicked(e)},this.adapter.adCallbacks.onAdError=function(e){return n.onAdError(e)},this.adapter.adCallbacks.onAdManifestLoaded=function(e){return n.onAdManifestLoaded(e)},this.adapter.adCallbacks.onPlay=function(){return n.onPlay()},this.adapter.adCallbacks.onPause=function(){return n.onPause()},this.adapter.adCallbacks.onBeforeUnload=function(){return n.onBeforeUnload()},this.adapter.adCallbacks.onAdSkipped=function(e){return n.onAdSkipped(e)},this.adapter.adCallbacks.onAdQuartile=function(e){return n.onAdQuartile(e)},this.viewportTracker=new d.ViewportTracker(this.adapter.getContainer(),(function(){return n.onIntersectionChanged()}),.5)}return e.prototype.release=function(){this.clearCurrentTimeInterval(),this.viewportTracker.dispose()},e.prototype.onIntersectionChanged=function(){this.activeAdSample&&(this.isContainerInViewport()?this.enterViewportTimestamp=c.getCurrentTimestamp():this.enterViewportTimestamp&&(this.activeAdSample.timeInViewport=(this.activeAdSample.timeInViewport||0)+c.getCurrentTimestamp()-this.enterViewportTimestamp))},e.prototype.isContainerInViewport=function(){return!this.viewportTracker||this.viewportTracker.isInViewport()},e.prototype.onPlay=function(){if(this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample){var e=c.getCurrentTimestamp();this.beginPlayingTimestamp=e,this.enterViewportTimestamp=e,this.isPlaying=!0}},e.prototype.onPause=function(){this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample&&(this.updatePlayingTime(this.activeAdSample),this.isPlaying=!1)},e.prototype.onAdManifestLoaded=function(e){var t=e.adConfig;t&&t.tag&&"vmap"===t.tag.type?this.sendAnalyticsRequest(new s.AdBreakSample(e.adConfig,e)):e.adBreak&&this.adManifestLoadedEvents.push(e)},e.prototype.onAdBreakStarted=function(e){this.adPodPosition=0,this.activeAdBreakSample=new s.AdBreakSample(e.adBreak,this.getAdManifestLoadedEvent(e.adBreak)),this.adStartupTimestamp=c.getCurrentTimestamp()},e.prototype.onAdBreakFinished=function(e){this.resetActiveAd(),this.activeAdBreakSample=void 0},e.prototype.onAdStarted=function(e){e.ad.isLinear&&(this.resetActiveAd(),this.activeAdSample=new l.AdSample(e.ad),this.currentTime=void 0,this.activeAdSample.adStartupTime=this.adStartupTimestamp?c.getCurrentTimestamp()-this.adStartupTimestamp:void 0,this.startAd(this.activeAdSample))},e.prototype.onAdFinished=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=r({},this.activeAdSample);t.completed=1,this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.adDuration)}},e.prototype.onAdSkipped=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=r({},this.activeAdSample);t.skipped=1,t.skipPosition=this.currentTime,t.skipPercentage=c.calculatePercentage(this.activeAdSample.skipPosition,this.activeAdSample.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.skipPosition)}},e.prototype.onAdError=function(e){var t,n,r,i=this,a=(t=e.data||{adBreak:void 0,adConfig:void 0,code:void 0,message:void 0}).adConfig,o=t.adBreak,l=t.code,u=t.message,d=new s.AdBreakSample(o||a,o?this.getAdManifestLoadedEvent(o):void 0);d.errorCode=l||e.code,d.errorData=JSON.stringify(e.data),d.errorMessage=u||e.name,this.activeAdSample&&o&&o.ads&&o.ads.includes((function(e){return e.id===i.activeAdSample.adId}))&&(r=(n=this.activeAdSample).errorPosition=this.currentTime,n.errorPercentage=c.calculatePercentage(n.errorPosition,n.adDuration)),this.completeAd(d,n,r)},e.prototype.onAdClicked=function(e){this.activeAdSample&&(this.activeAdSample.adClickthroughUrl=e.clickThroughUrl,this.activeAdSample.clicked=1,this.activeAdSample.clickPosition=this.currentTime,this.activeAdSample.clickPercentage=c.calculatePercentage(this.activeAdSample.clickPosition,this.activeAdSample.adDuration))},e.prototype.onAdQuartile=function(e){this.activeAdSample&&(e.quartile===i.FIRST_QUARTILE?this.activeAdSample.quartile1=1:e.quartile===i.MIDPOINT?this.activeAdSample.midpoint=1:e.quartile===i.THIRD_QUARTILE&&(this.activeAdSample.quartile3=1))},e.prototype.onBeforeUnload=function(){if(!this.onBeforeUnLoadEvent&&(this.onBeforeUnLoadEvent=!0,this.activeAdSample&&this.activeAdBreakSample)){var e=r({},this.activeAdSample);e.closed=1,e.closePosition=this.currentTime,e.closePercentage=c.calculatePercentage(e.closePosition,e.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,e,e.closePosition)}},e.prototype.createNewAdAnalyticsSample=function(e){var t=this.adapter.getAdModuleInfo();return r(r({},new o.AdAnalyticsSample(e)),{analyticsVersion:a.VERSION,adModule:t.name,adModuleVersion:t.version,playerStartupTime:this.analytics.playerStartupTime,pageLoadTime:this.analytics.pageLoadTime,autoplay:this.analytics.autoplay,pageLoadType:c.getPageLoadType()})},e.prototype.getAdManifestLoadedEvent=function(e){if(e)return this.adManifestLoadedEvents.find((function(t){return t.adBreak&&t.adBreak.id===e.id}))},e.prototype.sendAnalyticsRequest=function(e,t){var n=r(r(r({},this.createNewAdAnalyticsSample(this.analytics.sample)),e),t||new l.AdSample);n.time=c.getCurrentTimestamp(),n.adImpressionId=c.generateUUID(),n.percentageInViewport=c.calculatePercentage(n.timeInViewport,n.timePlayed),this.analytics.backend.sendAdRequest(n)},e.prototype.updatePlayingTime=function(e){var t=c.getCurrentTimestamp();this.beginPlayingTimestamp&&this.isPlaying&&(void 0!==e.timePlayed&&(e.timePlayed+=t-this.beginPlayingTimestamp),this.isContainerInViewport()&&this.enterViewportTimestamp&&void 0!==e.timeInViewport&&(e.timeInViewport+=t-this.enterViewportTimestamp))},e.prototype.startAd=function(t){var n=this;t.started=1,t.timePlayed=0,t.timeInViewport=0,t.adPodPosition=this.adPodPosition;var r=c.getCurrentTimestamp();this.beginPlayingTimestamp=r,this.enterViewportTimestamp=this.isContainerInViewport()?r:void 0,this.isPlaying=!0,this.currentTime=0,this.adPodPosition++,this.currentTimeInterval=window.setInterval((function(){try{t&&void 0!==t.adDuration&&t.adDuration>0&&n.adapter.isLinearAdActive()&&(n.currentTime=c.calculateTime(Math.max(n.adapter.currentTime(),0)))}catch(e){u.logger.log("AdStarted monitoring interval failed and got cleared",e),n.resetActiveAd()}}),e.TIMEOUT_CURRENT_TIME_INTERVAL)},e.prototype.completeAd=function(e,t,n){void 0===t&&(t=new l.AdSample),t.exitPosition=n,t.playPercentage=c.calculatePercentage(t.exitPosition,t.adDuration),this.adStartupTimestamp=c.getCurrentTimestamp(),this.updatePlayingTime(t),this.isPlaying=!1,this.sendAnalyticsRequest(e,t)},e.prototype.resetActiveAd=function(){this.clearCurrentTimeInterval(),this.activeAdSample=void 0},e.prototype.clearCurrentTimeInterval=function(){window.clearInterval(this.currentTimeInterval),delete this.currentTime},e.MODULE_NAME="ads",e.TIMEOUT_CURRENT_TIME_INTERVAL=100,e}()},2343:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var i=n(2764),a=n(6087),o=n(2108),s=n(9962),l=n(1942),u=n(5216),c=n(6767),d=n(1700),E=n(2498),p=n(4189),h=n(3382),A=n(4441),f=n(2228);t.Analytics=function(){function e(e,t,n){void 0===n&&(n=new p.BackendFactory);var i=this;this.pageLoadTime=0,this.playerStartupTime=0,this.videoStartupTime=0,this.autoplay=void 0,this.droppedSampleFrames=0,this.startupTime=0,this.featureManager=new s.FeatureManager,this.onErrorDetailEventDispatcher=new h.EventDispatcher,this.authenticationCallback={authenticationCompleted:function(e,t){i.featureManager.configureFeatures(e,t)}},this.guardAgainstMissingVideoTitle=function(e,t){e&&t&&e.title&&!t.title&&c.logger.error("The new analytics configuration does not contain the field title")},this.guardAgainstMissingIsLive=function(e,t){null!=e&&null!=t&&e.isLive&&null==t.isLive&&c.logger.error("The new analytics configuration does not contain the field `isLive`. It will default to `false` which might be unintended? Once stream playback information is available the type will be populated.")},this.sourceChange=function(e){c.logger.log("Processing Source Change for Analytics",e),i.guardAgainstMissingVideoTitle(i.config,e),i.guardAgainstMissingIsLive(i.config,e);var t=i.getMergedAnalyticsConfig(e);i.adapter.sourceChange(t,d.getCurrentTimestamp())},this.setCustomDataOnce=function(e){var t=r({},i.config);i.setState("customdatachange"),i.changeCustomData(e),i.sendAnalyticsRequestAndClearValues(),i.config=r({},t),i.setConfigParameters()},this.setCustomData=function(e){i.adapter.setCustomData(e)},this.getCurrentImpressionId=function(){return i.sample.impressionId},this.getUserId=function(){return i.sessionHandler.userId},this.changeCustomData=function(e){var t,n;i.config=r(r({},i.config),(t=e,n={},l.customDataValuesKeys.forEach((function(e){t[e]&&(n[e]=t[e])})),n)),i.setConfigParameters()};var a=this;this.config=this.buildDefaultAnalyticsConfigValues(e),this.errorDetailTrackingSettingsProvider={get domain(){return a.getDomain(a.config)},get licenseKey(){var e;return null!==(e=a.config.key)&&void 0!==e?e:""},get impressionId(){var e;return null!==(e=a.getCurrentImpressionId())&&void 0!==e?e:""},get collectorConfig(){return a.config.config}},this.adapter=t,this.backendFactory=n,this.sessionHandler=new f.SessionPersistenceHandler(e);var o=this.adapter.onLicenseKeyReceived.subscribe((function(e){i.config.key||(i.config.key=e.licenseKey),o()}));this.sample=this.setupSample(),this.init(),this.setupStateMachineCallbacks();var u=this.adapter.initialize(this);this.featureManager.registerFeatures(u),this.adapter.adModule&&(this.adAnalytics=new E.AdAnalytics(this,this.adapter.adModule)),this.checkForErrorsInConfig(e)}return Object.defineProperty(e.prototype,"version",{get:function(){return i.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorDetailSubscribable",{get:function(){return this.onErrorDetailEventDispatcher},enumerable:!1,configurable:!0}),e.prototype.getPlayerInformationFromAdapter=function(){var e=this.config.player||this.adapter.getPlayerName();return{player:e,version:e+"-"+this.adapter.getPlayerVersion(),playerTech:this.adapter.getPlayerTech()}},e.prototype.updateSamplesToCastClientConfig=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];this.updateSampleToCastClientConfig(i,t)}},e.prototype.updateSampleToCastClientConfig=function(e,t){var n=t.config,r=t.userId,i=t.impressionId,a=t.domain,o=t.path,s=t.language,l=t.userAgent;e.impressionId=i,e.userId=r,e.userAgent=l,e.domain=a,e.path=o,e.language=s,this.setConfigParameters(e,n)},e.prototype.init=function(){!0===this.adapter.supportsDeferredLicenseLoading||""!==this.config.key&&d.validString(this.config.key)?(c.logger.setLogging(this.config.debug||!1),this.featureManager.resetFeatures(),this.backend=this.createBackend(this.config),this.videoStartupTime=0,this.setConfigParameters(),this.generateNewImpressionId(),this.setUserId(),this.adapter.videoCompletionTracker&&this.adapter.videoCompletionTracker.reset(),this.adapter.qualityChangeService.resetValues()):c.logger.error("Invalid analytics license key provided")},e.prototype.release=function(){var e;this.backend=new A.NoOpBackend,null===(e=this.adAnalytics)||void 0===e||e.release(),this.adapter.qualityChangeService.stopResetInterval()},e.prototype.setConfigParameters=function(e,t){void 0===e&&(e=this.sample),void 0===t&&(t=this.config),e.key=t.key,e.playerKey=t.playerKey,t.player&&(e.player=t.player),e.domain=this.getDomainFromConfig(t)||d.sanitizePath(window.location.hostname),e.cdnProvider=t.cdnProvider,e.videoId=t.videoId,e.videoTitle=t.title,e.customUserId=null!=t.userId?t.userId:t.customUserId,d.transferCustomDataFields(t,e),e.experimentName=t.experimentName},e.prototype.generateNewImpressionId=function(){this.sample.impressionId=d.generateUUID()},e.prototype.setUserId=function(){this.sample.userId=this.sessionHandler.userId},e.prototype.setupStateMachineCallbacks=function(){var e=this;this.adapter.stateMachineCallbacks.setup=function(t,n){if(c.logger.log("Setup bitmovin analytics "+e.sample.analyticsVersion+" with impressionId: "+e.sample.impressionId),e.setDuration(t),e.setState(n),e.playerStartupTime=e.sample.playerStartupTime=t,window.performance&&window.performance.timing){var r=d.getCurrentTimestamp()-window.performance.timing.navigationStart;e.pageLoadTime=e.sample.pageLoadTime=r}e.startupTime=t,e.sendAnalyticsRequestAndClearValues(),e.sample.pageLoadTime=0},this.adapter.stateMachineCallbacks.startup=function(t,n){e.setDuration(t),e.videoStartupTime=e.sample.videoStartupTime=t,e.sample.supportedVideoCodecs=u.CodecHelper.supportedVideoFormats,e.setState(n),e.startupTime>0&&(e.startupTime+=t),e.sample.startupTime=e.startupTime,e.autoplay=e.sample.autoplay=e.adapter.getAutoPlay();var r=e.adapter.getDrmPerformanceInfo();null!=r&&(e.sample.drmType=r.drmType,e.sample.drmLoadTime=r.drmLoadTime),e.sendAnalyticsRequestAndClearValues(),e.sample.autoplay=void 0},this.adapter.stateMachineCallbacks.playing=function(t,n){e.setDuration(t),e.setState(n),e.sample.played=t,e.setCompletionValues(),e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.unload=function(t,n){var r=e.sample.videoTimeStart;"playing"===n&&(e.setDuration(t),e.setState(n),e.sample.played=t,e.setCompletionValues(),e.sendUnloadRequest(),d.validNumber(e.sample.videoTimeEnd)&&(r=e.sample.videoTimeEnd)),e.videoStartupTime>0&&(e.setVideoTimeStart(r),e.setVideoTimeEnd(r),e.clearValues(),e.setState("closed"),e.sendUnloadRequest())},this.adapter.stateMachineCallbacks.heartbeat=function(t,n,i){e.setState(n),e.setDuration(t),e.sample=r(r({},e.sample),i),"playing"===n&&e.setCompletionValues(),e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.qualitychange=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.qualitychange_pause=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.qualitychange_rebuffering=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.videoChange=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setPlaybackVideoPropertiesFromEvent(t)},this.adapter.stateMachineCallbacks.audioChange=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setPlaybackAudioPropertiesFromEvent(t)},this.adapter.stateMachineCallbacks.audiotrack_changing=function(){e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.pause=function(t,n){e.setDuration(t),e.setState(n),e.sample.paused=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.paused_seeking=function(t,n){e.setDuration(t),e.setState(n),e.sample.seeked=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.end_play_seeking=function(t,n){e.setState(n),e.setDuration(t),e.sample.seeked=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.rebuffering=function(t,n){e.setDuration(t),e.setState(n),e.sample.buffered=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.videoStartFailed=function(t,n){void 0===n&&(n=!0),e.setState("startup"),e.sample.videoStartFailed=!0,e.sample.videoStartFailedReason=t.reason.reason,null!=t.reason.errorCode&&(e.sample.errorCode=t.reason.errorCode.code,e.sample.errorMessage=t.reason.errorCode.message,n&&e.onErrorDetailEventDispatcher.dispatch(r({},t.reason.errorCode))),n&&e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.error=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setState("error"),e.sample.errorCode=t.code,e.sample.errorMessage=t.message,e.sample.errorData=JSON.stringify(t.legacyData);var n=e.adapter.segments.map((function(e){return e.name}));e.sample.errorSegments=n,e.adapter.onError&&e.adapter.onError(),e.onErrorDetailEventDispatcher.dispatch({code:t.code,message:t.message,errorData:t.data}),e.sendAnalyticsRequestAndClearValues(),delete e.sample.errorCode,delete e.sample.errorMessage,delete e.sample.errorData},this.adapter.stateMachineCallbacks.ad=function(t,n){e.setDuration(t),e.setState(n),e.sample.ad=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.mute=function(){e.sample.isMuted=!0},this.adapter.stateMachineCallbacks.unMute=function(){e.sample.isMuted=!1},this.adapter.stateMachineCallbacks.subtitle_changing=function(){e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent=function(t){d.validNumber(t.currentTime)&&e.setVideoTimeEnd(d.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent=function(t){d.validNumber(t.currentTime)&&e.setVideoTimeStart(d.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.manualSourceChange=function(t){e.adapter.resetSourceRelatedState(),e.sample=e.setupSample(),e.startupTime=0,e.config=Object.keys(t.config).length>0?t.config:e.config,e.init()},this.adapter.stateMachineCallbacks.playlistTransition=function(t){e.sample=e.setupSample(),e.startupTime=0,e.init()},this.adapter.stateMachineCallbacks.initialSourceChange=function(t){e.config=t.config,e.setConfigParameters()},this.adapter.stateMachineCallbacks.end=function(){e.sample=e.setupSample(),e.startupTime=0,e.init()},this.adapter.stateMachineCallbacks.release=function(){e.release()},this.adapter.stateMachineCallbacks.customdatachange=function(t,n,r){r&&r.values&&e.changeCustomData(r.values)}},e.prototype.setDuration=function(e){this.sample.duration=e},e.prototype.setState=function(e){this.sample.state=e},e.prototype.setPlaybackVideoPropertiesFromEvent=function(e){d.validNumber(e.width)&&(this.sample.videoPlaybackWidth=e.width),d.validNumber(e.height)&&(this.sample.videoPlaybackHeight=e.height),d.validNumber(e.bitrate)&&(this.sample.videoBitrate=e.bitrate),d.validString(e.codec)&&(this.sample.videoCodec=e.codec)},e.prototype.setPlaybackAudioPropertiesFromEvent=function(e){d.validNumber(e.bitrate)&&(this.sample.audioBitrate=e.bitrate),d.validString(e.codec)&&(this.sample.audioCodec=e.codec)},e.prototype.setPlaybackInfoFromAdapter=function(){var e=this.adapter.getCurrentPlaybackInfo();e&&(this.sample.isLive=this.getIsLiveFromConfigOrPlaybackInfo(this.config,e.isLive),d.validString(e.size)&&(this.sample.size=e.size),d.validString(e.playerTech)&&(this.sample.playerTech=e.playerTech),d.validNumber(e.videoDuration)&&(this.sample.videoDuration=d.calculateTime(e.videoDuration||0)),d.validString(e.streamFormat)&&(this.sample.streamFormat=e.streamFormat),d.validString(e.mpdUrl)&&(this.sample.mpdUrl=e.mpdUrl),d.validString(e.m3u8Url)&&(this.sample.m3u8Url=e.m3u8Url),d.validString(e.progUrl)&&(this.sample.progUrl=e.progUrl),d.validNumber(e.videoWindowWidth)&&(this.sample.videoWindowWidth=e.videoWindowWidth),d.validNumber(e.videoWindowHeight)&&(this.sample.videoWindowHeight=e.videoWindowHeight),d.validNumber(e.screenHeight)&&(this.sample.screenHeight=e.screenHeight),d.validNumber(e.screenWidth)&&(this.sample.screenWidth=e.screenWidth),d.validNumber(e.videoPlaybackHeight)&&(this.sample.videoPlaybackHeight=e.videoPlaybackHeight),d.validNumber(e.videoPlaybackWidth)&&(this.sample.videoPlaybackWidth=e.videoPlaybackWidth),d.validNumber(e.videoBitrate)&&(this.sample.videoBitrate=e.videoBitrate),d.validNumber(e.audioBitrate)&&(this.sample.audioBitrate=e.audioBitrate),d.validBoolean(e.isMuted)&&(this.sample.isMuted=e.isMuted),d.validBoolean(e.isCasting)&&(this.sample.isCasting=e.isCasting),d.validString(e.castTech)&&(this.sample.castTech=e.castTech),d.validString(e.videoTitle)&&!this.config.title&&(this.sample.videoTitle=e.videoTitle),d.validString(e.audioCodec)&&(this.sample.audioCodec=e.audioCodec),d.validString(e.videoCodec)&&(this.sample.videoCodec=e.videoCodec),d.validString(e.audioLanguage)&&(this.sample.audioLanguage=e.audioLanguage),d.validBoolean(e.subtitleEnabled)&&(this.sample.subtitleEnabled=e.subtitleEnabled),d.validString(e.subtitleLanguage)?this.sample.subtitleLanguage=e.subtitleLanguage:this.sample.subtitleLanguage=void 0,d.validNumber(e.droppedFrames)&&(this.sample.droppedFrames=Math.max(e.droppedFrames-this.droppedSampleFrames,0),this.droppedSampleFrames=e.droppedFrames))},e.prototype.setupSample=function(){return this.droppedSampleFrames=0,r({platform:"web",playerStartupTime:0,pageLoadType:d.getPageLoadType(),path:d.sanitizePath(window.location.pathname),language:navigator.language||navigator.userLanguage,userAgent:navigator.userAgent,screenWidth:screen.width,screenHeight:screen.height,isLive:!1,videoDuration:0,size:o.PlayerSize.Window,time:0,videoWindowWidth:0,videoWindowHeight:0,droppedFrames:0,played:0,buffered:0,paused:0,ad:0,seeked:0,videoPlaybackWidth:0,videoPlaybackHeight:0,videoBitrate:0,audioBitrate:0,videoTimeStart:0,videoTimeEnd:0,videoStartupTime:0,duration:0,startupTime:0,analyticsVersion:i.VERSION,pageLoadTime:0,completedTotal:0},this.getPlayerInformationFromAdapter())},e.prototype.sendAnalyticsRequest=function(){this.setPlaybackInfoFromAdapter(),this.sample.time=d.getCurrentTimestamp(),this.sample.downloadSpeedInfo=this.adapter.downloadSpeedInfo;var e=r({},this.sample);this.backend.sendRequest(e)},e.prototype.sendAnalyticsRequestAndClearValues=function(){this.sendAnalyticsRequest(),this.clearValues()},e.prototype.sendUnloadRequest=function(){this.backend.sendUnloadRequest(this.sample)},e.prototype.sendAnalyticsRequestSynchronous=function(){this.backend.sendRequestSynchronous(this.sample)},e.prototype.clearValues=function(){this.sample.ad=0,this.sample.paused=0,this.sample.played=0,this.sample.seeked=0,this.sample.buffered=0,this.sample.playerStartupTime=0,this.sample.videoStartupTime=0,this.sample.startupTime=0,this.sample.castTech=void 0,this.sample.duration=0,this.sample.droppedFrames=0,this.sample.drmLoadTime=void 0,this.sample.videoStartFailed=void 0,this.sample.videoStartFailedReason=void 0,this.sample.completed=void 0,this.adapter.clearValues()},e.prototype.getIsLiveFromConfigOrPlaybackInfo=function(e,t){return null==t?e.isLive||!1:!!d.validBoolean(t)&&t},e.prototype.getMergedCollectorConfig=function(e,t){void 0===t&&(t=this.config);var n=(t||{}).config;return null!=e&&(n=r(r(r({},n),{enabled:!0}),e.config)),n},e.prototype.getMergedAnalyticsConfig=function(e,t){void 0===t&&(t=this.config);var n=this.getMergedCollectorConfig(e,t);return r(r(r({},t),e),{config:n})},e.prototype.buildDefaultAnalyticsConfigValues=function(e){return d.validBoolean(e.isLive)||(e.isLive=!1),e},e.prototype.checkForErrorsInConfig=function(e){null!=e.customUserId&&null!=e.userId&&c.logger.warning("Configuration Warning: \nCustomUserId and UserId are set in the config \nValue of UserId will be used in sample \nPlease only use one configuartion field to set your userId")},e.prototype.getDomainFromConfig=function(e){var t=e.config;return null!=t&&null!=t.origin?t.origin:void 0},e.prototype.createBackend=function(e){var t=this.getDomain(e);return this.backendFactory.createBackend(e,{key:e.key,domain:t,version:i.VERSION},this.adapter,this.authenticationCallback)},e.prototype.getDomain=function(e){return this.getDomainFromConfig(e)||d.sanitizePath(window.location.hostname)},e.prototype.setCompletionValues=function(){if(this.adapter.videoCompletionTracker){var e=this.adapter.videoCompletionTracker.addWatched({start:this.sample.videoTimeStart,end:this.sample.videoTimeEnd}),t=this.adapter.videoCompletionTracker.getCompletionPercentage();Number.isNaN(e)||Number.isNaN(t)||(this.sample.completed=e,this.sample.completedTotal=t)}},e.prototype.setVideoTimeStart=function(e){this.sample.videoTimeStart=e},e.prototype.setVideoTimeEnd=function(e){this.sample.videoTimeEnd=e},e.prototype.sendQualityChange=function(e,t){this.adapter.qualityChangeService.startResetInterval(),this.adapter.qualityChangeService.increaseCounter(),this.adapter.qualityChangeService.isQualityChangeEventEnabled()?(this.setDuration(t),this.setState(e),this.sendAnalyticsRequestAndClearValues()):(this.setDuration(t),this.adapter.stateMachineCallbacks.error(r(r({},a.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED),{legacyData:void 0,currentTime:void 0,data:{}})))},e.version=i.VERSION,e.LICENSE_CALL_PENDING_TIMEOUT=200,e.PAGE_LOAD_TYPE_TIMEOUT=200,e.CAST_RECEIVER_CONFIG_MESSAGE="CAST_RECEIVER_CONFIG_MESSAGE",e}()},4189:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFactory=void 0;var r=n(5182),i=n(4960),a=n(9334),o=n(7817),s=n(7291),l=n(4441),u=n(8210),c=function(){function e(){}return e.prototype.createBackend=function(e,t,n,r){if(!this.isEnabled(e))return new l.NoOpBackend;var i=this.createInnerBackend(e,t,n,r);return this.decorateWithDebuggingBackend(e,i)},e.prototype.decorateWithDebuggingBackend=function(e,t){return e.debug?new a.DebuggingBackend(e,t):t},e.prototype.decorateWithBackendFromConfigIfAvailable=function(e,t){return void 0!==e&&void 0!==e.config&&void 0!==e.config.wrapBackend?e.config.wrapBackend(t):t},e.prototype.isEnabled=function(e){return void 0===e.config||!1!==e.config.enabled},e.prototype.createInnerBackend=function(e,t,n,a){var l=e.config&&e.config.backendUrl||i.ANALYTICS_BACKEND_BASE_URL,c=new o.LicenseCheckingBackend(t,r.LicenseCall,l,n,a);c=this.decorateWithBackendFromConfigIfAvailable(e,c);var d=new u.SequenceNumberBackend(c);return new s.LongPlaytimeFilteringBackend(d)},e}();t.BackendFactory=c},9334:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggingBackend=void 0;var r=n(6767),i=function(){function e(e,t){this.underlying=t,e.debug&&e.debug.fields&&(this.debugFields=e.debug.fields)}return e.prototype.sendRequest=function(e){this.printFields(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.printFields(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.printFields(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.printFields=function(e){if(this.debugFields&&this.debugFields.length){var t={};this.debugFields.forEach((function(n){return t[n]=e[n]})),r.logger.logTable([t])}},e}();t.DebuggingBackend=i},5032:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadSpeedMeter=void 0;var r=n(9711),i=n(9730),a=function(){function e(){this.measures=[]}return e.prototype.reset=function(){this.measures=[]},e.prototype.addMeasurement=function(e){if(!(e.httpStatus>=400)){var t=new i.Measure(e),n=r.Converter.bitsToBytes(3e8);t.speed>=n||this.measures.push(t)}},e.prototype.getInfo=function(){return{segmentsDownloadCount:this.measures.length,segmentsDownloadSize:this.measures.map((function(e){return e.size})).reduce(this.add,0),segmentsDownloadTime:Math.ceil(1e3*this.totalTime()),avgDownloadSpeed:this.avgSpeed(),minDownloadSpeed:this.minSpeed(),maxDownloadSpeed:this.maxSpeed(),avgTimeToFirstByte:this.avgTimeToFirstByte()}},e.prototype.add=function(e,t){return e+t},e.prototype.avgSpeed=function(){if(0===this.measures.length)return 0;var e=this.speeds().reduce((function(e,t){return e+t}),0),t=this.measures.length;return this.bytePerSecondToBitPerSecond(e/t)},e.prototype.bytePerSecondToBitPerSecond=function(e){return r.Converter.bytesToBits(e)},e.prototype.minSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.min.apply(Math,this.speeds()))},e.prototype.speeds=function(){return this.measures.map((function(e){return e.speed}))},e.prototype.maxSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.max.apply(Math,this.speeds()))},e.prototype.totalTime=function(){return 0===this.measures.length?0:this.measures.reduce((function(e,t){return e+t.duration}),0)},e.prototype.avgTimeToFirstByte=function(){if(0===this.measures.length)return 0;var e=this.measures.reduce((function(e,t){return e+1e3*t.timeToFirstByte}),0)/this.measures.length;return Math.ceil(e)},e}();t.DownloadSpeedMeter=a},3382:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0;var n=function(){function e(){this.callbacks=[]}return e.prototype.subscribe=function(e){var t=this;return this.callbacks.push(e),function(){return t.unsubscribe(e)}},e.prototype.dispatch=function(e){this.callbacks.slice(0).forEach((function(t){t(e)}))},e.prototype.unsubscribe=function(e){var t=this.callbacks.indexOf(e);t>-1&&this.callbacks.splice(t,1)},Object.defineProperty(e.prototype,"subscriberCount",{get:function(){return this.callbacks.length},enumerable:!1,configurable:!0}),e}();t.EventDispatcher=n},7817:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckingBackend=void 0;var i=n(4449),a=n(6767),o=n(4960),s=n(4441),l=n(5684),u=n(7639),c=function(){function e(e,t,n,i,a){var u=this;this.licenseCall=t,this.backendBaseUrl=n,this.adapter=i,this.authenticationCallback=a,this.licenseKeyReceived=function(e){clearTimeout(u.licenseLazyLoadingTimeoutHandle),u.unsubscribeFromAdapter(),u.info.key=e.licenseKey,u.promise=u.wrapLicenseCheckPromiseWithCallback(u.performLicenseCheck(),u.authenticationCallback)},this.licenseCallFailed=function(){clearTimeout(u.licenseLazyLoadingTimeoutHandle),u.unsubscribeFromAdapter(),u.backend=new s.NoOpBackend,u.authenticationCallback.authenticationCompleted(!1,void 0)},this.licenseLazyLoadingTimeout=function(){u.unsubscribeFromAdapter(),u.backend=new s.NoOpBackend,u.authenticationCallback.authenticationCompleted(!1,void 0)},this.info=r({},e),this.backend=new l.QueueBackend,this.licenseCall=t,void 0!==e.key&&""!==e.key?this.promise=this.wrapLicenseCheckPromiseWithCallback(this.performLicenseCheck(),this.authenticationCallback):!0===i.supportsDeferredLicenseLoading?(i.onLicenseKeyReceived.subscribe(this.licenseKeyReceived),i.onLicenseCallFailed.subscribe(this.licenseCallFailed),this.licenseLazyLoadingTimeoutHandle=window.setTimeout(this.licenseLazyLoadingTimeout,o.ANALYTICS_LICENSECALL_TIMEOUT)):(a.authenticationCompleted(!1,void 0),this.backend=new s.NoOpBackend)}return e.prototype.performLicenseCheck=function(){var e=this,t=this.info,n=t.key,r=t.domain,o=t.version;if(!n||""===n){var l={status:i.LicensingResult.Denied,message:"No license key provided"};return this.backend=new s.NoOpBackend,Promise.resolve(l)}return this.licenseCall(n,r,o,this.backendBaseUrl).then((function(t){if(t.status!==i.LicensingResult.Granted)throw new Error(t.message);var r=new u.RemoteBackend(!0,e.backendBaseUrl,n);return e.backend.flushTo(r),e.backend=r,t})).catch((function(t){return"Ignoring Impression due to DNT Header being set"===t.message?a.logger.error("License Check for Bitmovin Analytics failed because of",t):a.logger.errorMessageToUser("License Check for Bitmovin Analytics failed because of",t),e.backend=new s.NoOpBackend,{status:i.LicensingResult.Denied,message:t.message}}))},e.prototype.sendRequest=function(e){this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.unsubscribeFromAdapter=function(){this.adapter.onLicenseKeyReceived.unsubscribe(this.licenseKeyReceived),this.adapter.onLicenseCallFailed.unsubscribe(this.licenseCallFailed)},e.prototype.wrapLicenseCheckPromiseWithCallback=function(e,t){return e.then((function(e){return t.authenticationCompleted(e.status===i.LicensingResult.Granted,e.features),e}))},e}();t.LicenseCheckingBackend=c},7291:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPlaytimeFilteringBackend=void 0;var n=function(){function e(e){this.backend=e}return e.prototype.sendRequest=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.isPlayedAboveThreshold=function(e){return(null==e.played?0:e.played)>=9e4},e}();t.LongPlaytimeFilteringBackend=n},9730:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Measure=void 0;var n=function(){function e(e){this.download=e}return Object.defineProperty(e.prototype,"speed",{get:function(){return this.download.size/this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.download.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeToFirstByte",{get:function(){return this.download.timeToFirstByte},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestamp",{get:function(){return this.download.timestamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpStatus",{get:function(){return this.download.httpStatus},enumerable:!1,configurable:!0}),e}();t.Measure=n},4441:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpBackend=void 0;var n=function(){function e(){}return e.prototype.sendRequest=function(e){},e.prototype.sendUnloadRequest=function(e){},e.prototype.sendRequestSynchronous=function(e){},e.prototype.sendAdRequest=function(e){},e}();t.NoOpBackend=n},415:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4960),i=n(4960),a=function(){function e(e){void 0===e&&(e=r.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD),this.qualityChangeThreshold=e,this.qualityChangeCount=0,this.previousVideoBitrate=0,this.previousAudioBitrate=0}return e.prototype.resetValues=function(){this.qualityChangeCount=0,this.previousAudioBitrate=0,this.previousVideoBitrate=0,this.stopResetInterval()},e.prototype.isQualityChangeEventEnabled=function(){return this.qualityChangeCount<=this.qualityChangeThreshold},e.prototype.increaseCounter=function(){this.qualityChangeCount++},e.prototype.shouldAllowVideoQualityChange=function(e){return null!=e&&!isNaN(e)&&this.previousVideoBitrate!==e&&this.isQualityChangeEventEnabled()},e.prototype.setVideoBitrate=function(e){this.previousVideoBitrate=e},e.prototype.shouldAllowAudioQualityChange=function(e){return null!=e&&!isNaN(e)&&this.previousAudioBitrate!==e&&this.isQualityChangeEventEnabled()},e.prototype.setAudioBitrate=function(e){this.previousAudioBitrate=e},e.prototype.startResetInterval=function(){var e=this;void 0===this.resetIntervalId&&(this.resetIntervalId=window.setInterval((function(){e.resetCounter()}),i.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL))},e.prototype.stopResetInterval=function(){void 0!==this.resetIntervalId&&(window.clearInterval(this.resetIntervalId),delete this.resetIntervalId)},e.prototype.resetCounter=function(){this.qualityChangeCount=0},e}();t.default=a},5684:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueBackend=void 0;var n=function(){function e(){this.queue=[],this.unloadQueue=[],this.syncQueue=[],this.adQueue=[]}return e.prototype.sendRequest=function(e){this.queue.push(e)},e.prototype.sendUnloadRequest=function(e){this.unloadQueue.push(e)},e.prototype.sendRequestSynchronous=function(e){this.syncQueue.push(e)},e.prototype.sendAdRequest=function(e){this.adQueue.push(e)},e.prototype.flushTo=function(e){this.queue.forEach((function(t){e.sendRequest(t)})),this.unloadQueue.forEach((function(t){e.sendUnloadRequest(t)})),this.syncQueue.forEach((function(t){e.sendRequestSynchronous(t)})),this.adQueue.forEach((function(t){e.sendAdRequest(t)}))},e}();t.QueueBackend=n},7639:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBackend=void 0;var r=n(1632),i=n(1700),a=function(){function e(e,t,n){this.licenseKey=n,this.hasAdModule=e,this.analyticsCall=new r.AnalyticsCall(t)}return e.prototype.sendRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequest(e,i.noOp)},e.prototype.sendUnloadRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequestSynchronous(e,i.noOp)},e.prototype.sendAdRequest=function(e){e.key=this.licenseKey,this.hasAdModule&&this.analyticsCall.sendAdRequest(e)},e}();t.RemoteBackend=a},9827:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTracker=void 0;var n=function(){function e(){this.segments=[]}return e.prototype.reset=function(){this.segments=[]},e.prototype.addSegment=function(e){this.segments.push(e)},e.prototype.removeSegment=function(e){this.segments=this.segments.filter((function(t){return t.url!==e}))},e.prototype.getSegments=function(){return this.segments},e}();t.SegmentTracker=n},8210:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceNumberBackend=void 0;var n=function(){function e(e){this.sequenceNumber=0,this.underlying=e}return e.prototype.sendRequest=function(e){this.updateSampleBeforeSending(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.updateSampleBeforeSending(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.updateSampleBeforeSending(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.updateSampleBeforeSending=function(e){e.sequenceNumber=this.sequenceNumber++},e}();t.SequenceNumberBackend=n},2228:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionPersistenceHandler=t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME=void 0;var r=n(1700);t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME="bitmovin_analytics_uuid";var i=function(){function e(e){var t=e.config;this.cookiesEnabled=null==t||!1!==t.cookiesEnabled,null!=t&&null!=t.cookiesDomain?this.cookiesDomain=t.cookiesDomain:this.cookiesDomain=null,this.cookiesEnabled||this.ensureNoCookiePresent(),this.userId=this.setupUserId()}return e.prototype.setupUserId=function(){var e=r.getCookie(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME);return r.isNullOrEmptyString(e)&&(e=this.createAndSetNewUserId()),e},e.prototype.createAndSetNewUserId=function(){var e=r.generateUUID();return this.writeCookie(e),e},e.prototype.ensureNoCookiePresent=function(){var e=r.getCookie(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME);if(!r.isNullOrEmptyString(e)){var n="".concat(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;");document.cookie=n}},e.prototype.writeCookie=function(e){if(this.cookiesEnabled){var n="".concat(t.BITMOVIN_ANALYTICS_UUID_COOKIE_NAME,"=").concat(e,'; path=/; expires="Mon, 31 Dec 2029 23:00:00 GMT"; max-age=315400000');null!=this.cookiesDomain&&(n+="; domain=".concat(this.cookiesDomain)),document.cookie=n}},e}();t.SessionPersistenceHandler=i},5939:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.Overlapping=1]="Overlapping",e[e.FirstContainedInSecond=2]="FirstContainedInSecond",e[e.SecondContainedInFirst=3]="SecondContainedInFirst"}(n||(n={}));var r=function(){function e(){this.watched=[],this.videoDuration=null}return e.prototype.reset=function(){this.watched=[]},e.prototype.setVideoDuration=function(e){this.videoDuration=1e3*e},e.prototype.addWatched=function(e){if(null==this.videoDuration)throw new Error("no video duration set for completion tracker");this.watched.push(e);var t=this.mergeWatched(this.watched);return(this.getDuration(e)-t)/this.videoDuration},e.prototype.getCompletionPercentage=function(){if(null==this.videoDuration)throw new Error("no video duration set for completion tracker");for(var e=0,t=0,n=this.watched;t<n.length;t++){var r=n[t];e+=this.getDuration(r)}return e/this.videoDuration},e.prototype.mergeWatched=function(e){for(var t=0;t<e.length;t++)for(var r=e[t],i=t+1;i<e.length;i++){var a=e[i],o=0,s=this.getOverlappingType(r,a);if(s===n.Overlapping?(this.mergeAndReplace(r,t,a,i),o=this.getOverlappingTimespan(r,a)):s===n.FirstContainedInSecond?(this.watched.splice(t,1),o=this.getDuration(r)):s===n.SecondContainedInFirst&&(this.watched.splice(i,1),o=this.getDuration(a)),s!==n.None)return o+this.mergeWatched(this.watched)}return 0},e.prototype.getOverlappingType=function(e,t){return this.isMomentInTimespan(e.end,t)&&e.start<t.start||this.isMomentInTimespan(e.start,t)&&e.end>t.end?n.Overlapping:this.isMomentInTimespan(e.start,t)&&this.isMomentInTimespan(e.end,t)?n.FirstContainedInSecond:this.isMomentInTimespan(t.start,e)&&this.isMomentInTimespan(t.end,e)?n.SecondContainedInFirst:n.None},e.prototype.isMomentInTimespan=function(e,t){return e>=t.start&&e<t.end},e.prototype.mergeAndReplace=function(e,t,n,r){var i=e.end>n.end?e.end:n.end,a={start:e.start<n.start?e.start:n.start,end:i};this.watched.splice(t,1,a),this.watched.splice(r,1)},e.prototype.getOverlappingTimespan=function(e,t){return(e.end<t.end?e.end:t.end)-(e.start>=t.start?e.start:t.start)},e.prototype.getDuration=function(e){return Math.abs(e.end-e.start)},e}();t.default=r},1325:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CdnProvider=void 0,function(e){e.CLOUDFLARE="cloudflare",e.AKAMAI="akamai",e.FASTLY="fastly",e.MAXCDN="maxcdn",e.CLOUDFRONT="cloudfront",e.CHINACACHE="chinacache",e.BITGRAVITY="bitgravity"}(n||(t.CdnProvider=n={}))},8001:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CastTech=void 0,function(e){e.AirPlay="AirPlay",e.WebSocket="WebSocket",e.GoogleCast="GoogleCast"}(n||(t.CastTech=n={}))},6443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAudioCodec=t.isVideoCodec=void 0;var n=["avc1","avc3","hvc1","av01","av1","hev1","vp9"],r=["mp4a","ec-3","ac-3","opus","audio/mp4"];t.isVideoCodec=function(e){return!!e&&-1!==n.findIndex((function(t){return e.startsWith(t)}))},t.isAudioCodec=function(e){return!!e&&-1!==r.findIndex((function(t){return e.startsWith(t)}))}},6087:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0;t.ErrorCode=function(){function e(e,t){this.code=e,this.message=t}return e.BITMOVIN_PLAYER_LICENSING_ERROR=new e(1103,""),e.SETUP_MISSING_LICENSE_WHITELIST=new e(1105,""),e.QUALITY_CHANGE_THRESHOLD_EXCEEDED=new e(1e4,"ANALYTICS_QUALITY_CHANGE_THRESHOLD_EXCEEDED"),e.BUFFERING_TIMEOUT_REACHED=new e(10001,"ANALYTICS_BUFFERING_TIMEOUT_REACHED"),e.VIDEO_STARTUP_TIMEOUT_REACHED=new e(10002,"ANALYTICS_VIDEOSTART_TIMEOUT_REACHED"),e}()},4057:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0,function(e){e.SETUP="setup",e.READY="ready",e.SOURCE_LOADED="sourceLoaded",e.PLAY="play",e.PLAYING="playing",e.PAUSE="pause",e.TIMECHANGED="timechanged",e.SEEK="seek",e.SEEKED="seeked",e.START_CAST="startCasting",e.END_CAST="endCasting",e.START_BUFFERING="startBuffering",e.END_BUFFERING="endBuffering",e.AUDIOTRACK_CHANGED="audioTrackChanged",e.AUDIO_CHANGE="audioChange",e.VIDEO_CHANGE="videoChange",e.START_FULLSCREEN="startFullscreen",e.END_FULLSCREEN="endFullscreen",e.START_AD="adStart",e.SUBTITLE_CHANGE="subtitleChange",e.END_AD="adEnd",e.MUTE="mute",e.UN_MUTE="unMute",e.ERROR="playerError",e.PLAYBACK_FINISHED="end",e.SCREEN_RESIZE="resize",e.UNLOAD="unload",e.END="end",e.SOURCE_UNLOADED="sourceUnloaded",e.MANUAL_SOURCE_CHANGE="manualSourceChangeInitiated",e.VIDEOSTART_TIMEOUT="VIDEOSTART_TIMEOUT",e.CUSTOM_DATA_CHANGE="customDataChange",e.PLAYLIST_TRANSITION="playlistTransition"}(n||(t.Event=n={}))},9624:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMIMETypeFromFileExtension=t.MIMETypes=void 0;var r=n(1700),i="video/mp4",a="video/webm",o="application/x-mpegURL",s="application/dash+xml";t.MIMETypes={MP4:i,WEBM:a,HLS:o,DASH:s},t.getMIMETypeFromFileExtension=function(e){return e=e.split(/[?#]/)[0].toLowerCase(),(0,r.endsWith)(e,".m3u8")?o:(0,r.endsWith)(e,".mp4")||(0,r.endsWith)(e,".m4v")||(0,r.endsWith)(e,".m4a")?i:(0,r.endsWith)(e,".webm")?a:(0,r.endsWith)(e,".mpd")?s:void 0}},8900:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_LOAD_TYPE=void 0,function(e){e[e.FOREGROUND=1]="FOREGROUND",e[e.BACKGROUND=2]="BACKGROUND"}(n||(t.PAGE_LOAD_TYPE=n={}))},6473:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0,function(e){e.BITMOVIN="bitmovin",e.JW="jw",e.RADIANT="radiant",e.VIDEOJS="videojs",e.HLSJS="hlsjs",e.SHAKA="shaka",e.DASHJS="dashjs",e.HTML5="html5",e.CHROMECAST_SHAKA="chromecast-shaka",e.AMAZON_IVS="amazonivs"}(n||(t.Player=n={}))},2108:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSize=void 0,function(e){e.Window="WINDOW",e.Fullscreen="FULLSCREEN"}(n||(t.PlayerSize=n={}))},5001:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getStreamTypeFromMIMEType=t.StreamTypes=void 0;var i,a=n(9624),o=a.MIMETypes.MP4,s=a.MIMETypes.WEBM,l=a.MIMETypes.HLS,u=a.MIMETypes.DASH,c=((r={})[o]="progressive",r[s]="progressive",r[l]="hls",r[u]="dash",r);!function(e){e.prog="progressive",e.hls="hls",e.dash="dash"}(i||(t.StreamTypes=i={})),t.getStreamTypeFromMIMEType=function(e){return c[e]}},8829:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartFailedReason=void 0;var r=n(6087);t.VideoStartFailedReason=function(){function e(e,t){this.reason=e,this.errorCode=t}return e.PAGE_CLOSED=new e("PAGE_CLOSED",null),e.PLAYER_ERROR=new e("PLAYER_ERROR",null),e.TIMEOUT=new e("TIMEOUT",r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED),e.UNKNOWN=new e("UNKNOWN",null),e}()},5086:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Feature=void 0;var n=function(){function e(){this._config=void 0,this._isEnabled=!0}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),e.prototype.disable=function(){this._isEnabled=!1,this.disabled()},e.prototype.configure=function(e,t){return null!=t&&(this._config=this.extractConfig(t)),this.configured(e,this._config),this._config},e}();t.Feature=n},9962:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureManager=void 0;var r=n(6767),i=function(){function e(){this.features=[]}return e.prototype.registerFeatures=function(e){this.features=e},e.prototype.unregisterFeatures=function(){this.features.forEach((function(e){return e.disable()})),this.features=[]},e.prototype.resetFeatures=function(){this.features.forEach((function(e){return e.reset()}))},e.prototype.configureFeatures=function(e,t){this.features=this.features.filter((function(n){var i=n.configure(e,t);return!(!e||!0!==(null==i?void 0:i.enabled))||(r.logger.log("Disabling feature ".concat(n.constructor.name," as it isn't enabled according to license callback.")),n.disable(),!1)})),this.features.forEach((function(e){return e.enabled()}))},e}();t.FeatureManager=i},8458:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailBackend=void 0;var a=n(6332),o=n(4960),s=n(1700);t.ErrorDetailBackend=function(){function e(e){var t;this._queue=[],this._enabled=!1,this.backendUrl=(0,s.joinUrls)(null!==(t=null==e?void 0:e.backendUrl)&&void 0!==t?t:o.ANALYTICS_BACKEND_BASE_URL,"/analytics/error")}return Object.defineProperty(e.prototype,"queue",{get:function(){return this._queue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!1,configurable:!0}),e.copyErrorDetailTruncateStringsAndUrls=function(e,t,n){var i,a,o=this;return r(r({},e),{message:null===(i=e.message)||void 0===i?void 0:i.substr(0,t),data:this.copyErrorDataTruncateStrings(e.data,t),httpRequests:null===(a=e.httpRequests)||void 0===a?void 0:a.map((function(e){return o.copyHttpRequestTruncateUrls(e,n)}))})},e.copyHttpRequestTruncateUrls=function(e,t){var n,i;return r(r({},e),{url:null===(n=e.url)||void 0===n?void 0:n.substr(0,t),lastRedirectLocation:null===(i=e.lastRedirectLocation)||void 0===i?void 0:i.substr(0,t)})},e.copyErrorDataTruncateStrings=function(e,t){var n,i;return r(r({},e),{exceptionMessage:null===(n=e.exceptionMessage)||void 0===n?void 0:n.substr(0,t),additionalData:null===(i=e.additionalData)||void 0===i?void 0:i.substr(0,t)})},e.copyErrorDetailTruncateHttpRequests=function(e,t){var n;return r(r({},e),{httpRequests:null===(n=e.httpRequests)||void 0===n?void 0:n.slice(-t)})},e.prototype.limitHttpRequestsOfQueuedErrorDetails=function(t){var n=this;this._queue.forEach((function(r,i){n._queue[i]=e.copyErrorDetailTruncateHttpRequests(r,t)}))},e.prototype.send=function(t){var n=e.copyErrorDetailTruncateStringsAndUrls(t,e.MAX_STRING_LENGTH,e.MAX_URL_LENGTH);this.enabled?(0,a.post)(this.backendUrl,n,(function(){})):this._queue.push(n)},e.prototype.flush=function(){for(var e=i([],this._queue,!0),t=e.shift();null!=t;)this.removeFromQueue(t),this.send(t),t=e.shift()},e.prototype.clear=function(){this._queue.splice(0,this._queue.length)},e.prototype.removeFromQueue=function(e){var t=this._queue.findIndex((function(t){return t===e}));t>=0&&this._queue.splice(t,1)},e.MAX_URL_LENGTH=450,e.MAX_STRING_LENGTH=400,e}()},3909:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailTracking=void 0;var o=n(2764),s=n(6767),l=n(1700),u=function(e){function t(t,n,r,i){var u=e.call(this)||this;return u.settingsProvider=t,u.backend=n,u.subscribables=r,u.httpRequestTracking=i,u.errorIndex=0,u.onErrorHandler=function(e){var t,n;try{if(!u.isEnabled)return;var r=null===(t=u.httpRequestTracking)||void 0===t?void 0:t.httpRequests,i=null==r?void 0:a([],r,!0),c=u.errorIndex;u.errorIndex++;var d={platform:"web",licenseKey:u.settingsProvider.licenseKey,domain:u.settingsProvider.domain,impressionId:u.settingsProvider.impressionId,analyticsVersion:o.VERSION,errorId:c,timestamp:(0,l.getCurrentTimestamp)(),code:e.code,message:e.message,data:null!==(n=e.errorData)&&void 0!==n?n:{additionalData:void 0,exceptionMessage:void 0,exceptionStacktrace:void 0},httpRequests:i};s.logger.log("ErrorDetailTracking.onError: ".concat(JSON.stringify(d))),u.backend.send(d)}catch(e){s.logger.error("ErrorDetailTracking.onError: Error in handler",e)}},r.forEach((function(e){return e.subscribe(u.onErrorHandler)})),u}return i(t,e),t.prototype.reset=function(){var e;null===(e=this.httpRequestTracking)||void 0===e||e.reset(),this.errorIndex=0},t.prototype.enabled=function(){this.backend.enabled=!0,this.backend.flush()},t.prototype.disabled=function(){var e,t=this;this.errorIndex=0,null===(e=this.httpRequestTracking)||void 0===e||e.disable(),this.backend.clear(),this.subscribables.forEach((function(e){return e.unsubscribe(t.onErrorHandler)}))},t.prototype.configured=function(e,t){var n,r,i=Math.max(null!==(n=null==t?void 0:t.numberOfHttpRequests)&&void 0!==n?n:0,0);null===(r=this.httpRequestTracking)||void 0===r||r.configure(i),this.backend.limitHttpRequestsOfQueuedErrorDetails(i)},t.prototype.extractConfig=function(e){return e.errorDetails},t}(n(5086).Feature);t.ErrorDetailTracking=u},7999:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTracking=void 0;var r=n(6767),i=n(127);t.HttpRequestTracking=function(){function e(t){var n=this;this.subscribables=t,this._maxRequests=e.DEFAULT_MAX_REQUESTS,this._httpRequestQueue=new i.Queue,this.onDownloadFinishedHandler=function(e){try{n.addRequest(e.httpRequest)}catch(e){r.logger.error("HttpRequestTracking.onDownloadFinished: Error in handler",e)}},t.forEach((function(e){return e.subscribe(n.onDownloadFinishedHandler)}))}return Object.defineProperty(e.prototype,"maxRequests",{get:function(){return this._maxRequests},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpRequests",{get:function(){return this._httpRequestQueue.items},enumerable:!1,configurable:!0}),e.prototype.configure=function(e){this._maxRequests=e,this._httpRequestQueue.limit(e)},e.prototype.disable=function(){var e=this;this.subscribables.forEach((function(t){return t.unsubscribe(e.onDownloadFinishedHandler)})),this._httpRequestQueue.clear()},e.prototype.reset=function(){this._httpRequestQueue.clear()},e.prototype.addRequest=function(e){this._httpRequestQueue.offer(e),this._httpRequestQueue.limit(this._maxRequests)},e.DEFAULT_MAX_REQUESTS=10,e}()},8105:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestType=void 0,function(e){e.DRM_LICENSE_WIDEVINE="DRM_LICENSE_WIDEVINE",e.DRM_OTHER="DRM_OTHER",e.MEDIA_THUMBNAILS="MEDIA_THUMBNAILS",e.MEDIA_VIDEO="MEDIA_VIDEO",e.MEDIA_AUDIO="MEDIA_AUDIO",e.MEDIA_PROGRESSIVE="MEDIA_PROGRESSIVE",e.MEDIA_SUBTITLES="MEDIA_SUBTITLES",e.MANIFEST_DASH="MANIFEST_DASH",e.MANIFEST_HLS="MANIFEST_HLS",e.MANIFEST_HLS_MASTER="MANIFEST_HLS_MASTER",e.MANIFEST_HLS_VARIANT="DRM_LICENSMANIFEST_HLS_VARIANTE_WIDEVINE",e.MANIFEST_SMOOTH="MANIFEST_SMOOTH",e.MANIFEST="MANIFEST",e.KEY_HLS_AES="KEY_HLS_AES",e.UNKNOWN="UNKNOWN",e.TIME_SYNC="TIME_SYNC",e.DRM_CERTIFICATE_FAIRPLAY="DRM_CERTIFICATE_FAIRPLAY",e.DRM_LICENSE_CLEARKEY="DRM_LICENSE_CLEARKEY",e.DRM_LICENSE_PRIMETIME="DRM_LICENSE_PRIMETIME",e.DRM_LICENSE_FAIRPLAY="DRM_LICENSE_FAIRPLAY",e.DRM_LICENSE_PLAYREADY="DRM_LICENSE_PLAYREADY",e.MANIFEST_ADS="MANIFEST_ADS"}(n||(t.HttpRequestType=n={}))},7256:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModule=void 0;var r=n(8760);
|
|
12
12
|
/**
|
|
13
13
|
* @see https://github.com/bitmovin-engineering/bitdash/blob/ccd3227dac82d1416a471711b40ee0f65d7f9ddb/src/ModuleDefinition.ts#L17
|
|
14
|
-
*/t.PlayerModule={name:"analytics",module:{Analytics:r.Bitmovin8Adapter},hooks:{setup:function(e,t){var n=t.getConfig();if(!(null==n?void 0:n.analytics))return Promise.resolve();var r=new(0,e.Analytics)(t);return Promise.resolve(r)}}}},5464:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalyticsSample=void 0;var r=n(1700),i=function(e){this.platform="web",e&&(this.videoImpressionId=e.impressionId,this.userAgent=e.userAgent,this.language=e.language,this.cdnProvider=e.cdnProvider,r.transferCustomDataFields(e,this),this.customUserId=e.customUserId,this.domain=e.domain,this.experimentName=e.experimentName,this.key=e.key,this.path=e.path,this.player=e.player,this.playerKey=e.playerKey,this.playerTech=e.playerTech,this.screenHeight=e.screenHeight,this.screenWidth=e.screenWidth,this.version=e.version,this.size=e.size,this.userId=e.userId,this.videoId=e.videoId,this.videoTitle=e.videoTitle,this.videoWindowHeight=e.videoWindowHeight,this.videoWindowWidth=e.videoWindowWidth,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec)};t.AdAnalyticsSample=i},1834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdBreakSample=void 0;var r=n(1700),i=function(e,t){this.adFallbackIndex=0,t&&(this.manifestDownloadTime=r.calculateTime(t.downloadTiming.downloadTime)),e&&(this.adReplaceContentDuration=r.calculateTimeWithUndefined(e.replaceContentDuration),this.adFallbackIndex=(e.currentFallbackIndex||-1)+1);var n=e;n&&("pre"===n.position||"post"===n.position?this.adPosition=n.position:(this.adPosition="mid",this.adOffset=n.position),this.adPreloadOffset=r.calculateTimeWithUndefined(n.preloadOffset));var i=e;if(i){this.adIsPersistent=i.persistent;var a=i.tag;if(this.adFallbackIndex>0&&i.fallbackTags&&i.fallbackTags.length>=this.adFallbackIndex&&(a=i.fallbackTags[this.adFallbackIndex-1]),a&&(this.adTagType=a.type,this.adTagUrl=a.url),this.adTagUrl){var o=r.getHostnameAndPathFromUrl(this.adTagUrl);this.adTagServer=o.hostname,this.adTagPath=o.path}}var s=e;s&&(this.adScheduleTime=r.calculateTimeWithUndefined(s.scheduleTime),this.adIdPlayer=s.id)};t.AdBreakSample=i},5014:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdSample=void 0;var r=n(1700),i=function(){function e(t){if(this.clicked=0,this.closed=0,this.completed=0,this.midpoint=0,this.quartile1=0,this.quartile3=0,this.skipped=0,this.started=0,t){this.adClickthroughUrl=t.clickThroughUrl,this.adId=t.id,this.mediaUrl=t.mediaFileUrl;var n=r.getHostnameAndPathFromUrl(this.mediaUrl||"");this.mediaPath=n.path,this.mediaServer=n.hostname,this.isLinear=t.isLinear,this.adPlaybackHeight=t.height,this.adPlaybackWidth=t.width,t.data&&(this.videoBitrate=void 0===t.data.bitrate?void 0:1e3*t.data.bitrate,this.streamFormat=t.data.mimeType);var i=t.data;i&&(i.adSystem&&(this.adSystem=i.adSystem.name),i.advertiser&&(this.advertiserName=i.advertiser.name),this.apiFramework=i.apiFramework,i.creative&&(this.creativeAdId=i.creative.adId,this.creativeId=i.creative.id,i.creative.universalAdId&&(this.universalAdIdRegistry=i.creative.universalAdId.idRegistry,this.universalAdIdValue=i.creative.universalAdId.value)),this.adDescription=i.adDescription,this.minSuggestedDuration=r.calculateTimeWithUndefined(i.minSuggestedDuration),i.survey&&(this.surveyUrl=i.survey.uri),this.adTitle=i.adTitle,this.wrapperAdsCount=i.wrapperAdIds?i.wrapperAdIds.length:0)}var a=t;a&&(this.adSkippableAfter=e.parseSkipAfter(a.skippableAfter),this.adSkippable=a.skippable||(void 0===this.adSkippableAfter?void 0:this.adSkippableAfter>=0),this.adDuration=r.calculateTime(a.duration))}return e.parseSkipAfter=function(e){if(void 0!==e)return-1===e?e:r.calculateTime(e)},e}();t.AdSample=i},1942:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customDataFieldCount=t.customDataValuesKeys=void 0,t.customDataValuesKeys=["customData1","customData2","customData3","customData4","customData5","customData6","customData7","customData8","customData9","customData10","customData11","customData12","customData13","customData14","customData15","customData16","customData17","customData18","customData19","customData20","customData21","customData22","customData23","customData24","customData25","customData26","customData27","customData28","customData29","customData30","experimentName"],t.customDataFieldCount=t.customDataValuesKeys.filter((function(e){return e.match("customData\\d+")})).length},4449:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingResult=void 0,function(e){e.Granted="granted",e.Denied="denied",e.Skip="skip"}(n||(t.LicensingResult=n={}))},2033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVideoDuration=void 0,t.normalizeVideoDuration=function(e){return null==e||Number.isNaN(e)||e===1/0?0:e}},3318:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStateMachineCallbacks=void 0,t.defaultStateMachineCallbacks={setup:function(e,t){},startup:function(e,t){},playing:function(e,t){},heartbeat:function(e,t,n){},qualitychange:function(e,t){},qualitychange_pause:function(e,t){},qualitychange_rebuffering:function(e,t){},videoChange:function(e){},audioChange:function(e){},audiotrack_changing:function(){},pause:function(e,t){},paused_seeking:function(e,t){},end_play_seeking:function(e,t){},rebuffering:function(e,t){},error:function(e){},end:function(e,t){},unload:function(e,t){},ad:function(e,t){},mute:function(){},unMute:function(){},subtitle_changing:function(){},setVideoTimeEndFromEvent:function(e){},setVideoTimeStartFromEvent:function(e){},videoStartFailed:function(e,t){},source_changing:function(e,t,n){},startCasting:function(e,t){},casting:function(e,t){},manualSourceChange:function(e){},initialSourceChange:function(e){},muting_ready:function(e,t,n){},customdatachange:function(e,t,n){},release:function(){},playlistTransition:function(e){}}},9065:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDifferentSubtitleInfo=void 0;t.isDifferentSubtitleInfo=function(e,t){return(null!=e||null!=t)&&!(null!=e&&null!=t&&e.enabled===t.enabled&&e.language===t.language)}},1632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsCall=void 0;var r=n(6332),i=n(1700),a=function(){function e(e){this.analyticsServerUrl=(0,i.joinUrls)(e,"analytics"),this.adAnalyticsServerUrl=(0,i.joinUrls)(e,"analytics/a")}return e.prototype.sendRequest=function(e,t){(0,r.post)(this.analyticsServerUrl,e,t)},e.prototype.sendUnloadRequest=function(e){var t=this;this.trySendBeacon((function(e){return t.sendRequestSynchronous(e,i.noOp)}),this.getAnalyticsServerUrl(),e)},e.prototype.trySendBeacon=function(e,t,n){void 0===navigator.sendBeacon?e(n):navigator.sendBeacon(t,JSON.stringify(n))||e(n)},e.prototype.sendRequestSynchronous=function(e,t){(0,r.post)(this.analyticsServerUrl,e,t,!1)},e.prototype.sendAdRequest=function(e){var t=this;this.trySendBeacon((function(e){return(0,r.post)(t.getAdAnalyticsServerUrl(),e,i.noOp)}),this.getAdAnalyticsServerUrl(),e)},e.prototype.getAnalyticsServerUrl=function(){return this.analyticsServerUrl},e.prototype.getAdAnalyticsServerUrl=function(){return this.adAnalyticsServerUrl},e}();t.AnalyticsCall=a},7444:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceInfoFromBitmovinSourceConfig=void 0;t.getSourceInfoFromBitmovinSourceConfig=function(e,t){if(!e)return{progBitrate:void 0,progUrl:void 0};if("string"==typeof e)return{progBitrate:0,progUrl:e};if(Array.isArray(e)&&e.length>0){var n=t.getPlaybackVideoData(),r=0;return null==n||isNaN(+n.id)||(r=+n.id),{progBitrate:e[r].bitrate||0,progUrl:e[r].url}}return"object"!=typeof e||Array.isArray(e)?{progBitrate:void 0,progUrl:void 0}:{progBitrate:e.bitrate||0,progUrl:e.url}}},5216:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecHelper=void 0;var n={avc:['video/mp4; codecs="avc1.42000a"'],vp9:['video/mp4; codecs="vp09.00.50.08"'],av1:['video/mp4; codecs="av01.0.08M.08"'],hevc:['video/mp4; codecs="hev1.1.6.L93.B0"']},r=function(){function e(){}return Object.defineProperty(e,"supportedVideoFormats",{get:function(){var e=this;if("MediaSource"in window)return Object.getOwnPropertyNames(n).filter((function(t){return n[t].some((function(t){return e.isCodecSupported(t)}))}))},enumerable:!1,configurable:!0}),e.isCodecSupported=function(e){return"MediaSource"in window&&MediaSource.isTypeSupported(e)},e}();t.CodecHelper=r},9711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var r=n(1700),i=function(){function e(){}return e.bytesToBits=function(e){return 8*e},e.bitsToBytes=function(e){return Math.round(e/8)},e.bytesToKiloBytes=function(e){return r.calculateTime(1e3*e)},e.kiloBytesToMegaBytes=function(e){return 1e3*e},e}();t.Converter=i},6692:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDebugging=void 0;var n=function(e,t,n,r,i){this.event=e,this.from=t,this.to=n,this.timestamp=r,this.eventObject=i};t.EventDebugging=n},6332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=void 0;var r=n(6767);t.post=function(e,t,n,i){var a;void 0===i&&(i=!0);var o=!1;window.XDomainRequest&&(o=!0),a=o?new window.XDomainRequest:new XMLHttpRequest;var s=function(){if(a.readyState==XMLHttpRequest.DONE){if(a.responseText<=0)return;var e=JSON.parse(a.responseText);n(e)}};o?a.onload=s:a.onreadystatechange=s;try{a.open("POST",e,i),o||a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(t))}catch(e){r.logger.error("Failed to send POST request.",e)}}},5182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=void 0;var r=n(6332),i=n(1700);t.LicenseCall=function(e,t,n,a){var o=(0,i.joinUrls)(a,"/licensing"),s={analyticsVersion:n,domain:t,key:e};return new Promise((function(e){(0,r.post)(o,s,(function(t){e(t)}))}))}},6767:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.padRight=void 0;var r=function(){function e(e){void 0===e&&(e=!1),this.showLogs=e}return e.prototype.setLogging=function(e){this.showLogs=e},e.prototype.isLogging=function(){return this.showLogs},e.prototype.log=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.showLogs&&console.log.apply(console,n([e],t,!1))},e.prototype.logTable=function(e){console.table(e)},e.prototype.errorMessageToUser=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.error.apply(console,n([e],t,!1))},e.prototype.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.showLogs&&console.error.apply(console,n([e],t,!1))},e.prototype.warning=function(e){this.showLogs&&console.warn(e)},e}();t.padRight=function(e,t){return(e+new Array(t).join(" ")).slice(0,t)},t.logger=new r},127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0;var n=function(){function e(){this._items=[]}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e.prototype.offer=function(e){this._items.push(e)},e.prototype.poll=function(){return this._items.shift()},e.prototype.clear=function(){this._items.splice(0)},e.prototype.limit=function(e){for(;this._items.length>e;)this.poll()},e}();t.Queue=n},4960:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=t.ANALYTICS_REBUFFER_TIMEOUT=t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=t.ANALYTICS_VIDEOSTART_TIMEOUT=t.ANALYTICS_LICENSECALL_TIMEOUT=t.ANALYTICS_BACKEND_BASE_URL=t.MESSAGE_NAMESPACE=void 0,t.MESSAGE_NAMESPACE="urn:x-cast:com.bitmovin.analytics.cast",t.ANALYTICS_BACKEND_BASE_URL="https://analytics-ingress-global.bitmovin.com",t.ANALYTICS_LICENSECALL_TIMEOUT=6e4,t.ANALYTICS_VIDEOSTART_TIMEOUT=6e4,t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=50,t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=36e5,t.ANALYTICS_REBUFFER_TIMEOUT=12e4,t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=3},1700:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.endsWith=t.joinUrls=t.getURLResourceName=t.getBrowserInfo=t.calculatePercentage=t.getHostnameAndPathFromUrl=t.getPageLoadType=t.getHiddenProp=t.isVideoInFullscreen=t.getDocumentPropWithPrefix=t.transferCustomDataFields=t.getCustomDataString=t.noOp=t.getCookie=t.generateUUID=t.getDurationFromTimestampToNow=t.getCurrentTimestamp=t.calculateTime=t.calculateTimeWithUndefined=t.sanitizePath=t.validNumber=t.validBoolean=t.isNullOrEmptyString=t.validString=void 0;var r=n(8900),i=n(1942);t.validString=function(e){return null!=e&&"string"==typeof e};t.isNullOrEmptyString=function(e){return null==e||"string"!=typeof e||0===e.length};t.validBoolean=function(e){return null!=e&&"boolean"==typeof e};t.validNumber=function(e){return null!=e&&"number"==typeof e};t.sanitizePath=function(e){return e.replace(/\/$/g,"")};t.calculateTimeWithUndefined=function(e){return void 0===e?e:(e*=1e3,Math.round(e))};t.calculateTime=function(e){return e*=1e3,Math.round(e)};t.getCurrentTimestamp=function(){return Date.now()};t.getDurationFromTimestampToNow=function(e){return(0,t.getCurrentTimestamp)()-e};t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))};t.getCookie=function(e){for(var t=e+"=",n=0,r=document.cookie.split(";");n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return""};t.noOp=function(){};t.getCustomDataString=function(e){return"object"==typeof e?JSON.stringify(e):"function"==typeof e?(0,t.getCustomDataString)(e()):void 0===e?e:"string"!=typeof e?String(e):e};t.transferCustomDataFields=function(e,n){for(var r=1;r<=i.customDataFieldCount;r++){var a="customData".concat(r);n[a]=(0,t.getCustomDataString)(e[a])}};t.getDocumentPropWithPrefix=function(e){if(e in document)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0,r=["webkit","moz","ms","o"];n<r.length;n++){var i=r[n];if(i+t in document)return i+t}};t.isVideoInFullscreen=function(){var e=(0,t.getDocumentPropWithPrefix)("fullscreenElement");return void 0!==e&&document[e]&&"VIDEO"===document[e].nodeName};t.getHiddenProp=function(){return(0,t.getDocumentPropWithPrefix)("hidden")},t.getPageLoadType=function(){var e=(0,t.getHiddenProp)();return null!=e&&!0===document[e]?r.PAGE_LOAD_TYPE.BACKGROUND:r.PAGE_LOAD_TYPE.FOREGROUND};t.getHostnameAndPathFromUrl=function(e){var t=document.createElement("a");return t.href=e,{hostname:t.hostname,path:t.pathname}};t.calculatePercentage=function(e,t){if(void 0!==t&&0!==t)return Math.round((e||0)/t*100)};t.getBrowserInfo=function(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\b(OPR|Edge)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})};t.getURLResourceName=function(e){return 0===e.length?"":e.split("/").pop()||""};t.joinUrls=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.reduce((function(e,n){return((0,t.endsWith)(e,"/")&&void 0!==n?e.substr(0,e.length-1):e)+"/"+((0,t.startsWith)(n,"/")?n.substr(1):n)}))};t.endsWith=function(e,t){return null!=String.prototype.endsWith?e.endsWith(t):e.substring(e.length-t.length)===t};t.startsWith=function(e,t){return null!=String.prototype.startsWith?e.startsWith(t):e.substring(0,t.length)===t}},3871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportTracker=void 0;var r=n(6767),i=n(1700),a=function(){function e(e,t,n){void 0===n&&(n=1);var a=this;this.inViewport=void 0,this.threshold=n,this.onIntersectionChanged=t,this.element=e;try{var o={root:null,rootMargin:"0px",threshold:n};this.observer=new IntersectionObserver((function(e,t){return a.handleIntersect(e,t)}),o),this.observer.observe(e)}catch(e){r.logger.log("Couldn't create instance of IntersectionObserver. timeInViewport will always be reported as 100%.")}this.hidden=i.getHiddenProp(),this.hidden&&(this.visibilityChange=this.hidden.replace("hidden","")+"visibilitychange",document.addEventListener(this.visibilityChange,this.handleVisibilityChange=this.handleVisibilityChange.bind(this),!1))}return e.prototype.isHidden=function(){return this.hidden&&document[this.hidden]},e.prototype.isInViewport=function(){return!this.isHidden()&&(null==this.inViewport||this.inViewport)},e.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),this.visibilityChange&&document.removeEventListener(this.visibilityChange,this.handleVisibilityChange,!1)},e.prototype.handleVisibilityChange=function(){this.onIntersectionChanged()},e.prototype.handleIntersect=function(e,t){var n=this;e.forEach((function(e){e.target===n.element&&(n.inViewport=!(e.intersectionRatio<n.threshold))})),this.onIntersectionChanged()},e}();t.ViewportTracker=a},3068:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventTracker=void 0;var n=function(){function e(){this.trackedObjects=[]}return e.prototype.addEventListener=function(e,t){this.trackedObjects.push({eventName:e,func:t}),window.addEventListener(e,t)},e.prototype.release=function(){for(;0!==this.trackedObjects.length;){var e=this.trackedObjects.pop();void 0!==e&&window.removeEventListener(e.eventName,e.func)}},e}();t.WindowEventTracker=n}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}var r={};return function(){"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerModule=e.adapters=e.VideojsAdapter=e.ShakaAdapter=e.HlsAdapter=e.HTMLVideoElementAdapter=e.DashjsAdapter=e.CAFv3Adapter=e.Bitmovin8Adapter=e.AmazonIVSAdapter=e.CdnProviders=e.Players=e.version=void 0;var t=n(2764);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return t.VERSION}});var i=n(4715);Object.defineProperty(e,"AmazonIVSAdapter",{enumerable:!0,get:function(){return i.AmazonIVSAdapter}});var a=n(8760);Object.defineProperty(e,"Bitmovin8Adapter",{enumerable:!0,get:function(){return a.Bitmovin8Adapter}});var o=n(5531);Object.defineProperty(e,"CAFv3Adapter",{enumerable:!0,get:function(){return o.CAFv3Adapter}});var s=n(4921);Object.defineProperty(e,"DashjsAdapter",{enumerable:!0,get:function(){return s.DashjsAdapter}});var l=n(2989);Object.defineProperty(e,"HTMLVideoElementAdapter",{enumerable:!0,get:function(){return l.HTMLVideoElementAdapter}});var u=n(9894);Object.defineProperty(e,"HlsAdapter",{enumerable:!0,get:function(){return u.HlsAdapter}});var c=n(4009);Object.defineProperty(e,"ShakaAdapter",{enumerable:!0,get:function(){return c.ShakaAdapter}});var d=n(5553);Object.defineProperty(e,"VideojsAdapter",{enumerable:!0,get:function(){return d.VideojsAdapter}});var E=n(1325);Object.defineProperty(e,"CdnProviders",{enumerable:!0,get:function(){return E.CdnProvider}});var p=n(6473);Object.defineProperty(e,"Players",{enumerable:!0,get:function(){return p.Player}});var h=n(7256);Object.defineProperty(e,"PlayerModule",{enumerable:!0,get:function(){return h.PlayerModule}}),e.adapters={AmazonIVSAdapter:i.AmazonIVSAdapter,Bitmovin8Adapter:a.Bitmovin8Adapter,CAFv3Adapter:o.CAFv3Adapter,DashjsAdapter:s.DashjsAdapter,HTMLVideoElementAdapter:l.HTMLVideoElementAdapter,HlsAdapter:u.HlsAdapter,ShakaAdapter:c.ShakaAdapter,VideojsAdapter:d.VideojsAdapter},e.default={PlayerModule:h.PlayerModule}}(),r}()}));
|
|
14
|
+
*/t.PlayerModule={name:"analytics",module:{Analytics:r.Bitmovin8Adapter},hooks:{setup:function(e,t){var n=t.getConfig(),r=!n,i=!1===(null==n?void 0:n.analytics);if(r||i)return Promise.resolve();var a=new(0,e.Analytics)(t);return Promise.resolve(a)}}}},5464:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalyticsSample=void 0;var r=n(1700),i=function(e){this.platform="web",e&&(this.videoImpressionId=e.impressionId,this.userAgent=e.userAgent,this.language=e.language,this.cdnProvider=e.cdnProvider,r.transferCustomDataFields(e,this),this.customUserId=e.customUserId,this.domain=e.domain,this.experimentName=e.experimentName,this.key=e.key,this.path=e.path,this.player=e.player,this.playerKey=e.playerKey,this.playerTech=e.playerTech,this.screenHeight=e.screenHeight,this.screenWidth=e.screenWidth,this.version=e.version,this.size=e.size,this.userId=e.userId,this.videoId=e.videoId,this.videoTitle=e.videoTitle,this.videoWindowHeight=e.videoWindowHeight,this.videoWindowWidth=e.videoWindowWidth,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec)};t.AdAnalyticsSample=i},1834:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdBreakSample=void 0;var r=n(1700),i=function(e,t){this.adFallbackIndex=0,t&&(this.manifestDownloadTime=r.calculateTime(t.downloadTiming.downloadTime)),e&&(this.adReplaceContentDuration=r.calculateTimeWithUndefined(e.replaceContentDuration),this.adFallbackIndex=(e.currentFallbackIndex||-1)+1);var n=e;n&&("pre"===n.position||"post"===n.position?this.adPosition=n.position:(this.adPosition="mid",this.adOffset=n.position),this.adPreloadOffset=r.calculateTimeWithUndefined(n.preloadOffset));var i=e;if(i){this.adIsPersistent=i.persistent;var a=i.tag;if(this.adFallbackIndex>0&&i.fallbackTags&&i.fallbackTags.length>=this.adFallbackIndex&&(a=i.fallbackTags[this.adFallbackIndex-1]),a&&(this.adTagType=a.type,this.adTagUrl=a.url),this.adTagUrl){var o=r.getHostnameAndPathFromUrl(this.adTagUrl);this.adTagServer=o.hostname,this.adTagPath=o.path}}var s=e;s&&(this.adScheduleTime=r.calculateTimeWithUndefined(s.scheduleTime),this.adIdPlayer=s.id)};t.AdBreakSample=i},5014:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdSample=void 0;var r=n(1700),i=function(){function e(t){if(this.clicked=0,this.closed=0,this.completed=0,this.midpoint=0,this.quartile1=0,this.quartile3=0,this.skipped=0,this.started=0,t){this.adClickthroughUrl=t.clickThroughUrl,this.adId=t.id,this.mediaUrl=t.mediaFileUrl;var n=r.getHostnameAndPathFromUrl(this.mediaUrl||"");this.mediaPath=n.path,this.mediaServer=n.hostname,this.isLinear=t.isLinear,this.adPlaybackHeight=t.height,this.adPlaybackWidth=t.width,t.data&&(this.videoBitrate=void 0===t.data.bitrate?void 0:1e3*t.data.bitrate,this.streamFormat=t.data.mimeType);var i=t.data;i&&(i.adSystem&&(this.adSystem=i.adSystem.name),i.advertiser&&(this.advertiserName=i.advertiser.name),this.apiFramework=i.apiFramework,i.creative&&(this.creativeAdId=i.creative.adId,this.creativeId=i.creative.id,i.creative.universalAdId&&(this.universalAdIdRegistry=i.creative.universalAdId.idRegistry,this.universalAdIdValue=i.creative.universalAdId.value)),this.adDescription=i.adDescription,this.minSuggestedDuration=r.calculateTimeWithUndefined(i.minSuggestedDuration),i.survey&&(this.surveyUrl=i.survey.uri),this.adTitle=i.adTitle,this.wrapperAdsCount=i.wrapperAdIds?i.wrapperAdIds.length:0)}var a=t;a&&(this.adSkippableAfter=e.parseSkipAfter(a.skippableAfter),this.adSkippable=a.skippable||(void 0===this.adSkippableAfter?void 0:this.adSkippableAfter>=0),this.adDuration=r.calculateTime(a.duration))}return e.parseSkipAfter=function(e){if(void 0!==e)return-1===e?e:r.calculateTime(e)},e}();t.AdSample=i},1942:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customDataFieldCount=t.customDataValuesKeys=void 0,t.customDataValuesKeys=["customData1","customData2","customData3","customData4","customData5","customData6","customData7","customData8","customData9","customData10","customData11","customData12","customData13","customData14","customData15","customData16","customData17","customData18","customData19","customData20","customData21","customData22","customData23","customData24","customData25","customData26","customData27","customData28","customData29","customData30","experimentName"],t.customDataFieldCount=t.customDataValuesKeys.filter((function(e){return e.match("customData\\d+")})).length},4449:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingResult=void 0,function(e){e.Granted="granted",e.Denied="denied",e.Skip="skip"}(n||(t.LicensingResult=n={}))},2033:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVideoDuration=void 0,t.normalizeVideoDuration=function(e){return null==e||Number.isNaN(e)||e===1/0?0:e}},3318:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStateMachineCallbacks=void 0,t.defaultStateMachineCallbacks={setup:function(e,t){},startup:function(e,t){},playing:function(e,t){},heartbeat:function(e,t,n){},qualitychange:function(e,t){},qualitychange_pause:function(e,t){},qualitychange_rebuffering:function(e,t){},videoChange:function(e){},audioChange:function(e){},audiotrack_changing:function(){},pause:function(e,t){},paused_seeking:function(e,t){},end_play_seeking:function(e,t){},rebuffering:function(e,t){},error:function(e){},end:function(e,t){},unload:function(e,t){},ad:function(e,t){},mute:function(){},unMute:function(){},subtitle_changing:function(){},setVideoTimeEndFromEvent:function(e){},setVideoTimeStartFromEvent:function(e){},videoStartFailed:function(e,t){},source_changing:function(e,t,n){},startCasting:function(e,t){},casting:function(e,t){},manualSourceChange:function(e){},initialSourceChange:function(e){},muting_ready:function(e,t,n){},customdatachange:function(e,t,n){},release:function(){},playlistTransition:function(e){}}},9065:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDifferentSubtitleInfo=void 0;t.isDifferentSubtitleInfo=function(e,t){return(null!=e||null!=t)&&!(null!=e&&null!=t&&e.enabled===t.enabled&&e.language===t.language)}},1632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsCall=void 0;var r=n(6332),i=n(1700),a=function(){function e(e){this.analyticsServerUrl=(0,i.joinUrls)(e,"analytics"),this.adAnalyticsServerUrl=(0,i.joinUrls)(e,"analytics/a")}return e.prototype.sendRequest=function(e,t){(0,r.post)(this.analyticsServerUrl,e,t)},e.prototype.sendUnloadRequest=function(e){var t=this;this.trySendBeacon((function(e){return t.sendRequestSynchronous(e,i.noOp)}),this.getAnalyticsServerUrl(),e)},e.prototype.trySendBeacon=function(e,t,n){void 0===navigator.sendBeacon?e(n):navigator.sendBeacon(t,JSON.stringify(n))||e(n)},e.prototype.sendRequestSynchronous=function(e,t){(0,r.post)(this.analyticsServerUrl,e,t,!1)},e.prototype.sendAdRequest=function(e){var t=this;this.trySendBeacon((function(e){return(0,r.post)(t.getAdAnalyticsServerUrl(),e,i.noOp)}),this.getAdAnalyticsServerUrl(),e)},e.prototype.getAnalyticsServerUrl=function(){return this.analyticsServerUrl},e.prototype.getAdAnalyticsServerUrl=function(){return this.adAnalyticsServerUrl},e}();t.AnalyticsCall=a},7444:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceInfoFromBitmovinSourceConfig=void 0;t.getSourceInfoFromBitmovinSourceConfig=function(e,t){if(!e)return{progBitrate:void 0,progUrl:void 0};if("string"==typeof e)return{progBitrate:0,progUrl:e};if(Array.isArray(e)&&e.length>0){var n=t.getPlaybackVideoData(),r=0;return null==n||isNaN(+n.id)||(r=+n.id),{progBitrate:e[r].bitrate||0,progUrl:e[r].url}}return"object"!=typeof e||Array.isArray(e)?{progBitrate:void 0,progUrl:void 0}:{progBitrate:e.bitrate||0,progUrl:e.url}}},5216:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecHelper=void 0;var n={avc:['video/mp4; codecs="avc1.42000a"'],vp9:['video/mp4; codecs="vp09.00.50.08"'],av1:['video/mp4; codecs="av01.0.08M.08"'],hevc:['video/mp4; codecs="hev1.1.6.L93.B0"']},r=function(){function e(){}return Object.defineProperty(e,"supportedVideoFormats",{get:function(){var e=this;if("MediaSource"in window)return Object.getOwnPropertyNames(n).filter((function(t){return n[t].some((function(t){return e.isCodecSupported(t)}))}))},enumerable:!1,configurable:!0}),e.isCodecSupported=function(e){return"MediaSource"in window&&MediaSource.isTypeSupported(e)},e}();t.CodecHelper=r},9711:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var r=n(1700),i=function(){function e(){}return e.bytesToBits=function(e){return 8*e},e.bitsToBytes=function(e){return Math.round(e/8)},e.bytesToKiloBytes=function(e){return r.calculateTime(1e3*e)},e.kiloBytesToMegaBytes=function(e){return 1e3*e},e}();t.Converter=i},6692:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDebugging=void 0;var n=function(e,t,n,r,i){this.event=e,this.from=t,this.to=n,this.timestamp=r,this.eventObject=i};t.EventDebugging=n},6332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=void 0;var r=n(6767);t.post=function(e,t,n,i){var a;void 0===i&&(i=!0);var o=!1;window.XDomainRequest&&(o=!0),a=o?new window.XDomainRequest:new XMLHttpRequest;var s=function(){if(a.readyState==XMLHttpRequest.DONE){if(a.responseText<=0)return;var e=JSON.parse(a.responseText);n(e)}};o?a.onload=s:a.onreadystatechange=s;try{a.open("POST",e,i),o||a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(t))}catch(e){r.logger.error("Failed to send POST request.",e)}}},5182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=void 0;var r=n(6332),i=n(1700);t.LicenseCall=function(e,t,n,a){var o=(0,i.joinUrls)(a,"/licensing"),s={analyticsVersion:n,domain:t,key:e};return new Promise((function(e){(0,r.post)(o,s,(function(t){e(t)}))}))}},6767:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.padRight=void 0;var r=function(){function e(e){void 0===e&&(e=!1),this.showLogs=e}return e.prototype.setLogging=function(e){this.showLogs=e},e.prototype.isLogging=function(){return this.showLogs},e.prototype.log=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.showLogs&&console.log.apply(console,n([e],t,!1))},e.prototype.logTable=function(e){console.table(e)},e.prototype.errorMessageToUser=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.error.apply(console,n([e],t,!1))},e.prototype.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.showLogs&&console.error.apply(console,n([e],t,!1))},e.prototype.warning=function(e){this.showLogs&&console.warn(e)},e}();t.padRight=function(e,t){return(e+new Array(t).join(" ")).slice(0,t)},t.logger=new r},127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0;var n=function(){function e(){this._items=[]}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e.prototype.offer=function(e){this._items.push(e)},e.prototype.poll=function(){return this._items.shift()},e.prototype.clear=function(){this._items.splice(0)},e.prototype.limit=function(e){for(;this._items.length>e;)this.poll()},e}();t.Queue=n},4960:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=t.ANALYTICS_REBUFFER_TIMEOUT=t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=t.ANALYTICS_VIDEOSTART_TIMEOUT=t.ANALYTICS_LICENSECALL_TIMEOUT=t.ANALYTICS_BACKEND_BASE_URL=t.MESSAGE_NAMESPACE=void 0,t.MESSAGE_NAMESPACE="urn:x-cast:com.bitmovin.analytics.cast",t.ANALYTICS_BACKEND_BASE_URL="https://analytics-ingress-global.bitmovin.com",t.ANALYTICS_LICENSECALL_TIMEOUT=6e4,t.ANALYTICS_VIDEOSTART_TIMEOUT=6e4,t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=50,t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=36e5,t.ANALYTICS_REBUFFER_TIMEOUT=12e4,t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=3},1700:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.endsWith=t.joinUrls=t.getURLResourceName=t.getBrowserInfo=t.calculatePercentage=t.getHostnameAndPathFromUrl=t.getPageLoadType=t.getHiddenProp=t.isVideoInFullscreen=t.getDocumentPropWithPrefix=t.transferCustomDataFields=t.getCustomDataString=t.noOp=t.getCookie=t.generateUUID=t.getDurationFromTimestampToNow=t.getCurrentTimestamp=t.calculateTime=t.calculateTimeWithUndefined=t.sanitizePath=t.validNumber=t.validBoolean=t.isNullOrEmptyString=t.validString=void 0;var r=n(8900),i=n(1942);t.validString=function(e){return null!=e&&"string"==typeof e};t.isNullOrEmptyString=function(e){return null==e||"string"!=typeof e||0===e.length};t.validBoolean=function(e){return null!=e&&"boolean"==typeof e};t.validNumber=function(e){return null!=e&&"number"==typeof e};t.sanitizePath=function(e){return e.replace(/\/$/g,"")};t.calculateTimeWithUndefined=function(e){return void 0===e?e:(e*=1e3,Math.round(e))};t.calculateTime=function(e){return e*=1e3,Math.round(e)};t.getCurrentTimestamp=function(){return Date.now()};t.getDurationFromTimestampToNow=function(e){return(0,t.getCurrentTimestamp)()-e};t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))};t.getCookie=function(e){for(var t=e+"=",n=0,r=document.cookie.split(";");n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return""};t.noOp=function(){};t.getCustomDataString=function(e){return"object"==typeof e?JSON.stringify(e):"function"==typeof e?(0,t.getCustomDataString)(e()):void 0===e?e:"string"!=typeof e?String(e):e};t.transferCustomDataFields=function(e,n){for(var r=1;r<=i.customDataFieldCount;r++){var a="customData".concat(r);n[a]=(0,t.getCustomDataString)(e[a])}};t.getDocumentPropWithPrefix=function(e){if(e in document)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0,r=["webkit","moz","ms","o"];n<r.length;n++){var i=r[n];if(i+t in document)return i+t}};t.isVideoInFullscreen=function(){var e=(0,t.getDocumentPropWithPrefix)("fullscreenElement");return void 0!==e&&document[e]&&"VIDEO"===document[e].nodeName};t.getHiddenProp=function(){return(0,t.getDocumentPropWithPrefix)("hidden")},t.getPageLoadType=function(){var e=(0,t.getHiddenProp)();return null!=e&&!0===document[e]?r.PAGE_LOAD_TYPE.BACKGROUND:r.PAGE_LOAD_TYPE.FOREGROUND};t.getHostnameAndPathFromUrl=function(e){var t=document.createElement("a");return t.href=e,{hostname:t.hostname,path:t.pathname}};t.calculatePercentage=function(e,t){if(void 0!==t&&0!==t)return Math.round((e||0)/t*100)};t.getBrowserInfo=function(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===n[1]&&null!=(e=t.match(/\b(OPR|Edge)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),{name:n[0],version:n[1]})};t.getURLResourceName=function(e){return 0===e.length?"":e.split("/").pop()||""};t.joinUrls=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.reduce((function(e,n){return((0,t.endsWith)(e,"/")&&void 0!==n?e.substr(0,e.length-1):e)+"/"+((0,t.startsWith)(n,"/")?n.substr(1):n)}))};t.endsWith=function(e,t){return null!=String.prototype.endsWith?e.endsWith(t):e.substring(e.length-t.length)===t};t.startsWith=function(e,t){return null!=String.prototype.startsWith?e.startsWith(t):e.substring(0,t.length)===t}},3871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportTracker=void 0;var r=n(6767),i=n(1700),a=function(){function e(e,t,n){void 0===n&&(n=1);var a=this;this.inViewport=void 0,this.threshold=n,this.onIntersectionChanged=t,this.element=e;try{var o={root:null,rootMargin:"0px",threshold:n};this.observer=new IntersectionObserver((function(e,t){return a.handleIntersect(e,t)}),o),this.observer.observe(e)}catch(e){r.logger.log("Couldn't create instance of IntersectionObserver. timeInViewport will always be reported as 100%.")}this.hidden=i.getHiddenProp(),this.hidden&&(this.visibilityChange=this.hidden.replace("hidden","")+"visibilitychange",document.addEventListener(this.visibilityChange,this.handleVisibilityChange=this.handleVisibilityChange.bind(this),!1))}return e.prototype.isHidden=function(){return this.hidden&&document[this.hidden]},e.prototype.isInViewport=function(){return!this.isHidden()&&(null==this.inViewport||this.inViewport)},e.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),this.visibilityChange&&document.removeEventListener(this.visibilityChange,this.handleVisibilityChange,!1)},e.prototype.handleVisibilityChange=function(){this.onIntersectionChanged()},e.prototype.handleIntersect=function(e,t){var n=this;e.forEach((function(e){e.target===n.element&&(n.inViewport=!(e.intersectionRatio<n.threshold))})),this.onIntersectionChanged()},e}();t.ViewportTracker=a},3068:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventTracker=void 0;var n=function(){function e(){this.trackedObjects=[]}return e.prototype.addEventListener=function(e,t){this.trackedObjects.push({eventName:e,func:t}),window.addEventListener(e,t)},e.prototype.release=function(){for(;0!==this.trackedObjects.length;){var e=this.trackedObjects.pop();void 0!==e&&window.removeEventListener(e.eventName,e.func)}},e}();t.WindowEventTracker=n}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}var r={};return function(){"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerModule=e.adapters=e.VideojsAdapter=e.ShakaAdapter=e.HlsAdapter=e.HTMLVideoElementAdapter=e.DashjsAdapter=e.CAFv3Adapter=e.Bitmovin8Adapter=e.AmazonIVSAdapter=e.CdnProviders=e.Players=e.version=void 0;var t=n(2764);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return t.VERSION}});var i=n(4715);Object.defineProperty(e,"AmazonIVSAdapter",{enumerable:!0,get:function(){return i.AmazonIVSAdapter}});var a=n(8760);Object.defineProperty(e,"Bitmovin8Adapter",{enumerable:!0,get:function(){return a.Bitmovin8Adapter}});var o=n(5531);Object.defineProperty(e,"CAFv3Adapter",{enumerable:!0,get:function(){return o.CAFv3Adapter}});var s=n(4921);Object.defineProperty(e,"DashjsAdapter",{enumerable:!0,get:function(){return s.DashjsAdapter}});var l=n(2989);Object.defineProperty(e,"HTMLVideoElementAdapter",{enumerable:!0,get:function(){return l.HTMLVideoElementAdapter}});var u=n(9894);Object.defineProperty(e,"HlsAdapter",{enumerable:!0,get:function(){return u.HlsAdapter}});var c=n(4009);Object.defineProperty(e,"ShakaAdapter",{enumerable:!0,get:function(){return c.ShakaAdapter}});var d=n(5553);Object.defineProperty(e,"VideojsAdapter",{enumerable:!0,get:function(){return d.VideojsAdapter}});var E=n(1325);Object.defineProperty(e,"CdnProviders",{enumerable:!0,get:function(){return E.CdnProvider}});var p=n(6473);Object.defineProperty(e,"Players",{enumerable:!0,get:function(){return p.Player}});var h=n(7256);Object.defineProperty(e,"PlayerModule",{enumerable:!0,get:function(){return h.PlayerModule}}),e.adapters={AmazonIVSAdapter:i.AmazonIVSAdapter,Bitmovin8Adapter:a.Bitmovin8Adapter,CAFv3Adapter:o.CAFv3Adapter,DashjsAdapter:s.DashjsAdapter,HTMLVideoElementAdapter:l.HTMLVideoElementAdapter,HlsAdapter:u.HlsAdapter,ShakaAdapter:c.ShakaAdapter,VideojsAdapter:d.VideojsAdapter},e.default={PlayerModule:h.PlayerModule}}(),r}()}));
|
|
15
15
|
//# sourceMappingURL=bitmovinanalytics.min.js.map
|