-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
dash.reporting.min.js
2 lines (2 loc) · 97.6 KB
/
dash.reporting.min.js
1
2
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dashjs=t():e.dashjs=t()}(self,(function(){return function(){var e={6398:function(e,t,n){"use strict";var r=n(5595),a=n(8512),i=n(5448),o=1,s=2,u=3,c=4,l=5;function f(e){e=e||{};var t,n,i,f,d=this.context,h=(0,r.Z)(d).getInstance(),g=e.settings,m=[];function p(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[o,this].concat(t))}function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[s,this].concat(t))}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[u,this].concat(t))}function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[c,this].concat(t))}function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];A.apply(void 0,[l,this].concat(t))}function A(e,t){var r="",o=null;n&&(o=(new Date).getTime(),r+="["+(o-f)+"]"),i&&t&&t.getClassName&&(r+="["+t.getClassName()+"]",t.getType&&(r+="["+t.getType()+"]")),r.length>0&&(r+=" ");for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];Array.apply(null,u).forEach((function(e){r+=e+" "})),m[e]&&g&&g.get().debug.logLevel>=e&&m[e](r),g&&g.get().debug.dispatchEvent&&h.trigger(a.Z.LOG,{message:r,level:e})}return t={getLogger:function(e){return{fatal:E.bind(e),error:_.bind(e),warn:y.bind(e),info:T.bind(e),debug:b.bind(e)}},setLogTimestampVisible:function(e){n=e},setCalleeNameVisible:function(e){i=e}},n=!0,i=!0,f=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(m[o]=p(window.console.error),m[s]=p(window.console.error),m[u]=p(window.console.warn),m[c]=p(window.console.info),m[l]=p(window.console.debug)),t}f.__dashjs_factory_name="Debug";var d=i.Z.getSingletonFactory(f);d.LOG_LEVEL_NONE=0,d.LOG_LEVEL_FATAL=o,d.LOG_LEVEL_ERROR=s,d.LOG_LEVEL_WARNING=u,d.LOG_LEVEL_INFO=c,d.LOG_LEVEL_DEBUG=l,i.Z.updateSingletonFactory(f.__dashjs_factory_name,d),t.Z=d},5595:function(e,t,n){"use strict";var r=n(5448),a=n(8825);function i(){var e={};function t(t,n,r){var a=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return a=t,!0})),a):a}var n={on:function(n,r,a){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("event type cannot be null or undefined");if(!r||"function"!=typeof r)throw new Error("listener must be a function: "+r);var o=i.priority||0;if(!(t(n,r,a)>=0)){e[n]=e[n]||[];var s={callback:r,scope:a,priority:o};a&&a.getStreamId&&(s.streamId=a.getStreamId()),a&&a.getType&&(s.mediaType=a.getType()),i&&i.mode&&(s.mode=i.mode);var u=e[n].some((function(t,r){if(t&&o>t.priority)return e[n].splice(r,0,s),!0}));u||e[n].push(s)}},off:function(n,r,a){if(n&&r&&e[n]){var i=t(n,r,a);i<0||(e[n][i]=null)}},trigger:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,r.streamId&&(n.streamId=r.streamId),r.mediaType&&(n.mediaType=r.mediaType),e[t].filter((function(e){return!(!e||r.streamId&&e.streamId&&e.streamId!==r.streamId||r.mediaType&&e.mediaType&&e.mediaType!==r.mediaType||r.mode&&e.mode&&e.mode!==r.mode||!e.mode&&r.mode&&r.mode===a.Z.EVENT_MODE_ON_RECEIVE)})).forEach((function(e){return e&&e.callback.call(e.scope,n)}))}},reset:function(){e={}}};return n}i.__dashjs_factory_name="EventBus";var o=r.Z.getSingletonFactory(i);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,r.Z.updateSingletonFactory(i.__dashjs_factory_name,o),t.Z=o},5448:function(e,t){"use strict";var n=function(){var e,t=[],n={},r={};function a(e,n){for(var r in t){var a=t[r];if(a.context===e&&a.name===n)return a.instance}return null}function i(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){var a,i=t.__dashjs_factory_name,o=n[i];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},r);for(var u in a=t.apply({context:n},r),s=s.apply({context:n,factory:e,parent:a},r))a.hasOwnProperty(u)&&(a[u]=s[u])}else a=t.apply({context:n},r);return a.getClassName=function(){return i},a}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:a,setSingletonInstance:function(e,n,r){for(var a in t){var i=t[a];if(i.context===e&&i.name===n)return void(t[a].instance=r)}t.push({name:n,context:e,instance:r})},deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},getSingletonFactory:function(e){var r=i(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=a(n,e.__dashjs_factory_name)),r||(r=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return i(e,n)},updateSingletonFactory:function(e,t){o(e,t,n)},getClassFactory:function(e){var t=i(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return i(e,r)},updateClassFactory:function(e,t){o(e,t,r)}},e}();t.Z=n},1264:function(e,t,n){"use strict";var r=n(5448),a=n(703),i=n(6398),o=n(3393),s=n(7855),u=n(5595),c=n(8512);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){var e,t,n=this.context,r=(0,u.Z)(n).getInstance(),d={"streaming.delay.liveDelay":c.Z.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":c.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":c.Z.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":c.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":c.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX},h={debug:{logLevel:i.Z.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeTypeForTrackSwitch:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:o.Z.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:o.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:o.Z.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:o.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(e={},f(e,s.w.MPD_TYPE,500),f(e,s.w.XLINK_EXPANSION_TYPE,500),f(e,s.w.MEDIA_SEGMENT_TYPE,1e3),f(e,s.w.INIT_SEGMENT_TYPE,1e3),f(e,s.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),f(e,s.w.INDEX_SEGMENT_TYPE,1e3),f(e,s.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),f(e,s.w.LICENSE,1e3),f(e,s.w.OTHER_TYPE,1e3),f(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},f(t,s.w.MPD_TYPE,3),f(t,s.w.XLINK_EXPANSION_TYPE,1),f(t,s.w.MEDIA_SEGMENT_TYPE,3),f(t,s.w.INIT_SEGMENT_TYPE,3),f(t,s.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),f(t,s.w.INDEX_SEGMENT_TYPE,3),f(t,s.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),f(t,s.w.LICENSE,3),f(t,s.w.OTHER_TYPE,3),f(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:o.Z.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:o.Z.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},abrRulesParameters:{abandonRequestsRule:{graceTimeThreshold:500,abandonMultiplier:1.8,minLengthToAverage:5}},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:o.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:o.Z.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}},errors:{recoverAttempts:{mediaErrorDecode:5}}},g=a.Z.clone(h);function m(e,t,n){for(var i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)?"object"!==l(e[i])||e[i]instanceof Array||null===e[i]?(t[i]=a.Z.clone(e[i]),d[n+i]&&r.trigger(d[n+i])):m(e[i],t[i],n.slice()+i+"."):console.error("Settings parameter "+n+i+" is not supported"))}return{get:function(){return g},update:function(e){"object"===l(e)&&m(e,g,"")},reset:function(){g=a.Z.clone(h)}}}d.__dashjs_factory_name="Settings";var h=r.Z.getSingletonFactory(d);t.Z=h},703:function(e,t,n){"use strict";var r=n(3875),a=n.n(r),i=n(1067);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"mixin",value:function(t,n,r){var a,i={};if(t)for(var s in n)n.hasOwnProperty(s)&&(a=n[s],s in t&&(t[s]===a||s in i&&i[s]===a)||("object"===o(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],a,r):t[s]=r(a)));return t}},{key:"clone",value:function(t){if(!t||"object"!==o(t))return t;var n;if(t instanceof Array){n=[];for(var r=0,a=t.length;r<a;++r)r in t&&n.push(e.clone(t[r]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=new URL(e);return t.forEach((function(e){e.key&&e.value&&n.searchParams.set(e.key,e.value)})),n.href}catch(t){return e}}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),r=0,a=n.length;r<a;r++){var i=n[r],o=i.indexOf(": ");o>0&&(t[i.substring(0,o)]=i.substring(o+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},{key:"getRelativeUrl",value:function(e,t){try{var n=new URL(e),r=new URL(t);if(n.protocol=r.protocol,n.origin!==r.origin)return t;var i=a().relative(n.pathname.substr(0,n.pathname.lastIndexOf("/")),r.pathname.substr(0,r.pathname.lastIndexOf("/"))),o=0===i.length?1:0;return i+=r.pathname.substr(r.pathname.lastIndexOf("/")+o,r.pathname.length-1),r.pathname.length<i.length?r.pathname:i}catch(e){return t}}},{key:"parseUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=null===e&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return(0,i.UAParser)(t)}catch(e){return{}}}},{key:"stringHasProtocol",value:function(e){return/(http(s?)):\/\//i.test(e)}}],null&&s(t.prototype,null),n&&s(t,n),e}();t.Z=u},4351:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return i(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CMSD_STATIC_HEADER="cmsdStaticHeader",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.INBAND_EVENTS="inbandEvents",e.INITIAL_STREAM_SWITCH="initialStreamSwitch",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.QUOTA_EXCEEDED="quotaExceeded",e.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",e.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",e.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",e.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",e.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",e.SOURCE_BUFFER_ERROR="sourceBufferError",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e.SEEK_TARGET="seekTarget",e.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",e.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",e.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",e.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",e.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",e}return s}(n(8342).Z);t.Z=s},8512:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function o(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=s(t);if(n){var a=s(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return o(this,e)});function u(){return a(this,u),r.apply(this,arguments)}return u}(n(4351).Z),c=new u;t.Z=c},8342:function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r;return t=e,(r=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var a in e)!e.hasOwnProperty(a)||this[a]&&!n||r&&-1===e[a].indexOf("public_")||(this[a]=e[a])}}}])&&n(t.prototype,r),e}();t.Z=r},2610:function(e,t){"use strict";t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},8825:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return i(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).AST_IN_FUTURE="astInFuture",e.BASE_URLS_UPDATED="baseUrlsUpdated",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",e.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",e.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADING_STARTED="manifestLoadingStarted",e.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_ACTIVATED="streamActivated",e.STREAM_DEACTIVATED="streamDeactivated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.CUE_ENTER="cueEnter",e.CUE_EXIT="cueExit",e.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.CAN_PLAY_THROUGH="canPlayThrough",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_LOADED_DATA="playbackLoadedData",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e.REPRESENTATION_SWITCH="representationSwitch",e.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",e.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",e.INBAND_PRFT="inbandPrft",e.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",e.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming",e}return s}(n(8342).Z));t.Z=s},3393:function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,r;return t=e,(r=[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.TEXT_DISABLED="disabled",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.FONT_DOWNLOAD_DVB_SCHEME="urn:dvb:dash:fontdownload:2014",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.OFF_MIMETYPE="application/font-sfnt",this.WOFF_MIMETYPE="application/font-woff",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&n(t.prototype,r),e}());t.Z=r},3860:function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var r=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,r;return t=e,(r=[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors",this.HTTP_REQUEST_DVB_REPORTING_TYPE="DVBReporting"}}])&&n(t.prototype,r),e}());t.Z=r},1180:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(s,e);var t,n,r=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=o(t);if(n){var a=o(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return i(this,e)});function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=r.call(this)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e.CMCD_DATA_GENERATED="cmcdDataGenerated",e}return s}(n(8342).Z));t.Z=s},5717:function(e,t,n){"use strict";var r=n(2610),a=n(5448),i=n(1264),o=n(3106),s=n(1767),u=n(3393);function c(){var e,t,n,a,c,l,f,d,h=this.context,g=(0,i.Z)(h).getInstance();function m(){a=[],c=[],l=[],d=[],f=null,t=[]}function p(e,t){var n=-1;e.some((function(e,r){if(e===t)return n=r,!0})),n<0||e.splice(n,1)}function E(e){var t;for(t=0;t<d.length;t++)if(d[t].rulename===e)return t;return-1}function _(e,n){y(e,n);var a=new r.Z;a.schemeIdUri=e,a.value=n,t.push(a)}function y(e,n){(0,o.PS)(e,"string"),(0,o.PS)(n,"string"),t.forEach((function(r,a){r.schemeIdUri===e&&r.value===n&&t.splice(a,1)}))}return e={getCustomInitialTrackSelectionFunction:function(){return f},setCustomInitialTrackSelectionFunction:function(e){f=e},resetCustomInitialTrackSelectionFunction:function(){f=null},getLicenseResponseFilters:function(){return c},getLicenseRequestFilters:function(){return a},getCustomCapabilitiesFilters:function(){return l},registerCustomCapabilitiesFilter:function(e){l.push(e)},registerLicenseResponseFilter:function(e){c.push(e)},registerLicenseRequestFilter:function(e){a.push(e)},unregisterCustomCapabilitiesFilter:function(e){p(l,e)},unregisterLicenseResponseFilter:function(e){p(c,e)},unregisterLicenseRequestFilter:function(e){p(a,e)},addAbrCustomRule:function(e,t,n){if("string"!=typeof e||e!==s.Z.ABANDON_FRAGMENT_RULES&&e!==s.Z.QUALITY_SWITCH_RULES||"string"!=typeof t)throw u.Z.BAD_ARGUMENT_ERROR;var r=E(t);-1===r?d.push({type:e,rulename:t,rule:n}):(d[r].type=e,d[r].rule=n)},removeAllAbrCustomRule:function(){d=[]},removeAbrCustomRule:function(e){if(e){var t=E(e);-1!==t&&d.splice(t,1)}else d=[]},getAbrCustomRules:function(){return d},addUTCTimingSource:_,removeUTCTimingSource:y,getUTCTimingSources:function(){return t},clearDefaultUTCTimingSources:function(){t=[]},restoreDefaultUTCTimingSources:function(){var e=g.get().streaming.utcSynchronization.defaultTimingSource;_(e.scheme,e.value)},setXHRWithCredentialsForType:function e(t,r){t?n[t]=!!r:Object.keys(n).forEach((function(t){e(t,r)}))},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},setConfig:function(){},reset:function(){m()}},n={default:!1},m(),e}c.__dashjs_factory_name="CustomParametersModel",t.Z=a.Z.getSingletonFactory(c)},2068:function(e,t,n){"use strict";var r=n(5448),a={DEFAULT:.5,STRONG:1,WEAK:0};function i(e,t,n){var r,i;return r=void 0===e?-1:e,i=function(e){var t=a.DEFAULT;return e!==a.DEFAULT&&e!==a.STRONG&&e!==a.WEAK||(t=e),t}(n),{quality:r,reason:void 0===t?null:t,priority:i}}i.__dashjs_factory_name="SwitchRequest";var o=r.Z.getClassFactory(i);o.NO_CHANGE=-1,o.PRIORITY=a,r.Z.updateClassFactory(i.__dashjs_factory_name,o),t.Z=o},1767:function(e,t,n){"use strict";var r=n(5628),a=n(6535),i=n(7423),o=n(895),s=n(6070),u=n(3112),c=n(1914),l=n(5435),f=n(5448),d=n(2068),h=n(3393),g="qualitySwitchRules",m="abandonFragmentRules";function p(e){e=e||{};var t,n,f=this.context,p=e.mediaPlayerModel,E=e.customParametersModel,_=e.dashMetrics,y=e.settings;function T(e){return e.filter((function(e){return e.quality>d.Z.NO_CHANGE}))}function b(e){var t,n,r,a,i,o={},s=null;if(0!==e.length){for(o[d.Z.PRIORITY.STRONG]={quality:d.Z.NO_CHANGE,reason:null},o[d.Z.PRIORITY.WEAK]={quality:d.Z.NO_CHANGE,reason:null},o[d.Z.PRIORITY.DEFAULT]={quality:d.Z.NO_CHANGE,reason:null},t=0,n=e.length;t<n;t+=1)(r=e[t]).quality!==d.Z.NO_CHANGE&&(o[r.priority].quality===d.Z.NO_CHANGE||o[r.priority].quality>r.quality)&&(o[r.priority].quality=r.quality,o[r.priority].reason=r.reason||null);return o[d.Z.PRIORITY.WEAK].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.WEAK]),o[d.Z.PRIORITY.DEFAULT].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.DEFAULT]),o[d.Z.PRIORITY.STRONG].quality!==d.Z.NO_CHANGE&&(s=o[d.Z.PRIORITY.STRONG]),s&&(a=s.quality,i=s.reason),(0,d.Z)(f).create(a,i)}}return{initialize:function(){t=[],n=[],y.get().streaming.abr.useDefaultABRRules&&(y.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_L2A?t.push((0,c.Z)(f).create({dashMetrics:_,settings:y})):y.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_LoLP?t.push((0,l.Z)(f).create({dashMetrics:_})):(t.push((0,u.Z)(f).create({dashMetrics:_,mediaPlayerModel:p,settings:y})),t.push((0,r.Z)(f).create({dashMetrics:_})),y.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&t.push((0,a.Z)(f).create({dashMetrics:_,settings:y})),y.get().streaming.abr.additionalAbrRules.switchHistoryRule&&t.push((0,s.Z)(f).create()),y.get().streaming.abr.additionalAbrRules.droppedFramesRule&&t.push((0,o.Z)(f).create()),y.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&n.push((0,i.Z)(f).create({dashMetrics:_,mediaPlayerModel:p,settings:y})))),E.getAbrCustomRules().forEach((function(e){e.type===g&&t.push(e.rule(f).create()),e.type===m&&n.push(e.rule(f).create())}))},reset:function(){[t,n].forEach((function(e){e&&e.length&&e.forEach((function(e){return e.reset&&e.reset()}))})),t=[],n=[]},getMaxQuality:function(e){return b(T(t.map((function(t){return t.getMaxIndex(e)}))))||(0,d.Z)(f).create()},getMinSwitchRequest:b,shouldAbandonFragment:function(e,t){var r=b(T(n.map((function(n){return n.shouldAbandon(e,t)}))));return r&&(r.reason.forceAbandon=!0),r||(0,d.Z)(f).create()},getQualitySwitchRules:function(){return t}}}p.__dashjs_factory_name="ABRRulesCollection";var E=f.Z.getClassFactory(p);E.QUALITY_SWITCH_RULES=g,E.ABANDON_FRAGMENT_RULES=m,f.Z.updateSingletonFactory(p.__dashjs_factory_name,E),t.Z=E},7423:function(e,t,n){"use strict";var r=n(2068),a=n(5448),i=n(6398);function o(e){e=e||{};var t,n,a,s,u,c=this.context,l=e.mediaPlayerModel,f=e.dashMetrics,d=e.settings;function h(){a={},s={},u=[]}return t={shouldAbandon:function(e){var t=(0,r.Z)(c).create(r.Z.NO_CHANGE,{name:o.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var i,h,g=e.getMediaInfo(),m=e.getMediaType(),p=e.getStreamInfo(),E=p?p.id:null,_=e.getCurrentRequest();if(!isNaN(_.index)){i=m,h=_.index,a[i]=a[i]||{},a[i][h]=a[i][h]||{};var y=l.getStableBufferTime();if(f.getCurrentBufferLevel(m)>y)return t;var T=a[m][_.index];if(null===T||null===_.firstByteDate||s.hasOwnProperty(T.id))return t;if(void 0===T.firstByteTime&&(u[m]=[],T.firstByteTime=_.firstByteDate.getTime(),T.segmentDuration=_.duration,T.bytesTotal=_.bytesTotal,T.id=_.index),T.bytesLoaded=_.bytesLoaded,T.elapsedTime=(new Date).getTime()-T.firstByteTime,T.bytesLoaded>0&&T.elapsedTime>0&&function(e,t){u[e]=u[e]||[],u[e].push(t)}(m,Math.round(8*T.bytesLoaded/T.elapsedTime)),u[m].length>=d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&T.elapsedTime>d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&T.bytesLoaded<T.bytesTotal){var b=u[m].reduce((function(e,t){return e+t}),0);if(T.measuredBandwidthInKbps=Math.round(b/u[m].length),T.estimatedTimeOfDownload=+(8*T.bytesTotal/T.measuredBandwidthInKbps/1e3).toFixed(2),T.estimatedTimeOfDownload<T.segmentDuration*d.get().streaming.abr.abrRulesParameters.abandonRequestsRule.abandonMultiplier||0===e.getRepresentationInfo().quality)return t;if(!s.hasOwnProperty(T.id)){var A=e.getAbrController(),v=T.bytesTotal-T.bytesLoaded,R=A.getBitrateList(g),w=A.getQualityForBitrate(g,T.measuredBandwidthInKbps*d.get().streaming.abr.bandwidthSafetyFactor,E),S=A.getMinAllowedIndexFor(m,E),I=void 0!==S?Math.max(S,w):w;v>T.bytesTotal*R[I].bitrate/R[A.getQualityFor(m,E)].bitrate&&(t.quality=I,t.reason.throughput=T.measuredBandwidthInKbps,t.reason.fragmentID=T.id,t.reason.rule=this.getClassName(),s[T.id]=T,n.debug("["+m+"] frag id",T.id," is asking to abandon and switch to quality to ",I," measured bandwidth was",T.measuredBandwidthInKbps),delete a[m][T.id])}}else T.bytesLoaded===T.bytesTotal&&delete a[m][T.id]}return t},reset:h},n=(0,i.Z)(c).getInstance().getLogger(t),h(),t}o.__dashjs_factory_name="AbandonRequestsRule",t.Z=a.Z.getClassFactory(o)},3112:function(e,t,n){"use strict";var r=n(3860),a=n(2068),i=n(5448),o=n(7855),s=n(5595),u=n(8512),c=n(6398),l=n(8825),f=n(3393),d=10;function h(e){e=e||{};var t,n,i,h=this.context,g=e.dashMetrics,m=e.mediaPlayerModel,p=(0,s.Z)(h).getInstance();function E(e,t,n){var r=n.reduce((function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var a=Math.max(e,d+2*t.length),i=(n[r]-1)/(a/d-1);return{gp:i,Vp:d/i}}function _(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function y(e,t){var n=m.getStableBufferTime();if(e.stableBufferTime!==n){var r=E(n,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var a=g.getCurrentBufferLevel(t),i=a+e.placeholderBuffer;i-=d,i*=r.Vp/e.Vp,i+=d,e.stableBufferTime=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,i-a)}}}function T(e,t){return e.Vp*(e.utilities[t]+e.gp)}function b(e,t){for(var n=e.bitrates[t],r=e.utilities[t],a=0,i=t-1;i>=0;--i)if(e.utilities[i]<e.utilities[t]){var o=e.bitrates[i],s=e.utilities[i],u=e.Vp*(e.gp+(n*s-o*r)/(n-o));a=Math.max(a,u)}return a}function A(e){var t=e.mediaType===f.Z.AUDIO?[f.Z.AUDIO]:i;for(var n in t)i.hasOwnProperty(n)&&2===i[n].state&&(i[n].placeholderBuffer=0)}function v(){for(var e in i)if(i.hasOwnProperty(e)){var t=i[e];0!==t.state&&(t.state=1,_(t))}}function R(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=i[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,S(t,e.chunk.mediaInfo.type)}}}function w(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===o.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=i[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),S(t,e.mediaType))}}function S(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=g.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=T(e,e.lastQuality),a=Math.max(0,r-n);e.placeholderBuffer=Math.min(a,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function I(e){if(e){var t=i[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function N(e){if(e){var t=i[e.mediaType];if(t&&0!==t.state){var n,r=g.getCurrentBufferLevel(e.mediaType);n=t.abrQuality>0?b(t,t.abrQuality):d;var a=Math.max(0,n-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,a)}}}function C(){i={}}return t={getMaxIndex:function(e){var t=(0,a.Z)(h).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return t;var r=e.getMediaInfo(),o=e.getMediaType(),s=e.getScheduleController(),u=e.getStreamInfo(),c=e.getAbrController(),l=c.getThroughputHistory(),f=u?u.id:null,d=u&&u.manifestInfo&&u.manifestInfo.isDynamic,p=e.useBufferOccupancyABR();if(t.reason=t.reason||{},!p)return t;s.setTimeToLoadDelay(0);var A=function(e){var t=e.getMediaType(),n=i[t];return n?0!==n.state&&y(n,t):(n=function(e){var t={},n=e.getMediaInfo().bitrateList.map((function(e){return e.bandwidth})),r=function(e){return e.map((function(e){return Math.log(e)}))}(n);r=r.map((function(e){return e-r[0]+1}));var a=m.getStableBufferTime(),i=E(a,n,r);return i?(t.state=1,t.bitrates=n,t.utilities=r,t.stableBufferTime=a,t.Vp=i.Vp,t.gp=i.gp,t.lastQuality=0,_(t)):t.state=0,t}(e),i[t]=n),n}(e);if(0===A.state)return t;var v,R=g.getCurrentBufferLevel(o),w=l.getAverageThroughput(o,d),S=l.getSafeAverageThroughput(o,d),I=l.getAverageLatency(o);if(t.reason.state=A.state,t.reason.throughput=w,t.reason.latency=I,isNaN(w))return t;switch(A.state){case 1:v=c.getQualityForBitrate(r,S,f,I),t.quality=v,t.reason.throughput=S,A.placeholderBuffer=Math.max(0,b(A,v)-R),A.lastQuality=v,!isNaN(A.lastSegmentDurationS)&&R>=A.lastSegmentDurationS&&(A.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var a=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,a)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,y(e,t)}(A,o),v=function(e,t){for(var n=e.bitrates.length,r=NaN,a=NaN,i=0;i<n;++i){var o=(e.Vp*(e.utilities[i]+e.gp)-t)/e.bitrates[i];(isNaN(a)||o>=a)&&(a=o,r=i)}return r}(A,R+A.placeholderBuffer);var N=c.getQualityForBitrate(r,S,f,I);v>A.lastQuality&&v>N&&(v=Math.max(N,A.lastQuality));var C=Math.max(0,R+A.placeholderBuffer-T(A,v));C<=A.placeholderBuffer?(A.placeholderBuffer-=C,C=0):(C-=A.placeholderBuffer,A.placeholderBuffer=0,v<c.getMaxAllowedIndexFor(o,f)?s.setTimeToLoadDelay(1e3*C):C=0),t.quality=v,t.reason.throughput=w,t.reason.latency=I,t.reason.bufferLevel=R,t.reason.placeholderBuffer=A.placeholderBuffer,t.reason.delay=C,A.lastQuality=v;break;default:n.debug("BOLA ABR rule invoked in bad state."),t.quality=c.getQualityForBitrate(r,S,f,I),t.reason.state=A.state,t.reason.throughput=S,t.reason.latency=I,A.state=1,_(A)}return t},reset:function(){C(),p.off(l.Z.BUFFER_EMPTY,A,t),p.off(l.Z.PLAYBACK_SEEKING,v,t),p.off(l.Z.METRIC_ADDED,w,t),p.off(l.Z.QUALITY_CHANGE_REQUESTED,I,t),p.off(l.Z.FRAGMENT_LOADING_ABANDONED,N,t),p.off(u.Z.MEDIA_FRAGMENT_LOADED,R,t)}},n=(0,c.Z)(h).getInstance().getLogger(t),C(),p.on(l.Z.BUFFER_EMPTY,A,t),p.on(l.Z.PLAYBACK_SEEKING,v,t),p.on(l.Z.METRIC_ADDED,w,t),p.on(l.Z.QUALITY_CHANGE_REQUESTED,I,t),p.on(l.Z.FRAGMENT_LOADING_ABANDONED,N,t),p.on(u.Z.MEDIA_FRAGMENT_LOADED,R,t),t}h.__dashjs_factory_name="BolaRule",t.Z=i.Z.getClassFactory(h)},895:function(e,t,n){"use strict";var r=n(5448),a=n(2068),i=n(6398);function o(){var e,t,n=this.context;return e={getMaxIndex:function(e){var r=(0,a.Z)(n).create();if(!e||!e.hasOwnProperty("getDroppedFramesHistory"))return r;var i=e.getDroppedFramesHistory(),o=e.getStreamInfo().id;if(i){var s=i.getFrameHistory(o);if(!s||0===s.length)return r;for(var u=0,c=0,l=a.Z.NO_CHANGE,f=1;f<s.length;f++)if(s[f]&&(u=s[f].droppedVideoFrames,(c=s[f].totalVideoFrames)>375&&u/c>.15)){l=f-1,t.debug("index: "+l+" Dropped Frames: "+u+" Total Frames: "+c);break}return(0,a.Z)(n).create(l,{droppedFrames:u})}return r}},t=(0,i.Z)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="DroppedFramesRule",t.Z=r.Z.getClassFactory(o)},6535:function(e,t,n){"use strict";var r=n(5595),a=n(8512),i=n(5448),o=n(6398),s=n(2068),u=n(3393),c=n(3860),l=n(8825);function f(e){e=e||{};var t,n,i,f=this.context,d=(0,r.Z)(f).getInstance(),h=e.dashMetrics;function g(){(i={})[u.Z.VIDEO]={ignoreCount:2},i[u.Z.AUDIO]={ignoreCount:2}}function m(){g()}function p(e){isNaN(e.startTime)||e.mediaType!==u.Z.AUDIO&&e.mediaType!==u.Z.VIDEO||i[e.mediaType].ignoreCount>0&&i[e.mediaType].ignoreCount--}return t={getMaxIndex:function(e){var t=(0,s.Z)(f).create();if(!e||!e.hasOwnProperty("getMediaType"))return t;!function(){if(!h||!h.hasOwnProperty("getCurrentBufferLevel")||!h.hasOwnProperty("getCurrentBufferState"))throw new Error(u.Z.MISSING_CONFIG_ERROR)}();var r=e.getMediaType(),a=h.getCurrentBufferState(r),o=e.getRepresentationInfo().fragmentDuration,l=e.getStreamInfo(),d=l?l.id:null,g=e.getScheduleController(),m=l&&l.manifestInfo&&l.manifestInfo.isDynamic;if(function(e,t){return!e&&i[t].ignoreCount>0}(g.getPlaybackController().getLowLatencyModeEnabled(),r)||!o)return t;if(a&&a.state===c.Z.BUFFER_EMPTY)n.debug("["+r+"] Switch to index 0; buffer is empty."),t.quality=0,t.reason="InsufficientBufferRule: Buffer is empty";else{var p=e.getMediaInfo(),E=e.getAbrController(),_=E.getThroughputHistory(),y=h.getCurrentBufferLevel(r),T=_.getAverageThroughput(r,m),b=_.getAverageLatency(r),A=T*(y/o)*.5;t.quality=E.getQualityForBitrate(p,A,d,b),t.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return t},reset:function(){g(),d.off(l.Z.PLAYBACK_SEEKING,m,t),d.off(a.Z.BYTES_APPENDED_END_FRAGMENT,p,t)}},n=(0,o.Z)(f).getInstance().getLogger(t),g(),d.on(l.Z.PLAYBACK_SEEKING,m,t),d.on(a.Z.BYTES_APPENDED_END_FRAGMENT,p,t),t}f.__dashjs_factory_name="InsufficientBufferRule",t.Z=i.Z.getClassFactory(f)},1914:function(e,t,n){"use strict";var r=n(3860),a=n(2068),i=n(5448),o=n(7855),s=n(5595),u=n(8512),c=n(6398),l=n(3393);function f(e){e=e||{};var t,n,i,f,d=this.context,h=e.dashMetrics,g=(0,s.Z)(d).getInstance();function m(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,e.lastSegmentUrl=""}function p(){for(var e in n)if(n.hasOwnProperty(e)){var t=n[e];0!==t.state&&(t.state=1,m(t))}}function E(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=n[e.chunk.mediaInfo.type],r=i[e.chunk.mediaInfo.type];if(t&&0!==t.state){var a=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||a>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=a,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=a,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,y(t,r)}}}function _(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===o.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=n[e.mediaType],a=i[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),y(t,a))}}function y(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function T(e){if(e&&e.mediaType){var t=n[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function b(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function A(){n={},i={}}return t={getMaxIndex:function(e){var t,r=(0,a.Z)(d).create(),s=Math.pow(4,.99),u=Math.max(Math.pow(4,1),s*Math.sqrt(4)),c=e.getMediaInfo(),g=e.getMediaType(),p=c.bitrateList.map((function(e){return e.bandwidth})),E=p.length,_=e.getScheduleController(),y=e.getStreamInfo(),T=e.getAbrController(),A=T.getThroughputHistory(),v=y&&y.manifestInfo&&y.manifestInfo.isDynamic,R=e.useL2AABR(),w=h.getCurrentBufferLevel(g,!0),S=A.getSafeAverageThroughput(g,v),I=A.getAverageThroughput(g,v),N=A.getAverageLatency(g),C=e.getVideoModel().getPlaybackRate();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useL2AABR")))return r;if(r.reason=r.reason||{},!R||g===l.Z.AUDIO)return r;_.setTimeToLoadDelay(0);var D=function(e){var t=e.getMediaType(),r=n[t];return r||(r=function(e){var t={},n=e.getMediaInfo(),r=n.bitrateList.map((function(e){return e.bandwidth/1e3}));return t.state=1,t.bitrates=r,t.lastQuality=0,function(e){e&&e.type&&(i[e.type]={},i[e.type].w=[],i[e.type].prev_w=[],i[e.type].Q=0,i[e.type].segment_request_start_s=0,i[e.type].segment_download_finish_s=0,i[e.type].B_target=1.5)}(n),m(t),t}(e),n[t]=r),r}(e);if(0===D.state)return r;var M=i[g];if(!M)return r;if(r.reason.state=D.state,r.reason.throughput=I,r.reason.latency=N,isNaN(I))return r;switch(D.state){case 1:if(t=T.getQualityForBitrate(c,S,y.id,N),r.quality=t,r.reason.throughput=S,D.lastQuality=t,!isNaN(D.lastSegmentDurationS)&&w>=M.B_target){D.state=2,M.Q=s;for(var O=0;O<E;++O)O===D.lastQuality?M.prev_w[O]=1:M.prev_w[O]=0}break;case 2:var L=[],P=h.getCurrentHttpRequest(g).trace.reduce((function(e,t){return e+t.d}),0),B=h.getCurrentHttpRequest(g).trace.reduce((function(e,t){return e+t.b[0]}),0),F=Math.round(8*B/P),x=h.getCurrentHttpRequest(g);if(F<1&&(F=1),x.url===D.lastSegmentUrl||x.type===o.w.INIT_SEGMENT_TYPE)t=D.lastQuality;else{for(var k=D.lastSegmentDurationS,U=1,G=0;G<E;++G)p[G]=p[G]/1e3,C*p[G]>F&&(U=-1),M.w[G]=M.prev_w[G]+U*(k/(2*u))*((M.Q+s)*(C*p[G]/F));M.w=function(e){for(var t=e.length,n=!1,r=[],a=0;a<t;++a)r[a]=e[a];for(var i=e.sort((function(e,t){return t-e})),o=0,s=0,u=[],c=0;c<t-1;++c)if((s=((o+=i[c])-1)/(c+1))>=i[c+1]){n=!0;break}n||(s=(o+i[t-1]-1)/t);for(var l=0;l<t;++l)u[l]=Math.max(r[l]-s,0);return u}(M.w);for(var Z=0;Z<E;++Z)L[Z]=M.w[Z]-M.prev_w[Z],M.prev_w[Z]=M.w[Z];M.Q=Math.max(0,M.Q-k+k*C*((b(p,M.prev_w)+b(p,L))/F));for(var H=[],j=0;j<E;++j)H[j]=Math.abs(p[j]-b(M.w,p));(t=H.indexOf(Math.min.apply(Math,H)))>D.lastQuality&&p[D.lastQuality+1]<=F&&(t=D.lastQuality+1),p[t]>=F&&(M.Q=2*Math.max(s,M.Q)),D.lastSegmentUrl=x.url}r.quality=t,r.reason.throughput=I,r.reason.latency=N,r.reason.bufferLevel=w,D.lastQuality=r.quality;break;default:f.debug("L2A ABR rule invoked in bad state."),r.quality=T.getQualityForBitrate(c,S,y.id,N),r.reason.state=D.state,r.reason.throughput=S,r.reason.latency=N,D.state=1,m(D)}return r},reset:function(){A(),g.off(u.Z.PLAYBACK_SEEKING,p,t),g.off(u.Z.MEDIA_FRAGMENT_LOADED,E,t),g.off(u.Z.METRIC_ADDED,_,t),g.off(u.Z.QUALITY_CHANGE_REQUESTED,T,t)}},f=(0,c.Z)(d).getInstance().getLogger(t),A(),g.on(u.Z.PLAYBACK_SEEKING,p,t),g.on(u.Z.MEDIA_FRAGMENT_LOADED,E,t),g.on(u.Z.METRIC_ADDED,_,t),g.on(u.Z.QUALITY_CHANGE_REQUESTED,T,t),t}f.__dashjs_factory_name="L2ARule",t.Z=i.Z.getClassFactory(f)},6070:function(e,t,n){"use strict";var r=n(5448),a=n(6398),i=n(2068);function o(){var e,t,n=this.context;return e={getMaxIndex:function(e){for(var r=e?e.getSwitchHistory():null,a=r?r.getSwitchRequests():[],o=0,s=0,u=0,c=(0,i.Z)(n).create(),l=0;l<a.length;l++)if(void 0!==a[l]&&(o+=a[l].drops,s+=a[l].noDrops,u+=a[l].dropSize,o+s>=6&&o/s>.075)){c.quality=l>0&&a[l].drops>0?l-1:l,c.reason={index:c.quality,drops:o,noDrops:s,dropSize:u},t.debug("Switch history rule index: "+c.quality+" samples: "+(o+s)+" drops: "+o);break}return c}},t=(0,a.Z)(n).getInstance().getLogger(e),e}o.__dashjs_factory_name="SwitchHistoryRule",t.Z=r.Z.getClassFactory(o)},5628:function(e,t,n){"use strict";var r=n(5448),a=n(2068),i=n(3393),o=n(3860);function s(e){e=e||{};var t=this.context,n=e.dashMetrics;return{getMaxIndex:function(e){var r=(0,a.Z)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return r;!function(){if(!n||!n.hasOwnProperty("getCurrentBufferState"))throw new Error(i.Z.MISSING_CONFIG_ERROR)}();var s=e.getMediaInfo(),u=e.getMediaType(),c=n.getCurrentBufferState(u),l=e.getScheduleController(),f=e.getAbrController(),d=e.getStreamInfo(),h=d?d.id:null,g=d&&d.manifestInfo?d.manifestInfo.isDynamic:null,m=f.getThroughputHistory(),p=m.getSafeAverageThroughput(u,g),E=m.getAverageLatency(u),_=e.useBufferOccupancyABR();return isNaN(p)||!c||_||f.getAbandonmentStateFor(h,u)!==o.Z.ABANDON_LOAD&&(c.state===o.Z.BUFFER_LOADED||g)&&(r.quality=f.getQualityForBitrate(s,p,h,E),l.setTimeToLoadDelay(0),r.reason={throughput:p,latency:E}),r},reset:function(){}}}s.__dashjs_factory_name="ThroughputRule",t.Z=r.Z.getClassFactory(s)},4722:function(e,t,n){"use strict";var r=n(5448),a=n(6398);function i(){var e,t,n,r,i,o,s,u,c,l=this.context;function f(){n=null,r=1,i=100,o=0,s=null,u=null,c="dynamic_weight_selection"}function d(){var e=0;if(n)for(var t=0;t<n.length;t++){var r=n[t];r.state.throughput>e&&(e=r.state.throughput)}return e}function h(e,t,n){var r=e.map((function(e,r){return n[r]*Math.pow(e-t[r],2)})).reduce((function(e,t){return e+t}));return(r<0?-1:1)*Math.sqrt(Math.abs(r))}function g(e,t,n){for(var r=0;r<t.length;r++){var a=t[r],i=(s=e,h([(o=a).state.throughput,o.state.latency,o.state.rebuffer,o.state.switch],[s.state.throughput,s.state.latency,s.state.rebuffer,s.state.switch],[1,1,1,1]));m(a,n,Math.exp(-1*Math.pow(i,2)/(2*Math.pow(.1,2))))}var o,s}function m(e,t,n){var r=e.state,a=[.01,.01,.01,.01];r.throughput=r.throughput+(t[0]-r.throughput)*a[0]*n,r.latency=r.latency+(t[1]-r.latency)*a[1]*n,r.rebuffer=r.rebuffer+(t[2]-r.rebuffer)*a[2]*n,r.switch=r.switch+(t[3]-r.switch)*a[3]*n}return e={getNextQuality:function(e,a,l,f,m,p,E){var _=l,y=f,T=a,b=function(e){if(!n){n=[];var t=e.bitrateList,a=[];o=t[0].bandwidth,t.forEach((function(e){a.push(e.bandwidth),e.bandwidth<o&&(o=e.bandwidth)})),c=a.map((function(e){return Math.pow(e,2)})).reduce((function(e,t){return e+t})),r=Math.sqrt(c);for(var i=0;i<t.length;i++){var s={qualityIndex:i,bitrate:t[i].bandwidth,state:{throughput:t[i].bandwidth/r,latency:0,rebuffer:0,switch:0}};n.push(s)}u=function(e){var t=[],n=function(e){for(var t=[],n=0;n<e;n++){var r=[Math.random()*d(),Math.random(),Math.random(),Math.random()];t.push(r)}return t}(Math.pow(e.length,2));t.push(n[0]);for(var r=[1,1,1,1],a=1;a<e.length;a++){for(var i=null,o=null,s=0;s<n.length;s++){for(var u=n[s],c=null,l=0;l<t.length;l++){var f=h(u,t[l],r);(null===c||f<c)&&(c=f)}(null===o||c>o)&&(i=u,o=c)}t.push(i)}for(var g=null,m=null,p=0;p<t.length;p++){for(var E=0,_=0;_<t.length;_++)p!==_&&(E+=h(t[p],t[_],r));(null===g||E>g)&&(g=E,m=p)}var y=[];for(y.push(t[m]),t.splice(m,1);t.length>0;){for(var T=null,b=null,A=0;A<t.length;A++){var v=h(y[0],t[A],r);(null===T||v<T)&&(T=v,b=A)}y.push(t[b]),t.splice(b,1)}return y}(n)}var c;return n}(e),A=a/r;A>1&&(A=d()),l/=i,t.debug("getNextQuality called throughput:".concat(A," latency:").concat(l," bufferSize:").concat(f," currentQualityIndex:").concat(p," playbackRate:").concat(m));var v=b[p],R=v.bitrate*E.getSegmentDuration()/T,w=Math.max(0,R-y);if(y-R<E.getMinBuffer())return t.debug("Buffer is low for bitrate= ".concat(v.bitrate," downloadTime=").concat(R," currentBuffer=").concat(y," rebuffer=").concat(w)),function(e,t){var r=0,a=e;if(n)for(var i=0;i<n.length;i++){var o=n[i];o.bitrate<e.bitrate&&o.bitrate>r&&t>o.bitrate&&(r=o.bitrate,a=o)}return a}(v,T).qualityIndex;switch(c){case"manual_weight_selection":s=[.4,.4,.4,.4];break;case"random_weight_selection":!function(e){s=function(e,t){for(var n=[],r=Math.sqrt(2/e),a=0;a<4;a++)n.push(Math.random()*r);return s=n}(e.length)}(b);break;default:!function(e,t,n,r,a,i,o){s||(s=u[u.length-1]);var c=e.findWeightVector(t,n,r,a,i,o);null!==c&&-1!==c&&(s=c)}(E,b,_,y,w,T,m)}for(var S=null,I=null,N=null,C=0;C<b.length;C++){var D=b[C],M=D.state,O=[M.throughput,M.latency,M.rebuffer,M.switch],L=s.slice(),P=E.getNextBufferWithBitrate(D.bitrate,y,T),B=P<E.getMinBuffer();B&&t.debug("Buffer is low for bitrate=".concat(D.bitrate," downloadTime=").concat(R," currentBuffer=").concat(y," nextBuffer=").concat(P)),(D.bitrate>a-1e4||B)&&D.bitrate!==o&&(L[0]=100);var F=h(O,[A,0,0,0],L);(null===S||F<S)&&(S=F,I=D.qualityIndex,N=D)}var x=Math.abs(v.bitrate-N.bitrate)/r;return g(v,b,[A,l,w,x]),g(N,b,[A,0,0,x]),I},reset:function(){f()}},t=(0,a.Z)(l).getInstance().getLogger(e),f(),e}i.__dashjs_factory_name="LearningAbrController",t.Z=r.Z.getClassFactory(i)},5317:function(e,t,n){"use strict";var r=n(5448),a=n(2298);function i(){var e,t,n,r,i;function o(){t=null,n=null,r=null,i=null}function s(e,t,n,r){var i=new a.Z;return i.type=e,i.weights.bitrateReward=t||1,i.weights.bitrateSwitchPenalty=1,i.weights.rebufferPenalty=n||1e3,i.weights.latencyPenalty=[],i.weights.latencyPenalty.push({threshold:1.1,penalty:.05*r}),i.weights.latencyPenalty.push({threshold:1e8,penalty:.1*n}),i.weights.playbackSpeedPenalty=r||200,i}function u(e,t,n,r,a){a.bitrateWSum+=a.weights.bitrateReward*e,a.lastBitrate&&(a.bitrateSwitchWSum+=a.weights.bitrateSwitchPenalty*Math.abs(e-a.lastBitrate)),a.lastBitrate=e,a.rebufferWSum+=a.weights.rebufferPenalty*t;for(var i=0;i<a.weights.latencyPenalty.length;i++){var o=a.weights.latencyPenalty[i];if(n<=o.threshold){a.latencyWSum+=o.penalty*n;break}}a.playbackSpeedWSum+=a.weights.playbackSpeedPenalty*Math.abs(1-r),a.totalQoe=a.bitrateWSum-a.bitrateSwitchWSum-a.rebufferWSum-a.latencyWSum-a.playbackSpeedWSum}return e={setupPerSegmentQoe:function(e,a,o){t=s("segment",e,a,o),n=e,r=a,i=o},logSegmentMetrics:function(e,n,r,a){t&&u(e,n,r,a,t)},getPerSegmentQoe:function(){return t},calculateSingleUseQoe:function(e,t,a,o){var c=null;return n&&r&&i&&(c=s("segment",n,r,i)),c?(u(e,t,a,o,c),c.totalQoe):0},reset:function(){o()}},o(),e}i.__dashjs_factory_name="LoLpQoeEvaluator",t.Z=r.Z.getClassFactory(i)},5435:function(e,t,n){"use strict";var r=n(6398),a=n(5448),i=n(4722),o=n(5317),s=n(2068),u=n(3860),c=n(6523),l=n(3393);function f(e){var t,n,a,f,d=(e=e||{}).dashMetrics,h=this.context;return n={getMaxIndex:function(e){try{var n=(0,s.Z)(h).create(),r=e.getMediaInfo().type,i=e.getAbrController(),o=e.getStreamInfo(),g=i.getQualityFor(r,o.id),m=e.getMediaInfo(),p=d.getCurrentBufferState(r),E=e.getScheduleController(),_=d.getCurrentBufferLevel(r,!0),y=o&&o.manifestInfo?o.manifestInfo.isDynamic:null,T=E.getPlaybackController(),b=T.getCurrentLiveLatency();if(!e.useLoLPABR()||r===l.Z.AUDIO)return n;b||(b=0);var A=T.getPlaybackRate(),v=i.getThroughputHistory().getSafeAverageThroughput(r,y);if(t.debug("Throughput ".concat(Math.round(v)," kbps")),isNaN(v)||!p)return n;if(i.getAbandonmentStateFor(o.id,r)===u.Z.ABANDON_LOAD)return n;for(var R=m.bitrateList,w=e.getRepresentationInfo().fragmentDuration,S=R[0].bandwidth/1e3,I=R[R.length-1].bandwidth/1e3,N=0;N<R.length;N++){var C=R[N].bandwidth/1e3;C>I?I=C:C<S&&(S=C)}var D=R[g].bandwidth/1e3,M=d.getCurrentHttpRequest(r,!0),O=(M.tresponse.getTime()-M.trequest.getTime())/1e3,L=O>w?O-w:0;f.setupPerSegmentQoe(w,I,S),f.logSegmentMetrics(D,L,b,A);var P=(0,c.Z)(h).create({targetLatency:1.5,bufferMin:.3,segmentDuration:w,qoeEvaluator:f});return n.quality=a.getNextQuality(m,1e3*v,b,_,A,g,P),n.reason={throughput:v,latency:b},n.priority=s.Z.PRIORITY.STRONG,E.setTimeToLoadDelay(0),n.quality!==g&&t.debug("[TgcLearningRule]["+r+"] requesting switch to index: ",n.quality,"Average throughput",Math.round(v),"kbps"),n}catch(e){throw e}},reset:function(){a.reset(),f.reset()}},t=(0,r.Z)(h).getInstance().getLogger(n),a=(0,i.Z)(h).create(),f=(0,o.Z)(h).create(),n}f.__dashjs_factory_name="LoLPRule",t.Z=a.Z.getClassFactory(f)},6523:function(e,t,n){"use strict";var r=n(5448);function a(e){var t,n,r,a,i=e.targetLatency,o=e.bufferMin,s=e.segmentDuration,u=e.qoeEvaluator;function c(){return s}function l(e,t){var n=c();return t>n?e-n:e+n-t}return t={getMinBuffer:function(){return o},getSegmentDuration:c,getNextBufferWithBitrate:function(e,t,n){return l(t,e*s/n)},getNextBuffer:l,findWeightVector:function(e,t,a,c,f,d){var h=null,g=null,m=null,p=Math.abs(t-r);return e.forEach((function(e){n.forEach((function(n){n[0];var r=n[1],c=n[2],E=(n[3],e.bitrate*s/f),_=l(a,E),y=(0===c?10:1/c)*Math.max(1e-5,E-_),T=(0===r?10:1/r)*e.state.latency,b=u.calculateSingleUseQoe(e.bitrate,y,T,d);(null===h||b>h)&&function(e,t,n){return!(e>i+n)&&t>=o}(t,_,p)&&(h=b,g=n,m=e.bitrate)}))})),null===g&&null===m&&(g=-1),r=t,g}},4,n=function e(t,n,r){if(r===n)return t;for(var i=t.length,o=0;o<i;o++)for(var s=t.shift(),u=0;u<a.length;u++)t.push(s.concat(a[u]));return e(t,n,r+1)}((a=[.2,.4,.6,.8,1]).map((function(e){return[e]})),4,1),r=0,t}a.__dashjs_factory_name="LoLpWeightSelector",t.Z=r.Z.getClassFactory(a)},2298:function(e,t){"use strict";t.Z=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0}},2295:function(e,t,n){"use strict";var r=n(5448),a=n(3106);function i(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return(0,a.SE)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,a.SE)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}i.__dashjs_factory_name="CustomTimeRanges",t.Z=r.Z.getClassFactory(i)},3106:function(e,t,n){"use strict";n.d(t,{PS:function(){return i},SE:function(){return o}});var r=n(3393);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function i(e,t){if(a(e)!==t)throw r.Z.BAD_ARGUMENT_ERROR}function o(e){if(null===e||isNaN(e)||e%1!=0)throw r.Z.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},7855:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var r=function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null};r.GET="GET",r.HEAD="HEAD",r.MPD_TYPE="MPD",r.XLINK_EXPANSION_TYPE="XLinkExpansion",r.INIT_SEGMENT_TYPE="InitializationSegment",r.INDEX_SEGMENT_TYPE="IndexSegment",r.MEDIA_SEGMENT_TYPE="MediaSegment",r.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",r.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",r.DVB_REPORTING_TYPE="DVBReporting",r.LICENSE="license",r.CONTENT_STEERING_TYPE="ContentSteering",r.OTHER_TYPE="other"},3875:function(e){"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",a=0,i=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===o);else if(i!==s-1&&2===o){if(r.length<2||2!==a||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",a=0):a=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),i=s,o=0;continue}}else if(2===r.length||1===r.length){r="",a=0,i=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",a=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),a=s-i-1;i=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",a=!1,i=arguments.length-1;i>=-1&&!a;i--){var o;i>=0?o=arguments[i]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,a=47===o.charCodeAt(0))}return r=n(r,!a),a?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&a&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var a=arguments[n];t(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var i=e.length,o=i-a,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var u=n.length-s,c=o<u?o:u,l=-1,f=0;f<=c;++f){if(f===c){if(u>c){if(47===n.charCodeAt(s+f))return n.slice(s+f+1);if(0===f)return n.slice(s+f)}else o>c&&(47===e.charCodeAt(a+f)?l=f:0===f&&(l=0));break}var d=e.charCodeAt(a+f);if(d!==n.charCodeAt(s+f))break;47===d&&(l=f)}var h="";for(f=a+l+1;f<=i;++f)f!==i&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(s+l):(s+=l,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,a=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!i){a=o;break}}else i=!1;return-1===a?r?"/":".":r&&1===a?"//":e.slice(0,a)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,a=0,i=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!o){a=r+1;break}}else-1===u&&(o=!1,u=r+1),s>=0&&(c===n.charCodeAt(s)?-1==--s&&(i=r):(s=-1,i=u))}return a===i?i=u:-1===i&&(i=e.length),e.slice(a,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){a=r+1;break}}else-1===i&&(o=!1,i=r+1);return-1===i?"":e.slice(a,i)},extname:function(e){t(e);for(var n=-1,r=0,a=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===a&&(i=!1,a=s+1),46===u?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!i){r=s+1;break}}return-1===n||-1===a||0===o||1===o&&n===a-1&&n===r+1?"":e.slice(n,a)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,a=e.charCodeAt(0),i=47===a;i?(n.root="/",r=1):r=0;for(var o=-1,s=0,u=-1,c=!0,l=e.length-1,f=0;l>=r;--l)if(47!==(a=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===a?-1===o?o=l:1!==f&&(f=1):-1!==o&&(f=-1);else if(!c){s=l+1;break}return-1===o||-1===u||0===f||1===f&&o===u-1&&o===s+1?-1!==u&&(n.base=n.name=0===s&&i?e.slice(1,u):e.slice(s,u)):(0===s&&i?(n.name=e.slice(1,o),n.base=e.slice(1,u)):(n.name=e.slice(s,o),n.base=e.slice(s,u)),n.ext=e.slice(o,u)),s>0?n.dir=e.slice(0,s-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},1067:function(e,t,n){var r;!function(a,i){"use strict";var o="function",s="undefined",u="object",c="string",l="major",f="model",d="name",h="type",g="vendor",m="version",p="architecture",E="console",_="mobile",y="tablet",T="smarttv",b="wearable",A="embedded",v="Amazon",R="Apple",w="ASUS",S="BlackBerry",I="Browser",N="Chrome",C="Firefox",D="Google",M="Huawei",O="LG",L="Microsoft",P="Motorola",B="Opera",F="Samsung",x="Sharp",k="Sony",U="Xiaomi",G="Zebra",Z="Facebook",H="Chromium OS",j="Mac OS",Y=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},q=function(e,t){return typeof e===c&&-1!==V(t).indexOf(V(e))},V=function(e){return e.toLowerCase()},K=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},Q=function(e,t){for(var n,r,a,s,c,l,f=0;f<t.length&&!c;){var d=t[f],h=t[f+1];for(n=r=0;n<d.length&&!c&&d[n];)if(c=d[n++].exec(e))for(a=0;a<h.length;a++)l=c[++r],typeof(s=h[a])===u&&s.length>0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):i:this[s[0]]=l?s[1].call(this,l,s[2]):i:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):i):this[s]=l||i;f+=2}},W=function(e,t){for(var n in t)if(typeof t[n]===u&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(q(t[n][r],e))return"?"===n?i:n}else if(q(t[n],e))return"?"===n?i:n;return e},z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,m],[/opios[\/ ]+([\w\.]+)/i],[m,[d,B+" Mini"]],[/\bopr\/([\w\.]+)/i],[m,[d,B]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[d,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,m],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[d,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[d,"Smart Lenovo "+I]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+I],m],[/\bfocus\/([\w\.]+)/i],[m,[d,C+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[d,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[d,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[d,"MIUI "+I]],[/fxios\/([-\w\.]+)/i],[m,[d,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+I]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+I],m],[/samsungbrowser\/([\w\.]+)/i],[m,[d,F+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],m],[/metasr[\/ ]?([\d\.]+)/i],[m,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[d,m],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,Z],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[d,N+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,N+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[d,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[m,W,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[d,C+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[d,m],[/(cobalt)\/([\w\.]+)/i],[d,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,V]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,V]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[f,[g,F],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[f,[g,F],[h,_]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[f,[g,R],[h,_]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[f,[g,R],[h,y]],[/(macintosh);/i],[f,[g,R]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[f,[g,x],[h,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[f,[g,M],[h,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[f,[g,M],[h,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[f,/_/g," "],[g,U],[h,_]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[f,/_/g," "],[g,U],[h,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[f,[g,"OPPO"],[h,_]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[f,[g,"Vivo"],[h,_]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[f,[g,"Realme"],[h,_]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[f,[g,P],[h,_]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[f,[g,P],[h,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[f,[g,O],[h,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[f,[g,O],[h,_]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[f,[g,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[f,/_/g," "],[g,"Nokia"],[h,_]],[/(pixel c)\b/i],[f,[g,D],[h,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[f,[g,D],[h,_]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[f,[g,k],[h,_]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[f,"Xperia Tablet"],[g,k],[h,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[f,[g,"OnePlus"],[h,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[f,[g,v],[h,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[f,/(.+)/g,"Fire Phone $1"],[g,v],[h,_]],[/(playbook);[-\w\),; ]+(rim)/i],[f,g,[h,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[f,[g,S],[h,_]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[f,[g,w],[h,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[f,[g,w],[h,_]],[/(nexus 9)/i],[f,[g,"HTC"],[h,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[f,/_/g," "],[h,_]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[f,[g,"Acer"],[h,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[f,[g,"Meizu"],[h,_]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[f,[g,"Ulefone"],[h,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,f,[h,_]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,f,[h,y]],[/(surface duo)/i],[f,[g,L],[h,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[f,[g,"Fairphone"],[h,_]],[/(u304aa)/i],[f,[g,"AT&T"],[h,_]],[/\bsie-(\w*)/i],[f,[g,"Siemens"],[h,_]],[/\b(rct\w+) b/i],[f,[g,"RCA"],[h,y]],[/\b(venue[\d ]{2,7}) b/i],[f,[g,"Dell"],[h,y]],[/\b(q(?:mv|ta)\w+) b/i],[f,[g,"Verizon"],[h,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[f,[g,"Barnes & Noble"],[h,y]],[/\b(tm\d{3}\w+) b/i],[f,[g,"NuVision"],[h,y]],[/\b(k88) b/i],[f,[g,"ZTE"],[h,y]],[/\b(nx\d{3}j) b/i],[f,[g,"ZTE"],[h,_]],[/\b(gen\d{3}) b.+49h/i],[f,[g,"Swiss"],[h,_]],[/\b(zur\d{3}) b/i],[f,[g,"Swiss"],[h,y]],[/\b((zeki)?tb.*\b) b/i],[f,[g,"Zeki"],[h,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],f,[h,y]],[/\b(ns-?\w{0,9}) b/i],[f,[g,"Insignia"],[h,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[f,[g,"NextBook"],[h,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],f,[h,_]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],f,[h,_]],[/\b(ph-1) /i],[f,[g,"Essential"],[h,_]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[f,[g,"Envizen"],[h,y]],[/\b(trio[-\w\. ]+) b/i],[f,[g,"MachSpeed"],[h,y]],[/\btu_(1491) b/i],[f,[g,"Rotor"],[h,y]],[/(shield[\w ]+) b/i],[f,[g,"Nvidia"],[h,y]],[/(sprint) (\w+)/i],[g,f,[h,_]],[/(kin\.[onetw]{3})/i],[[f,/\./g," "],[g,L],[h,_]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[f,[g,G],[h,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[f,[g,G],[h,_]],[/smart-tv.+(samsung)/i],[g,[h,T]],[/hbbtv.+maple;(\d+)/i],[[f,/^/,"SmartTV"],[g,F],[h,T]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,O],[h,T]],[/(apple) ?tv/i],[g,[f,R+" TV"],[h,T]],[/crkey/i],[[f,N+"cast"],[g,D],[h,T]],[/droid.+aft(\w+)( bui|\))/i],[f,[g,v],[h,T]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[f,[g,x],[h,T]],[/(bravia[\w ]+)( bui|\))/i],[f,[g,k],[h,T]],[/(mitv-\w{5}) bui/i],[f,[g,U],[h,T]],[/Hbbtv.*(technisat) (.*);/i],[g,f,[h,T]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,K],[f,K],[h,T]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,T]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,f,[h,E]],[/droid.+; (shield) bui/i],[f,[g,"Nvidia"],[h,E]],[/(playstation [345portablevi]+)/i],[f,[g,k],[h,E]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[f,[g,L],[h,E]],[/((pebble))app/i],[g,f,[h,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[f,[g,R],[h,b]],[/droid.+; (glass) \d/i],[f,[g,D],[h,b]],[/droid.+; (wt63?0{2,3})\)/i],[f,[g,G],[h,b]],[/(quest( 2| pro)?)/i],[f,[g,Z],[h,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[h,A]],[/(aeobc)\b/i],[f,[g,v],[h,A]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[f,[h,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[f,[h,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,_]],[/(android[-\w\. ]{0,9});.+buil/i],[f,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[m,W,z]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,W,z],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,j],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,m],[/\(bb(10);/i],[m,[d,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[d,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[d,N+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,H],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,m],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,m]]},$=function(e,t){if(typeof e===u&&(t=e,e=i),!(this instanceof $))return new $(e,t).getResult();var n=typeof a!==s&&a.navigator?a.navigator:i,r=e||(n&&n.userAgent?n.userAgent:""),E=n&&n.userAgentData?n.userAgentData:i,T=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(X,t):X,b=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[d]=i,t[m]=i,Q.call(t,r,T.browser),t[l]=typeof(e=t[m])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:i,b&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[d]="Brave"),t},this.getCPU=function(){var e={};return e[p]=i,Q.call(e,r,T.cpu),e},this.getDevice=function(){var e={};return e[g]=i,e[f]=i,e[h]=i,Q.call(e,r,T.device),b&&!e[h]&&E&&E.mobile&&(e[h]=_),b&&"Macintosh"==e[f]&&n&&typeof n.standalone!==s&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[f]="iPad",e[h]=y),e},this.getEngine=function(){var e={};return e[d]=i,e[m]=i,Q.call(e,r,T.engine),e},this.getOS=function(){var e={};return e[d]=i,e[m]=i,Q.call(e,r,T.os),b&&!e[d]&&E&&"Unknown"!=E.platform&&(e[d]=E.platform.replace(/chrome os/i,H).replace(/macos/i,j)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===c&&e.length>500?K(e,500):e,this},this.setUA(r),this};$.VERSION="1.0.37",$.BROWSER=Y([d,m,l]),$.CPU=Y([p]),$.DEVICE=Y([f,g,h,E,_,T,y,b,A]),$.ENGINE=$.OS=Y([d,m]),typeof t!==s?(e.exports&&(t=e.exports=$),t.UAParser=$):n.amdO?(r=function(){return $}.call(t,n,t,e))===i||(e.exports=r):typeof a!==s&&(a.UAParser=$);var J=typeof a!==s&&(a.jQuery||a.Zepto);if(J&&!J.ua){var ee=new $;J.ua=ee.getResult(),J.ua.get=function(){return ee.getUA()},J.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r={};return function(){"use strict";n.d(r,{default:function(){return q}});var e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};e.SSL_CONNECTION_FAILED_PREFIX="SSL",e.DNS_RESOLUTION_FAILED="C00",e.HOST_UNREACHABLE="C01",e.CONNECTION_REFUSED="C02",e.CONNECTION_ERROR="C03",e.CORRUPT_MEDIA_ISOBMFF="M00",e.CORRUPT_MEDIA_OTHER="M01",e.BASE_URL_CHANGED="F00",e.BECAME_REPORTER="S00";var t=e,a=n(1180);function i(e){var n,r,i=(e=e||{}).eventBus,o=e.dashMetrics,s=e.metricsConstants,u=e.events;function c(e){var n=new t;if(r){for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a]);n.mpdurl||(n.mpdurl=r.originalUrl||r.url),n.terror||(n.terror=new Date),o.addDVBErrors(n)}}function l(e){e.error||(r=e.manifest)}function f(e){c({errorcode:t.BASE_URL_CHANGED,servicelocation:e.entry})}function d(){c({errorcode:t.BECAME_REPORTER})}function h(e){var n;e.metric===s.HTTP_REQUEST&&(0===(n=e.value).responsecode||null==n.responsecode||n.responsecode>=400||n.responsecode<100||n.responsecode>=600)&&c({errorcode:n.responsecode||t.CONNECTION_ERROR,url:n.url,terror:n.tresponse,servicelocation:n._serviceLocation})}function g(e){var n;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:n=t.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:n=t.CORRUPT_MEDIA_OTHER;break;default:return}c({errorcode:n})}return n={initialize:function(){i.on(u.MANIFEST_UPDATED,l,n),i.on(u.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,n),i.on(u.METRIC_ADDED,h,n),i.on(u.METRIC_UPDATED,h,n),i.on(u.PLAYBACK_ERROR,g,n),i.on(a.Z.BECAME_REPORTING_PLAYER,d,n)},reset:function(){i.off(u.MANIFEST_UPDATED,l,n),i.off(u.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,n),i.off(u.METRIC_ADDED,h,n),i.off(u.METRIC_UPDATED,h,n),i.off(u.PLAYBACK_ERROR,g,n),i.off(a.Z.BECAME_REPORTING_PLAYER,d,n)}}}i.__dashjs_factory_name="DVBErrorsTranslator";var o=dashjs.FactoryMaker.getSingletonFactory(i),s=n(2295);function u(e){e=e||{};var t,n,r=!1,a=this.context,i=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach((function(e){var t=e.starttime,r=t+e.duration;n.add(t,r)})),r=!!e[0]._useWallClockTime)},reset:function(){n.clear()},isEnabled:function(){var e,t=n.length;if(!t)return!0;e=r?(new Date).getTime()/1e3:i.currentTime;for(var a=0;a<t;a+=1){var o=n.start(a),s=n.end(a);if(o<=e&&e<s)return!0}return!1}},n=(0,s.Z)(a).create(),t}u.__dashjs_factory_name="RangeController";var c=dashjs.FactoryMaker.getClassFactory(u);function l(){return{serialise:function e(t){var n,r,a=[],i=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(null==(r=t[n])&&(r=""),Array.isArray(r)){if(!r.length)continue;i=[],r.forEach((function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);i.push(n?t:e(t))})),r=i.map(encodeURIComponent).join(",")}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));a.push(n+"="+r)}return a.join("&")}}}l.__dashjs_factory_name="MetricSerialiser";var f=dashjs.FactoryMaker.getSingletonFactory(l);function d(){var e,t,n,r=window.crypto||window.msCrypto,a=Uint32Array,i=Math.pow(2,8*a.BYTES_PER_ELEMENT)-1;function o(){r&&(e||(e=new a(10)),r.getRandomValues(e),t=0)}return n={random:function(n,a){var s;return n||(n=0),a||(a=1),r?(t===e.length&&o(),s=e[t]/i,t+=1):s=Math.random(),s*(a-n)+n}},o(),n}d.__dashjs_factory_name="RNG";var h=dashjs.FactoryMaker.getSingletonFactory(d),g=n(5717);function m(e){var t;e=e||{};var n,r,a,i,o,s,u,c=this.context,l=[],d=e.metricsConstants;function m(){i=!1,o=!1,s=null,u=null}return t={report:function(e,t){Array.isArray(t)||(t=[t]),o&&u.isEnabled()&&t.forEach((function(t){var a=n.serialise(t);e!==d.DVB_ERRORS&&(a="metricname=".concat(e,"&").concat(a)),function(e,t,n){var a=new XMLHttpRequest;a.withCredentials=r.getXHRWithCredentialsForType(d.HTTP_REQUEST_DVB_REPORTING_TYPE);var i=function(){var e=l.indexOf(a);-1!==e&&(l.splice(e,1),!(a.status>=200&&a.status<300)&&(n&&n()))};l.push(a);try{a.open("GET",e),a.onloadend=i,a.onerror=i,a.send()}catch(e){a.onerror()}}(a="".concat(s,"?").concat(a),0,(function(){o=!1}))}))},initialize:function(e,t){var n;if(u=t,!(s=e.dvbReportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");i||((n=e.dvbProbability)&&(1e3===n||n/1e3>=a.random())&&(o=!0),i=!0)},reset:function(){m()}},n=f(c).getInstance(),a=h(c).getInstance(),r=(0,g.Z)(c).getInstance(),m(),t}m.__dashjs_factory_name="DVBReporting";var p=dashjs.FactoryMaker.getClassFactory(m);function E(e){e=e||{};var t,n={"urn:dvb:dash:reporting:2014":p},r=this.context,a=e.debug?e.debug.getLogger(t):{},i=e.metricsConstants,o=e.mediaPlayerModel||{};return{create:function(e,t){var s;try{(s=n[e.schemeIdUri](r).create({metricsConstants:i,mediaPlayerModel:o})).initialize(e,t)}catch(t){s=null,a.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(e.schemeIdUri," (").concat(t.message,")"))}return s},register:function(e,t){n[e]=t},unregister:function(e){delete n[e]}}}E.__dashjs_factory_name="ReportingFactory";var _=dashjs.FactoryMaker.getSingletonFactory(E);function y(e){var t=[],n=_(this.context).getInstance(e);return{initialize:function(e,r){e.some((function(e){var a=n.create(e,r);if(a)return t.push(a),!0}))},reset:function(){t.forEach((function(e){return e.reset()})),t=[]},report:function(e,n){t.forEach((function(t){return t.report(e,n)}))}}}y.__dashjs_factory_name="ReportingController";var T=dashjs.FactoryMaker.getClassFactory(y);function b(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}b.__dashjs_factory_name="HandlerHelpers";var A=dashjs.FactoryMaker.getSingletonFactory(b);function v(e){var t,n,r,a,i;e=e||{};var o=this.context,s=A(o).getInstance(),u=[],c=e.metricsConstants;function l(){var e=function(){try{return Object.keys(u).map((function(e){return u[e]})).reduce((function(e,t){return e.level<t.level?e:t}))}catch(e){return}}();e&&i!==e.t&&(i=e.t,t.report(r,e))}return{initialize:function(e,i,o){i&&(n=s.validateN(o),t=i,r=s.reconstructFullMetricName(e,o),a=setInterval(l,n))},reset:function(){clearInterval(a),a=null,n=0,t=null,i=null},handleNewMetric:function(e,t,n){e===c.BUFFER_LEVEL&&(u[n]=t)}}}v.__dashjs_factory_name="BufferLevelHandler";var R=dashjs.FactoryMaker.getClassFactory(v),w=dashjs.FactoryMaker.getClassFactory((function(e){var t,n=(e=e||{}).eventBus,r=e.metricsConstants;function i(){n.off(a.Z.METRICS_INITIALISATION_COMPLETE,i,this),n.trigger(a.Z.BECAME_REPORTING_PLAYER)}return{initialize:function(e,r){r&&(t=r,n.on(a.Z.METRICS_INITIALISATION_COMPLETE,i,this))},reset:function(){t=null},handleNewMetric:function(e,n){e===r.DVB_ERRORS&&t&&t.report(e,n)}}}));function S(e){var t,n,r,a,i;e=e||{};var o=[],s=A(this.context).getInstance(),u=e.metricsConstants;function c(){var e=o;e.length&&t&&t.report(a,e),o=[]}return{initialize:function(e,o,u,l){o&&(n=s.validateN(u),t=o,l&&l.length&&(r=l),a=s.reconstructFullMetricName(e,u,l),i=setInterval(c,n))},reset:function(){clearInterval(i),i=null,n=null,r=null,o=[],t=null},handleNewMetric:function(e,t){e===u.HTTP_REQUEST&&(r&&r!==t.type||o.push(t))}}}S.__dashjs_factory_name="HttpListHandler";var I=dashjs.FactoryMaker.getClassFactory(S);function N(){var e,t;return{initialize:function(n,r){e=n,t=r},reset:function(){t=null,e=void 0},handleNewMetric:function(n,r){n===e&&t&&t.report(e,r)}}}N.__dashjs_factory_name="GenericMetricHandler";var C=dashjs.FactoryMaker.getClassFactory(N);function D(e){var t,n=(e=e||{}).debug?e.debug.getLogger(t):{},r=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,a=this.context,i={BufferLevel:R,DVBErrors:w,HttpList:I,PlayList:C,RepSwitchList:C,TcpList:C};return{create:function(t,o){var s,u=t.match(r);if(u){try{(s=i[u[1]](a).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(u[1],o,u[3],u[5])}catch(e){s=null,n.error("MetricsHandlerFactory: Could not create handler for type ".concat(u[1]," with args ").concat(u[3],", ").concat(u[5]," (").concat(e.message,")"))}return s}},register:function(e,t){i[e]=t},unregister:function(e){delete i[e]}}}D.__dashjs_factory_name="MetricsHandlerFactory";var M=dashjs.FactoryMaker.getSingletonFactory(D);function O(e){e=e||{};var t,n=[],r=this.context,a=e.eventBus,i=e.events,o=M(r).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function s(e){n.forEach((function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)}))}return t={initialize:function(e,r){e.split(",").forEach((function(e,t,a){var i;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){var s=a[t+1];s&&-1===s.indexOf("(")&&-1!==s.indexOf(")")&&(e+=","+s,delete a[t+1])}(i=o.create(e,r))&&n.push(i)})),a.on(i.METRIC_ADDED,s,t),a.on(i.METRIC_UPDATED,s,t)},reset:function(){a.off(i.METRIC_ADDED,s,t),a.off(i.METRIC_UPDATED,s,t),n.forEach((function(e){return e.reset()})),n=[]}}}O.__dashjs_factory_name="MetricsHandlersController";var L=dashjs.FactoryMaker.getClassFactory(O);function P(e){var t,n,r;e=e||{};var a=this.context;function i(){t&&t.reset(),n&&n.reset(),r&&r.reset()}return{initialize:function(o){try{(r=c(a).create({mediaElement:e.mediaElement})).initialize(o.Range),(n=T(a).create({debug:e.debug,metricsConstants:e.metricsConstants,mediaPlayerModel:e.mediaPlayerModel})).initialize(o.Reporting,r),(t=L(a).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events})).initialize(o.metrics,n)}catch(e){throw i(),e}},reset:i}}P.__dashjs_factory_name="MetricsController";var B=dashjs.FactoryMaker.getClassFactory(P),F=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]},x=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1},k=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3};function U(e){var t=(e=e||{}).adapter,n=e.constants;return{getMetrics:function(e){var r=[];return e&&e.Metrics_asArray&&e.Metrics_asArray.forEach((function(a){var i=new F,o=t.getIsDynamic(e);a.hasOwnProperty("metrics")&&(i.metrics=a.metrics,a.Range_asArray&&a.Range_asArray.forEach((function(r){var a=new x;a.starttime=function(e,r,a){var i,o,s=0;return r?s=t.getAvailabilityStartTime(e)/1e3:(i=t.getRegularPeriods(e)).length&&(s=i[0].start),o=s,a&&a.hasOwnProperty(n.START_TIME)&&(o+=a.starttime),o}(e,o,r),r.hasOwnProperty("duration")?a.duration=r.duration:a.duration=t.getDuration(e),a._useWallClockTime=o,i.Range.push(a)})),a.Reporting_asArray&&(a.Reporting_asArray.forEach((function(e){var t=new k;e.hasOwnProperty(n.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value),e.hasOwnProperty(n.DVB_REPORTING_URL)&&(t.dvbReportingUrl=e[n.DVB_REPORTING_URL]),e.hasOwnProperty(n.DVB_PROBABILITY)&&(t.dvbProbability=e[n.DVB_PROBABILITY]),i.Reporting.push(t))})),r.push(i)))})),r}}}U.__dashjs_factory_name="ManifestParsing";var G=dashjs.FactoryMaker.getSingletonFactory(U);function Z(e){var t;e=e||{};var n={},r=this.context,i=e.eventBus,o=e.events;function s(t){if(!t.error){var o=Object.keys(n);G(r).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(t.manifest).forEach((function(t){var a=JSON.stringify(t);if(n.hasOwnProperty(a))o.splice(a,1);else try{var i=B(r).create(e);i.initialize(t),n[a]=i}catch(e){}})),o.forEach((function(e){n[e].reset(),delete n[e]})),i.trigger(a.Z.METRICS_INITIALISATION_COMPLETE)}}function u(){Object.keys(n).forEach((function(e){n[e].reset()})),n={}}return t={reset:function(){i.off(o.MANIFEST_UPDATED,s,t),i.off(o.STREAM_TEARDOWN_COMPLETE,u,t)}},i.on(o.MANIFEST_UPDATED,s,t),i.on(o.STREAM_TEARDOWN_COMPLETE,u,t),t}Z.__dashjs_factory_name="MetricsCollectionController";var H=dashjs.FactoryMaker.getClassFactory(Z);function j(){var e=this.context;return{createMetricsReporting:function(t){return o(e).getInstance({eventBus:t.eventBus,dashMetrics:t.dashMetrics,metricsConstants:t.metricsConstants,events:t.events}).initialize(),H(e).create(t)},getReportingFactory:function(){return _(e).getInstance()},getMetricsHandlerFactory:function(){return M(e).getInstance()}}}j.__dashjs_factory_name="MetricsReporting";var Y=dashjs.FactoryMaker.getClassFactory(j);Y.events=a.Z,dashjs.FactoryMaker.updateClassFactory(j.__dashjs_factory_name,Y);var q=Y}(),r.default}()}));
//# sourceMappingURL=dash.reporting.min.js.map