/*! For license information please see video.30eb6efad928dcf70871.js.LICENSE.txt */
(self.webpackChunkWebsite=self.webpackChunkWebsite||[]).push([[791],{6316:(e,t,n)=>{"use strict";var i=n(3379),r=n.n(i),s=n(7795),a=n.n(s),o=n(569),l=n.n(o),u=n(3565),c=n.n(u),d=n(9216),h=n.n(d),p=n(4589),f=n.n(p),m=n(6939),g={};g.styleTagTransform=f(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);m.Z&&m.Z.locals&&m.Z.locals;var v=n(8908),y=n.n(v),_=n(9144),b=n.n(_);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},T.apply(this,arguments)}var S=n(7537),k=n.n(S);function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,w(e,t)}var x=n(5974),j=n.n(x),A=n(9603),I=n.n(A),P=n(3407),L=n.n(P);function O(){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 D(e,t,n){return D=O()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&w(r,n.prototype),r},D.apply(null,arguments)}var M=n(9945),N=n.n(M),R="http://example.com";const U=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=y().location&&y().location.href||"");var n="function"==typeof y().URL,i=/^\/\//.test(e),r=!y().location&&!/\/\//i.test(e);if(n?e=new(y().URL)(e,y().location||R):/\/\//i.test(e)||(e=N().buildAbsoluteURL(y().location&&y().location.href||"",e)),n){var s=new URL(t,e);return r?s.href.slice(R.length):i?s.href.slice(s.protocol.length):s.href}return N().buildAbsoluteURL(e,t)};var B=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();function F(e){for(var t,n=(t=e,y().atob?y().atob(t):Buffer.from(t,"base64").toString("binary")),i=new Uint8Array(n.length),r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}var H,V,q,z=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return C(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(B),W=String.fromCharCode(9),G=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},X=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},r=n.length;r--;)""!==n[r]&&((t=/([^=]*)=(.*)/.exec(n[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),i[t[0]]=t[1]);return i},K=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}C(t,e);var n=t.prototype;return n.push=function(e){var t,n,i=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var i=n(e);return i===e?t:t.concat([i])}),[e]).forEach((function(e){for(var r=0;r<i.customParsers.length;r++)if(i.customParsers[r].call(i,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))i.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void i.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void i.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=T(G(t[1]),{type:"tag",tagType:"byterange"}),void i.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var s=X(t[1]);s.URI&&(n.uri=s.URI),s.BYTERANGE&&(n.byterange=G(s.BYTERANGE))}i.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=X(t[1]),n.attributes.RESOLUTION){var a=n.attributes.RESOLUTION.split("x"),o={};a[0]&&(o.width=parseInt(a[0],10)),a[1]&&(o.height=parseInt(a[1],10)),n.attributes.RESOLUTION=o}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}i.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=X(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))i.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))i.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=X(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void i.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=X(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void i.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void i.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void i.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void i.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=X(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(W)),void i.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=X(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=G(n.attributes.BYTERANGE)),void i.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=X(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void i.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=X(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void i.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=X(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void i.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=X(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void i.trigger("data",n);i.trigger("data",{type:"tag",data:e.slice(4)})}}}else i.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,i=e.customType,r=e.dataParser,s=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:i,segment:s}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(B),Y=function(e){var t={};return Object.keys(e).forEach((function(n){var i;t[(i=n,i.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},Q=function(e){var t=e.serverControl,n=e.targetDuration,i=e.partTargetDuration;if(t){var r="#EXT-X-SERVER-CONTROL",s="holdBack",a="partHoldBack",o=n&&3*n,l=i&&2*i;n&&!t.hasOwnProperty(s)&&(t[s]=o,this.trigger("info",{message:r+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[s]<o&&(this.trigger("warn",{message:r+" clamping HOLD-BACK ("+t[s]+") to targetDuration * 3 ("+o+")"}),t[s]=o),i&&!t.hasOwnProperty(a)&&(t[a]=3*i,this.trigger("info",{message:r+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[a]+")."})),i&&t[a]<l&&(this.trigger("warn",{message:r+" clamping PART-HOLD-BACK ("+t[a]+") to partTargetDuration * 2 ("+l+")."}),t[a]=l)}},J=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new z,t.parseStream=new K,t.lineStream.pipe(t.parseStream);var n,i,r=E(t),s=[],a={},o=!1,l=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var d=0,h=0;return t.on("end",(function(){a.uri||!a.parts&&!a.preloadHints||(!a.map&&n&&(a.map=n),!a.key&&i&&(a.key=i),a.timeline||"number"!=typeof c||(a.timeline=c),t.manifest.preloadSegment=a)})),t.parseStream.on("data",(function(e){var t,p;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(e.offset=d)),"offset"in e&&(a.byterange=t,t.offset=e.offset),d=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=s},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:F(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),i={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(i.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else i=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),i&&(n.key=i)},"stream-inf":function(){this.manifest.playlists=s,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(a.attributes||(a.attributes={}),T(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(p={default:/yes/i.test(e.attributes.DEFAULT)}).default?p.autoselect=!0:p.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(p.language=e.attributes.LANGUAGE),e.attributes.URI&&(p.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(p.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(p.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(p.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=p}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(s.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,Q.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data},skip:function(){this.manifest.skip=Y(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;o=!0;var n=this.manifest.segments.length,i=Y(e.attributes);a.parts=a.parts||[],a.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=h),h=i.byterange.offset+i.byterange.length);var r=a.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+r+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=Y(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Q.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=Y(e.attributes),i=n.type&&"PART"===n.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=i?h:0,i&&(h=n.byterange.offset+n.byterange.length)));var r=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var s=0;s<a.preloadHints.length-1;s++){var o=a.preloadHints[s];o.type&&(o.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+s}))}},"rendition-report":function(){var t=Y(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];o&&i.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,i)},"part-inf":function(){this.manifest.partInf=Y(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Q.call(this,this.manifest)}}[e.tagType]||l).call(r)},uri:function(){a.uri=e.uri,s.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),i&&(a.key=i),a.timeline=c,n&&(a.map=n),h=0,a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)})),t}C(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var i=[];n.forEach((function(e){t.hasOwnProperty(e)||i.push(e)})),i.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+i.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(B),Z={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},$=["video","audio","text"],ee=["Video","Audio","Text"],te=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},ne=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),$.forEach((function(i){var r=Z[i].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=i;var s=e.substring(0,r[1].length),a=e.replace(s,"");n.push({type:s,details:a,mediaType:i})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},ie=function(e){return void 0===e&&(e=""),Z.audio.test(e.trim().toLowerCase())},re=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return te(e.trim())})),i="video";1===n.length&&ie(n[0])?i="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),Z.text.test(t.trim().toLowerCase()))&&(i="application");var r="mp4";return n.every((function(e){return Z.mp4.test(e)}))?r="mp4":n.every((function(e){return Z.webm.test(e)}))?r="webm":n.every((function(e){return Z.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},se=function(e){return void 0===e&&(e=""),y().MediaSource&&y().MediaSource.isTypeSupported&&y().MediaSource.isTypeSupported(re(e))||!1},ae=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<ee.length;t++){if(Z["muxer"+ee[t]].test(e))return!0}return!1}))},oe="mp4a.40.2",le=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,ue=/^application\/dash\+xml/i,ce=function(e){return le.test(e)?"hls":ue.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},de=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},he=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||de(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},pe=y().BigInt||Number,fe=[pe("0x1"),pe("0x100"),pe("0x10000"),pe("0x1000000"),pe("0x100000000"),pe("0x10000000000"),pe("0x1000000000000"),pe("0x100000000000000"),pe("0x10000000000000000")],me=(H=new Uint16Array([65484]),255===(V=new Uint8Array(H.buffer,H.byteOffset,H.byteLength))[0]||V[0],function(e,t){var n=void 0===t?{}:t,i=n.signed,r=void 0!==i&&i,s=n.le,a=void 0!==s&&s;e=he(e);var o=a?"reduce":"reduceRight",l=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,n,i){var r=a?i:Math.abs(i+1-e.length);return t+pe(n)*fe[r]}),pe(0));if(r){var u=fe[e.length]/pe(2)-pe(1);(l=pe(l))>u&&(l-=u,l-=u,l-=pe(2))}return Number(l)}),ge=function(e,t){var n=(void 0===t?{}:t).le,i=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=pe(e);for(var r,s=(r=e,Math.ceil(function(e){return e.toString(2).length}(r)/8)),a=new Uint8Array(new ArrayBuffer(s)),o=0;o<s;o++){var l=i?o:Math.abs(o+1-a.length);a[l]=Number(e/fe[o]&pe(255)),e<0&&(a[l]=Math.abs(~a[l]),a[l]-=0===o?1:2)}return a},ve=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n},ye=function(e,t,n){var i=void 0===n?{}:n,r=i.offset,s=void 0===r?0:r,a=i.mask,o=void 0===a?[]:a;e=he(e);var l=(t=he(t)).every?t.every:Array.prototype.every;return t.length&&e.length-s>=t.length&&l.call(t,(function(t,n){return t===(o[n]?o[n]&e[s+n]:e[s+n])}))},_e=n(3969),be=function(e){return!!e&&"object"==typeof e},Te=function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(i){Array.isArray(t[i])&&Array.isArray(n[i])?t[i]=t[i].concat(n[i]):be(t[i])&&be(n[i])?t[i]=e(t[i],n[i]):t[i]=n[i]})),t}),{})},Se=function(e){return Object.keys(e).map((function(t){return e[t]}))},ke=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},Ee=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},we=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},Ce="INVALID_NUMBER_OF_PERIOD",xe="DASH_EMPTY_MANIFEST",je="DASH_INVALID_XML",Ae="NO_BASE_URL",Ie="SEGMENT_TIME_UNSPECIFIED",Pe="UNSUPPORTED_UTC_TIMING_SCHEME",Le=function(e){var t=e.baseUrl,n=void 0===t?"":t,i=e.source,r=void 0===i?"":i,s=e.range,a=void 0===s?"":s,o=e.indexRange,l=void 0===o?"":o,u={uri:r,resolvedUri:U(n||"",r)};if(a||l){var c,d=(a||l).split("-"),h=y().BigInt?y().BigInt(d[0]):parseInt(d[0],10),p=y().BigInt?y().BigInt(d[1]):parseInt(d[1],10);h<Number.MAX_SAFE_INTEGER&&"bigint"==typeof h&&(h=Number(h)),p<Number.MAX_SAFE_INTEGER&&"bigint"==typeof p&&(p=Number(p)),"bigint"==typeof(c="bigint"==typeof p||"bigint"==typeof h?y().BigInt(p)-y().BigInt(h)+y().BigInt(1):p-h+1)&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),u.byterange={length:c,offset:h}}return u},Oe=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},De={static:function(e){var t=e.duration,n=e.timescale,i=void 0===n?1:n,r=e.sourceDuration,s=e.periodDuration,a=Oe(e.endNumber),o=t/i;return"number"==typeof a?{start:0,end:a}:"number"==typeof s?{start:0,end:s/o}:{start:0,end:r/o}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,i=e.availabilityStartTime,r=e.timescale,s=void 0===r?1:r,a=e.duration,o=e.periodStart,l=void 0===o?0:o,u=e.minimumUpdatePeriod,c=void 0===u?0:u,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=Oe(e.endNumber),f=(t+n)/1e3,m=i+l,g=f+c-m,v=Math.ceil(g*s/a),y=Math.floor((f-m-h)*s/a),_=Math.floor((f-m)*s/a);return{start:Math.max(0,y),end:"number"==typeof p?p:Math.min(v,_)}}},Me=function(e){var t=e.type,n=e.duration,i=e.timescale,r=void 0===i?1:i,s=e.periodDuration,a=e.sourceDuration,o=De[t](e),l=function(e,t){for(var n=[],i=e;i<t;i++)n.push(i);return n}(o.start,o.end).map(function(e){return function(t){var n=e.duration,i=e.timescale,r=void 0===i?1:i,s=e.periodStart,a=e.startNumber;return{number:(void 0===a?1:a)+t,duration:n/r,timeline:s,time:t*n}}}(e));if("static"===t){var u=l.length-1,c="number"==typeof s?s:a;l[u].duration=c-n/r*u}return l},Ne=function(e){var t=e.baseUrl,n=e.initialization,i=void 0===n?{}:n,r=e.sourceDuration,s=e.indexRange,a=void 0===s?"":s,o=e.periodStart,l=e.presentationTime,u=e.number,c=void 0===u?0:u,d=e.duration;if(!t)throw new Error(Ae);var h=Le({baseUrl:t,source:i.sourceURL,range:i.range}),p=Le({baseUrl:t,source:t,indexRange:a});if(p.map=h,d){var f=Me(e);f.length&&(p.duration=f[0].duration,p.timeline=f[0].timeline)}else r&&(p.duration=r,p.timeline=o);return p.presentationTime=l||o,p.number=c,[p]},Re=function(e,t,n){var i,r=e.sidx.map?e.sidx.map:null,s=e.sidx.duration,a=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,u=t.timescale,c=t.references.filter((function(e){return 1!==e.referenceType})),d=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline,f=p,m=e.mediaSequence||0;i="bigint"==typeof t.firstOffset?y().BigInt(l)+t.firstOffset:l+t.firstOffset;for(var g=0;g<c.length;g++){var v=t.references[g],_=v.referencedSize,b=v.subsegmentDuration,T=void 0;T="bigint"==typeof i?i+y().BigInt(_)-y().BigInt(1):i+_-1;var S=Ne({baseUrl:n,timescale:u,timeline:a,periodStart:p,presentationTime:f,number:m,duration:b,sourceDuration:s,indexRange:i+"-"+T,type:h})[0];r&&(S.map=r),d.push(S),i+="bigint"==typeof i?y().BigInt(_):_,f+=b/u,m++}return e.segments=d,e},Ue=["AUDIO","SUBTITLES"],Be=function(e){return(t=e,n=function(e){return e.timeline},Se(t.reduce((function(e,t){return t.forEach((function(t){e[n(t)]=t})),e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}));var t,n},Fe=function(e){var t,n,i=[];return t=e,n=function(e,t,n,r){i=i.concat(e.playlists||[])},Ue.forEach((function(e){for(var i in t.mediaGroups[e])for(var r in t.mediaGroups[e][i]){var s=t.mediaGroups[e][i][r];n(s,e,i,r)}})),i},He=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},Ve=function(e){var t=e.oldManifest,n=e.newManifest,i=t.playlists.concat(Fe(t)),r=n.playlists.concat(Fe(n));return n.timelineStarts=Be([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,i=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=we(i,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var r=e.segments[0],s=we(n.segments,(function(e){return Math.abs(e.presentationTime-r.presentationTime)<.016666666666666666}));if(-1===s)return He({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),He({playlist:e,mediaSequence:n.segments[s].number})}}))}({oldPlaylists:i,newPlaylists:r,timelineStarts:n.timelineStarts}),n},qe=function(e){return e&&e.uri+"-"+(t=e.byterange,n="bigint"==typeof t.offset||"bigint"==typeof t.length?y().BigInt(t.offset)+y().BigInt(t.length)-y().BigInt(1):t.offset+t.length-1,t.offset+"-"+n);var t,n},ze=function(e){return Se(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var i;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce((function(e,t,i){return t[n]&&e.push(i),e}),[])),e}))},We=function(e,t){var n=qe(e.sidx),i=n&&t[n]&&t[n].sidx;return i&&Re(e,i,e.sidx.resolvedUri),e},Ge=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=We(e[n],t);return e},Xe=function(e){var t,n=e.attributes,i=e.segments,r=e.sidx,s=e.discontinuityStarts,a={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:s,timelineStarts:n.timelineStarts,segments:i};return n.contentProtection&&(a.contentProtection=n.contentProtection),r&&(a.sidx=r),a},Ke=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},Ye=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},Qe=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},Je=function(e){return e?Object.keys(e).reduce((function(t,n){var i=e[n];return t.concat(i.playlists)}),[]):[]},Ze=function(e){var t,n=e.dashPlaylists,i=e.locations,r=e.sidxMapping,s=void 0===r?{}:r,a=e.previousManifest;if(!n.length)return{};var o=n[0].attributes,l=o.sourceDuration,u=o.type,c=o.suggestedPresentationDelay,d=o.minimumUpdatePeriod,h=ze(n.filter(Ke)).map(Xe),p=ze(n.filter(Ye)),f=ze(n.filter(Qe)),m=n.map((function(e){return e.attributes.captionServices})).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:l,playlists:Ge(h,s)};d>=0&&(g.minimumUpdatePeriod=1e3*d),i&&(g.locations=i),"dynamic"===u&&(g.suggestedPresentationDelay=c);var v,y,_=0===g.playlists.length,b=p.length?function(e,t,n){var i;void 0===t&&(t={}),void 0===n&&(n=!1);var r=e.reduce((function(e,r){var s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"",o=r.attributes.label||"main";if(a&&!r.attributes.label){var l=s?" ("+s+")":"";o=""+r.attributes.lang+l}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});var u=We(function(e,t){var n,i=e.attributes,r=e.segments,s=e.sidx,a=e.mediaSequence,o=e.discontinuitySequence,l=e.discontinuityStarts,u={attributes:(n={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuitySequence:o,discontinuityStarts:l,timelineStarts:i.timelineStarts,mediaSequence:a,segments:r};return i.contentProtection&&(u.contentProtection=i.contentProtection),s&&(u.sidx=s),t&&(u.attributes.AUDIO="audio",u.attributes.SUBTITLES="subs"),u}(r,n),t);return e[o].playlists.push(u),void 0===i&&"main"===s&&((i=r).default=!0),e}),{});return i||(r[Object.keys(r)[0]].default=!0),r}(p,s,_):null,T=f.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var i=n.attributes.lang||"text";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(We(function(e){var t,n=e.attributes,i=e.segments,r=e.mediaSequence,s=e.discontinuityStarts,a=e.discontinuitySequence;void 0===i&&(i=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var o=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(o.CODECS=n.codecs),{attributes:o,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:s,discontinuitySequence:a,mediaSequence:r,segments:i}}(n),t)),e}),{})}(f,s):null,S=h.concat(Je(b),Je(T)),k=S.map((function(e){return e.timelineStarts}));return g.timelineStarts=Be(k),v=S,y=g.timelineStarts,v.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=we(y,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),b&&(g.mediaGroups.AUDIO.audio=b),T&&(g.mediaGroups.SUBTITLES.subs=T),m.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=m.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,i=t.language;e[i]={autoselect:!1,default:!1,instreamId:n,language:i},t.hasOwnProperty("aspectRatio")&&(e[i].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[i].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[i]["3D"]=t["3D"])})),e):e}),{})),a?Ve({oldManifest:a,newManifest:g}):g},$e=function(e,t,n){var i=e.NOW,r=e.clientOffset,s=e.availabilityStartTime,a=e.timescale,o=void 0===a?1:a,l=e.periodStart,u=void 0===l?0:l,c=e.minimumUpdatePeriod,d=(i+r)/1e3+(void 0===c?0:c)-(s+u);return Math.ceil((d*o-t)/n)},et=function(e,t){for(var n=e.type,i=e.minimumUpdatePeriod,r=void 0===i?0:i,s=e.media,a=void 0===s?"":s,o=e.sourceDuration,l=e.timescale,u=void 0===l?1:l,c=e.startNumber,d=void 0===c?1:c,h=e.periodStart,p=[],f=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,y=g.r||0,_=g.t||0;f<0&&(f=_),_&&_>f&&(f=_);var b=void 0;if(y<0){var T=m+1;b=T===t.length?"dynamic"===n&&r>0&&a.indexOf("$Number$")>0?$e(e,f,v):(o*u-f)/v:(t[T].t-f)/v}else b=y+1;for(var S=d+p.length+b,k=d+p.length;k<S;)p.push({number:k,duration:v/u,time:f,timeline:h}),f+=v,k++}return p},tt=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,nt=function(e,t){return e.replace(tt,function(e){return function(t,n,i,r){if("$$"===t)return"$";if(void 0===e[n])return t;var s=""+e[n];return"RepresentationID"===n?s:(r=i?parseInt(r,10):1,s.length>=r?s:""+new Array(r-s.length+1).join("0")+s)}}(t))},it=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,r=void 0===i?{sourceURL:"",range:""}:i,s=Le({baseUrl:e.baseUrl,source:nt(r.sourceURL,n),range:r.range}),a=function(e,t){return e.duration||t?e.duration?Me(e):et(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return a.map((function(t){n.Number=t.number,n.Time=t.time;var i=nt(e.media||"",n),r=e.timescale||1,a=e.presentationTimeOffset||0,o=e.periodStart+(t.time-a)/r;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:U(e.baseUrl||"",i),map:s,number:t.number,presentationTime:o}}))},rt=function(e,t){var n=e.duration,i=e.segmentUrls,r=void 0===i?[]:i,s=e.periodStart;if(!n&&!t||n&&t)throw new Error(Ie);var a,o=r.map((function(t){return function(e,t){var n=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,s=Le({baseUrl:n,source:r.sourceURL,range:r.range}),a=Le({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=s,a}(e,t)}));return n&&(a=Me(e)),t&&(a=et(e,t)),a.map((function(t,n){if(o[n]){var i=o[n],r=e.timescale||1,a=e.presentationTimeOffset||0;return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i.presentationTime=s+(t.time-a)/r,i}})).filter((function(e){return e}))},st=function(e){var t,n,i=e.attributes,r=e.segmentInfo;r.template?(n=it,t=Te(i,r.template)):r.base?(n=Ne,t=Te(i,r.base)):r.list&&(n=rt,t=Te(i,r.list));var s={attributes:i};if(!n)return s;var a=n(t,r.segmentTimeline);if(t.duration){var o=t,l=o.duration,u=o.timescale,c=void 0===u?1:u;t.duration=l/c}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return s.attributes=t,s.segments=a,r.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},at=function(e,t){return Ee(e.childNodes).filter((function(e){return e.tagName===t}))},ot=function(e){return e.textContent.trim()},lt=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),i=n[0],r=n[1],s=n[2],a=n[3],o=n[4],l=n[5];return 31536e3*parseFloat(i||0)+2592e3*parseFloat(r||0)+86400*parseFloat(s||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(l||0)},ut={mediaPresentationDuration:function(e){return lt(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return lt(e)},suggestedPresentationDelay:function(e){return lt(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return lt(e)},start:function(e){return lt(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?lt(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},ct=function(e){return e&&e.attributes?Ee(e.attributes).reduce((function(e,t){var n=ut[t.name]||ut.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},dt={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ht=function(e,t){return t.length?ke(e.map((function(e){return t.map((function(t){return U(e,ot(t))}))}))):e},pt=function(e){var t=at(e,"SegmentTemplate")[0],n=at(e,"SegmentList")[0],i=n&&at(n,"SegmentURL").map((function(e){return Te({tag:"SegmentURL"},ct(e))})),r=at(e,"SegmentBase")[0],s=n||t,a=s&&at(s,"SegmentTimeline")[0],o=n||r||t,l=o&&at(o,"Initialization")[0],u=t&&ct(t);u&&l?u.initialization=l&&ct(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});var c={template:u,segmentTimeline:a&&at(a,"S").map((function(e){return ct(e)})),list:n&&Te(ct(n),{segmentUrls:i,initialization:ct(l)}),base:r&&Te(ct(r),{initialization:ct(l)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},ft=function(e,t,n){return function(i){var r,s=ct(i),a=ht(t,at(i,"BaseURL")),o=at(i,"Role")[0],l={role:ct(o)},u=Te(e,s,l),c=at(i,"Accessibility")[0],d="urn:scte:dash:cc:cea-608:2015"===(r=ct(c)).schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var i=e.split("=");t=i[0],n=i[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===r.schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),i=n[0],r=n[1],s=void 0===r?"":r;t.channel=i,t.language=e,s.split(",").forEach((function(e){var n=e.split(":"),i=n[0],r=n[1];"lang"===i?t.language=r:"er"===i?t.easyReader=Number(r):"war"===i?t.aspectRatio=Number(r):"3D"===i&&(t["3D"]=Number(r))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;d&&(u=Te(u,{captionServices:d}));var h=at(i,"Label")[0];if(h&&h.childNodes.length){var p=h.childNodes[0].nodeValue.trim();u=Te(u,{label:p})}var f=at(i,"ContentProtection").reduce((function(e,t){var n=ct(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var i=dt[n.schemeIdUri];if(i){e[i]={attributes:n};var r=at(t,"cenc:pssh")[0];if(r){var s=ot(r);e[i].pssh=s&&F(s)}}return e}),{});Object.keys(f).length&&(u=Te(u,{contentProtection:f}));var m=pt(i),g=at(i,"Representation"),v=Te(n,m);return ke(g.map(function(e,t,n){return function(i){var r=at(i,"BaseURL"),s=ht(t,r),a=Te(e,ct(i)),o=pt(i);return s.map((function(e){return{segmentInfo:Te(n,o),attributes:Te(a,{baseUrl:e})}}))}}(u,a,v)))}},mt=function(e,t){return function(n,i){var r=ht(t,at(n.node,"BaseURL")),s=Te(e,{periodStart:n.attributes.start});"number"==typeof n.attributes.duration&&(s.periodDuration=n.attributes.duration);var a=at(n.node,"AdaptationSet"),o=pt(n.node);return ke(a.map(ft(s,r,o)))}},gt=function(e){if(""===e)throw new Error(xe);var t,n,i=new _e.DOMParser;try{n=(t=i.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(je);return n},vt=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,i=n.manifestUri,r=void 0===i?"":i,s=n.NOW,a=void 0===s?Date.now():s,o=n.clientOffset,l=void 0===o?0:o,u=at(e,"Period");if(!u.length)throw new Error(Ce);var c=at(e,"Location"),d=ct(e),h=ht([r],at(e,"BaseURL"));d.type=d.type||"static",d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=a,d.clientOffset=l,c.length&&(d.locations=c.map(ot));var p=[];return u.forEach((function(e,t){var n=ct(e),i=p[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,i=e.mpdType;return"number"==typeof t.start?t.start:n&&"number"==typeof n.start&&"number"==typeof n.duration?n.start+n.duration:n||"static"!==i?null:0}({attributes:n,priorPeriodAttributes:i?i.attributes:null,mpdType:d.type}),p.push({node:e,attributes:n})})),{locations:d.locations,representationInfo:ke(p.map(mt(d,h)))}}(gt(e),t),i=n.representationInfo.map(st);return Ze({dashPlaylists:i,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},yt=function(e){return function(e){var t=at(e,"UTCTiming")[0];if(!t)return null;var n=ct(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;default:throw new Error(Pe)}return n}(gt(e))},_t=n(4221),bt=n.n(_t),Tt=he([73,68,51]),St=function e(t,n){return void 0===n&&(n=0),(t=he(t)).length-n<10||!ye(t,Tt,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=he(e))[t+5],i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?i+20:i+10}(t,n),e(t,n))},kt=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?ve(e):e}),Et=function(e){e=he(e);for(var t=[],n=0;e.length>n;){var i=e[n],r=0,s=0,a=e[++s];for(s++;128&a;)r=(127&a)<<7,a=e[s],s++;r+=127&a;for(var o=0;o<q.length;o++){var l=q[o],u=l.id,c=l.parser;if(i===u){t.push(c(e.subarray(s,s+r)));break}}n+=r+s}return t};q=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,he(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=Et(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:Et(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var wt=function e(t,n,i){void 0===i&&(i=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return kt(e)})):[kt(e)]}(n),t=he(t);var r=[];if(!n.length)return r;for(var s=0;s<t.length;){var a=(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3])>>>0,o=t.subarray(s+4,s+8);if(0===a)break;var l=s+a;if(l>t.length){if(i)break;l=t.length}var u=t.subarray(s+8,l);ye(o,n[0])&&(1===n.length?r.push(u):r.push.apply(r,e(u,n.slice(1),i))),s=l}return r},Ct={EBML:he([26,69,223,163]),DocType:he([66,130]),Segment:he([24,83,128,103]),SegmentInfo:he([21,73,169,102]),Tracks:he([22,84,174,107]),Track:he([174]),TrackNumber:he([215]),DefaultDuration:he([35,227,131]),TrackEntry:he([174]),TrackType:he([131]),FlagDefault:he([136]),CodecID:he([134]),CodecPrivate:he([99,162]),VideoTrack:he([224]),AudioTrack:he([225]),Cluster:he([31,67,182,117]),Timestamp:he([231]),TimestampScale:he([42,215,177]),BlockGroup:he([160]),BlockDuration:he([155]),Block:he([161]),SimpleBlock:he([163])},xt=[128,64,32,16,8,4,2,1],jt=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1);var r=function(e){for(var t=1,n=0;n<xt.length&&!(e&xt[n]);n++)t++;return t}(e[t]),s=e.subarray(t,t+r);return n&&((s=Array.prototype.slice.call(e,t,t+r))[0]^=xt[r-1]),{length:r,value:me(s,{signed:i}),bytes:s}},At=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?ge(t):t},It=function e(t,n,i){if(i>=n.length)return n.length;var r=jt(n,i,!1);if(ye(t.bytes,r.bytes))return i;var s=jt(n,i+r.length);return e(t,n,i+s.length+s.value+r.length)},Pt=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return At(e)})):[At(e)]}(n),t=he(t);var i=[];if(!n.length)return i;for(var r=0;r<t.length;){var s=jt(t,r,!1),a=jt(t,r+s.length),o=r+s.length+a.length;127===a.value&&(a.value=It(s,t,o),a.value!==t.length&&(a.value-=o));var l=o+a.value>t.length?t.length:o+a.value,u=t.subarray(o,l);ye(n[0],s.bytes)&&(1===n.length?i.push(u):i=i.concat(e(u,n.slice(1)))),r+=s.length+a.length+u.length}return i},Lt=he([0,0,0,1]),Ot=he([0,0,1]),Dt=he([0,0,3]),Mt=function(e){for(var t=[],n=1;n<e.length-2;)ye(e.subarray(n,n+3),Dt)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var i=e.length-t.length,r=new Uint8Array(i),s=0;for(n=0;n<i;s++,n++)s===t[0]&&(s++,t.shift()),r[n]=e[s];return r},Nt=function(e,t,n,i){void 0===i&&(i=1/0),e=he(e),n=[].concat(n);for(var r,s=0,a=0;s<e.length&&(a<i||r);){var o=void 0;if(ye(e.subarray(s),Lt)?o=4:ye(e.subarray(s),Ot)&&(o=3),o){if(a++,r)return Mt(e.subarray(r,s));var l=void 0;"h264"===t?l=31&e[s+o]:"h265"===t&&(l=e[s+o]>>1&63),-1!==n.indexOf(l)&&(r=s+o),s+=o+("h264"===t?1:2)}else s++}return e.subarray(0,0)},Rt={webm:he([119,101,98,109]),matroska:he([109,97,116,114,111,115,107,97]),flac:he([102,76,97,67]),ogg:he([79,103,103,83]),ac3:he([11,119]),riff:he([82,73,70,70]),avi:he([65,86,73]),wav:he([87,65,86,69]),"3gp":he([102,116,121,112,51,103]),mp4:he([102,116,121,112]),fmp4:he([115,116,121,112]),mov:he([102,116,121,112,113,116]),moov:he([109,111,111,118]),moof:he([109,111,111,102])},Ut={aac:function(e){var t=St(e);return ye(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=St(e);return ye(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Pt(e,[Ct.EBML,Ct.DocType])[0];return ye(t,Rt.webm)},mkv:function(e){var t=Pt(e,[Ct.EBML,Ct.DocType])[0];return ye(t,Rt.matroska)},mp4:function(e){return!Ut["3gp"](e)&&!Ut.mov(e)&&(!(!ye(e,Rt.mp4,{offset:4})&&!ye(e,Rt.fmp4,{offset:4}))||(!(!ye(e,Rt.moof,{offset:4})&&!ye(e,Rt.moov,{offset:4}))||void 0))},mov:function(e){return ye(e,Rt.mov,{offset:4})},"3gp":function(e){return ye(e,Rt["3gp"],{offset:4})},ac3:function(e){var t=St(e);return ye(e,Rt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=St(e);return ye(e,Rt.flac,{offset:t})},ogg:function(e){return ye(e,Rt.ogg)},avi:function(e){return ye(e,Rt.riff)&&ye(e,Rt.avi,{offset:8})},wav:function(e){return ye(e,Rt.riff)&&ye(e,Rt.wav,{offset:8})},h264:function(e){return function(e,t,n){return Nt(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return Nt(e,"h265",t,n)}(e,[32,33],3).length}},Bt=Object.keys(Ut).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);Bt.forEach((function(e){var t=Ut[e];Ut[e]=function(e){return t(he(e))}}));for(var Ft,Ht=Ut,Vt=function(e){e=he(e);for(var t=0;t<Bt.length;t++){var n=Bt[t];if(Ht[n](e))return n}return""},qt=n(1489),zt="7.19.2",Wt={},Gt=function(e,t){return Wt[e]=Wt[e]||[],t&&(Wt[e]=Wt[e].concat(t)),Wt[e]},Xt=function(e,t){var n=Gt(e).indexOf(t);return!(n<=-1)&&(Wt[e]=Wt[e].slice(),Wt[e].splice(n,1),!0)},Kt={prefixed:!0},Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Qt=Yt[0],Jt=0;Jt<Yt.length;Jt++)if(Yt[Jt][1]in b()){Ft=Yt[Jt];break}if(Ft){for(var Zt=0;Zt<Ft.length;Zt++)Kt[Qt[Zt]]=Ft[Zt];Kt.prefixed=Ft[0]!==Qt[0]}var $t=[];var en=function e(t){var n,i="info",r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n("log",i,t)};return n=function(e,t){return function(n,i,r){var s=t.levels[i],a=new RegExp("^("+s+")$");if("log"!==n&&r.unshift(n.toUpperCase()+":"),r.unshift(e+":"),$t){$t.push([].concat(r));var o=$t.length-1e3;$t.splice(0,o>0?o:0)}if(y().console){var l=y().console[n];l||"debug"!==n||(l=y().console.info||y().console.log),l&&s&&a.test(n)&&l[Array.isArray(r)?"apply":"call"](y().console,r)}}}(t,r),r.createLogger=function(n){return e(t+": "+n)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');i=e}return i},(r.history=function(){return $t?[].concat($t):[]}).filter=function(e){return($t||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},r.history.clear=function(){$t&&($t.length=0)},r.history.disable=function(){null!==$t&&($t.length=0,$t=null)},r.history.enable=function(){null===$t&&($t=[])},r.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("error",i,t)},r.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("warn",i,t)},r.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("debug",i,t)},r}("VIDEOJS"),tn=en.createLogger,nn=Object.prototype.toString,rn=function(e){return on(e)?Object.keys(e):[]};function sn(e,t){rn(e).forEach((function(n){return t(e[n],n)}))}function an(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object.assign?T.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&sn(t,(function(t,n){e[n]=t}))})),e)}function on(e){return!!e&&"object"==typeof e}function ln(e){return on(e)&&"[object Object]"===nn.call(e)&&e.constructor===Object}function un(e,t){if(!e||!t)return"";if("function"==typeof y().getComputedStyle){var n;try{n=y().getComputedStyle(e)}catch(e){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var cn,dn=y().navigator&&y().navigator.userAgent||"",hn=/AppleWebKit\/([\d.]+)/i.exec(dn),pn=hn?parseFloat(hn.pop()):null,fn=/iPod/i.test(dn),mn=(cn=dn.match(/OS (\d+)_/i))&&cn[1]?cn[1]:null,gn=/Android/i.test(dn),vn=function(){var e=dn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),yn=gn&&vn<5&&pn<537,_n=/Firefox/i.test(dn),bn=/Edg/i.test(dn),Tn=!bn&&(/Chrome/i.test(dn)||/CriOS/i.test(dn)),Sn=function(){var e=dn.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),kn=function(){var e=/MSIE\s(\d+)\.\d/.exec(dn),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(dn)&&/rv:11.0/.test(dn)&&(t=11),t}(),En=/Safari/i.test(dn)&&!Tn&&!gn&&!bn,wn=/Windows/i.test(dn),Cn=Boolean(Dn()&&("ontouchstart"in y()||y().navigator.maxTouchPoints||y().DocumentTouch&&y().document instanceof y().DocumentTouch)),xn=/iPad/i.test(dn)||En&&Cn&&!/iPhone/i.test(dn),jn=/iPhone/i.test(dn)&&!xn,An=jn||xn||fn,In=(En||An)&&!Tn,Pn=Object.freeze({__proto__:null,IS_IPOD:fn,IOS_VERSION:mn,IS_ANDROID:gn,ANDROID_VERSION:vn,IS_NATIVE_ANDROID:yn,IS_FIREFOX:_n,IS_EDGE:bn,IS_CHROME:Tn,CHROME_VERSION:Sn,IE_VERSION:kn,IS_SAFARI:En,IS_WINDOWS:wn,TOUCH_ENABLED:Cn,IS_IPAD:xn,IS_IPHONE:jn,IS_IOS:An,IS_ANY_SAFARI:In});function Ln(e){return"string"==typeof e&&Boolean(e.trim())}function On(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Dn(){return b()===y().document}function Mn(e){return on(e)&&1===e.nodeType}function Nn(){try{return y().parent!==y().self}catch(e){return!0}}function Rn(e){return function(t,n){if(!Ln(t))return b()[e](null);Ln(n)&&(n=b().querySelector(n));var i=Mn(n)?n:b();return i[e]&&i[e](t)}}function Un(e,t,n,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var r=b().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(en.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),r.setAttribute(e,n)):"textContent"===e?Bn(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){r.setAttribute(e,n[e])})),i&&ri(r,i),r}function Bn(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Fn(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Hn(e,t){return On(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function Vn(e,t){return e.classList?e.classList.add(t):Hn(e,t)||(e.className=(e.className+" "+t).trim()),e}function qn(e,t){return e?(e.classList?e.classList.remove(t):(On(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(en.warn("removeClass was called with an element that doesn't exist"),null)}function zn(e,t,n){var i=Hn(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!i),n!==i)return n?Vn(e,t):qn(e,t),e}function Wn(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var i=t[n];null==i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)}))}function Gn(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var i=e.attributes,r=i.length-1;r>=0;r--){var s=i[r].name,a=i[r].value;"boolean"!=typeof e[s]&&-1===n.indexOf(","+s+",")||(a=null!==a),t[s]=a}return t}function Xn(e,t){return e.getAttribute(t)}function Kn(e,t,n){e.setAttribute(t,n)}function Yn(e,t){e.removeAttribute(t)}function Qn(){b().body.focus(),b().onselectstart=function(){return!1}}function Jn(){b().onselectstart=function(){return!0}}function Zn(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(un(e,"height"))),n.width||(n.width=parseFloat(un(e,"width"))),n}}function $n(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,i=0,r=0;e.offsetParent&&e!==b()[Kt.fullscreenElement];)i+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:i,top:r,width:t,height:n}}function ei(e,t){var n={x:0,y:0};if(An)for(var i=e;i&&"html"!==i.nodeName.toLowerCase();){var r=un(i,"transform");if(/^matrix/.test(r)){var s=r.slice(7,-1).split(/,\s/).map(Number);n.x+=s[4],n.y+=s[5]}else if(/^matrix3d/.test(r)){var a=r.slice(9,-1).split(/,\s/).map(Number);n.x+=a[12],n.y+=a[13]}i=i.parentNode}var o={},l=$n(t.target),u=$n(e),c=u.width,d=u.height,h=t.offsetY-(u.top-l.top),p=t.offsetX-(u.left-l.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-u.left,h=t.changedTouches[0].pageY+u.top,An&&(p-=n.x,h-=n.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,p/c)),o}function ti(e){return on(e)&&3===e.nodeType}function ni(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function ii(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Mn(e)||ti(e)?e:"string"==typeof e&&/\S/.test(e)?b().createTextNode(e):void 0})).filter((function(e){return e}))}function ri(e,t){return ii(t).forEach((function(t){return e.appendChild(t)})),e}function si(e,t){return ri(ni(e),t)}function ai(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var oi,li=Rn("querySelector"),ui=Rn("querySelectorAll"),ci=Object.freeze({__proto__:null,isReal:Dn,isEl:Mn,isInFrame:Nn,createEl:Un,textContent:Bn,prependTo:Fn,hasClass:Hn,addClass:Vn,removeClass:qn,toggleClass:zn,setAttributes:Wn,getAttributes:Gn,getAttribute:Xn,setAttribute:Kn,removeAttribute:Yn,blockTextSelection:Qn,unblockTextSelection:Jn,getBoundingClientRect:Zn,findPosition:$n,getPointerPosition:ei,isTextNode:ti,emptyEl:ni,normalizeContent:ii,appendContent:ri,insertContent:si,isSingleLeftClick:ai,$:li,$$:ui}),di=!1,hi=function(){if(!1!==oi.options.autoSetup){var e=Array.prototype.slice.call(b().getElementsByTagName("video")),t=Array.prototype.slice.call(b().getElementsByTagName("audio")),n=Array.prototype.slice.call(b().getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(var r=0,s=i.length;r<s;r++){var a=i[r];if(!a||!a.getAttribute){pi(1);break}void 0===a.player&&null!==a.getAttribute("data-setup")&&oi(a)}else di||pi(1)}};function pi(e,t){Dn()&&(t&&(oi=t),y().setTimeout(hi,e))}function fi(){di=!0,y().removeEventListener("load",fi)}Dn()&&("complete"===b().readyState?fi():y().addEventListener("load",fi));var mi,gi=function(e){var t=b().createElement("style");return t.className=e,t},vi=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},yi=3;function _i(){return yi++}y().WeakMap||(mi=function(){function e(){this.vdata="vdata"+Math.floor(y().performance&&y().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||_i();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];en("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var bi,Ti=y().WeakMap?new WeakMap:new mi;function Si(e,t){if(Ti.has(e)){var n=Ti.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Ti.delete(e)}}function ki(e,t,n,i){n.forEach((function(n){e(t,n,i)}))}function Ei(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var i=e||y().event;for(var r in e={},i)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&("returnValue"===r&&i.preventDefault||(e[r]=i[r]));if(e.target||(e.target=e.srcElement||b()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){i.preventDefault&&i.preventDefault(),e.returnValue=!1,i.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),e.cancelBubble=!0,i.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var s=b().documentElement,a=b().body;e.pageX=e.clientX+(s&&s.scrollLeft||a&&a.scrollLeft||0)-(s&&s.clientLeft||a&&a.clientLeft||0),e.pageY=e.clientY+(s&&s.scrollTop||a&&a.scrollTop||0)-(s&&s.clientTop||a&&a.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var wi=["touchstart","touchmove"];function Ci(e,t,n){if(Array.isArray(t))return ki(Ci,e,t,n);Ti.has(e)||Ti.set(e,{});var i=Ti.get(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=_i()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(!i.disabled){t=Ei(t);var r=i.handlers[t.type];if(r)for(var s=r.slice(0),a=0,o=s.length;a<o&&!t.isImmediatePropagationStopped();a++)try{s[a].call(e,t,n)}catch(e){en.error(e)}}}),1===i.handlers[t].length)if(e.addEventListener){var r=!1;(function(){if("boolean"!=typeof bi){bi=!1;try{var e=Object.defineProperty({},"passive",{get:function(){bi=!0}});y().addEventListener("test",null,e),y().removeEventListener("test",null,e)}catch(e){}}return bi})()&&wi.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,i.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function xi(e,t,n){if(Ti.has(e)){var i=Ti.get(e);if(i.handlers){if(Array.isArray(t))return ki(xi,e,t,n);var r=function(e,t){i.handlers[t]=[],Si(e,t)};if(void 0!==t){var s=i.handlers[t];if(s)if(n){if(n.guid)for(var a=0;a<s.length;a++)s[a].guid===n.guid&&s.splice(a--,1);Si(e,t)}else r(e,t)}else for(var o in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},o)&&r(e,o)}}}function ji(e,t,n){var i=Ti.has(e)?Ti.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Ei(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)ji.call(null,r,t,n);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){Ti.has(t.target)||Ti.set(t.target,{});var s=Ti.get(t.target);t.target[t.type]&&(s.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),s.disabled=!1)}return!t.defaultPrevented}function Ai(e,t,n){if(Array.isArray(t))return ki(Ai,e,t,n);var i=function i(){xi(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||_i(),Ci(e,t,i)}function Ii(e,t,n){var i=function i(){xi(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||_i(),Ci(e,t,i)}var Pi,Li=Object.freeze({__proto__:null,fixEvent:Ei,on:Ci,off:xi,trigger:ji,one:Ai,any:Ii}),Oi=30,Di=function(e,t,n){t.guid||(t.guid=_i());var i=t.bind(e);return i.guid=n?n+"_"+t.guid:t.guid,i},Mi=function(e,t){var n=y().performance.now();return function(){var i=y().performance.now();i-n>=t&&(e.apply(void 0,arguments),n=i)}},Ni=function(){};Ni.prototype.allowedEvents_={},Ni.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ci(this,e,t),this.addEventListener=n},Ni.prototype.addEventListener=Ni.prototype.on,Ni.prototype.off=function(e,t){xi(this,e,t)},Ni.prototype.removeEventListener=Ni.prototype.off,Ni.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ai(this,e,t),this.addEventListener=n},Ni.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ii(this,e,t),this.addEventListener=n},Ni.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Ei(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ji(this,e)},Ni.prototype.dispatchEvent=Ni.prototype.trigger,Ni.prototype.queueTrigger=function(e){var t=this;Pi||(Pi=new Map);var n=e.type||e,i=Pi.get(this);i||(i=new Map,Pi.set(this,i));var r=i.get(n);i.delete(n),y().clearTimeout(r);var s=y().setTimeout((function(){0===i.size&&(i=null,Pi.delete(t)),t.trigger(e)}),0);i.set(n,s)};var Ri=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},Ui=function(e){return e instanceof Ni||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},Bi=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Fi=function(e,t,n){if(!e||!e.nodeName&&!Ui(e))throw new Error("Invalid target for "+Ri(t)+"#"+n+"; must be a DOM node or evented object.")},Hi=function(e,t,n){if(!Bi(e))throw new Error("Invalid event type for "+Ri(t)+"#"+n+"; must be a non-empty string or array.")},Vi=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+Ri(t)+"#"+n+"; must be a function.")},qi=function(e,t,n){var i,r,s,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(i=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],s=t[1]):(i=t[0],r=t[1],s=t[2]),Fi(i,e,n),Hi(r,e,n),Vi(s,e,n),{isTargetingSelf:a,target:i,type:r,listener:s=Di(e,s)}},zi=function(e,t,n,i){Fi(e,e,t),e.nodeName?Li[t](e,n,i):e[t](n,i)},Wi={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=qi(this,n,"on"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(zi(a,"on",o,l),!s){var u=function(){return e.off(a,o,l)};u.guid=l.guid;var c=function(){return e.off("dispose",u)};c.guid=l.guid,zi(this,"on","dispose",u),zi(a,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=qi(this,n,"one"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)zi(a,"one",o,l);else{var u=function t(){e.off(a,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];l.apply(null,i)};u.guid=l.guid,zi(a,"one",o,u)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=qi(this,n,"any"),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)zi(a,"any",o,l);else{var u=function t(){e.off(a,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];l.apply(null,i)};u.guid=l.guid,zi(a,"any",o,u)}},off:function(e,t,n){if(!e||Bi(e))xi(this.eventBusEl_,e,t);else{var i=e,r=t;Fi(i,this,"off"),Hi(r,this,"off"),Vi(n,this,"off"),n=Di(this,n),this.off("dispose",n),i.nodeName?(xi(i,r,n),xi(i,"dispose",n)):Ui(i)&&(i.off(r,n),i.off("dispose",n))}},trigger:function(e,t){Fi(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!Bi(n)){var i="Invalid event type for "+Ri(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(i);(this.log||en).error(i)}return ji(this.eventBusEl_,e,t)}};function Gi(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=Un("span",{className:"vjs-event-bus"});return an(e,Wi),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&Ti.has(e)&&Ti.delete(e)})),y().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Xi={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),sn(e,(function(e,i){n.state[i]!==e&&((t=t||{})[i]={from:n.state[i],to:e}),n.state[i]=e})),t&&Ui(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Ki(e,t){return an(e,Xi),e.state=an({},e.state,t),"function"==typeof e.handleStateChanged&&Ui(e)&&e.on("statechanged",e.handleStateChanged),e}var Yi=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Qi=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Ji(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){t&&sn(t,(function(t,n){ln(t)?(ln(e[n])||(e[n]={}),e[n]=Ji(e[n],t)):e[n]=t}))})),e}var Zi=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),$i=y().Map?y().Map:Zi,er=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),tr=y().Set?y().Set:er,nr=function(){function e(e,t,n){var i=this;if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Ji({},this.options_),t=this.options_=Ji(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+_i()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((function(e){return i.addClass(e)})),!1!==t.evented&&(Gi(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Ki(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new tr,this.setIntervalIds_=new tr,this.rafIds_=new tr,this.namedRafs_=new $i,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=Ji(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Un(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[i],a=i&&i.split("-")[0],o=r&&r[a],l=n;return s&&s[e]?l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r}))),l},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var i=this,r=0;r<t.length;r++)if(!(i=i.getChild(t[r]))||!i.getChild)return;return i},t.addChild=function(t,n,i){var r,s;if(void 0===n&&(n={}),void 0===i&&(i=this.children_.length),"string"==typeof t){s=Qi(t);var a=n.componentClass||s;n.name=s;var o=e.getComponent(a);if(!o)throw new Error("Component "+a+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,n)}else r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(s=s||r.name&&Qi(r.name()))&&(this.childNameIndex_[s]=r,this.childNameIndex_[Yi(s)]=r),"function"==typeof r.el&&r.el()){var l=null;this.children_[i+1]&&(this.children_[i+1].el_?l=this.children_[i+1].el_:Mn(this.children_[i+1])&&(l=this.children_[i+1])),this.contentEl().insertBefore(r.el(),l)}return r},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Qi(e.name())]=null,this.childNameIndex_[Yi(e.name())]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var i,r=this.options_,s=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var i,r;return"string"==typeof e?r=n[i=e]||t.options_[i]||{}:(i=e.name,r=e),{name:i,opts:r}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||Qi(t.name));return n&&!s.isTech(n)})).forEach((function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var s=t.addChild(n,i);s&&(t[n]=s)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return li(e,t||this.contentEl())},t.$$=function(e,t){return ui(e,t||this.contentEl())},t.hasClass=function(e){return Hn(this.el_,e)},t.addClass=function(e){Vn(this.el_,e)},t.removeClass=function(e){qn(this.el_,e)},t.toggleClass=function(e,t){zn(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return Xn(this.el_,e)},t.setAttribute=function(e,t){Kn(this.el_,e,t)},t.removeAttribute=function(e){Yn(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Qi(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=un(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Qi(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(k().isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(i){1===i.touches.length&&(n={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},t=y().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var i=t.touches[0].pageX-n.pageX,r=t.touches[0].pageY-n.pageY;Math.sqrt(i*i+r*r)>10&&(e=!1)}}));var i=function(){e=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){(n=null,!0===e)&&(y().performance.now()-t<200&&(i.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Di(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,i=this;return e=Di(this,e),this.clearTimersOnDispose_(),n=y().setTimeout((function(){i.setTimeoutIds_.has(n)&&i.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),y().clearTimeout(e)),e},t.setInterval=function(e,t){e=Di(this,e),this.clearTimersOnDispose_();var n=y().setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),y().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Di(this,e),t=y().requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Di(this,t);var i=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),y().cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],i=t[1];e[n].forEach((function(t,n){return e[i](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var i,r=e.getComponent("Tech"),s=r&&r.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(s||!a)throw i=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+i+".");t=Qi(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Yi(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function ir(e,t,n,i){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,i,n.length-1),n[i][t]}function rr(e){var t;return t=void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:ir.bind(null,"start",0,e),end:ir.bind(null,"end",1,e)},y().Symbol&&y().Symbol.iterator&&(t[y().Symbol.iterator]=function(){return(e||[]).values()}),t}function sr(e,t){return Array.isArray(e)?rr(e):void 0===e||void 0===t?rr():rr([[e,t]])}function ar(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=sr(0,0));for(var s=0;s<e.length;s++)n=e.start(s),(i=e.end(s))>t&&(i=t),r+=i-n;return r/t}function or(e){if(e instanceof or)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:on(e)&&("number"==typeof e.code&&(this.code=e.code),an(this,e)),this.message||(this.message=or.defaultMessages[this.code]||"")}nr.prototype.supportsRaf_="function"==typeof y().requestAnimationFrame&&"function"==typeof y().cancelAnimationFrame,nr.registerComponent("Component",nr),or.prototype.code=0,or.prototype.message="",or.prototype.status=null,or.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],or.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var lr=0;lr<or.errorTypes.length;lr++)or[or.errorTypes[lr]]=lr,or.prototype[or.errorTypes[lr]]=lr;function ur(e){return null!=e&&"function"==typeof e.then}function cr(e){ur(e)&&e.then(null,(function(e){}))}var dr=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,i){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},hr=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=dr(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(dr))},pr=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},fr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleKeyDown_=function(e){return i.handleKeyDown(e)},i.close_=function(e){return i.close(e)},i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=Un("div",{className:"vjs-modal-dialog-content"},{role:"document"}),i.descEl_=Un("p",{className:"vjs-modal-dialog-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),Bn(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var i=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),si(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);var r=this.getChild("closeButton");r&&n.appendChild(r.el_)},n.empty=function(){this.trigger("beforemodalempty"),ni(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=b().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),k().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(k().isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),i=this.el_.querySelector(":focus"),r=0;r<n.length;r++)if(i===n[r]){t=r;break}b().activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof y().HTMLAnchorElement||e instanceof y().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof y().HTMLInputElement||e instanceof y().HTMLSelectElement||e instanceof y().HTMLTextAreaElement||e instanceof y().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof y().HTMLIFrameElement||e instanceof y().HTMLObjectElement||e instanceof y().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(nr);fr.prototype.options_={pauseOnOpen:!0,temporary:!0},nr.registerComponent("ModalDialog",fr);var mr=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(E(n),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)n.addTrack(t[i]);return n}C(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},Ui(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,i=this.length;n<i;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},t}(Ni);for(var gr in mr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},mr.prototype.allowedEvents_)mr.prototype["on"+gr]=null;var vr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},yr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].enabled){vr(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}C(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&vr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,vr(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(mr),_r=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},br=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].selected){_r(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(E(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}C(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&_r(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,_r(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(mr),Tr=function(e){function t(){return e.apply(this,arguments)||this}C(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(mr),Sr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,i=this.trackElements_.length;n<i;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),kr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,i=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<i)for(n=t;n<i;n++)r.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},e}(),Er={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},wr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Cr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},xr={disabled:"disabled",hidden:"hidden",showing:"showing"},jr=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var i={id:t.id||"vjs_track_"+_i(),kind:t.kind||"",language:t.language||""},r=t.label||"",s=function(e){Object.defineProperty(E(n),e,{get:function(){return i[e]},set:function(){}})};for(var a in i)s(a);return Object.defineProperty(E(n),"label",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger("labelchange"))}}),n}return C(t,e),t}(Ni),Ar=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=b().createElement("a");n.href=e;for(var i={},r=0;r<t.length;r++)i[t[r]]=n[t[r]];return"http:"===i.protocol&&(i.host=i.host.replace(/:80$/,"")),"https:"===i.protocol&&(i.host=i.host.replace(/:443$/,"")),i.protocol||(i.protocol=y().location.protocol),i.host||(i.host=y().location.host),i},Ir=function(e){if(!e.match(/^https?:\/\//)){var t=b().createElement("a");t.href=e,e=t.href}return e},Pr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Lr=function(e,t){void 0===t&&(t=y().location);var n=Ar(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Or=Object.freeze({__proto__:null,parseUrl:Ar,getAbsoluteURL:Ir,getFileExtension:Pr,isCrossOrigin:Lr}),Dr=function(e,t){var n=new(y().WebVTT.Parser)(y(),y().vttjs,y().WebVTT.StringDecoder()),i=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){i.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),i.length>0&&(y().console&&y().console.groupCollapsed&&y().console.groupCollapsed("Text Track parsing errors for "+t.src),i.forEach((function(e){return en.error(e)})),y().console&&y().console.groupEnd&&y().console.groupEnd()),n.flush()},Mr=function(e,t){var n={uri:e},i=Lr(e);i&&(n.cors=i);var r="use-credentials"===t.tech_.crossOrigin();r&&(n.withCredentials=r),I()(n,Di(this,(function(e,n,i){if(e)return en.error(e,n);t.loaded_=!0,"function"!=typeof y().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Dr(i,t);en.error("vttjs failed to load, stopping trying to process "+t.src)})):Dr(i,t)})))},Nr=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=Ji(t,{kind:Cr[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=xr[i.mode]||"disabled",s=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(r="hidden"),(n=e.call(this,i)||this).tech_=i.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new kr(n.cues_),o=new kr(n.activeCues_),l=!1;n.timeupdateHandler=Di(E(n),(function(){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)):this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}));return n.tech_.one("dispose",(function(){n.stopTracking()})),"disabled"!==r&&n.startTracking(),Object.defineProperties(E(n),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return r},set:function(e){xr[e]&&r!==e&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||Mr(this.src,this),this.stopTracking(),"disabled"!==r&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,i=this.cues.length;n<i;n++){var r=this.cues[n];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var s=0;s<t.length;s++)-1===this.activeCues_.indexOf(t[s])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),i.src?(n.src=i.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==i.kind&&"captions"!==i.kind)&&Mr(n.src,E(n))):n.loaded_=!0,n}C(t,e);var n=t.prototype;return n.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)},n.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0)},n.addCue=function(e){var t=e;if(y().vttjs&&!(e instanceof y().vttjs.VTTCue)){for(var n in t=new(y().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var i=this.tech_.textTracks(),r=0;r<i.length;r++)i[r]!==this&&i[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(jr);Nr.prototype.allowedEvents_={cuechange:"cuechange"};var Rr=function(e){function t(t){var n;void 0===t&&(t={});var i=Ji(t,{kind:wr[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(E(n),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),i.enabled&&(n.enabled=i.enabled),n.loaded_=!0,n}return C(t,e),t}(jr),Ur=function(e){function t(t){var n;void 0===t&&(t={});var i=Ji(t,{kind:Er[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(E(n),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),i.selected&&(n.selected=i.selected),n}return C(t,e),t}(jr),Br=function(e){function t(t){var n,i;void 0===t&&(t={}),n=e.call(this)||this;var r=new Nr(t);return n.kind=r.kind,n.src=r.src,n.srclang=r.language,n.label=r.label,n.default=r.default,Object.defineProperties(E(n),{readyState:{get:function(){return i}},track:{get:function(){return r}}}),i=0,r.addEventListener("loadeddata",(function(){i=2,n.trigger({type:"load",target:E(n)})})),n}return C(t,e),t}(Ni);Br.prototype.allowedEvents_={load:"load"},Br.NONE=0,Br.LOADING=1,Br.LOADED=2,Br.ERROR=3;var Fr={audio:{ListClass:yr,TrackClass:Rr,capitalName:"Audio"},video:{ListClass:br,TrackClass:Ur,capitalName:"Video"},text:{ListClass:Tr,TrackClass:Nr,capitalName:"Text"}};Object.keys(Fr).forEach((function(e){Fr[e].getterName=e+"Tracks",Fr[e].privateName=e+"Tracks_"}));var Hr={remoteText:{ListClass:Tr,TrackClass:Nr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Sr,TrackClass:Br,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Vr=T({},Fr,Hr);Hr.names=Object.keys(Hr),Fr.names=Object.keys(Fr),Vr.names=[].concat(Hr.names).concat(Fr.names);var qr=function(e){function t(t,n){var i;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(i=e.call(this,null,t,n)||this).onDurationChange_=function(e){return i.onDurationChange(e)},i.trackProgress_=function(e){return i.trackProgress(e)},i.trackCurrentTime_=function(e){return i.trackCurrentTime(e)},i.stopTrackingCurrentTime_=function(e){return i.stopTrackingCurrentTime(e)},i.disposeSourceHandler_=function(e){return i.disposeSourceHandler(e)},i.queuedHanders_=new Set,i.hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),Vr.names.forEach((function(e){var n=Vr[e];t&&t[n.getterName]&&(i[n.privateName]=t[n.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.preloadTextTracks=!1!==t.preloadTextTracks,i.autoRemoteTextTracks_=new Vr.text.ListClass,i.initTrackListeners(),t.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}C(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Di(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return sr(0,0)},n.bufferedPercent=function(){return ar(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Fr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],i=n.length;i--;){var r=n[i];"text"===e&&t.removeRemoteTextTrack(r),n.removeTrack(r)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new or(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?sr(0,0):sr()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Fr.names.forEach((function(t){var n=Fr[t],i=function(){e.trigger(t+"trackchange")},r=e[n.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),e.on("dispose",(function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)}))}))},n.addWebVttScript_=function(){var e=this;if(!y().WebVTT)if(b().body.contains(this.el())){if(!this.options_["vtt.js"]&&ln(L())&&Object.keys(L()).length>0)return void this.trigger("vttjsloaded");var t=b().createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),y().WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),i=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();var s=function(){return e.trigger("texttrackchange")},a=function(){s();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",s),"showing"===n.mode&&n.addEventListener("cuechange",s)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",i),n.off("removetrack",r),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",s)}}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,i,r){void 0===r&&(r={});var s=e.textTracks();r.kind=t,n&&(r.label=n),i&&(r.language=i),r.tech=e;var a=new Vr.text.TrackClass(r);return s.addTrack(a),a}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=Ji(e,{tech:this});return new Hr.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var i=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(en.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(i.track)})),i},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||y().Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.requestVideoFrameCallback=function(e){var t=this,n=_i();return this.paused()?(this.queuedHanders_.add(n),this.one("playing",(function(){t.queuedHanders_.has(n)&&(t.queuedHanders_.delete(n),e())}))):this.requestNamedAnimationFrame(n,e),n},n.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Qi(e),t.techs_[e]=n,t.techs_[Yi(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=Qi(e),y()&&y().videojs&&y().videojs[e]?(en.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),y().videojs[e]):void 0)},t}(nr);Vr.names.forEach((function(e){var t=Vr[e];qr.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),qr.prototype.featuresVolumeControl=!0,qr.prototype.featuresMuteControl=!0,qr.prototype.featuresFullscreenResize=!1,qr.prototype.featuresPlaybackRate=!1,qr.prototype.featuresProgressEvents=!1,qr.prototype.featuresSourceset=!1,qr.prototype.featuresTimeupdateEvents=!1,qr.prototype.featuresNativeTextTracks=!1,qr.prototype.featuresVideoFrameCallback=!1,qr.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var i=e.sourceHandlers;i||(i=e.sourceHandlers=[]),void 0===n&&(n=i.length),i.splice(n,0,t)},e.canPlayType=function(t){for(var n,i=e.sourceHandlers||[],r=0;r<i.length;r++)if(n=i[r].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var i=e.sourceHandlers||[],r=0;r<i.length;r++)if(i[r].canHandleSource(t,n))return i[r];return null},e.canPlaySource=function(t,n){var i=e.selectSourceHandler(t,n);return i?i.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:en.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},nr.registerComponent("Tech",qr),qr.registerTech("Tech",qr),qr.defaultTechOrder_=[];var zr={},Wr={},Gr={};function Xr(e,t,n){e.setTimeout((function(){return $r(t,zr[t.type],n,e)}),1)}function Kr(e,t,n,i){void 0===i&&(i=null);var r="call"+Qi(n),s=e.reduce(Zr(r),i),a=s===Gr,o=a?null:t[n](s);return function(e,t,n,i){for(var r=e.length-1;r>=0;r--){var s=e[r];s[t]&&s[t](i,n)}}(e,n,o,a),o}var Yr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Qr={setCurrentTime:1,setMuted:1,setVolume:1},Jr={play:1,pause:1};function Zr(e){return function(t,n){return t===Gr?Gr:n[e]?n[e](t):t}}function $r(e,t,n,i,r,s){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===s&&(s=!1);var a=t,o=a[0],l=a.slice(1);if("string"==typeof o)$r(e,zr[o],n,i,r,s);else if(o){var u=function(e,t){var n=Wr[e.id()],i=null;if(null==n)return i=t(e),Wr[e.id()]=[[t,i]],i;for(var r=0;r<n.length;r++){var s=n[r],a=s[0],o=s[1];a===t&&(i=o)}return null===i&&(i=t(e),n.push([t,i])),i}(i,o);if(!u.setSource)return r.push(u),$r(e,l,n,i,r,s);u.setSource(an({},e),(function(t,a){if(t)return $r(e,l,n,i,r,s);r.push(u),$r(a,e.type===a.type?l:zr[a.type],n,i,r,s)}))}else l.length?$r(e,l,n,i,r,s):s?n(e,r):$r(e,zr["*"],n,i,r,!0)}var es={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ts=function(e){void 0===e&&(e="");var t=Pr(e);return es[t.toLowerCase()]||""},ns=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):on(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[is({src:t})]:on(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[is(t)]:[];return t};function is(e){if(!e.type){var t=ts(e.src);t&&(e.type=t)}return e}var rs=function(e){function t(t,n,i){var r,s=Ji({createEl:!1},n);if(r=e.call(this,t,s,i)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,o=n.playerOptions.techOrder;a<o.length;a++){var l=Qi(o[a]),u=qr.getTech(l);if(l||(u=nr.getComponent(l)),u&&u.isSupported()){t.loadTech_(l);break}}return r}return C(t,e),t}(nr);nr.registerComponent("MediaLoader",rs);var ss=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).options_.controlText&&i.controlText(i.options_.controlText),i.handleMouseOver_=function(e){return i.handleMouseOver(e)},i.handleMouseOut_=function(e){return i.handleMouseOut(e)},i.handleClick_=function(e){return i.handleClick(e)},i.handleKeyDown_=function(e){return i.handleKeyDown(e)},i.emitTapEvents(),i.enable(),i}C(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={}),t=an({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&en.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=an({role:"button"},n),this.tabIndex_=t.tabIndex;var i=Un(e,t,n);return i.appendChild(Un("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=Un("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,Bn(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){k().isEventKey(t,"Space")||k().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(nr);nr.registerComponent("ClickableComponent",ss);var as=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update(),i.update_=function(e){return i.update(e)},t.on("posterchange",i.update_),i}C(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return Un("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(kn||bn)&&t||this.player_.tech(!0).focus(),this.player_.paused()?cr(this.player_.play()):this.player_.pause()}},t}(ss);nr.registerComponent("PosterImage",as);var os={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function ls(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function us(e,t,n){try{e.style[t]=n}catch(e){return}}var cs=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var s=function(e){return r.updateDisplay(e)};return t.on("loadstart",(function(e){return r.toggleDisplay(e)})),t.on("texttrackchange",s),t.on("loadedmetadata",(function(e){return r.preselectTrack(e)})),t.ready(Di(E(r),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",s),t.on("playerresize",s),y().addEventListener("orientationchange",s),t.on("dispose",(function(){return y().removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),r}C(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,i={captions:1,subtitles:1},r=this.player_.textTracks(),s=this.player_.cache_.selectedLanguage,a=0;a<r.length;a++){var o=r[a];s&&s.enabled&&s.language&&s.language===o.language&&o.kind in i?o.kind===s.kind?n=o:n||(n=o):s&&!s.enabled?(n=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in i&&!t&&(t=o):e=o)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof y().WebVTT&&y().WebVTT.processCues(y(),[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],i=0;i<e.length;++i){var r=e[i];"showing"===r.mode&&n.push(r)}this.updateForTrack(n)}else{for(var s=null,a=null,o=e.length;o--;){var l=e[o];"showing"===l.mode&&("descriptions"===l.kind?s=l:a=l)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):s&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(s))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,i=n.length;i--;){var r=n[i];if(r){var s=r.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&us(s.firstChild,"color",ls(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&us(s.firstChild,"backgroundColor",ls(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?us(s,"backgroundColor",ls(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var a=y().parseFloat(s.style.fontSize);s.style.fontSize=a*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=os[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof y().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var i=e[n],r=0;r<i.activeCues.length;++r)t.push(i.activeCues[r]);y().WebVTT.processCues(y(),t,this.el_);for(var s=0;s<e.length;++s){for(var a=e[s],o=0;o<a.activeCues.length;++o){var l=a.activeCues[o].displayState;Vn(l,"vjs-text-track-cue"),Vn(l,"vjs-text-track-cue-"+(a.language?a.language:s)),a.language&&Kn(l,"lang",a.language)}this.player_.textTrackSettings&&this.updateDisplayState(a)}}},t}(nr);nr.registerComponent("TextTrackDisplay",cs);var ds=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),i=Un("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r},t}(nr);nr.registerComponent("LoadingSpinner",ds);var hs=function(e){function t(){return e.apply(this,arguments)||this}C(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var i=Un("button",t=an({className:this.buildCSSClass()},t),n=an({type:"button"},n));return i.appendChild(Un("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return en.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),nr.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){k().isEventKey(t,"Space")||k().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(ss);nr.registerComponent("Button",hs);var ps=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).mouseused_=!1,i.on("mousedown",(function(e){return i.handleMouseDown(e)})),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return cr(t),void(!this.player_.tech(!0)||(kn||bn)&&n||this.player_.tech(!0).focus())}var i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(r){var s=function(){return r.focus()};ur(t)?t.then(s,(function(){})):this.setTimeout(s,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(hs);ps.prototype.controlText_="Play Video",nr.registerComponent("BigPlayButton",ps);var fs=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).controlText(n&&n.controlText||i.localize("Close")),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){k().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(hs);nr.registerComponent("CloseButton",fs);var ms=function(e){function t(t,n){var i;return void 0===n&&(n={}),i=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,i.on(t,"play",(function(e){return i.handlePlay(e)})),i.on(t,"pause",(function(e){return i.handlePause(e)})),n.replay&&i.on(t,"ended",(function(e){return i.handleEnded(e)})),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?cr(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(hs);ms.prototype.controlText_="Play",nr.registerComponent("PlayToggle",ms);var gs=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600),s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),(r=r>0||a>0?r+":":"")+(i=((r||s>=10)&&i<10?"0"+i:i)+":")+(n=n<10?"0"+n:n)},vs=gs;function ys(e,t){return void 0===t&&(t=e),vs(e,t)}var _s=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return i.updateContent(e)})),i.updateTextNode_(),i}C(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),i=Un("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return n.appendChild(i),this.contentEl_=Un("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=ys(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,en.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=b().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(nr);_s.prototype.labelText_="Time",_s.prototype.controlText_="Time",nr.registerComponent("TimeDisplay",_s);var bs=function(e){function t(){return e.apply(this,arguments)||this}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(_s);bs.prototype.labelText_="Current Time",bs.prototype.controlText_="Current Time",nr.registerComponent("CurrentTimeDisplay",bs);var Ts=function(e){function t(t,n){var i,r=function(e){return i.updateContent(e)};return(i=e.call(this,t,n)||this).on(t,"durationchange",r),i.on(t,"loadstart",r),i.on(t,"loadedmetadata",r),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(_s);Ts.prototype.labelText_="Duration",Ts.prototype.controlText_="Duration",nr.registerComponent("DurationDisplay",Ts);var Ss=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),i=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(i),t.appendChild(n),t},t}(nr);nr.registerComponent("TimeDivider",Ss);var ks=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return i.updateContent(e)})),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(Un("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(_s);ks.prototype.labelText_="Remaining Time",ks.prototype.controlText_="Remaining Time",nr.registerComponent("RemainingTimeDisplay",ks);var Es=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateShowing(),i.on(i.player(),"durationchange",(function(e){return i.updateShowing(e)})),i}C(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Un("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Un("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(b().createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(nr);nr.registerComponent("LiveDisplay",Es);var ws=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&(i.updateLiveEdgeStatusHandler_=function(e){return i.updateLiveEdgeStatus(e)},i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)),i}C(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Un("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(hs);ws.prototype.controlText_="Seek to live, currently playing live",nr.registerComponent("SeekToLive",ws);var Cs=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},xs=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseDown_=function(e){return i.handleMouseDown(e)},i.handleMouseUp_=function(e){return i.handleMouseUp(e)},i.handleKeyDown_=function(e){return i.handleKeyDown(e)},i.handleClick_=function(e){return i.handleClick(e)},i.handleMouseMove_=function(e){return i.handleMouseMove(e)},i.update_=function(e){return i.update(e)},i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}C(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=an({tabIndex:0},n),i=an({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Tn||e.preventDefault(),Qn(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Jn(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(Cs(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=ei(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){k().isEventKey(t,"Left")||k().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):k().isEventKey(t,"Right")||k().isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(nr);nr.registerComponent("Slider",xs);var js=function(e,t){return Cs(e/t*100,0,100).toFixed(2)+"%"},As=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).partEls_=[],i.on(t,"progress",(function(e){return i.update(e)})),i}C(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Un("span",{className:"vjs-control-text"}),i=Un("span",{textContent:this.localize("Loaded")}),r=b().createTextNode(": ");return this.percentageEl_=Un("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(i),n.appendChild(r),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),s=t.partEls_,a=js(r,i);t.percent_!==a&&(t.el_.style.width=a,Bn(t.percentageEl_,a),t.percent_=a);for(var o=0;o<n.length;o++){var l=n.start(o),u=n.end(o),c=s[o];c||(c=t.el_.appendChild(Un()),s[o]=c),c.dataset.start===l&&c.dataset.end===u||(c.dataset.start=l,c.dataset.end=u,c.style.left=js(l,r),c.style.width=js(u-l,r))}for(var d=s.length;d>n.length;d--)t.el_.removeChild(s[d-1]);s.length=n.length}))},t}(nr);nr.registerComponent("LoadProgressBar",As);var Is=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Mi(Di(E(i),i.update),Oi),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var i=$n(this.el_),r=Zn(this.player_.el()),s=e.width*t;if(r&&i){var a=e.left-r.left+s,o=e.width-s+(r.right-e.right),l=i.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>i.width&&(l=i.width),l=Math.round(l),this.el_.style.right="-"+l+"px",this.write(n)}},n.write=function(e){Bn(this.el_,e)},n.updateTime=function(e,t,n,i){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var s,a=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),l=o-t*o;s=(l<1?"":"-")+ys(l,o)}else s=ys(n,a);r.update(e,t,s),i&&i()}))},t}(nr);nr.registerComponent("TimeTooltip",Is);var Ps=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Mi(Di(E(i),i.update),Oi),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,i)}},t}(nr);Ps.prototype.options_={children:[]},An||gn||Ps.prototype.options_.children.push("timeTooltip"),nr.registerComponent("PlayProgressBar",Ps);var Ls=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Mi(Di(E(i),i.update),Oi),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(function(){n.el_.style.left=e.width*t+"px"}))},t}(nr);Ls.prototype.options_={children:["timeTooltip"]},nr.registerComponent("MouseTimeDisplay",Ls);var Os=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).setEventHandlers_(),i}C(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Di(this,this.update),this.update=Mi(this.update_,Oi),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in b()&&"visibilityState"in b()&&this.on(b(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===b().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Oi))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==b().visibilityState){var i=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,r=n.player_.duration();t&&t.isLive()&&(r=n.player_.liveTracker.liveCurrentTime()),n.percent_!==i&&(n.el_.setAttribute("aria-valuenow",(100*i).toFixed(2)),n.percent_=i),n.currentTime_===e&&n.duration_===r||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ys(e,r),ys(r,r)],"{1} of {2}")),n.currentTime_=e,n.duration_=r),n.bar&&n.bar.update(Zn(n.el()),n.getProgress())})),i}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){ai(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),ai(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var i=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(i>=.99)return void r.seekToLiveEdge();var s=r.seekableStart(),a=r.liveCurrentTime();if((n=s+i*r.liveWindow())>=a&&(n=a),n<=s&&(n=s+.1),n===1/0)return}else(n=i*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?cr(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(k().isEventKey(t,"Space")||k().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(k().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(k().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(k()(t))){t.preventDefault(),t.stopPropagation();var i=10*(k().codes[k()(t)]-k().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else k().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):k().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in b()&&"visibilityState"in b()&&this.off(b(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(xs);Os.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},An||gn||Os.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),nr.registerComponent("SeekBar",Os);var Ds=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseMove=Mi(Di(E(i),i.handleMouseMove),Oi),i.throttledHandleMouseSeek=Mi(Di(E(i),i.handleMouseSeek),Oi),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.handleMouseDownHandler_=function(e){return i.handleMouseDown(e)},i.enable(),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),i=t.getChild("mouseTimeDisplay");if(n||i){var r=t.el(),s=$n(r),a=ei(r,e).x;a=Cs(a,0,1),i&&i.update(s,a),n&&n.update(s,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&cr(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(nr);Ds.prototype.options_={children:["seekBar"]},nr.registerComponent("ProgressControl",Ds);var Ms=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return i.handlePictureInPictureChange(e)})),i.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return i.handlePictureInPictureEnabledChange(e)})),i.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),i.hide()):i.show()})),i.disable(),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){b().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(hs);Ms.prototype.controlText_="Picture-in-Picture",nr.registerComponent("PictureInPictureToggle",Ms);var Ns=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return i.handleFullscreenChange(e)})),!1===b()[t.fsApi_.fullscreenEnabled]&&i.disable(),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(hs);Ns.prototype.controlText_="Fullscreen",nr.registerComponent("FullscreenToggle",Ns);var Rs=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(nr);nr.registerComponent("VolumeLevel",Rs);var Us=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Mi(Di(E(i),i.update),Oi),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,i){if(!n){var r=Zn(this.el_),s=Zn(this.player_.el()),a=e.width*t;if(!s||!r)return;var o=e.left-s.left+a,l=e.width-a+(s.right-e.right),u=r.width/2;o<u?u+=u-o:l<u&&(u=l),u<0?u=0:u>r.width&&(u=r.width),this.el_.style.right="-"+u+"px"}this.write(i+"%")},n.write=function(e){Bn(this.el_,e)},n.updateVolume=function(e,t,n,i,r){var s=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){s.update(e,t,n,i.toFixed(0)),r&&r()}))},t}(nr);nr.registerComponent("VolumeLevelTooltip",Us);var Bs=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Mi(Di(E(i),i.update),Oi),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var i=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,r,(function(){n?i.el_.style.bottom=e.height*t+"px":i.el_.style.left=e.width*t+"px"}))},t}(nr);Bs.prototype.options_={children:["volumeLevelTooltip"]},nr.registerComponent("MouseVolumeLevelDisplay",Bs);var Fs=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on("slideractive",(function(e){return i.updateLastVolume_(e)})),i.on(t,"volumechange",(function(e){return i.updateARIAAttributes(e)})),t.ready((function(){return i.updateARIAAttributes()})),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){ai(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),i=Zn(n),r=this.vertical(),s=ei(n,e);s=r?s.y:s.x,s=Cs(s,0,1),t.update(i,s,r)}ai(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(xs);Fs.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},An||gn||Fs.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Fs.prototype.playerEvent="volumechange",nr.registerComponent("VolumeBar",Fs);var Hs=function(e){function t(t,n){var i;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||ln(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(E(i=e.call(this,t,n)||this),t),i.throttledHandleMouseMove=Mi(Di(E(i),i.handleMouseMove),Oi),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.on("mousedown",(function(e){return i.handleMouseDown(e)})),i.on("touchstart",(function(e){return i.handleMouseDown(e)})),i.on("mousemove",(function(e){return i.handleMouseMove(e)})),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}C(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(nr);Hs.prototype.options_={children:["volumeBar"]},nr.registerComponent("VolumeControl",Hs);var Vs=function(e){function t(t,n){var i;return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(E(i=e.call(this,t,n)||this),t),i.on(t,["loadstart","volumechange"],(function(e){return i.update(e)})),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var i=n<.1?.1:n;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;An&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)qn(this.el_,"vjs-vol-"+n);Vn(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(hs);Vs.prototype.controlText_="Mute",nr.registerComponent("MuteToggle",Vs);var qs=function(e){function t(t,n){var i;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||ln(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(i=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return i.handleKeyPress(e)},i.on(t,["loadstart"],(function(e){return i.volumePanelState_(e)})),i.on(i.muteToggle,"keyup",(function(e){return i.handleKeyPress(e)})),i.on(i.volumeControl,"keyup",(function(e){return i.handleVolumeControlKeyUp(e)})),i.on("keydown",(function(e){return i.handleKeyPress(e)})),i.on("mouseover",(function(e){return i.handleMouseOver(e)})),i.on("mouseout",(function(e){return i.handleMouseOut(e)})),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}C(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){k().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),Ci(b(),"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),xi(b(),"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){k().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(nr);qs.prototype.options_={children:["muteToggle","volumeControl"]},nr.registerComponent("VolumePanel",qs);var zs=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,n&&(i.menuButton_=n.menuButton),i.focusedChild_=-1,i.on("keydown",(function(e){return i.handleKeyDown(e)})),i.boundHandleBlur_=function(e){return i.handleBlur(e)},i.boundHandleTapClick_=function(e){return i.handleTapClick(e)},i}C(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof nr&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof nr&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Un(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ci(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||b().activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){k().isEventKey(e,"Left")||k().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(k().isEventKey(e,"Right")||k().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(nr);nr.registerComponent("Menu",zs);var Ws=function(e){function t(t,n){var i;void 0===n&&(n={}),(i=e.call(this,t,n)||this).menuButton_=new hs(t,n),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var r=hs.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+r,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;var s=function(e){return i.handleClick(e)};return i.handleMenuKeyUp_=function(e){return i.handleMenuKeyUp(e)},i.on(i.menuButton_,"tap",s),i.on(i.menuButton_,"click",s),i.on(i.menuButton_,"keydown",(function(e){return i.handleKeyDown(e)})),i.on(i.menuButton_,"mouseenter",(function(){i.addClass("vjs-hover"),i.menu.show(),Ci(b(),"keyup",i.handleMenuKeyUp_)})),i.on("mouseleave",(function(e){return i.handleMouseLeave(e)})),i.on("keydown",(function(e){return i.handleSubmenuKeyDown(e)})),i}C(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},n.createMenu=function(){var e=new zs(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Un("li",{className:"vjs-menu-title",textContent:Qi(this.options_.title),tabIndex:-1}),n=new nr(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+hs.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),xi(b(),"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){k().isEventKey(e,"Esc")||k().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),k().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(k().isEventKey(e,"Up")||k().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(k().isEventKey(e,"Esc")||k().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(k().isEventKey(e,"Esc")||k().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),k().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),An&&Nn())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(nr);nr.registerComponent("MenuButton",Ws);var Gs=function(e){function t(t,n){var i,r=n.tracks;if((i=e.call(this,t,n)||this).items.length<=1&&i.hide(),!r)return E(i);var s=Di(E(i),i.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),r.addEventListener("labelchange",s),i.player_.on("ready",s),i.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s),r.removeEventListener("labelchange",s)})),i}return C(t,e),t}(Ws);nr.registerComponent("TrackButton",Gs);var Xs=["Tab","Esc","Up","Down","Right","Left"],Ks=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).selectable=n.selectable,i.isSelected_=n.selected||!1,i.multiSelectable=n.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}C(t,e);var n=t.prototype;return n.createEl=function(t,n,i){this.nonIconControl=!0;var r=e.prototype.createEl.call(this,"li",an({className:"vjs-menu-item",tabIndex:-1},n),i);return r.replaceChild(Un("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder")),r},n.handleKeyDown=function(t){Xs.some((function(e){return k().isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(ss);nr.registerComponent("MenuItem",Ks);var Ys=function(e){function t(t,n){var i,r=n.track,s=t.textTracks();n.label=r.label||r.language||"Unknown",n.selected="showing"===r.mode,(i=e.call(this,t,n)||this).track=r,i.kinds=(n.kinds||[n.kind||i.track.kind]).filter(Boolean);var a,o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(E(i),t)},l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleSelectedLanguageChange.apply(E(i),t)};(t.on(["loadstart","texttrackchange"],o),s.addEventListener("change",o),s.addEventListener("selectedlanguagechange",l),i.on("dispose",(function(){t.off(["loadstart","texttrackchange"],o),s.removeEventListener("change",o),s.removeEventListener("selectedlanguagechange",l)})),void 0===s.onchange)&&i.on(["tap","click"],(function(){if("object"!=typeof y().Event)try{a=new(y().Event)("change")}catch(e){}a||(a=b().createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(a)}));return i.handleTracksChange(),i}C(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,i=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),i)for(var r=0;r<i.length;r++){var s=i[r];-1!==this.kinds.indexOf(s.kind)&&(s===n?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Ks);nr.registerComponent("TextTrackMenuItem",Ys);var Qs=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}C(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var s=t[i];if(this.options_.kinds.indexOf(s.kind)>-1&&"showing"===s.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var s=t[i];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&"showing"===s.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Ys);nr.registerComponent("OffTextTrackMenuItem",Qs);var Js=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return C(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Ys),this.label_&&(n=this.label_+" off"),e.push(new Qs(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<i.length;r++){var s=i[r];if(this.kinds_.indexOf(s.kind)>-1){var a=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+s.kind+"-menu-item"),e.push(a)}}return e},t}(Gs);nr.registerComponent("TextTrackButton",Js);var Zs=function(e){function t(t,n){var i,r=n.track,s=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=s.text,n.selected=s.startTime<=a&&a<s.endTime,(i=e.call(this,t,n)||this).track=r,i.cue=s,i}return C(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}(Ks);nr.registerComponent("ChaptersTrackMenuItem",Zs);var $s=function(e){function t(t,n,i){var r;return(r=e.call(this,t,n,i)||this).selectCurrentItem_=function(){r.items.forEach((function(e){e.selected(r.track_.activeCues[0]===e.cue)}))},r}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){if(!t||!t.track||"chapters"===t.track.kind){var n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),e.prototype.update.call(this)):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&e.prototype.update.call(this)}},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Qi(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,i=t.length;n<i;n++){var r=t[n],s=new Zs(this.player_,{track:this.track_,cue:r});e.push(s)}return e},t}(Js);$s.prototype.kind_="chapters",$s.prototype.controlText_="Chapters",nr.registerComponent("ChaptersButton",$s);var ea=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var s=t.textTracks(),a=Di(E(r),r.handleTracksChange);return s.addEventListener("change",a),r.on("dispose",(function(){s.removeEventListener("change",a)})),r}C(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,i=0,r=t.length;i<r;i++){var s=t[i];if(s.kind!==this.kind_&&"showing"===s.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Js);ea.prototype.kind_="descriptions",ea.prototype.controlText_="Descriptions",nr.registerComponent("DescriptionsButton",ea);var ta=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Js);ta.prototype.kind_="subtitles",ta.prototype.controlText_="Subtitles",nr.registerComponent("SubtitlesButton",ta);var na=function(e){function t(t,n){var i;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(i=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+n.kind+" settings dialog"),i}return C(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Ys);nr.registerComponent("CaptionSettingsMenuItem",na);var ia=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new na(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Js);ia.prototype.kind_="captions",ia.prototype.controlText_="Captions",nr.registerComponent("CaptionsButton",ia);var ra=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.createEl=function(t,n,i){var r=e.prototype.createEl.call(this,t,n,i),s=r.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(s.appendChild(Un("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Un("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),r},t}(Ys);nr.registerComponent("SubsCapsMenuItem",ra);var sa=function(e){function t(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(Qi(i.label_)),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new na(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,ra)},t}(Js);sa.prototype.kinds_=["captions","subtitles"],sa.prototype.controlText_="Subtitles",nr.registerComponent("SubsCapsButton",sa);var aa=function(e){function t(t,n){var i,r=n.track,s=t.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled,(i=e.call(this,t,n)||this).track=r,i.addClass("vjs-"+r.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(E(i),t)};return s.addEventListener("change",a),i.on("dispose",(function(){s.removeEventListener("change",a)})),i}C(t,e);var n=t.prototype;return n.createEl=function(t,n,i){var r=e.prototype.createEl.call(this,t,n,i),s=r.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(s.appendChild(Un("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Un("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r},n.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var n=this.player_.audioTracks(),i=0;i<n.length;i++){var r=n[i];r!==this.track&&(r.enabled=r===this.track)}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Ks);nr.registerComponent("AudioTrackMenuItem",aa);var oa=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var i=t[n];e.push(new aa(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e},t}(Gs);oa.prototype.controlText_="Audio Track",nr.registerComponent("AudioTrackButton",oa);var la=function(e){function t(t,n){var i,r=n.rate,s=parseFloat(r,10);return n.label=r,n.selected=s===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(i=e.call(this,t,n)||this).label=r,i.rate=s,i.on(t,"ratechange",(function(e){return i.update(e)})),i}C(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Ks);la.prototype.contentElType="button",nr.registerComponent("PlaybackRateMenuItem",la);var ua=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",i.labelElId_),i.updateVisibility(),i.updateLabel(),i.on(t,"loadstart",(function(e){return i.updateVisibility(e)})),i.on(t,"ratechange",(function(e){return i.updateLabel(e)})),i.on(t,"playbackrateschange",(function(e){return i.handlePlaybackRateschange(e)})),i}C(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Un("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){for(var e=this.playbackRates(),t=[],n=e.length-1;n>=0;n--)t.push(new la(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),i=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[i])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Ws);ua.prototype.controlText_="Playback Rate",nr.registerComponent("PlaybackRateMenuButton",ua);var ca=function(e){function t(){return e.apply(this,arguments)||this}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,i){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===i&&(i={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,i)},t}(nr);nr.registerComponent("Spacer",ca);var da=function(e){function t(){return e.apply(this,arguments)||this}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},t}(ca);nr.registerComponent("CustomControlSpacer",da);var ha=function(e){function t(){return e.apply(this,arguments)||this}return C(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(nr);ha.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in b()&&ha.prototype.options_.children.splice(ha.prototype.options_.children.length-1,0,"pictureInPictureToggle"),nr.registerComponent("ControlBar",ha);var pa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"error",(function(e){return i.open(e)})),i}C(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(fr);pa.prototype.options_=T({},fr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),nr.registerComponent("ErrorDisplay",pa);var fa="vjs-text-track-settings",ma=["#000","Black"],ga=["#00F","Blue"],va=["#0FF","Cyan"],ya=["#0F0","Green"],_a=["#F0F","Magenta"],ba=["#F00","Red"],Ta=["#FFF","White"],Sa=["#FF0","Yellow"],ka=["1","Opaque"],Ea=["0.5","Semi-Transparent"],wa=["0","Transparent"],Ca={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ma,Ta,ba,ya,ga,Sa,_a,va]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ka,Ea,wa]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Ta,ma,ba,ya,ga,Sa,_a,va]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ka,Ea]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[wa,Ea,ka]}};function xa(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}Ca.windowColor.options=Ca.backgroundColor.options;var ja=function(e){function t(t,n){var i;return n.temporary=!1,(i=e.call(this,t,n)||this).updateDisplay=i.updateDisplay.bind(E(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=Un("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===n.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",(function(){i.saveSettings(),i.close()})),i.on(i.$(".vjs-default-button"),"click",(function(){i.setDefaults(),i.updateDisplay()})),sn(Ca,(function(e){i.on(i.$(e.selector),"change",i.updateDisplay)})),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}C(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var i=this;void 0===t&&(t=""),void 0===n&&(n="label");var r=Ca[e],s=r.id.replace("%s",this.id_),a=[t,s].join(" ").trim();return["<"+n+' id="'+s+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(r.options.map((function(e){var t=s+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',i.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return Un("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Un("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Un("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,i=this;return t=function(e,t,n){var r,s,a=(r=i.$(t.selector),s=t.parser,xa(r.options[r.options.selectedIndex].value,s));return void 0!==a&&(e[n]=a),e},void 0===(n={})&&(n=0),rn(e=Ca).reduce((function(n,i){return t(n,e[i],i)}),n)},n.setValues=function(e){var t=this;sn(Ca,(function(n,i){!function(e,t,n){if(t)for(var i=0;i<e.options.length;i++)if(xa(e.options[i].value,n)===t){e.selectedIndex=i;break}}(t.$(n.selector),e[i],n.parser)}))},n.setDefaults=function(){var e=this;sn(Ca,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(y().localStorage.getItem(fa))}catch(e){en.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?y().localStorage.setItem(fa,JSON.stringify(e)):y().localStorage.removeItem(fa)}catch(e){en.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(fr);nr.registerComponent("TextTrackSettings",ja);var Aa=function(e){function t(t,n){var i,r=n.ResizeObserver||y().ResizeObserver;null===n.ResizeObserver&&(r=!1);var s=Ji({createEl:!r,reportTouchActivity:!1},n);return(i=e.call(this,t,s)||this).ResizeObserver=n.ResizeObserver||y().ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=function(e,t,n,i){var r;void 0===i&&(i=y());var s=function(){var s=this,a=arguments,o=function(){r=null,o=null,n||e.apply(s,a)};!r&&n&&e.apply(s,a),i.clearTimeout(r),r=i.setTimeout(o,t)};return s.cancel=function(){i.clearTimeout(r),r=null},s}((function(){i.resizeHandler()}),100,!1,E(i)),r?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){if(i.el_&&i.el_.contentWindow){var e=i.debouncedHandler_,t=i.unloadListener_=function(){xi(this,"resize",e),xi(this,"unload",t),t=null};Ci(i.el_.contentWindow,"unload",t),Ci(i.el_.contentWindow,"resize",e)}},i.one("load",i.loadListener_)),i}C(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(nr);nr.registerComponent("ResizeManager",Aa);var Ia={trackingThreshold:20,liveTolerance:15},Pa=function(e){function t(t,n){var i,r=Ji(Ia,n,{createEl:!1});return(i=e.call(this,t,r)||this).handleVisibilityChange_=function(e){return i.handleVisibilityChange(e)},i.trackLiveHandler_=function(){return i.trackLive_()},i.handlePlay_=function(e){return i.handlePlay(e)},i.handleFirstTimeupdate_=function(e){return i.handleFirstTimeupdate(e)},i.handleSeeked_=function(e){return i.handleSeeked(e)},i.seekToLiveEdge_=function(e){return i.seekToLiveEdge(e)},i.reset_(),i.on(i.player_,"durationchange",(function(e){return i.handleDurationchange(e)})),i.on(i.player_,"canplay",(function(){return i.toggleTracking()})),kn&&"hidden"in b()&&"visibilityState"in b()&&i.on(b(),"visibilitychange",i.handleVisibilityChange_),i}C(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(b().hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(y().performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var i=this.liveCurrentTime(),r=this.player_.currentTime(),s=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-r)>this.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Oi),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(b(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(nr);nr.registerComponent("LiveTracker",Pa);var La,Oa=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),i=[],r="";if(!n.length)return!1;for(var s=0;s<n.length;s++){var a=n[s].src;a&&-1===i.indexOf(a)&&i.push(a)}return!!i.length&&(1===i.length&&(r=i[0]),e.triggerSourceset(r),!0)},Da=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=b().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=b().createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",y().Element.prototype.appendChild.call(this,n),this.innerHTML}}),Ma=function(e,t){for(var n={},i=0;i<e.length&&!((n=Object.getOwnPropertyDescriptor(e[i],t))&&n.set&&n.get);i++);return n.enumerable=!0,n.configurable=!0,n},Na=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},i=function(e){return Ma([e.el(),y().HTMLMediaElement.prototype,y().Element.prototype,Da],"innerHTML")}(e),r=function(n){return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];var a=n.apply(t,r);return Oa(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=r(n[e]))})),Object.defineProperty(t,"innerHTML",Ji(i,{set:r(i.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",i)},e.one("sourceset",t.resetSourceWatch_)}},Ra=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Ir(y().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return y().Element.prototype.setAttribute.call(this,"src",e),e}}),Ua=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return Ma([e.el(),y().HTMLMediaElement.prototype,Ra],"src")}(e),i=t.setAttribute,r=t.load;Object.defineProperty(t,"src",Ji(n,{set:function(i){var r=n.set.call(t,i);return e.triggerSourceset(t.src),r}})),t.setAttribute=function(n,r){var s=i.call(t,n,r);return/src/i.test(n)&&e.triggerSourceset(t.src),s},t.load=function(){var n=r.call(t);return Oa(e)||(e.triggerSourceset(""),Na(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Oa(e)||Na(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=r,t.setAttribute=i,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},Ba=function(e,t,n,i){void 0===i&&(i=!0);var r=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},s={configurable:!0,enumerable:!0,get:function(){var e=n();return r(e),e}};return i&&(s.set=r),Object.defineProperty(e,t,s)},Fa=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var r=t.source,s=!1;if(r&&(i.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?i.setSource(r):i.handleLateInit_(i.el_),t.enableSourceset&&i.setupSourcesetHandling_(),i.isScrubbing_=!1,i.el_.hasChildNodes()){for(var a=i.el_.childNodes,o=a.length,l=[];o--;){var u=a[o];"track"===u.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(u),i.remoteTextTracks().addTrack(u.track),i.textTracks().addTrack(u.track),s||i.el_.hasAttribute("crossorigin")||!Lr(u.src)||(s=!0)):l.push(u))}for(var c=0;c<l.length;c++)i.el_.removeChild(l[c])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&s&&en.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),i.restoreMetadataTracksInIOSNativePlayer_(),(Cn||jn||yn)&&!0===t.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}C(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){Ua(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var i=t[n];"metadata"===i.kind&&e.push({track:i,storedMode:i.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var i=function n(){for(var i=0;i<e.length;i++){var r=e[i];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",i),t.addEventListener("change",i)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",i)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach((function(e){n.el()[i+"Tracks"].removeEventListener(e,n[i+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=Fr[e],i=this.el()[n.getterName],r=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&i&&i.addEventListener){var s={change:function(n){var i={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(i),"text"===e&&t[Hr.remoteText.getterName]().trigger(i)},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<r.length;t++){for(var n=!1,s=0;s<i.length;s++)if(i[s]===r[t]){n=!0;break}n||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=s,Object.keys(s).forEach((function(e){var n=s[e];i.addEventListener(e,n),t.on("dispose",(function(t){return i.removeEventListener(e,n)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},n.proxyNativeTracks_=function(){var e=this;Fr.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=b().createElement("video");var i=Ji({},this.options_.tag&&Gn(this.options_.tag));Cn&&!0===this.options_.nativeControlsForTouch||delete i.controls,Wn(e,an(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Kn(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var r=["loop","muted","playsinline","autoplay"],s=0;s<r.length;s++){var a=r[s],o=this.options_[a];void 0!==o&&(o?Kn(e,a,a):Yn(e,a),e[a]=o)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var i=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",i),t||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&In?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){en(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&gn&&Tn&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=y().navigator&&y().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)cr(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},n.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,i):e.prototype.addTextTrack.call(this,t,n,i)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=b().createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var i=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),i=n.length;i--;)t!==n[i]&&t!==n[i].track||this.el().removeChild(n[i])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),y().performance&&"function"==typeof y().performance.now?e.creationTime=y().performance.now():y().performance&&y().performance.timing&&"number"==typeof y().performance.timing.navigationStart&&(e.creationTime=y().Date.now()-y().performance.timing.navigationStart),e},t}(qr);Ba(Fa,"TEST_VID",(function(){if(Dn()){var e=b().createElement("video"),t=b().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Fa.isSupported=function(){try{Fa.TEST_VID.volume=.5}catch(e){return!1}return!(!Fa.TEST_VID||!Fa.TEST_VID.canPlayType)},Fa.canPlayType=function(e){return Fa.TEST_VID.canPlayType(e)},Fa.canPlaySource=function(e,t){return Fa.canPlayType(e.type)},Fa.canControlVolume=function(){try{var e=Fa.TEST_VID.volume;Fa.TEST_VID.volume=e/2+.1;var t=e!==Fa.TEST_VID.volume;return t&&An?(y().setTimeout((function(){Fa&&Fa.prototype&&(Fa.prototype.featuresVolumeControl=e!==Fa.TEST_VID.volume)})),!1):t}catch(e){return!1}},Fa.canMuteVolume=function(){try{var e=Fa.TEST_VID.muted;return Fa.TEST_VID.muted=!e,Fa.TEST_VID.muted?Kn(Fa.TEST_VID,"muted","muted"):Yn(Fa.TEST_VID,"muted"),e!==Fa.TEST_VID.muted}catch(e){return!1}},Fa.canControlPlaybackRate=function(){if(gn&&Tn&&Sn<58)return!1;try{var e=Fa.TEST_VID.playbackRate;return Fa.TEST_VID.playbackRate=e/2+.1,e!==Fa.TEST_VID.playbackRate}catch(e){return!1}},Fa.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(b().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(b().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(b().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(b().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Fa.supportsNativeTextTracks=function(){return In||An&&Tn},Fa.supportsNativeVideoTracks=function(){return!(!Fa.TEST_VID||!Fa.TEST_VID.videoTracks)},Fa.supportsNativeAudioTracks=function(){return!(!Fa.TEST_VID||!Fa.TEST_VID.audioTracks)},Fa.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];Ba(Fa.prototype,t,(function(){return Fa[n]()}),!0)})),Fa.prototype.featuresVolumeControl=Fa.canControlVolume(),Fa.prototype.movingMediaElementInDOM=!An,Fa.prototype.featuresFullscreenResize=!0,Fa.prototype.featuresProgressEvents=!0,Fa.prototype.featuresTimeupdateEvents=!0,Fa.prototype.featuresVideoFrameCallback=!(!Fa.TEST_VID||!Fa.TEST_VID.requestVideoFrameCallback),Fa.patchCanPlayType=function(){vn>=4&&!_n&&!Tn&&(La=Fa.TEST_VID&&Fa.TEST_VID.constructor.prototype.canPlayType,Fa.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":La.call(this,e)})},Fa.unpatchCanPlayType=function(){var e=Fa.TEST_VID.constructor.prototype.canPlayType;return La&&(Fa.TEST_VID.constructor.prototype.canPlayType=La),e},Fa.patchCanPlayType(),Fa.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Fa.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Fa.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Fa.prototype["set"+Qi(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Fa.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Fa.prototype["set"+Qi(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Fa.prototype[e]=function(){return this.el_[e]()}})),qr.withSourceHandlers(Fa),Fa.nativeSourceHandler={},Fa.nativeSourceHandler.canPlayType=function(e){try{return Fa.TEST_VID.canPlayType(e)}catch(e){return""}},Fa.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Fa.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Pr(e.src);return Fa.nativeSourceHandler.canPlayType("video/"+n)}return""},Fa.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Fa.nativeSourceHandler.dispose=function(){},Fa.registerSourceHandler(Fa.nativeSourceHandler),qr.registerTech("Html5",Fa);var Ha=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Va={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},qa=["tiny","xsmall","small","medium","large","xlarge","huge"],za={};qa.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;za[e]="vjs-layout-"+t}));var Wa={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ga=function(e){function t(n,i,r){var s;if(n.id=n.id||i.id||"vjs_video_"+_i(),(i=an(t.getTagSettings(n),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(i.language=a.getAttribute("lang"))}else for(var o=n;o&&1===o.nodeType;){if(Gn(o).hasOwnProperty("lang")){i.language=o.getAttribute("lang");break}o=o.parentNode}if((s=e.call(this,null,i,r)||this).boundDocumentFullscreenChange_=function(e){return s.documentFullscreenChange_(e)},s.boundFullWindowOnEscKey_=function(e){return s.fullWindowOnEscKey(e)},s.boundUpdateStyleEl_=function(e){return s.updateStyleEl_(e)},s.boundApplyInitTime_=function(e){return s.applyInitTime_(e)},s.boundUpdateCurrentBreakpoint_=function(e){return s.updateCurrentBreakpoint_(e)},s.boundHandleTechClick_=function(e){return s.handleTechClick_(e)},s.boundHandleTechDoubleClick_=function(e){return s.handleTechDoubleClick_(e)},s.boundHandleTechTouchStart_=function(e){return s.handleTechTouchStart_(e)},s.boundHandleTechTouchMove_=function(e){return s.handleTechTouchMove_(e)},s.boundHandleTechTouchEnd_=function(e){return s.handleTechTouchEnd_(e)},s.boundHandleTechTap_=function(e){return s.handleTechTap_(e)},s.isFullscreen_=!1,s.log=tn(s.id_),s.fsApi_=Kt,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,s.audioOnlyMode_=!1,s.audioPosterMode_=!1,s.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&Gn(n),s.language(s.options_.language),i.languages){var l={};Object.getOwnPropertyNames(i.languages).forEach((function(e){l[e.toLowerCase()]=i.languages[e]})),s.languages_=l}else s.languages_=t.prototype.options_.languages;s.resetCache_(),s.poster_=i.poster||"",s.controls_=!!i.controls,n.controls=!1,n.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],n.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach((function(e){if("function"!=typeof s[e])throw new Error('plugin "'+e+'" does not exist')})),s.scrubbing_=!1,s.el_=s.createEl(),Gi(E(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(Ci(b(),s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.boundUpdateStyleEl_);var u=Ji(s.options_);i.plugins&&Object.keys(i.plugins).forEach((function(e){s[e](i.plugins[e])})),i.debug&&s.debug(!0),s.options_.playerOptions=u,s.middleware_=[],s.playbackRates(i.playbackRates),s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),Cn&&s.addClass("vjs-touch-enabled"),An||s.addClass("vjs-workinghover"),t.players[s.id_]=E(s);var c=zt.split(".")[0];return s.addClass("vjs-v"+c),s.userActive(!0),s.reportUserActivity(),s.one("play",(function(e){return s.listenForUserActivity_(e)})),s.on("stageclick",(function(e){return s.handleStageClick_(e)})),s.on("keydown",(function(e){return s.handleKeyDown(e)})),s.on("languagechange",(function(e){return s.handleLanguagechange(e)})),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.on("ready",(function(){s.audioPosterMode(s.options_.audioPosterMode),s.audioOnlyMode(s.options_.audioOnlyMode)})),s}C(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),xi(b(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),xi(b(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Wr[this.id()]=null,Vr.names.forEach((function(e){var t=Vr[e],i=n[t.getterName]();i&&i.off&&i.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,i=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();i?t=this.el_=n.parentNode:r||(t=this.el_=e.prototype.createEl.call(this,"div"));var s=Gn(n);if(r){for(t=this.el_=n,n=this.tag=b().createElement("video");t.children.length;)n.appendChild(t.firstChild);Hn(t,"video-js")||Vn(t,"video-js"),t.appendChild(n),i=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),s.tabindex="-1",(kn||Tn&&wn)&&(n.setAttribute("role","application"),s.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){r&&"class"===e||t.setAttribute(e,s[e]),r&&n.setAttribute(e,s[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==y().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=gi("vjs-styles-dimensions");var a=li(".vjs-styles-defaults"),o=li("head");o.insertBefore(this.styleEl_,a?a.nextSibling:o.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var l=n.getElementsByTagName("a"),u=0;u<l.length;u++){var c=l.item(u);Vn(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!i&&n.parentNode.insertBefore(t,n),Fn(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):en.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var i=parseFloat(t);isNaN(i)?en.error('Improper value "'+t+'" supplied for for '+e):(this[n]=i,this.updateStyleEl_())},n.fluid=function(e){var t,n,i=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,Ui(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){i.on(["playerreset","resize"],i.boundUpdateStyleEl_)},Ui(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==y().VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,i=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=i[1]/i[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),vi(this.styleEl_,"\n      ."+n+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+n+".vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: "+100*r+"%;\n      }\n    ")}else{var s="number"==typeof this.width_?this.width_:this.options_.width,a="number"==typeof this.height_?this.height_:this.options_.height,o=this.tech_&&this.tech_.el();o&&(s>=0&&(o.width=s),a>=0&&(o.height=a))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var i=Qi(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(qr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var s=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);var a={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Vr.names.forEach((function(e){var t=Vr[e];a[t.getterName]=n[t.privateName]})),an(a,this.options_[i]),an(a,this.options_[r]),an(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var o=qr.getTech(e);if(!o)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new o(a),this.tech_.ready(Di(this,this.handleTechReady_),!0),pr(this.textTracksJson_||[],this.tech_),Ha.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+Qi(e)+"_"](t)}))})),Object.keys(Va).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Va[e]+"_"].bind(n),event:t}):n["handleTech"+Va[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||Fn(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Vr.names.forEach((function(t){var n=Vr[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=hr(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&en.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,i=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var i=t.play();if(ur(i))return i.catch((function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():i():ur(n=this.play())&&(n=n.catch(i)),ur(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var i=e.$$("source"),r=0;r<i.length;r++){var s=i[r];if(s.type&&s.src&&s.src===t)return s.type}return ts(t)}(this,t)),this.cache_.source=Ji({},e,{src:t,type:n});for(var i=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),r=[],s=this.$$("source"),a=[],o=0;o<s.length;o++){var l=Gn(s[o]);r.push(l),l.src&&l.src===t&&a.push(l.src)}a.length&&!i.length?this.cache_.sources=r:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(n=function(){}),n(r),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(en.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?cr(this.play()):this.pause()))},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),i=b()[this.fsApi_.fullscreenElement]===n;!i&&n.matches?i=n.matches(":"+this.fsApi_.fullscreen):!i&&n.msMatchesSelector&&(i=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}},n.handleTechFullscreenChange_=function(e,t){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){n.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in Qr)return function(e,t,n,i){return t[n](e.reduce(Zr(n),i))}(this.middleware_,this.tech_,e,t);if(e in Jr)return Kr(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw en(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Yr)return function(e,t,n){return e.reduceRight(Zr(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Jr)return Kr(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw en("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw en("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw en(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||y().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=cr),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!In&&!An||this.load());var i=this.techGet_("play");null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||sr(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=sr(0,0)),e},n.bufferedPercent=function(){return ar(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||y().Promise;if(t){var n=this;return new t((function(t,i){function r(){n.off("fullscreenerror",a),n.off("fullscreenchange",s)}function s(){r(),t()}function a(e,t){r(),i(t)}n.one("fullscreenchange",s),n.one("fullscreenerror",a);var o=n.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(t,i))}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),i}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||y().Promise;if(e){var t=this;return new e((function(e,n){function i(){t.off("fullscreenerror",s),t.off("fullscreenchange",r)}function r(){i(),e()}function s(e,t){i(),n(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",s);var a=t.exitFullscreenHelper_();a&&(a.then(i,i),a.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=b()[this.fsApi_.exitFullscreen]();return t&&cr(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=b().documentElement.style.overflow,Ci(b(),"keydown",this.boundFullWindowOnEscKey_),b().documentElement.style.overflow="hidden",Vn(b().body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){k().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,xi(b(),"keydown",this.boundFullWindowOnEscKey_),b().documentElement.style.overflow=this.docOrigOverflow,qn(b().body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in b()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in b())return b().exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,i=void 0===n?function(e){return k().isEventKey(e,"f")}:n,r=t.muteKey,s=void 0===r?function(e){return k().isEventKey(e,"m")}:r,a=t.playPauseKey,o=void 0===a?function(e){return k().isEventKey(e,"k")||k().isEventKey(e,"Space")}:a;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();var l=nr.getComponent("FullscreenToggle");!1!==b()[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),nr.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),nr.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,i=this.options_.techOrder;n<i.length;n++){var r=i[n],s=qr.getTech(r);if(s||(s=nr.getComponent(r)),s){if(s.isSupported()&&(t=s.canPlayType(e)))return t}else en.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n,i=this,r=this.options_.techOrder.map((function(e){return[e,qr.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(en.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),s=function(e,t,n){var i;return e.some((function(e){return t.some((function(t){if(i=n(e,t))return!0}))})),i},a=function(e,t){var n=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}};return t=this.options_.sourceOrder?s(e,r,(n=a,function(e,t){return n(t,e)})):s(r,e,a),t||!1},n.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var i=ns(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),Xr(this,i[0],(function(e,r){var s,a;if(n.middleware_=r,t||(n.cache_.sources=i),n.updateSourceCaches_(e),n.src_(e))return i.length>1?n.handleSrc_(i.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void n.triggerReady());s=r,a=n.tech_,s.forEach((function(e){return e.setTech&&e.setTech(a)}))})),this.options_.retryOnError&&i.length>1){var r=function(){n.error(null),n.handleSrc_(i.slice(1),!0)},s=function(){n.off("error",r)};this.one("error",r),this.one("playing",s),this.resetRetryOnError_=function(){n.off("error",r),n.off("playing",s)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,i=this,r=this.selectSource([e]);return!r||(t=r.tech,n=this.techName_,Qi(t)!==Qi(n)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){i.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||y().Promise;this.paused()||!t?this.doReset_():cr(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Ui(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(Gt("beforeerror").forEach((function(n){var i=n(t,e);on(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",(function(){this.off(["click","touchstart"],n)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new or(e),this.addClass("vjs-error"),en.error("(CODE:"+this.error_.code+" "+or.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Gt("error").forEach((function(e){return e(t,t.error_)}))},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,i=Di(this,this.reportUserActivity),r=function(t){i(),this.clearInterval(e)};this.on("mousedown",(function(){i(),this.clearInterval(e),e=this.setInterval(i,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,i())})),this.on("mouseup",r),this.on("mouseleave",r);var s,a=this.getChild("controlBar");!a||An||gn||(a.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",i),this.on("keyup",i),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),i=n&&n.currentHeight();t.forEach((function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")},n.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((function(e){return e.show()})),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},n.audioOnlyMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var n=this.options_.Promise||y().Promise;if(n){if(e){var i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),n.all(i).then((function(){return t.enableAudioOnlyUI_()}))}return n.resolve().then((function(){return t.disableAudioOnlyUI_()}))}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},n.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.audioPosterMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var n=this.options_.Promise||y().Promise;return n?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.disablePosterModeUI_()})):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ui(this)&&this.trigger("languagechange"))},n.languages=function(){return Ji(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Ji(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var i=t[n];(i=Ji(i)).player=void 0,e.tracks[n]=i}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var i=new fr(this,t);return this.addChild(i),i.on("dispose",(function(){n.removeChild(i)})),i.open(),i},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<qa.length;n++){var i=qa[n];if(t<=this.breakpoints_[i]){if(e===i)return;e&&this.removeClass(za[e]),this.addClass(za[i]),this.breakpoint_=i;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=an({},Wa,e),this.updateCurrentBreakpoint_()),an(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return za[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Ji(e);var i=this.cache_.media,r=i.artwork,s=i.poster,a=i.src,o=i.textTracks;!r&&s&&(this.cache_.media.artwork=[{src:s,type:ts(s)}]),a&&this.src(a),s&&this.poster(s),Array.isArray(o)&&o.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:ts(t.poster)}]),t}return Ji(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=Gn(e),i=n["data-setup"];if(Hn(e,"vjs-fill")&&(n.fill=!0),Hn(e,"vjs-fluid")&&(n.fluid=!0),null!==i){var r=j()(i||"{}"),s=r[0],a=r[1];s&&en.error(s),an(n,a)}if(an(t,n),e.hasChildNodes())for(var o=e.childNodes,l=0,u=o.length;l<u;l++){var c=o[l],d=c.nodeName.toLowerCase();"source"===d?t.sources.push(Gn(c)):"track"===d&&t.tracks.push(Gn(c))}return t},n.flexNotSupported_=function(){var e=b().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},n.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(nr);Vr.names.forEach((function(e){var t=Vr[e];Ga.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Ga.prototype.crossorigin=Ga.prototype.crossOrigin,Ga.players={};var Xa=y().navigator;Ga.prototype.options_={techOrder:qr.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Xa&&(Xa.languages&&Xa.languages[0]||Xa.userLanguage||Xa.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Ga.prototype[e]=function(){return this.techGet_(e)}})),Ha.forEach((function(e){Ga.prototype["handleTech"+Qi(e)+"_"]=function(){return this.trigger(e)}})),nr.registerComponent("Player",Ga);var Ka="plugin",Ya={},Qa=function(e){return Ya.hasOwnProperty(e)},Ja=function(e){return Qa(e)?Ya[e]:void 0},Za=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},$a=function(e,t,n){var i=(n?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},eo=function(e,t){return t.prototype.name=e,function(){$a(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var s=D(t,[this].concat(i));return this[e]=function(){return s},$a(this,s.getEventHash()),s}},to=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),Gi(this),delete this.trigger,Ki(this,this.constructor.defaultState),Za(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),ji(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=eo(e,Ya[e])},e.isBasic=function(t){var n="string"==typeof t?Ja(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(Qa(t))en.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Ga.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return Ya[t]=n,t!==Ka&&(e.isBasic(n)?Ga.prototype[t]=function(e,t){var n=function(){$a(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Za(this,e),$a(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Ga.prototype[t]=eo(t,n)),n},e.deregisterPlugin=function(e){if(e===Ka)throw new Error("Cannot de-register base plugin.");Qa(e)&&(delete Ya[e],delete Ga.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(Ya)),e.forEach((function(e){var n=Ja(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=Ja(e);return t&&t.VERSION||""},e}();to.getPlugin=Ja,to.BASE_PLUGIN_NAME=Ka,to.registerPlugin(Ka,to),Ga.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Ga.prototype.hasPlugin=function(e){return!!Qa(e)};var no=function(e){return 0===e.indexOf("#")?e.slice(1):e};function io(e,t,n){var i=io.getPlayer(e);if(i)return t&&en.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&i.ready(n),i;var r="string"==typeof e?li("#"+no(e)):e;if(!Mn(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||en.warn("The element supplied is not included in the DOM"),t=t||{},Gt("beforesetup").forEach((function(e){var n=e(r,Ji(t));on(n)&&!Array.isArray(n)?t=Ji(t,n):en.error("please return an object in beforesetup hooks")}));var s=nr.getComponent("Player");return i=new s(r,t,n),Gt("setup").forEach((function(e){return e(i)})),i}if(io.hooks_=Wt,io.hooks=Gt,io.hook=function(e,t){Gt(e,t)},io.hookOnce=function(e,t){Gt(e,[].concat(t).map((function(t){return function n(){return Xt(e,n),t.apply(void 0,arguments)}})))},io.removeHook=Xt,!0!==y().VIDEOJS_NO_DYNAMIC_STYLE&&Dn()){var ro=li(".vjs-styles-defaults");if(!ro){ro=gi("vjs-styles-defaults");var so=li("head");so&&so.insertBefore(ro,so.firstChild),vi(ro,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}pi(1,io),io.VERSION=zt,io.options=Ga.prototype.options_,io.getPlayers=function(){return Ga.players},io.getPlayer=function(e){var t,n=Ga.players;if("string"==typeof e){var i=no(e),r=n[i];if(r)return r;t=li("#"+i)}else t=e;if(Mn(t)){var s=t,a=s.player,o=s.playerId;if(a||n[o])return a||n[o]}},io.getAllPlayers=function(){return Object.keys(Ga.players).map((function(e){return Ga.players[e]})).filter(Boolean)},io.players=Ga.players,io.getComponent=nr.getComponent,io.registerComponent=function(e,t){qr.isTech(t)&&en.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),nr.registerComponent.call(nr,e,t)},io.getTech=qr.getTech,io.registerTech=qr.registerTech,io.use=function(e,t){zr[e]=zr[e]||[],zr[e].push(t)},Object.defineProperty(io,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(io.middleware,"TERMINATOR",{value:Gr,writeable:!1,enumerable:!0}),io.browser=Pn,io.TOUCH_ENABLED=Cn,io.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},i={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),i=t):"function"==typeof t&&(n=t),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(n,e),e&&(n.super_=e),i)i.hasOwnProperty(r)&&(n.prototype[r]=i[r]);return n},io.mergeOptions=Ji,io.bind=Di,io.registerPlugin=to.registerPlugin,io.deregisterPlugin=to.deregisterPlugin,io.plugin=function(e,t){return en.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),to.registerPlugin(e,t)},io.getPlugins=to.getPlugins,io.getPlugin=to.getPlugin,io.getPluginVersion=to.getPluginVersion,io.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),io.options.languages=Ji(io.options.languages,((n={})[e]=t,n)),io.options.languages[e]},io.log=en,io.createLogger=tn,io.createTimeRange=io.createTimeRanges=sr,io.formatTime=ys,io.setFormatTime=function(e){vs=e},io.resetFormatTime=function(){vs=gs},io.parseUrl=Ar,io.isCrossOrigin=Lr,io.EventTarget=Ni,io.on=Ci,io.one=Ai,io.off=xi,io.trigger=ji,io.xhr=I(),io.TextTrack=Nr,io.AudioTrack=Rr,io.VideoTrack=Ur,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){io[e]=function(){return en.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),ci[e].apply(null,arguments)}})),io.computedStyle=un,io.dom=ci,io.url=Or,io.defineLazyProperty=Ba,io.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var ao=U,oo=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},lo=function(e){return io.log.debug?io.log.debug.bind(io,"VHS:",e+" >"):function(){}},uo=1/30,co=.1,ho=function(e,t){var n,i=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return io.createTimeRanges(i)},po=function(e,t){return ho(e,(function(e,n){return e-co<=t&&n+co>=t}))},fo=function(e,t){return ho(e,(function(e){return e-uo>=t}))},mo=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},go=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},vo=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},yo=function(e,t){var n=0;if(!e||!e.length)return n;for(var i=0;i<e.length;i++){var r=e.start(i),s=e.end(i);t>s||(n+=t>r&&t<=s?s-t:s-r)}return n},_o=io.createTimeRange,bo=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},To=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(i,r){e.push({duration:i.duration,segmentIndex:n,partIndex:r,part:i,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},So=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},ko=function(e){var t=e.preloadSegment;if(t){var n=t.parts,i=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return i+=n&&n.length?n.length:0}},Eo=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=So(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},wo=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var i=function(e,t){var n=0,i=t-e.mediaSequence,r=e.segments[i];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;i--;){if(void 0!==(r=e.segments[i]).end)return{result:n+r.end,precise:!0};if(n+=bo(e,r),void 0!==r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(i.precise)return i.result;var r=function(e,t){for(var n,i=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(n=e.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=bo(e,n),void 0!==n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:i.result+n},Co=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return y()[1/0]}return wo(e,t,n)},xo=function(e){var t=e.defaultDuration,n=e.durationList,i=e.startIndex,r=e.endIndex,s=0;if(i>r){var a=[r,i];i=a[0],r=a[1]}if(i<0){for(var o=i;o<Math.min(0,r);o++)s+=t;i=0}for(var l=i;l<r;l++)s+=n[l].duration;return s},jo=function(e,t,n,i){if(!e||!e.segments)return null;if(e.endList)return Co(e);if(null===t)return null;t=t||0;var r=wo(e,e.mediaSequence+e.segments.length,t);return n&&(r-=i="number"==typeof i?i:Eo(null,e)),Math.max(0,r)},Ao=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Io=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Po=function(e){var t=Ao(e);return!e.disabled&&!t},Lo=function(e,t){return t.attributes&&t.attributes[e]},Oo=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!Po(e)&&(e.attributes.BANDWIDTH||0)<n})).length},Do=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},Mo=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},i=!1;for(var r in n){for(var s in n[r])if(i=t(n[r][s]))break;if(i)break}return!!i},No=function(e){if(!e||!e.playlists||!e.playlists.length)return Mo(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],i=n.attributes&&n.attributes.CODECS;return i&&i.split(",").every((function(e){return ie(e)}))||Mo(e,(function(e){return Do(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var i=t(n);if("continue"!==i&&"object"==typeof i)return i.v}return!0},Ro={liveEdgeDelay:Eo,duration:Co,seekable:function(e,t,n){var i=t||0,r=jo(e,t,!0,n);return null===r?_o():_o(i,r)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,i=e.startingSegmentIndex,r=e.startingPartIndex,s=e.startTime,a=e.experimentalExactManifestTimings,o=n-s,l=To(t),u=0,c=0;c<l.length;c++){var d=l[c];if(i===d.segmentIndex&&("number"!=typeof r||"number"!=typeof d.partIndex||r===d.partIndex)){u=c;break}}if(o<0){if(u>0)for(var h=u-1;h>=0;h--){var p=l[h];if(o+=p.duration,a){if(o<0)continue}else if(o+uo<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:s-xo({defaultDuration:t.targetDuration,durationList:l,startIndex:u,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n}}if(u<0){for(var f=u;f<0;f++)if((o-=t.targetDuration)<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n};u=0}for(var m=u;m<l.length;m++){var g=l[m];if(o-=g.duration,a){if(o>0)continue}else if(o-uo>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+xo({defaultDuration:t.targetDuration,durationList:l,startIndex:u,endIndex:m})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:n}},isEnabled:Po,isDisabled:function(e){return e.disabled},isBlacklisted:Ao,isIncompatible:Io,playlistEnd:jo,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:Lo,estimateSegmentRequestTime:function(e,t,n,i){return void 0===i&&(i=0),Lo("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*i)/t:NaN},isLowestEnabledRendition:Oo,isAudioOnly:No,playlistMatch:Do,segmentDurationWithParts:bo},Uo=io.log,Bo=function(e,t){return e+"-"+t},Fo=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var i in e.mediaGroups[n])for(var r in e.mediaGroups[n][i]){var s=e.mediaGroups[n][i][r];t(s,n,i,r)}}))},Ho=function(e){var t=e.playlist,n=e.uri,i=e.id;t.id=i,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Vo=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var i="placeholder-uri-"+n;e.playlists[n].uri=i}var r=No(e);Fo(e,(function(t,n,i,s){var a="placeholder-uri-"+n+"-"+i+"-"+s;if(!t.playlists||!t.playlists.length){if(r&&"AUDIO"===n&&!t.uri)for(var o=0;o<e.playlists.length;o++){var l=e.playlists[o];if(l.attributes&&l.attributes.AUDIO&&l.attributes.AUDIO===i)return}t.playlists=[T({},t)]}t.playlists.forEach((function(t,n){var i=Bo(n,a);t.uri?t.resolvedUri=t.resolvedUri||ao(e.uri,t.uri):(t.uri=0===n?a:i,t.resolvedUri=t.uri),t.id=t.id||i,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Ho({playlist:n,id:Bo(t,n.uri)}),n.resolvedUri=ao(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Uo.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Fo(e,(function(t){t.uri&&(t.resolvedUri=ao(e.uri,t.uri))}))}(e)},qo=io.mergeOptions,zo=io.EventTarget,Wo=function(e,t){if(!e)return t;var n=qo(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var i=0;i<t.parts.length;i++)e.parts&&e.parts[i]&&(n.parts[i]=qo(e.parts[i],t.parts[i]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},Go=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=ao(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ao(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ao(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ao(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=ao(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=ao(t,e.uri))}))},Xo=function(e){var t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(var i=0;i<n.preloadHints.length;i++)if("MAP"===n.preloadHints[i].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},Ko=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},Yo=function(e,t,n){void 0===n&&(n=Ko);var i=qo(e,{}),r=i.playlists[t.id];if(!r)return null;if(n(r,t))return null;t.segments=Xo(t);var s=qo(r,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(var a=0;a<t.skip.skippedSegments;a++)t.segments.unshift({skipped:!0})}s.segments=function(e,t,n){var i=e.slice(),r=t.slice();n=n||0;for(var s,a=[],o=0;o<r.length;o++){var l=i[o+n],u=r[o];l?(s=l.map||s,a.push(Wo(l,u))):(s&&!u.map&&(u.map=s),a.push(u))}return a}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}s.segments.forEach((function(e){Go(e,s.resolvedUri)}));for(var o=0;o<i.playlists.length;o++)i.playlists[o].id===t.id&&(i.playlists[o]=s);return i.playlists[t.id]=s,i.playlists[t.uri]=s,Fo(e,(function(e,n,i,r){if(e.playlists)for(var a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=s)})),i},Qo=function(e,t){var n=e.segments||[],i=n[n.length-1],r=i&&i.parts&&i.parts[i.parts.length-1],s=r&&r.duration||i&&i.duration;return t&&s?1e3*s:500*(e.partTargetDuration||e.targetDuration||10)},Jo=function(e){function t(t,n,i){var r;if(void 0===i&&(i={}),r=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");r.logger_=lo("PlaylistLoader");var s=i,a=s.withCredentials,o=void 0!==a&&a,l=s.handleManifestRedirects,u=void 0!==l&&l;r.src=t,r.vhs_=n,r.withCredentials=o,r.handleManifestRedirects=u;var c=n.options_;return r.customTagParsers=c&&c.customTagParsers||[],r.customTagMappers=c&&c.customTagMappers||[],r.experimentalLLHLS=c&&c.experimentalLLHLS||!1,io.browser.IE_VERSION&&(r.experimentalLLHLS=!1),r.state="HAVE_NOTHING",r.handleMediaupdatetimeout_=r.handleMediaupdatetimeout_.bind(E(r)),r.on("mediaupdatetimeout",r.handleMediaupdatetimeout_),r}C(t,e);var n=t.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),n=ao(this.master.uri,t.uri);this.experimentalLLHLS&&(n=function(e,t){if(t.endList||!t.serverControl)return e;var n={};if(t.serverControl.canBlockReload){var i=t.preloadSegment,r=t.mediaSequence+t.segments.length;if(i){var s=i.parts||[],a=ko(t)-1;a>-1&&a!==s.length-1&&(n._HLS_part=a),(a>-1||s.length)&&r--}n._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var o=new(y().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&o.searchParams.set(e,n[e])})),e=o.toString()}return e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},n.playlistRequestError=function(e,t,n){var i=t.uri,r=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+i+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,i=e.manifestString,r=e.customTagParsers,s=void 0===r?[]:r,a=e.customTagMappers,o=void 0===a?[]:a,l=e.experimentalLLHLS,u=new J;t&&u.on("warn",t),n&&u.on("info",n),s.forEach((function(e){return u.addParser(e)})),o.forEach((function(e){return u.addTagMapper(e)})),u.push(i),u.end();var c=u.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}var h=So(c);if(h.length&&!c.partTargetDuration){var p=h.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+p),Uo.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),c.partTargetDuration=p}return c}({onwarn:function(e){var i=e.message;return t.logger_("m3u8-parser warn for "+n+": "+i)},oninfo:function(e){var i=e.message;return t.logger_("m3u8-parser info for "+n+": "+i)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistObject,i=e.url,r=e.id;this.request=null,this.state="HAVE_METADATA";var s=n||this.parseManifest_({url:i,manifestString:t});s.lastRequest=Date.now(),Ho({playlist:s,uri:i,id:r});var a=Yo(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,a?(this.master=a,this.media_=this.master.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Qo(this.media(),!!a)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),y().clearTimeout(this.mediaUpdateTimeout),y().clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(y().clearTimeout(this.finalRenditionTimeout),t){var i=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=y().setTimeout(this.media.bind(this,e,!1),i)}else{var r=this.state,s=!this.media_||e.id!==this.media_.id,a=this.master.playlists[e.id];if(a&&a.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MASTER"===r?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Qo(e,!0)),s){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,i){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=oo(n.handleManifestRedirects,e.resolvedUri,i),t)return n.playlistRequestError(n.request,e,r);n.haveMetadata({playlistString:i.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===r?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(y().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(y().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var i=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=y().setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),i)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(y().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=y().setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=y().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=oo(e.handleManifestRedirects,e.src,n);var i=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(i)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Vo(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Xo(e),e.segments.forEach((function(t){Go(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||y().location.href;this.master=function(e,t){var n=Bo(0,t),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:y().location.href,resolvedUri:y().location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return i.playlists[n]=i.playlists[0],i.playlists[t]=i.playlists[0],i}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(zo),Zo=io.xhr,$o=io.mergeOptions,el=function(e,t,n,i){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),i(t,e)},tl=function(){var e=function e(t,n){t=$o({timeout:45e3},t);var i=e.beforeRequest||io.Vhs.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(t);r&&(t=r)}var s=(!0===io.Vhs.xhr.original?Zo:io.Vhs.xhr)(t,(function(e,t){return el(s,e,t,n)})),a=s.abort;return s.abort=function(){return s.aborted=!0,a.apply(s,arguments)},s.uri=t.uri,s.requestTime=Date.now(),s};return e.original=!0,e},nl=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?y().BigInt(t.offset)+y().BigInt(t.length)-y().BigInt(1):t.offset+t.length-1)),n},il=function(e,t){return e.start(t)+"-"+e.end(t)},rl=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},sl=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},al=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];de(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t},ol=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},ll=function(e){return e.resolvedUri},ul=function(e){for(var t=Array.prototype.slice.call(e),n=16,i="",r=0;r<t.length/n;r++)i+=t.slice(r*n,r*n+n).map(rl).join("")+" "+t.slice(r*n,r*n+n).map(sl).join("")+"\n";return i},cl=Object.freeze({__proto__:null,createTransferableMessage:al,initSegmentId:ol,segmentKeyId:ll,hexDump:ul,tagDump:function(e){var t=e.bytes;return ul(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=il(e,t)+" ";return n}}),dl=function(e){var t=e.playlist,n=e.time,i=void 0===n?void 0:n,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===i)return r({message:"getProgramTime: playlist and time must be provided"});var s=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,i=0,r=0;r<t.segments.length&&!(e<=(i=(n=t.segments[r]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration));r++);var s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>i){if(e>i+.25*s.duration)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(i,t);if(!s)return r({message:"valid programTime was not found"});if("estimate"===s.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});var a={mediaSeconds:i},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*i)}(i,s.segment);return o&&(a.programDateTime=o.toISOString()),r(null,a)},hl=function e(t){var n=t.programTime,i=t.playlist,r=t.retryCount,s=void 0===r?2:r,a=t.seekTo,o=t.pauseAfterSeek,l=void 0===o||o,u=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!i||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(i))return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri});var d=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var i=t.segments[0];if(n<i.dateTimeObject)return null;for(var r=0;r<t.segments.length-1&&(i=t.segments[r],!(n<t.segments[r+1].dateTimeObject));r++);var s,a=t.segments[t.segments.length-1],o=a.dateTimeObject,l=a.videoTimingInfo?(s=a.videoTimingInfo).transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds:a.duration+.25*a.duration;return n>new Date(o.getTime()+1e3*l)?null:(n>o&&(i=a),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:Ro.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})}(n,i);if(!d)return c({message:n+" was not found in the stream"});var h=d.segment,p=function(e,t){var n,i;try{n=new Date(e),i=new Date(t)}catch(e){}var r=n.getTime();return(i.getTime()-r)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===s?c({message:n+" is not buffered yet. Try again"}):(a(d.estimatedStart+p),void u.one("seeked",(function(){e({programTime:n,playlist:i,retryCount:s-1,seekTo:a,pauseAfterSeek:l,tech:u,callback:c})})));var f=h.start+p;u.one("seeked",(function(){return c(null,u.currentTime())})),l&&u.pause(),a(f)},pl=function(e,t){if(4===e.readyState)return t()},fl=function(e,t,n){var i,r=[],s=!1,a=function(e,t,i,r){return t.abort(),s=!0,n(e,t,i,r)},o=function(e,t){if(!s){if(e)return a(e,t,"",r);var n=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return he(t[0]);var i=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),r=new Uint8Array(i),s=0;return t.forEach((function(e){e=he(e),r.set(e,s),s+=e.byteLength})),r}(r,ve(n,!0)),i=i||St(r),r.length<10||i&&r.length<i+2)return pl(t,(function(){return a(e,t,"",r)}));var o=Vt(r);return"ts"===o&&r.length<188||!o&&r.length<376?pl(t,(function(){return a(e,t,"",r)})):a(null,t,o,r)}},l={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,el(e,null,{statusCode:e.status},o)}))}},u=t(l,(function(e,t){return el(u,e,t,o)}));return u},ml=io.EventTarget,gl=io.mergeOptions,vl=function(e,t){if(!Ko(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var i=e.segments[n],r=t.segments[n];if(i.uri!==r.uri)return!1;if(i.byterange||r.byterange){var s=i.byterange,a=r.byterange;if(s&&!a||!s&&a)return!1;if(s.offset!==a.offset||s.length!==a.length)return!1}}return!0},yl=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},_l=function(e,t){var n={};for(var i in e){var r=e[i].sidx;if(r){var s=qe(r);if(!t[s])break;var a=t[s].sidxInfo;yl(a,r)&&(n[s]=t[s])}}return n},bl=function(e){function t(t,n,i,r){var s;void 0===i&&(i={}),(s=e.call(this)||this).masterPlaylistLoader_=r||E(s),r||(s.isMaster_=!0);var a=i,o=a.withCredentials,l=void 0!==o&&o,u=a.handleManifestRedirects,c=void 0!==u&&u;if(s.vhs_=n,s.withCredentials=l,s.handleManifestRedirects=c,!t)throw new Error("A non-empty playlist URL or object is required");return s.on("minimumUpdatePeriod",(function(){s.refreshXml_()})),s.on("mediaupdatetimeout",(function(){s.refreshMedia_(s.media().id)})),s.state="HAVE_NOTHING",s.loadedPlaylists_={},s.logger_=lo("DashPlaylistLoader"),s.isMaster_?(s.masterPlaylistLoader_.srcUrl=t,s.masterPlaylistLoader_.sidxMapping_={}):s.childPlaylist_=t,s}C(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var i=this,r=e.sidx&&qe(e.sidx);if(e.sidx&&r&&!this.masterPlaylistLoader_.sidxMapping_[r]){var s=oo(this.handleManifestRedirects,e.sidx.resolvedUri),a=function(s,a){if(!i.requestErrored_(s,a,t)){var o,l=i.masterPlaylistLoader_.sidxMapping_;try{o=bt()(he(a.response).subarray(8))}catch(e){return void i.requestErrored_(e,a,t)}return l[r]={sidxInfo:e.sidx,sidx:o},Re(e,o,e.sidx.resolvedUri),n(!0)}};this.request=fl(s,this.vhs_.xhr,(function(t,n,r,o){if(t)return a(t,n);if(!r||"mp4"!==r)return a({status:n.status,message:"Unsupported "+(r||"unknown")+" container type for sidx segment at URL: "+s,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var l=e.sidx.byterange,u=l.offset,c=l.length;if(o.length>=c+u)return a(t,{response:o.subarray(u,u+c),status:n.status,uri:n.uri});i.request=i.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:nl({byterange:e.sidx.byterange})},a)}))}else this.mediaRequest_=y().setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},y().clearTimeout(this.minimumUpdatePeriodTimeout_),y().clearTimeout(this.mediaRequest_),y().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(i){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),y().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(y().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;y().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=y().setTimeout((function(){return t.load()}),i)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=y().setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,i){if(!t.requestErrored_(n,i)){var r=i.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?t.masterLoaded_=Date.parse(i.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=oo(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,i),r?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(i,r)}))):e(i,r)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=yt(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:ao(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(i,r){if(t.request){if(i)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var s;s="HEAD"===n.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):t.masterLoaded_:Date.parse(r.responseText),t.masterPlaylistLoader_.clientOffset_=s-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,i,r,s,a,o=this.masterPlaylistLoader_.master,l=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:o},t=e.masterXml,n=e.srcUrl,i=e.clientOffset,r=e.sidxMapping,s=e.previousManifest,a=vt(t,{manifestUri:n,clientOffset:i,sidxMapping:r,previousManifest:s}),Vo(a,n),a);o&&(l=function(e,t,n){for(var i=!0,r=gl(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),s=0;s<t.playlists.length;s++){var a=t.playlists[s];if(a.sidx){var o=qe(a.sidx);n&&n[o]&&n[o].sidx&&Re(a,n[o].sidx,a.sidx.resolvedUri)}var l=Yo(r,a,vl);l&&(r=l,i=!1)}return Fo(t,(function(e,t,n,s){if(e.playlists&&e.playlists.length){var a=e.playlists[0].id,o=Yo(r,e.playlists[0],vl);o&&((r=o).mediaGroups[t][n][s].playlists[0]=r.playlists[a],i=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:r}(o,l,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=l||o;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!o||l&&l.minimumUpdatePeriod!==o.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(l)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(y().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=y().setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var i,r,s;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(i=e.masterPlaylistLoader_.master,r=e.masterPlaylistLoader_.sidxMapping_,s=_l(i.playlists,r),Fo(i,(function(e,t,n,i){if(e.playlists&&e.playlists.length){var a=e.playlists;s=gl(s,_l(a,r))}})),s),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,i=!this.media_||this.media_!==n[e];if(i?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=y().setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Qo(t.media(),Boolean(i))))}()}this.trigger("loadedplaylist")},t}(ml),Tl={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Sl=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},kl=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=Sl(new Worker(t));n.objURL=t;var i=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),i.call(this)},n}},El=function(e){return"var browserWorkerPolyFill = "+Sl.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},wl=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Cl=El(wl((function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,s;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(s=[],i=arguments.length,i=1;i<arguments.length;++i)s.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,s)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,i,r,s,a,o,l,u,c,d,h,p,f,m,g,v,y,_,b,T,S,k,E,w,C,x,j,A,I,P,L,O,D,M,N,R,U,B,F,H,V=e,q=Math.pow(2,32),z={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:n.getUint32(0)*q+n.getUint32(4)},MAX_UINT32:q},W=z.MAX_UINT32;!function(){var e;if(k={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in k)k.hasOwnProperty(e)&&(k[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),w=new Uint8Array([0,0,0,1]),x=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),j=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),A={video:x,audio:j},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),O=new Uint8Array([0,0,0,0,0,0,0,0]),D=O,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=O,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},i=function(){return t(k.dinf,t(k.dref,L))},r=function(e){return t(k.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return t(k.hdlr,A[e])},m=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(k.mdhd,n)},f=function(e){return t(k.mdia,m(e),g(e.type),o(e))},a=function(e){return t(k.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(k.minf,"video"===e.type?t(k.vmhd,I):t(k.smhd,P),i(),y(e))},l=function(e,n){for(var i=[],r=n.length;r--;)i[r]=b(n[r]);return t.apply(null,[k.moof,a(e)].concat(i))},u=function(e){for(var n=e.length,i=[];n--;)i[n]=h(e[n]);return t.apply(null,[k.moov,d(4294967295)].concat(i).concat(c(e)))},c=function(e){for(var n=e.length,i=[];n--;)i[n]=T(e[n]);return t.apply(null,[k.mvex].concat(i))},d=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(k.mvhd,n)},v=function(e){var n,i,r=e.samples||[],s=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,s[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(k.sdtp,s)},y=function(e){return t(k.stbl,_(e),t(k.stts,N),t(k.stsc,D),t(k.stsz,M),t(k.stco,O))},_=function(e){return t(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?R(e):U(e))},R=function(e){var n,i,r=e.sps||[],s=e.pps||[],a=[],o=[];for(n=0;n<r.length;n++)a.push((65280&r[n].byteLength)>>>8),a.push(255&r[n].byteLength),a=a.concat(Array.prototype.slice.call(r[n]));for(n=0;n<s.length;n++)o.push((65280&s[n].byteLength)>>>8),o.push(255&s[n].byteLength),o=o.concat(Array.prototype.slice.call(s[n]));if(i=[k.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(k.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),t(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],u=e.sarRatio[1];i.push(t(k.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return t.apply(null,i)},U=function(e){return t(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},p=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(k.tkhd,n)},b=function(e){var n,i,r,s,a,o;return n=t(k.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/W),o=Math.floor(e.baseMediaDecodeTime%W),i=t(k.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(r=S(e,92),t(k.traf,n,i,r)):(s=v(e),r=S(e,s.length+92),t(k.traf,n,i,r,s))},h=function(e){return e.duration=e.duration||4294967295,t(k.trak,p(e),f(e))},T=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(k.trex,n)},H=function(e,t){var n=0,i=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,n|i|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,n){var i,r,s,a,o,l;for(n+=20+16*(a=e.samples||[]).length,s=H(a,n),(r=new Uint8Array(s.length+16*a.length)).set(s),i=s.length,l=0;l<a.length;l++)o=a[l],r[i++]=(4278190080&o.duration)>>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size,r[i++]=o.flags.isLeading<<2|o.flags.dependsOn,r[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[i++]=61440&o.flags.degradationPriority,r[i++]=15&o.flags.degradationPriority,r[i++]=(4278190080&o.compositionTimeOffset)>>>24,r[i++]=(16711680&o.compositionTimeOffset)>>>16,r[i++]=(65280&o.compositionTimeOffset)>>>8,r[i++]=255&o.compositionTimeOffset;return t(k.trun,r)},B=function(e,n){var i,r,s,a,o,l;for(n+=20+8*(a=e.samples||[]).length,s=H(a,n),(i=new Uint8Array(s.length+8*a.length)).set(s),r=s.length,l=0;l<a.length;l++)o=a[l],i[r++]=(4278190080&o.duration)>>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size;return t(k.trun,i)},S=function(e,t){return"audio"===e.type?B(e,t):F(e,t)};s=function(){return t(k.ftyp,E,w,E,C)};var G,X,K,Y,Q,J,Z,$,ee=function(e){return t(k.mdat,e)},te=l,ne=function(e){var t,n=s(),i=u(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t},ie=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},re=function(e){var t,n,i=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i),r},se=function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},ae=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var n,i,r,s,a,o=t||0,l=[];for(n=0;n<e.length;n++)for(s=e[n],i=0;i<s.length;i++)a=s[i],o+=(r=ie(a,o)).size,l.push(r);return l},le=function(e){var t,n,i,r,s,a,o=0,l=e.byteLength,u=e.nalCount,c=new Uint8Array(l+4*u),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(s=r[n],i=0;i<s.length;i++)a=s[i],d.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},ue=[33,16,5,32,164,27],ce=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],de=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!G){var e={96e3:[ue,[227,64],de(154),[56]],88200:[ue,[231],de(170),[56]],64e3:[ue,[248,192],de(240),[56]],48e3:[ue,[255,192],de(268),[55,148,128],de(54),[112]],44100:[ue,[255,192],de(268),[55,163,128],de(84),[112]],32e3:[ue,[255,192],de(268),[55,234],de(226),[112]],24e3:[ue,[255,192],de(268),[55,255,128],de(268),[111,112],de(126),[224]],16e3:[ue,[255,192],de(268),[55,255,128],de(268),[111,255],de(269),[223,108],de(195),[1,192]],12e3:[ce,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,253,128],de(259),[56]],11025:[ce,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,255,192],de(268),[55,175,128],de(108),[112]],8e3:[ce,de(268),[3,121,16],de(47),[7]]};t=e,G=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return G},pe=9e4;J=function(e,t){return X(Q(e,t))},Z=function(e,t){return K(Y(e),t)},$=function(e,t,n){return Y(n?e:e-t)};var fe=pe,me=X=function(e){return e*pe},ge=(K=function(e,t){return e*t},Y=function(e){return e/pe}),ve=(Q=function(e,t){return e/t},J),ye=Z,_e=$,be=function(e,t,n,i){var r,s,a,o,l,u=0,c=0,d=0;if(t.length&&(r=ve(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(fe/(e.samplerate/1024)),n&&i&&(u=r-Math.max(n,i),d=(c=Math.floor(u/s))*s),!(c<1||d>fe/2))){for((a=he()[e.samplerate])||(a=t[0].data),o=0;o<c;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-s,pts:l.pts-s});return e.baseMediaDecodeTime-=Math.floor(ye(d,e.samplerate)),d}},Te=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Se=function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},ke=function(e){var t,n,i=0,r=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength;return r},Ee=fe,we=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ce=function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/Ee,n=Math.floor(n)),n},xe=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},je=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}n.payload=void 0}t+=r,i=0,r=0}return n},Ae=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Ie=function(e,t){var n,i,r,s,a=[];if(!(64&t[0]))return a;for(i=31&t[0],n=0;n<i;n++)s={type:3&t[(r=3*n)+2],pts:e},4&t[r+2]&&(s.ccData=t[r+3]<<8|t[r+4],a.push(s));return a},Pe=function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},Le=4,Oe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new qe(0,0),new qe(0,1),new qe(1,0),new qe(1,1)],this.parse708captions_&&(this.cc708Stream_=new Ue({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(Oe.prototype=new V).push=function(e){var t,n,i;if("sei_rbsp"===e.nalUnitType&&(t=je(e.escapedRBSP)).payload&&t.payloadType===Le&&(n=Ae(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));i=Ie(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Oe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Oe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Oe.prototype.flush=function(){return this.flushStream("flush")},Oe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Oe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Oe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Oe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Oe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Oe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},Oe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var De={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Me=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Ne=function(e){this.windowNum=e,this.reset()};Ne.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ne.prototype.getText=function(){return this.rows.join("\n")},Ne.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ne.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ne.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ne.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ne.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Re=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Ne(-1),this.windows=[],this.stream=n,"string"==typeof t&&this.createTextDecoder(t)};Re.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Ne(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Re.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Re.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Ue=function e(t){t=t||{},e.prototype.init.call(this);var n,i=this,r=t.captionServices||{},s={};Object.keys(r).forEach((function(e){n=r[e],/^SERVICE/.test(e)&&(s[e]=n.encoding)})),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Ue.prototype=new V,Ue.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ue.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,i=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(i)},Ue.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,i=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r<t.length;r++)i=31&(s=t[r++]),7===(n=s>>5)&&i>0&&(n=s=t[r++]),this.pushServiceBlock(n,r,i),i>0&&(r+=i-1)},Ue.prototype.pushServiceBlock=function(e,t,n){var i,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r<t+n&&r<s.length;r++)i=s[r],Me(i)?r=this.handleText(r,a):24===i?r=this.multiByteCharacter(r,a):16===i?r=this.extendedCommands(r,a):128<=i&&i<=135?r=this.setCurrentWindow(r,a):152<=i&&i<=159?r=this.defineWindow(r,a):136===i?r=this.clearWindows(r,a):140===i?r=this.deleteWindows(r,a):137===i?r=this.displayWindows(r,a):138===i?r=this.hideWindows(r,a):139===i?r=this.toggleWindows(r,a):151===i?r=this.setWindowAttributes(r,a):144===i?r=this.setPenAttributes(r,a):145===i?r=this.setPenColor(r,a):146===i?r=this.setPenLocation(r,a):143===i?a=this.reset(r,a):8===i?a.currentWindow.backspace():12===i?a.currentWindow.clearText():13===i?a.currentWindow.pendingNewLine=!0:14===i?a.currentWindow.clearText():141===i&&r++},Ue.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Me(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},Ue.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ue.prototype.initService=function(e,t){var n,i,r=this;return(n="SERVICE"+e)in this.serviceEncodings&&(i=this.serviceEncodings[n]),this.services[e]=new Re(e,i,r),this.services[e].init(this.getPts(t),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},Ue.prototype.handleText=function(e,t,n){var i,r,s,a,o=n&&n.isExtended,l=n&&n.isMultiByte,u=this.current708Packet.data,c=o?4096:0,d=u[e],h=u[e+1],p=t.currentWindow;return t.textDecoder_&&!o?(l?(r=[d,h],e++):r=[d],i=t.textDecoder_.decode(new Uint8Array(r))):(a=De[s=c|d]||s,i=4096&s&&s===a?"":String.fromCharCode(a)),p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(i),e},Ue.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,i=n[e+1],r=n[e+2];return Me(i)&&Me(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Ue.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Ue.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,i=n[e],r=7&i;t.setCurrentWindow(r);var s=t.currentWindow;return i=n[++e],s.visible=(32&i)>>5,s.rowLock=(16&i)>>4,s.columnLock=(8&i)>>3,s.priority=7&i,i=n[++e],s.relativePositioning=(128&i)>>7,s.anchorVertical=127&i,i=n[++e],s.anchorHorizontal=i,i=n[++e],s.anchorPoint=(240&i)>>4,s.rowCount=15&i,i=n[++e],s.columnCount=63&i,i=n[++e],s.windowStyle=(56&i)>>3,s.penStyle=7&i,s.virtualRowCount=s.rowCount+1,e},Ue.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.winAttr;return i=n[++e],r.fillOpacity=(192&i)>>6,r.fillRed=(48&i)>>4,r.fillGreen=(12&i)>>2,r.fillBlue=3&i,i=n[++e],r.borderType=(192&i)>>6,r.borderRed=(48&i)>>4,r.borderGreen=(12&i)>>2,r.borderBlue=3&i,i=n[++e],r.borderType+=(128&i)>>5,r.wordWrap=(64&i)>>6,r.printDirection=(48&i)>>4,r.scrollDirection=(12&i)>>2,r.justify=3&i,i=n[++e],r.effectSpeed=(240&i)>>4,r.effectDirection=(12&i)>>2,r.displayEffect=3&i,e},Ue.prototype.flushDisplayed=function(e,t){for(var n=[],i=0;i<8;i++)t.windows[i].visible&&!t.windows[i].isEmpty()&&n.push(t.windows[i].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ue.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ue.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=1);return e},Ue.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=0);return e},Ue.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible^=1);return e},Ue.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].clearText();return e},Ue.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].reset();return e},Ue.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penAttr;return i=n[++e],r.textTag=(240&i)>>4,r.offset=(12&i)>>2,r.penSize=3&i,i=n[++e],r.italics=(128&i)>>7,r.underline=(64&i)>>6,r.edgeType=(56&i)>>3,r.fontStyle=7&i,e},Ue.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penColor;return i=n[++e],r.fgOpacity=(192&i)>>6,r.fgRed=(48&i)>>4,r.fgGreen=(12&i)>>2,r.fgBlue=3&i,i=n[++e],r.bgOpacity=(192&i)>>6,r.bgRed=(48&i)>>4,r.bgGreen=(12&i)>>2,r.bgBlue=3&i,i=n[++e],r.edgeRed=(48&i)>>4,r.edgeGreen=(12&i)>>2,r.edgeBlue=3&i,e},Ue.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,i=n[++e],r.row=15&i,i=n[++e],r.column=63&i,e},Ue.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var Be={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Fe=function(e){return null===e?"":(e=Be[e]||e,String.fromCharCode(e))},He=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ve=function(){for(var e=[],t=15;t--;)e.push("");return e},qe=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ve();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ve();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ve()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))s=Fe((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(i,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),s=Fe((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var a=He.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),s=Fe(i),s+=Fe(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};qe.prototype=new V,qe.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},qe.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ve(),this.nonDisplayed_=Ve(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},qe.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},qe.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},qe.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},qe.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},qe.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},qe.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},qe.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},qe.prototype.isNormalChar=function(e){return e>=32&&e<=127},qe.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ve(),this.displayed_=Ve()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},qe.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},qe.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},qe.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},qe.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},qe.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},qe.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var ze={CaptionStream:Oe,Cea608Stream:qe,Cea708Stream:Ue},We={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ge="shared",Xe=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ke=function e(t){var n,i;e.prototype.init.call(this),this.type_=t||Ge,this.push=function(e){this.type_!==Ge&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Xe(e.dts,i),e.pts=Xe(e.pts,i),n=e.dts,this.trigger("data",e))},this.flush=function(){i=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ke.prototype=new V;var Ye,Qe=Ke,Je=Xe,Ze=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},$e=function(e,t,n){return decodeURIComponent(Ze(e,t,n))},et=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},tt={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.value=$e(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=$e(e.data,1,t),e.url=$e(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(Ze(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Ye=function(e){var t,n={descriptor:e&&e.descriptor},i=0,r=[],s=0;if(Ye.prototype.init.call(this),this.dispatchType=We.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),s+=e.data.byteLength,1===r.length&&(i=et(e.data.subarray(6,10)),i+=10),!(s<i)){for(t={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts},l=0;l<i;)t.data.set(r[0].data.subarray(0,i-l),l),l+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();n=10,64&t.data[5]&&(n+=4,n+=et(t.data.subarray(10,14)),i-=et(t.data.subarray(16,20)));do{if((a=et(t.data.subarray(n+4,n+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((o={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+a+10)}).key=o.id,tt[o.id]&&(tt[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner)){var u=o.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),n+=10,n+=a}while(n<i);this.trigger("data",t)}}},Ye.prototype=new V;var nt,it,rt,st=Ye,at=Qe,ot=188;(nt=function(){var e=new Uint8Array(ot),t=0;nt.prototype.init.call(this),this.push=function(n){var i,r=0,s=ot;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;s<i.byteLength;)71!==i[r]||71!==i[s]?(r++,s++):(this.trigger("data",i.subarray(r,s)),r+=ot,s+=ot);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){t===ot&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new V,it=function(){var e,t,n,i;it.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var s=e[r],a=(31&e[r+1])<<8|e[r+2];s===We.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=a:s===We.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=a:s===We.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][a]=s),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=We.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=We.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},it.prototype=new V,it.STREAM_TYPES={h264:27,adts:15},rt=function(){var e,t=this,n=!1,i={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,n,i){var r,s,a=new Uint8Array(e.size),o={type:n},l=0,u=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)s=e.data[l],a.set(s.data,u),u+=s.data.byteLength;var c,d,h,p;d=o,p=(c=a)[0]<<16|c[1]<<8|c[2],d.data=new Uint8Array,1===p&&(d.packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),r="video"===n||o.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};rt.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case We.H264_STREAM_TYPE:e=i,t="video";break;case We.ADTS_STREAM_TYPE:e=r,t="audio";break;case We.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",i)}})[o.type]()},this.reset=function(){i.size=0,i.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(i,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!n&&e){var i={type:"metadata",tracks:[]};null!==e.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",i)}n=!1,this.flushStreams_(),this.trigger("done")}},rt.prototype=new V;var lt={PAT_PID:0,MP2T_PACKET_LENGTH:ot,TransportPacketStream:nt,TransportParseStream:it,ElementaryStream:rt,TimestampRolloverStream:at,CaptionStream:ze.CaptionStream,Cea608Stream:ze.Cea608Stream,Cea708Stream:ze.Cea708Stream,MetadataStream:st};for(var ut in We)We.hasOwnProperty(ut)&&(lt[ut]=We[ut]);var ct,dt=lt,ht=fe,pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ct=function(e){var t,n=0;ct.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(i){var r,s,a,o,l,u=0;if(e||(n=0),"audio"===i.type){var c;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+i.data.byteLength)).set(a),t.set(i.data,a.byteLength)):t=i.data;u+7<t.length;)if(255===t[u]&&240==(246&t[u+1])){if("number"==typeof c&&(this.skipWarn_(c,u),c=null),s=2*(1&~t[u+1]),r=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,l=(o=1024*(1+(3&t[u+6])))*ht/pt[(60&t[u+2])>>>2],t.byteLength-u<r)break;this.trigger("data",{pts:i.pts+n*l,dts:i.dts+n*l,sampleCount:o,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:pt[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+s,u+r)}),n++,u+=r}else"number"!=typeof c&&(c=u),u++;"number"==typeof c&&(this.skipWarn_(c,u),c=null),t=t.subarray(u)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},ct.prototype=new V;var ft,mt,gt,vt=ct,yt=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),n=new DataView(s.buffer).getUint32(0),i=8*a,t-=a},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),s=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var e;for(e=0;e<i;++e)if(0!=(n&2147483648>>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};mt=function(){var e,t,n=0;mt.prototype.init.call(this),this.push=function(i){var r;t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;for(var s=t.byteLength;n<s-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<s;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<s);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},mt.prototype=new V,gt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},ft=function(){var e,t,n,i,r,s,a,o=new mt;ft.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:n,dts:i,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},r=function(e){for(var t,n,i=e.byteLength,r=[],s=1;s<i-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var a=0;for(s=0;s<t;a++,s++)a===r[0]&&(a++,r.shift()),n[s]=e[a];return n},s=function(e){var t,n,i,r,s,o,l,u,c,d,h,p,f=0,m=0,g=0,v=0,y=[1,1];if(n=(t=new yt(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),gt[n]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==s?8:12,p=0;p<h;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}y&&(y[0],y[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:16*(u+1)-2*f-2*m,height:(2-d)*(c+1)*16-2*g-2*v,sarRatio:y}}},ft.prototype=new V;var _t,bt={H264Stream:ft,NalByteStream:mt},Tt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],St=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},kt=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=St(t,n))},Et=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},wt={isLikelyAacData:function(e){var t=kt(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:St,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Tt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=Et(e.subarray(10,14)));do{if((n=Et(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var r=0;r<i.byteLength;r++)if(0===i[r]){var s=unescape(function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(i,0,r));if("com.apple.streaming.transportStreamTimestamp"===s){var a=i.subarray(r+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return o*=4,o+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(_t=function(){var e=new Uint8Array,t=0;_t.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,s,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=wt.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",s),l+=o}else{if(e.length-l<10)break;if(l+(o=wt.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}i=e.length-l,e=i>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new V;var Ct,xt,jt,At,It=_t,Pt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Lt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ot=bt.H264Stream,Dt=wt.isLikelyAacData,Mt=fe,Nt=function(e,t){t.stream=e,this.trigger("log",t)},Rt=function(e,t){for(var n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",Nt.bind(e,r))}},Ut=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Bt=function(e,t,n,i,r,s){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(i-t),pts:e+(r-n)},prependedContentDuration:s,baseMediaDecodeTime:e}};xt=function(e,t){var n,i=[],r=0,s=0,a=1/0;n=(t=t||{}).firstSequenceNumber||0,xt.prototype.init.call(this),this.push=function(t){xe(e,t),e&&Pt.forEach((function(n){e[n]=t[n]})),i.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){s=e},this.flush=function(){var o,l,u,c,d,h,p;0!==i.length?(o=Te(i,e,r),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),p=be(e,o,s,a),e.samples=Se(o),u=ee(ke(o)),i=[],l=te(n,[e]),c=new Uint8Array(l.byteLength+u.byteLength),n++,c.set(l),c.set(u,l.byteLength),we(e),d=Math.ceil(1024*Mt/e.samplerate),o.length&&(h=o.length*d,this.trigger("segmentTimingInfo",Bt(ve(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){we(e),i=[],this.trigger("reset")}},xt.prototype=new V,Ct=function(e,t){var n,i,r,s=[],a=[];n=(t=t||{}).firstSequenceNumber||0,Ct.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){xe(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],Lt.forEach((function(t){e[t]=i[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),s.push(t)},this.flush=function(){for(var i,r,o,l,u,c,d,h,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=re(s),(o=se(i))[0][0].keyFrame||((r=this.getGopForFusion_(s[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=ae(o)),a.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");we(e),o=f}xe(e,o),e.samples=oe(o),u=ee(le(o)),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Bt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=te(n,[e]),c=new Uint8Array(l.byteLength+u.byteLength),n++,c.set(l),c.set(u,l.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){we(e),i=void 0,r=void 0},this.getGopForFusion_=function(t){var n,i,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,e.pps&&Ut(e.pps[0],s.pps[0])&&e.sps&&Ut(e.sps[0],s.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=s,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,s,o,l,u;for(s=e.byteLength,o=e.nalCount,l=e.duration,t=n=0;t<a.length&&n<e.length&&(i=a[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===n?e:n===e.length?null:((u=e.slice(n)).byteLength=s,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,n,i,r,s,o,l;for(t=a.length-1,n=e.length-1,s=null,o=!1;t>=0&&n>=0;){if(i=a[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===a.length-1&&(s=n),n--)}if(!o&&null===s)return null;if(0===(l=o?n:s))return e;var u=e.slice(l),c=u.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){a=e}},Ct.prototype=new V,At=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,At.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},At.prototype=new V,At.prototype.flush=function(e){var t,n,i,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Lt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Pt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,i=ne(this.pendingTracks),a.initSegment=new Uint8Array(i.byteLength),a.initSegment.set(i),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],s),s+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=_e(t.startPts,o,this.keepOriginalTimestamps),t.endTime=_e(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=_e(n.pts,o,this.keepOriginalTimestamps),a.metadata.push(n);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),r=0;r<a.captions.length;r++)t=a.captions[r],this.trigger("caption",t);for(r=0;r<a.metadata.length;r++)n=a.metadata[r],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},At.prototype.setRemux=function(e){this.remuxTracks=e},jt=function(e){var t,n,i=this,r=!0;jt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new dt.MetadataStream,r.aacStream=new It,r.audioTimestampRolloverStream=new dt.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new dt.TimestampRolloverStream("timed-metadata"),r.adtsStream=new vt,r.coalesceStream=new At(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Rt(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new dt.MetadataStream,r.packetStream=new dt.TransportPacketStream,r.parseStream=new dt.TransportParseStream,r.elementaryStream=new dt.ElementaryStream,r.timestampRolloverStream=new dt.TimestampRolloverStream,r.adtsStream=new vt,r.h264Stream=new Ot,r.captionStream=new dt.CaptionStream(e),r.coalesceStream=new At(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?n||"audio"!==s.tracks[a].type||((n=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new Ct(t,e),r.videoSegmentStream.on("log",i.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-i.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,i.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Rt(this,r)},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,we(n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,we(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(r){var t=Dt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},jt.prototype=new V;var Ft,Ht,Vt,qt={Transmuxer:jt,VideoSegmentStream:Ct,AudioSegmentStream:xt,AUDIO_PROPERTIES:Pt,VIDEO_PROPERTIES:Lt,generateSegmentTimingInfo:Bt},zt=function(e){return e>>>0},Wt=function(e){return("00"+e.toString(16)).slice(-2)},Gt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Xt=zt,Kt=function e(t,n){var i,r,s,a,o,l=[];if(!n.length)return null;for(i=0;i<t.byteLength;)r=Xt(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),s=Gt(t.subarray(i+4,i+8)),a=r>1?i+r:t.byteLength,s===n[0]&&(1===n.length?l.push(t.subarray(i+8,a)):(o=e(t.subarray(i+8,a),n.slice(1))).length&&(l=l.concat(o))),i=a;return l},Yt=zt,Qt=z.getUint64,Jt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Qt(e.subarray(4)):t.baseMediaDecodeTime=Yt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Zt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},$t=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],s=4&n.flags[2],a=1&n.flags[1],o=2&n.flags[1],l=4&n.flags[1],u=8&n.flags[1],c=i.getUint32(4),d=8;for(r&&(n.dataOffset=i.getInt32(d),d+=4),s&&c&&(t={flags:Zt(e.subarray(d,d+4))},d+=4,a&&(t.duration=i.getUint32(d),d+=4),o&&(t.size=i.getUint32(d),d+=4),u&&(1===n.version?t.compositionTimeOffset=i.getInt32(d):t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},a&&(t.duration=i.getUint32(d),d+=4),o&&(t.size=i.getUint32(d),d+=4),l&&(t.flags=Zt(e.subarray(d,d+4)),d+=4),u&&(1===n.version?t.compositionTimeOffset=i.getInt32(d):t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t);return n},en=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],s=2&i.flags[2],a=8&i.flags[2],o=16&i.flags[2],l=32&i.flags[2],u=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),s&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),u&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i},tn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},nn="undefined"!=typeof window?window:void 0!==tn?tn:"undefined"!=typeof self?self:{},rn=Pe,sn=ze.CaptionStream,an=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},on=function(e,t){var n=Kt(e,["moof","traf"]),i=Kt(e,["mdat"]),r={},s=[];return i.forEach((function(e,t){var i=n[t];s.push({mdat:e,traf:i})})),s.forEach((function(e){var n,i,s=e.mdat,a=e.traf,o=Kt(a,["tfhd"]),l=en(o[0]),u=l.trackId,c=Kt(a,["tfdt"]),d=c.length>0?Jt(c[0]).baseMediaDecodeTime:0,h=Kt(a,["trun"]);t===u&&h.length>0&&(n=function(e,t,n){var i=t,r=n.defaultSampleDuration||0,s=n.defaultSampleSize||0,a=n.trackId,o=[];return e.forEach((function(e){var t=$t(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=s),e.trackId=a,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof i?(e.pts=i+nn.BigInt(e.compositionTimeOffset),i+=nn.BigInt(e.duration)):(e.pts=i+e.compositionTimeOffset,i+=e.duration)})),o=o.concat(t)})),o}(h,d,l),i=function(e,t,n){var i,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&e[r]){case 6:var u=e.subarray(r+1,r+1+s),c=an(r,t);if(i={nalUnitType:"sei_rbsp",size:s,data:u,escapedRBSP:rn(u),trackId:n},c)i.pts=c.pts,i.dts=c.dts,a=c;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+n+". See mux.js#223."});break}i.pts=a.pts,i.dts=a.dts}l.seiNals.push(i)}return l}(s,n,u),r[u]||(r[u]={seiNals:[],logs:[]}),r[u].seiNals=r[u].seiNals.concat(i.seiNals),r[u].logs=r[u].logs.concat(i.logs))})),r},ln=function(){var e,t,n,i,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new sn,a=!0,s=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,r.captions.push(e),r.captionStreams[e.stream]=!0})),e.on("log",(function(e){r.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||i!==t[n])},this.parse=function(e,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))n=s[0],i=a[n];else if(null===n||!i)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,s,a)}return o=function(e,t,n){if(null===t)return null;var i=on(e,t)[t]||{};return{seiNals:i.seiNals,logs:i.logs,timescale:n}}(e,n,i),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},un=zt,cn=Wt,dn=z.getUint64;Ft=function(e,t){var n=Kt(t,["moof","traf"]).reduce((function(t,n){var i,r,s=Kt(n,["tfhd"])[0],a=un(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),o=e[a]||9e4,l=Kt(n,["tfdt"])[0],u=new DataView(l.buffer,l.byteOffset,l.byteLength);return"bigint"==typeof(i=1===l[0]?dn(l.subarray(4,12)):u.getUint32(4))?r=i/nn.BigInt(o):"number"!=typeof i||isNaN(i)||(r=i/o),r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r<t&&(t=r),t}),1/0);return"bigint"==typeof n||isFinite(n)?n:0},Vt=function(e){var t=0===e[0]?12:20;return un(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Ht=function(e){var t=Kt(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,i,r={},s=Kt(e,["tkhd"])[0];s&&(i=(t=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===i?t.getUint32(12):t.getUint32(20));var a=Kt(e,["mdia","hdlr"])[0];if(a){var o=Gt(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var l=Kt(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);r.codec=Gt(u.subarray(4,8));var c,d=Kt(u,[r.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(r.codec)?(c=d.subarray(78),"avcC"===Gt(c.subarray(4,8))&&c.length>11?(r.codec+=".",r.codec+=cn(c[9]),r.codec+=cn(c[10]),r.codec+=cn(c[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(c=d.subarray(28),"esds"===Gt(c.subarray(4,8))&&c.length>20&&0!==c[19]?(r.codec+="."+cn(c[19]),r.codec+="."+cn(c[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=Kt(e,["mdia","mdhd"])[0];h&&(r.timescale=Vt(h)),n.push(r)})),n};var hn=Ft,pn=Ht,fn=function(e){var t=31&e[1];return t<<=8,t|=e[2]},mn=function(e){return!!(64&e[1])},gn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},vn=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},yn={parseType:function(e,t){var n=fn(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=mn(e),n=4+gn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=mn(e),i=4+gn(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var s=12+((15&e[i+10])<<8|e[i+11]);s<r;){var a=i+s;t[(31&e[a+1])<<8|e[a+2]]=e[a],s+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:mn,parsePesType:function(e,t){switch(t[fn(e)]){case We.H264_STREAM_TYPE:return"video";case We.ADTS_STREAM_TYPE:return"audio";case We.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!mn(e))return null;var t=4+gn(e);if(t>=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+gn(e),n=e.subarray(t),i=0,r=0,s=!1;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}r+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===vn(31&n[r+3])&&(s=!0);do{i++}while(1!==n[i]&&i<n.length);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}"slice_layer_without_partitioning_rbsp_idr"===vn(31&n[r+3])&&(s=!0),r=i-2,i+=3;break;default:i+=3}return n=n.subarray(r),i-=r,r=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===vn(31&n[r+3])&&(s=!0),s}},_n=Je,bn={};bn.ts=yn,bn.aac=wt;var Tn=fe,Sn=188,kn=71,En=function(e,t,n){for(var i,r,s,a,o=0,l=Sn,u=!1;l<=e.byteLength;)if(e[o]!==kn||e[l]!==kn&&l!==e.byteLength)o++,l++;else{if(i=e.subarray(o,l),"pes"===bn.ts.parseType(i,t.pid))r=bn.ts.parsePesType(i,t.table),s=bn.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=bn.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),u=!0);if(u)break;o+=Sn,l+=Sn}for(o=(l=e.byteLength)-Sn,u=!1;o>=0;)if(e[o]!==kn||e[l]!==kn&&l!==e.byteLength)o--,l--;else{if(i=e.subarray(o,l),"pes"===bn.ts.parseType(i,t.pid))r=bn.ts.parsePesType(i,t.table),s=bn.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=bn.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),u=!0);if(u)break;o-=Sn,l-=Sn}},wn=function(e,t,n){for(var i,r,s,a,o,l,u,c=0,d=Sn,h=!1,p={data:[],size:0};d<e.byteLength;)if(e[c]!==kn||e[d]!==kn)c++,d++;else{if(i=e.subarray(c,d),"pes"===bn.ts.parseType(i,t.pid))if(r=bn.ts.parsePesType(i,t.table),s=bn.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(s&&!h&&(a=bn.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0),!n.firstKeyFrame)){if(s&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)u=p.data.shift(),o.set(u,l),l+=u.byteLength;if(bn.ts.videoPacketContainsKeyFrame(o)){var f=bn.ts.parsePesTime(o);f&&(n.firstKeyFrame=f,n.firstKeyFrame.type="video")}p.size=0}p.data.push(i),p.size+=i.byteLength}if(h&&n.firstKeyFrame)break;c+=Sn,d+=Sn}for(c=(d=e.byteLength)-Sn,h=!1;c>=0;)if(e[c]!==kn||e[d]!==kn)c--,d--;else{if(i=e.subarray(c,d),"pes"===bn.ts.parseType(i,t.pid))r=bn.ts.parsePesType(i,t.table),s=bn.ts.parsePayloadUnitStartIndicator(i),"video"===r&&s&&(a=bn.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0);if(h)break;c-=Sn,d-=Sn}},Cn=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,i=0,r=Sn;r<e.byteLength;)if(e[i]!==kn||e[r]!==kn)i++,r++;else{switch(n=e.subarray(i,r),bn.ts.parseType(n,t.pid)){case"pat":t.pid=bn.ts.parsePat(n);break;case"pmt":var s=bn.ts.parsePmt(n);t.table=t.table||{},Object.keys(s).forEach((function(e){t.table[e]=s[e]}))}i+=Sn,r+=Sn}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case We.H264_STREAM_TYPE:n.video=[],wn(e,t,n),0===n.video.length&&delete n.video;break;case We.ADTS_STREAM_TYPE:n.audio=[],En(e,t,n),0===n.audio.length&&delete n.audio}}return n},xn=function(e,t){var n;return n=bn.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,i=0,r=null,s=null,a=0,o=0;e.length-o>=3;){switch(bn.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((a=bn.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===s&&(t=e.subarray(o,o+a),s=bn.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){n=!0;break}if((a=bn.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===r&&(t=e.subarray(o,o+a),r=bn.aac.parseSampleRate(t)),i++,o+=a;break;default:o++}if(n)return null}if(null===r||null===s)return null;var l=Tn/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*i*l,pts:s+1024*i*l}]}}(e):Cn(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=_n(e.dts,n),e.pts=_n(e.pts,n),e.dtsTime=e.dts/Tn,e.ptsTime=e.pts/Tn}))}if(e.video&&e.video.length){var i=t;if((void 0===i||isNaN(i))&&(i=e.video[0].dts),e.video.forEach((function(e){e.dts=_n(e.dts,i),e.pts=_n(e.pts,i),e.dtsTime=e.dts/Tn,e.ptsTime=e.pts/Tn})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=_n(r.dts,i),r.pts=_n(r.pts,i),r.dtsTime=r.dts/Tn,r.ptsTime=r.pts/Tn}}}(n,t),n):null},jn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new qt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ge(t.start),end:ge(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ge(t.start),end:ge(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new ln,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,i=hn(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=pn(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,i="number"!=typeof n||isNaN(n)?void 0:n*fe,r=xn(t,i),s=null;r&&((s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1}).hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(me(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new jn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new jn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),xl=kl(Cl),jl=function(e){var t=e.transmuxer,n=e.bytes,i=e.audioAppendStart,r=e.gopsToAlignWith,s=e.remux,a=e.onData,o=e.onTrackInfo,l=e.onAudioTimingInfo,u=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,f=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,v=e.isEndOfTimeline,y={buffer:[]},_=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var i=e.data.segment,r=i.type,s=i.initSegment,a=i.captions,o=i.captionStreams,l=i.metadata,u=i.videoFrameDtsTime,c=i.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:o,metadata:l});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:r,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==u&&(h.videoFrameDtsTime=u),void 0!==c&&(h.videoFramePtsTime=c),n(h)}(n,y,a),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,y),"audioTimingInfo"===n.data.action&&l(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&u(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(_=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(_||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:y,callback:f}),Al(t))))},i&&t.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==s&&t.postMessage({action:"setRemux",remux:s}),n.byteLength){var b=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:b,byteOffset:T,byteLength:n.byteLength},[b])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Al=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():jl(e.currentTransmux))},Il=function(e,t){e.postMessage({action:t}),Al(e)},Pl=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void Il(t,e);t.transmuxQueue.push(Il.bind(null,t,e))},Ll=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void jl(e);e.transmuxer.transmuxQueue.push(e)},Ol=function(e){Pl("reset",e)},Dl=function(e){var t=new xl;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},Ml=function(e){var t=e.transmuxer,n=e.endAction||e.action,i=e.callback,r=T({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function r(s){s.data.action===n&&(t.removeEventListener("message",r),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),i(s.data))})),e.data){var s=e.data instanceof ArrayBuffer;r.byteOffset=s?0:e.data.byteOffset,r.byteLength=e.data.byteLength;var a=[s?e.data:e.data.buffer];t.postMessage(r,a)}else t.postMessage(r)},Nl=2,Rl=-101,Ul=-102,Bl=function(e){e.forEach((function(e){e.abort()}))},Fl=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Rl,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Ul,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Nl,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Nl,xhr:t}:null},Hl=function(e,t,n){return function(i,r){var s=r.response,a=Fl(i,r);if(a)return n(a,e);if(16!==s.byteLength)return n({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Nl,xhr:r},e);for(var o=new DataView(s),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),u=0;u<t.length;u++)t[u].bytes=l;return n(null,e)}},Vl=function(e,t){var n=Vt(e.map.bytes);if("mp4"!==n){var i=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+i,code:Nl})}Ml({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var i=n.tracks,r=n.data;return e.map.bytes=r,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null)}})},ql=function(e){var t=e.segment,n=e.finishProcessingFn,i=e.responseType;return function(e,r){var s=Fl(e,r);if(s)return n(s,t);var a="arraybuffer"!==i&&r.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(r.responseText.substring(t.lastReachedChar||0)):r.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),t.key?t.encryptedBytes=new Uint8Array(a):t.bytes=new Uint8Array(a),n(null,t)}},zl=function(e){var t=e.segment,n=e.bytes,i=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=t.map&&t.map.tracks||{},m=Boolean(f.audio&&f.video),g=r.bind(null,t,"audio","start"),v=r.bind(null,t,"audio","end"),y=r.bind(null,t,"video","start"),_=r.bind(null,t,"video","end");Ml({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var r=e.result;r&&(i(t,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:m}),i=null,r.hasAudio&&!m&&g(r.audioStart),r.hasVideo&&y(r.videoStart),g=null,y=null),Ll({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:m,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){i&&(m&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),v&&void 0!==e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&void 0!==e.start&&(y(e.start),y=null),_&&void 0!==e.end&&_(e.end)},onVideoSegmentTimingInfo:function(e){s(e)},onAudioSegmentTimingInfo:function(e){a(e)},onId3:function(e,n){o(t,e,n)},onCaptions:function(e){l(t,[e])},isEndOfTimeline:u,onEndedTimeline:function(){c()},onTransmuxerLog:p,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Wl=function(e){var t=e.segment,n=e.bytes,i=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=new Uint8Array(n);if(function(e){return wt(e,["moof"]).length>0}(f)){t.isFmp4=!0;var m=t.map.tracks,g={isFmp4:!0,hasVideo:!!m.video,hasAudio:!!m.audio};m.audio&&m.audio.codec&&"enca"!==m.audio.codec&&(g.audioCodec=m.audio.codec),m.video&&m.video.codec&&"encv"!==m.video.codec&&(g.videoCodec=m.video.codec),m.video&&m.audio&&(g.isMuxed=!0),i(t,g);var v=function(e){d(t,{data:f,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&l(t,e),h(null,t,{})};Ml({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var i=e.data,s=e.startTime;n=i.buffer,t.bytes=f=i,g.hasAudio&&!g.isMuxed&&r(t,"audio","start",s),g.hasVideo&&r(t,"video","start",s),m.video&&i.byteLength&&t.transmuxer?Ml({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[m.video.id],callback:function(e){n=e.data.buffer,t.bytes=f=e.data,e.logs.forEach((function(e){p(io.mergeOptions(e,{stream:"mp4CaptionParser"}))})),v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=Vt(f)),"ts"!==t.container&&"aac"!==t.container)return i(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});zl({segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}else h(null,t,{})},Gl=function(e,t){var n,i=e.id,r=e.key,s=e.encryptedBytes,a=e.decryptionWorker;a.addEventListener("message",(function e(n){if(n.data.source===i){a.removeEventListener("message",e);var r=n.data.decrypted;t(new Uint8Array(r.bytes,r.byteOffset,r.byteLength))}})),n=r.bytes.slice?r.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.bytes)),a.postMessage(al({source:i,encrypted:s,key:n,iv:r.iv}),[s.buffer,n.buffer])},Xl=function(e){var t=e.activeXhrs,n=e.decryptionWorker,i=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=0,m=!1;return function(e,g){if(!m){if(e)return m=!0,Bl(t),h(e,g);if((f+=1)===t.length){var v=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,i=e.trackInfoFn,r=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,o=e.id3Fn,l=e.captionsFn,u=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog;Gl({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t},(function(e){n.bytes=e,Wl({segment:n,bytes:n.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}))}({decryptionWorker:n,segment:g,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p});Wl({segment:g,bytes:g.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:u,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Gl({decryptionWorker:n,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},(function(e){g.map.bytes=e,Vl(g,(function(e){if(e)return Bl(t),h(e,g);v()}))}));v()}}}},Kl=function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=io.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},Yl=function(e){var t=e.xhr,n=e.xhrOptions,i=e.decryptionWorker,r=e.segment,s=e.abortFn,a=e.progressFn,o=e.trackInfoFn,l=e.timingInfoFn,u=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,f=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.onTransmuxerLog,y=[],_=Xl({activeXhrs:y,decryptionWorker:i,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m,doneFn:g,onTransmuxerLog:v});if(r.key&&!r.key.bytes){var b=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&b.push(r.map.key);var T=t(io.mergeOptions(n,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),Hl(r,b,_));y.push(T)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){var S=t(io.mergeOptions(n,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),Hl(r,[r.map.key],_));y.push(S)}var k=io.mergeOptions(n,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:nl(r.map)}),E=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,i){var r=Fl(e,i);if(r)return n(r,t);var s=new Uint8Array(i.response);if(t.map.key)return t.map.encryptedBytes=s,n(null,t);t.map.bytes=s,Vl(t,(function(e){if(e)return e.xhr=i,e.status=i.status,n(e,t);n(null,t)}))}}({segment:r,finishProcessingFn:_}),w=t(k,E);y.push(w)}var C=io.mergeOptions(n,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:nl(r)}),x=t(C,ql({segment:r,finishProcessingFn:_,responseType:C.responseType}));x.addEventListener("progress",Kl({segment:r,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m})),y.push(x);var j={};return y.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:j,abortFn:s}))})),function(){return Bl(y)}},Ql=lo("CodecUtils"),Jl=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Zl=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,i=e.type,r=e.details;t[n]=t[n]||[],t[n].push(te(""+i+r))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Ql("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},$l=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},eu=function(e,t){var n=t.attributes||{},i=Zl(function(e){var t=e.attributes||{};if(t.CODECS)return ne(t.CODECS)}(t)||[]);if(Jl(e,t)&&!i.audio&&!function(e,t){if(!Jl(e,t))return!0;var n=t.attributes||{},i=e.mediaGroups.AUDIO[n.AUDIO];for(var r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1}(e,t)){var r=Zl(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return ne(r.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);r.audio&&(i.audio=r.audio)}return i},tu=lo("PlaylistSelector"),nu=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},iu=function(e,t){if(!e)return"";var n=y().getComputedStyle(e);return n?n[t]:""},ru=function(e,t){var n=e.slice();e.sort((function(e,i){var r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r}))},su=function(e,t){var n,i;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||y().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),n-(i=i||y().Number.MAX_VALUE)},au=function(e,t,n,i,r,s){if(e){var a={bandwidth:t,width:n,height:i,limitRenditionByPlayerDimensions:r},o=e.playlists;Ro.isAudioOnly(e)&&(o=s.getAudioTrackPlaylists_(),a.audioOnly=!0);var l=o.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||y().Number.MAX_VALUE,width:t,height:n,playlist:e}}));ru(l,(function(e,t){return e.bandwidth-t.bandwidth}));var u=(l=l.filter((function(e){return!Ro.isIncompatible(e.playlist)}))).filter((function(e){return Ro.isEnabled(e.playlist)}));u.length||(u=l.filter((function(e){return!Ro.isDisabled(e.playlist)})));var c=u.filter((function(e){return e.bandwidth*Tl.BANDWIDTH_VARIANCE<t})),d=c[c.length-1],h=c.filter((function(e){return e.bandwidth===d.bandwidth}))[0];if(!1===r){var p=h||u[0]||l[0];if(p&&p.playlist){var f="sortedPlaylistReps";return h&&(f="bandwidthBestRep"),u[0]&&(f="enabledPlaylistReps"),tu("choosing "+nu(p)+" using "+f+" with options",a),p.playlist}return tu("could not choose a playlist with options",a),null}var m=c.filter((function(e){return e.width&&e.height}));ru(m,(function(e,t){return e.width-t.width}));var g=m.filter((function(e){return e.width===n&&e.height===i}));d=g[g.length-1];var v,_,b,T,S=g.filter((function(e){return e.bandwidth===d.bandwidth}))[0];if(S||(_=(v=m.filter((function(e){return e.width>n||e.height>i}))).filter((function(e){return e.width===v[0].width&&e.height===v[0].height})),d=_[_.length-1],b=_.filter((function(e){return e.bandwidth===d.bandwidth}))[0]),s.experimentalLeastPixelDiffSelector){var k=m.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-i),e}));ru(k,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),T=k[0]}var E=T||b||S||h||u[0]||l[0];if(E&&E.playlist){var w="sortedPlaylistReps";return T?w="leastPixelDiffRep":b?w="resolutionPlusOneRep":S?w="resolutionBestRep":h?w="bandwidthBestRep":u[0]&&(w="enabledPlaylistReps"),tu("choosing "+nu(E)+" using "+w+" with options",a),E.playlist}return tu("could not choose a playlist with options",a),null}},ou=function(){var e=this.useDevicePixelRatio&&y().devicePixelRatio||1;return au(this.playlists.master,this.systemBandwidth,parseInt(iu(this.tech_.el(),"width"),10)*e,parseInt(iu(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},lu=function(e){var t=e.inbandTextTracks,n=e.metadataArray,i=e.timestampOffset,r=e.videoDuration;if(n){var s=y().WebKitDataCue||y().VTTCue,a=t.metadataTrack_;if(a&&(n.forEach((function(e){var t=e.cueTime+i;!("number"!=typeof t||y().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new s(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return io.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return io.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return io.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),a.addCue(n)}))})),a.cues&&a.cues.length)){for(var o=a.cues,l=[],u=0;u<o.length;u++)o[u]&&l.push(o[u]);var c=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),d=Object.keys(c).sort((function(e,t){return Number(e)-Number(t)}));d.forEach((function(e,t){var n=c[e],i=Number(d[t+1])||r;n.forEach((function(e){e.endTime=i}))}))}}},uu=function(e,t,n){var i,r;if(n&&n.cues)for(i=n.cues.length;i--;)(r=n.cues[i]).startTime>=e&&r.endTime<=t&&n.removeCue(r)},cu=function(e){return"number"==typeof e&&isFinite(e)},du=1/60,hu=function(e){var t=e.startOfSegment,n=e.duration,i=e.segment,r=e.part,s=e.playlist,a=s.mediaSequence,o=s.id,l=s.segments,u=void 0===l?[]:l,c=e.mediaIndex,d=e.partIndex,h=e.timeline,p=u.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var m="number"==typeof d,g=e.segment.uri?"segment":"pre-segment",v=m?ko({preloadSegment:i})-1:0;return g+" ["+(a+c)+"/"+(a+p)+"]"+(m?" part ["+d+"/"+v+"]":"")+" segment start/end ["+i.start+" => "+i.end+"]"+(m?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+h+"] selected by ["+f+"] playlist ["+o+"]"},pu=function(e){return e+"TimingInfo"},fu=function(e){var t=e.timelineChangeController,n=e.currentTimeline,i=e.segmentTimeline,r=e.loaderType,s=e.audioDisabled;if(n===i)return!1;if("audio"===r){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==i}if("main"===r&&s){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==i}return!1},mu=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+uo},gu=function(e,t){if("hls"!==t)return null;var n,i,r=(n={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},i=0,["video","audio"].forEach((function(e){var t=n[e+"TimingInfo"];if(t){var r,s=t.start,a=t.end;"bigint"==typeof s||"bigint"==typeof a?r=y().BigInt(a)-y().BigInt(s):"number"==typeof s&&"number"==typeof a&&(r=a-s),void 0!==r&&r>i&&(i=r)}})),"bigint"==typeof i&&i<Number.MAX_SAFE_INTEGER&&(i=Number(i)),i);if(!r)return null;var s=e.playlist.targetDuration,a=mu({segmentDuration:r,maxDuration:2*s}),o=mu({segmentDuration:r,maxDuration:s}),l="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+r+" when the reported duration is "+e.duration+" and the target duration is "+s+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return a||o?{severity:a?"warn":"info",message:l}:null},vu=function(e){function t(t,n){var i;if(i=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return i.bandwidth=t.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.partIndex=null,i.hasPlayed_=t.hasPlayed,i.currentTime_=t.currentTime,i.seekable_=t.seekable,i.seeking_=t.seeking,i.duration_=t.duration,i.mediaSource_=t.mediaSource,i.vhs_=t.vhs,i.loaderType_=t.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=t.segmentMetadataTrack,i.goalBufferLength_=t.goalBufferLength,i.sourceType_=t.sourceType,i.sourceUpdater_=t.sourceUpdater,i.inbandTextTracks_=t.inbandTextTracks,i.state_="INIT",i.timelineChangeController_=t.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=t.parse708captions,i.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,i.captionServices_=t.captionServices,i.experimentalExactManifestTimings=t.experimentalExactManifestTimings,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=io.browser.IE_VERSION>=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=t.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=t.decrypter,i.syncController_=t.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",(function(){i.isEndOfStream_()||(i.ended_=!1)})),i.fetchAtBuffer_=!1,i.logger_=lo("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(E(i),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",(function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",(function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",(function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),i}C(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return Dl({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&y().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,y().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Ol(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return io.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,i=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=ol(e),i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=ll(e),i=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!i&&e.bytes&&(this.keyCache_[n]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(i||e).resolvedUri};return i&&(r.bytes=i.bytes),r},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(n&&(n.id?r=n.id:n.uri&&(r=n.uri)),this.logger_("playlist update ["+r+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var s=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+s+"]"),null!==this.mediaIndex)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var a=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!a.parts||!a.parts.length||!a.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}i&&(i.mediaIndex-=s,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(y().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Ol(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,i){if(void 0===n&&(n=function(){}),void 0===i&&(i=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var r=1,s=function(){0===--r&&n()};for(var a in!i&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(i||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,i){for(var r=Math.ceil((t-i)*qt.ONE_SECOND_IN_TS),s=Math.ceil((n-i)*qt.ONE_SECOND_IN_TS),a=e.slice(),o=e.length;o--&&!(e[o].pts<=s););if(-1===o)return a;for(var l=o+1;l--&&!(e[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s)),this.inbandTextTracks_)uu(e,t,this.inbandTextTracks_[a]);uu(e,t,this.segmentMetadataTrack_),s()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&y().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y().setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&y().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y().setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var i="number"==typeof e&&t.segments[e],r=e+1===t.segments.length,s=!i||!i.parts||n+1===i.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s},n.chooseNextRequest_=function(){var e=this.buffered_(),t=vo(e)||0,n=yo(e,this.currentTime_()),i=!this.hasPlayed_()&&n>=1,r=n>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||i||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,n){t=t||[];for(var i=[],r=0,s=0;s<t.length;s++){var a=t[s];if(e===a.timeline&&(i.push(s),(r+=a.duration)>n))return s}return 0===i.length?0:i[i.length-1]}(this.currentTimeline_,s,t);else if(null!==this.mediaIndex){var o=s[this.mediaIndex],l="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=o.end?o.end:t,o.parts&&o.parts[l+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=l+1):a.mediaIndex=this.mediaIndex+1}else{var u=Ro.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),c=u.segmentIndex,d=u.startTime,h=u.partIndex;a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=c,a.startOfSegment=d,a.partIndex=h}var p=s[a.mediaIndex],f=p&&"number"==typeof a.partIndex&&p.parts&&p.parts[a.partIndex];if(!p||"number"==typeof a.partIndex&&!f)return null;if("number"!=typeof a.partIndex&&p.parts&&(a.partIndex=0,f=p.parts[0]),!n&&f&&!f.independent)if(0===a.partIndex){var m=s[a.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(a.mediaIndex-=1,a.partIndex=m.parts.length-1,a.independent="previous segment")}else p.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(a)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,i=e.mediaIndex,r=e.startOfSegment,s=e.isSyncRequest,a=e.partIndex,o=e.forceTimestampOffset,l=e.getMediaInfoForTime,u=n.segments[i],c="number"==typeof a&&u.parts[a],d={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||u.resolvedUri,mediaIndex:i,partIndex:c?a:null,isSyncRequest:s,startOfSegment:r,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:c&&c.duration||u.duration,segment:u,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});var p=vo(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var i,r=Math.ceil((t-n+3)*qt.ONE_SECOND_IN_TS);for(i=0;i<e.length&&!(e[i].pts>r);i++);return e.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,i=t.currentTimeline,r=t.startOfSegment,s=t.buffered,t.overrideCheck||n!==i?n<i?r:s.length?s.end(s.length-1):r:null;var t,n,i,r,s},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,i=this.pendingSegment_.duration,r=Ro.estimateSegmentRequestTime(i,n,this.playlist_,e.bytesReceived),s=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(r<=s)){var a=function(e){var t=e.master,n=e.currentTime,i=e.bandwidth,r=e.duration,s=e.segmentDuration,a=e.timeUntilRebuffer,o=e.currentTimeline,l=e.syncController,u=t.playlists.filter((function(e){return!Ro.isIncompatible(e)})),c=u.filter(Ro.isEnabled);c.length||(c=u.filter((function(e){return!Ro.isDisabled(e)})));var d=c.filter(Ro.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=l.getSyncPoint(e,r,o,n)?1:2;return{playlist:e,rebufferingImpact:Ro.estimateSegmentRequestTime(s,i,e)*t-a}})),h=d.filter((function(e){return e.rebufferingImpact<=0}));return ru(h,(function(e,t){return su(t.playlist,e.playlist)})),h.length?h[0]:(ru(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var o=r-s-a.rebufferingImpact,l=.5;s<=uo&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Tl.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+hu(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),i=Object.keys(t).sort();if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++){var s=n[r];if(s!==i[r])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,s=pu(t);r[s]=r[s]||{},r[s][n]=i,this.logger_("timinginfo: "+t+" - "+n+" - "+i),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),r={};t.forEach((function(e){r[e.stream]=r[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=r[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)})),Object.keys(r).forEach((function(e){var t=r[e],s=t.startTime,a=t.endTime,o=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+s+" -> "+a+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var i=n;/^cc708_/.test(n)&&(i="SERVICE"+n.split("_")[1]);var r=t.textTracks().getTrackById(i);if(r)e[n]=r;else{var s=n,a=n,o=!1,l=(t.options_.vhs&&t.options_.vhs.captionServices||{})[i];l&&(s=l.label,a=l.language,o=l.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:i,default:o,label:s,language:a},!1).track}}}(l,n.vhs_.tech_,e),uu(s,a,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,i=e.timestampOffset;if(n){var r=y().WebKitDataCue||y().VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new r(e.startTime+i,e.endTime+i,e.text))}))}}({captionArray:o,inbandTextTracks:l,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),lu({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:i,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!fu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var n=t.hasAudio,i=t.hasVideo,r=t.isMuxed;return!(i&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!fu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[pu(t.type)].start;else{var i,r=this.getCurrentMediaInfo_(),s="main"===this.loaderType_&&r&&r.hasVideo;s&&(i=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:i,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var a=this.chooseNextRequest_();if(a.mediaIndex!==n.mediaIndex||a.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,i=e.map,r=e.playlist;if(i){var s=ol(i);if(this.activeInitSegmentId_===s)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=s}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,i=e.segmentInfo,r=e.type,s=e.bytes,a=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+go(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+go(o).join(", "));var l=a.length?a.start(0):0,u=a.length?a.end(a.length-1):0,c=o.length?o.start(0):0,d=o.length?o.end(o.length-1):0;if(u-l<=1&&d-c<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+s.byteLength+", audio buffer: "+go(a).join(", ")+", video buffer: "+go(o).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:i,type:r,bytes:s}));var h=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+h),this.remove(0,h,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=y().setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,i=e.type,r=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(i+" append of "+r.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:i,bytes:r}))},n.appendToSourceBuffer_=function(e){var t,n,i,r=e.segmentInfo,s=e.type,a=e.initSegment,o=e.data,l=e.bytes;if(!l){var u=[o],c=o.byteLength;a&&(u.unshift(a),c+=a.byteLength),i=0,(t={bytes:c,segments:u}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,i),i+=e.byteLength}))),l=n}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:s,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:r,type:s,bytes:l}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var i=this.pendingSegment_.segment,r=e+"TimingInfo";i[r]||(i[r]={}),i[r].transmuxerPrependedSeconds=n.prependedContentDuration||0,i[r].transmuxedPresentationStart=n.start.presentation,i[r].transmuxedDecodeStart=n.start.decode,i[r].transmuxedPresentationEnd=n.end.presentation,i[r].transmuxedDecodeEnd=n.end.decode,i[r].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,i=t.data;if(i&&i.byteLength&&("audio"!==n||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=T({},e,{forceTimestampOffset:!0});T(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,a=i||r&&s;this.logger_("Requesting "+hu(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Yl({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var i=n.message,r=n.level,s=n.stream;t.logger_(hu(e)+" logged from transmuxer stream "+s+" as a "+r+": "+i)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var i=t-Tl.BACK_BUFFER_LENGTH;e.length&&(i=Math.max(i,e.start(0)));var r=t-n;return Math.min(r,i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,i={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?i.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(i.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var s=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key=this.segmentKey(t.key),i.key.iv=s}return t.map&&(i.map=this.initSegmentForMap(t.map)),i},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<du?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record 0.016666666666666666"):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Ul)return;return this.pause(),e.code===Rl?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),i.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var i=t[0].pts,r=0;r<e.length&&!(e[r].pts>=i);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,i=e.mediaIndex,r=e.firstVideoFrameTimeForData,s=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,o=e.videoTimingInfo,l=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return l.start;var u=n.segments[i-1];return 0!==i&&u&&void 0!==u.start&&u.end===r+s?o.start:r},n.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var n=t.hasAudio,i=t.hasVideo,r=t.isMuxed,s="main"===this.loaderType_&&i,a=!this.audioDisabled_&&n&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,i=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:i.start:i.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"==typeof n.end?n.end:n.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=gu(e,this.sourceType_);if(t&&("warn"===t.severity?io.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+hu(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment,i=e.part,r=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,s=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration;if(r||s)return this.logger_("bad "+(r?"segment":"part")+" "+hu(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+hu(e))},n.recordThroughput_=function(e){if(e.duration<du)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record 0.016666666666666666");else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,i=t.end;if(cu(n)&&cu(i)){uu(n,i,this.segmentMetadataTrack_);var r=y().WebKitDataCue||y().VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:i},a=new r(n,i,JSON.stringify(s));a.value=s,this.segmentMetadataTrack_.addCue(a)}}},t}(io.EventTarget);function yu(){}var _u,bu=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Tu=["video","audio"],Su=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},ku=function e(t,n){if(0!==n.queue.length){var i=0,r=n.queue[i];if("mediaSource"!==r.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!Su(t,n)){if(r.type!==t){if(i=function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if("mediaSource"===i.type)return null;if(i.type===e)return n}return null}(t,n.queue),null===i)return;r=n.queue[i]}return n.queue.splice(i,1),n.queuePending[t]=r,r.action(t,n),r.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),r.action(n),r.doneFn&&r.doneFn(),e("audio",n),e("video",n))}},Eu=function(e,t){var n=t[e+"Buffer"],i=bu(e);n&&(n.removeEventListener("updateend",t["on"+i+"UpdateEnd_"]),n.removeEventListener("error",t["on"+i+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},wu=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},Cu=function(e,t,n){return function(i,r){var s=r[i+"Buffer"];if(wu(r.mediaSource,s)){r.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+i+"Buffer");try{s.appendBuffer(e)}catch(e){r.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+i+"Buffer"),r.queuePending[i]=null,n(e)}}}},xu=function(e,t){return function(n,i){var r=i[n+"Buffer"];if(wu(i.mediaSource,r)){i.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{r.remove(e,t)}catch(r){i.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},ju=function(e){return function(t,n){var i=n[t+"Buffer"];wu(n.mediaSource,i)&&(n.logger_("Setting "+t+"timestampOffset to "+e),i.timestampOffset=e)}},Au=function(e){return function(t,n){e()}},Iu=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){io.log.warn("Failed to call media source endOfStream",e)}}}},Pu=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){io.log.warn("Failed to set media source duration",e)}}},Lu=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(wu(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){io.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},Ou=function(e,t){return function(n){var i=bu(e),r=re(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var s=n.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",n["on"+i+"UpdateEnd_"]),s.addEventListener("error",n["on"+i+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=s}},Du=function(e){return function(t){var n=t[e+"Buffer"];if(Eu(e,t),wu(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){io.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},Mu=function(e){return function(t,n){var i=n[t+"Buffer"],r=re(e);wu(n.mediaSource,i)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),i.changeType(r),n.codecs[t]=e)}},Nu=function(e){var t=e.type,n=e.sourceUpdater,i=e.action,r=e.doneFn,s=e.name;n.queue.push({type:t,action:i,doneFn:r,name:s}),ku(t,n)},Ru=function(e,t){return function(n){if(t.queuePending[e]){var i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}ku(e,t)}},Uu=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return ku("mediaSource",E(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=lo("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Ru("video",E(n)),n.onAudioUpdateEnd_=Ru("audio",E(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}C(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Nu({type:"mediaSource",sourceUpdater:this,action:Ou(e,t),name:"addSourceBuffer"})},n.abort=function(e){Nu({type:e,sourceUpdater:this,action:Lu(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Nu({type:"mediaSource",sourceUpdater:this,action:Du(e),name:"removeSourceBuffer"}):io.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!io.browser.IE_VERSION&&!io.browser.IS_FIREFOX&&y().MediaSource&&y().MediaSource.prototype&&"function"==typeof y().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return y().SourceBuffer&&y().SourceBuffer.prototype&&"function"==typeof y().SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Nu({type:e,sourceUpdater:this,action:Mu(t),name:"changeType"}):io.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var i=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,i);t.canChangeType()&&t.changeType(n,i)}))},n.appendBuffer=function(e,t){var n=this,i=e.segmentInfo,r=e.type,s=e.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+s.length+" until video append");if(Nu({type:r,sourceUpdater:this,action:Cu(s,i||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return wu(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:io.createTimeRange()},n.videoBuffered=function(){return wu(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:io.createTimeRange()},n.buffered=function(){var e=wu(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=wu(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,i=null,r=0,s=[],a=[];if(!(e&&e.length&&t&&t.length))return io.createTimeRange();for(var o=e.length;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(s.sort((function(e,t){return e.time-t.time})),o=0;o<s.length;o++)"start"===s[o].type?2==++r&&(n=s[o].time):"end"===s[o].type&&1==--r&&(i=s[o].time),null!==n&&null!==i&&(a.push([n,i]),n=null,i=null);return io.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=yu),Nu({type:"mediaSource",sourceUpdater:this,action:Pu(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=yu),"string"!=typeof e&&(e=void 0),Nu({type:"mediaSource",sourceUpdater:this,action:Iu(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=yu),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Nu({type:"audio",sourceUpdater:this,action:xu(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=yu),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Nu({type:"video",sourceUpdater:this,action:xu(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!Su("audio",this)&&!Su("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Nu({type:"audio",sourceUpdater:this,action:ju(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Nu({type:"video",sourceUpdater:this,action:ju(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Nu({type:"audio",sourceUpdater:this,action:Au(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Nu({type:"video",sourceUpdater:this,action:Au(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Tu.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Eu(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(io.EventTarget),Bu=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Fu=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),Hu=function(e){function t(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).mediaSource_=null,i.subtitlesTrack_=null,i.loaderType_="subtitle",i.featuresNativeTextTracks_=t.featuresNativeTextTracks,i.shouldSaveSegmentTimingInfo_=!1,i}C(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return io.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return io.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=ol(e),i=this.initSegments_[n];if(t&&!i&&e.bytes){var r=Fu.byteLength+e.bytes.byteLength,s=new Uint8Array(r);s.set(e.bytes),s.set(Fu,e.bytes.byteLength),this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return i||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){uu(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var i=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Rl&&this.handleTimeout_(),e.code===Ul?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),this.state="APPENDING",this.trigger("appending");var s=r.segment;if(s.map&&(s.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!=typeof y().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var a,o=function(){i.subtitlesTrack_.tech_.off("vttjsloaded",a),i.stopForError({message:"Error loading vtt.js"})};return a=function(){i.subtitlesTrack_.tech_.off("vttjserror",o),i.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",a),void this.subtitlesTrack_.tech_.one("vttjserror",o)}s.requested=!0;try{this.parseVTTCues_(r)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,r.cues.forEach((function(e){i.subtitlesTrack_.addCue(i.featuresNativeTextTracks_?new(y().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var i=[],r=0,s=0;s<t.length;s++)t[n].startTime===t[s].startTime&&t[n].endTime===t[s].endTime&&t[n].text===t[s].text&&++r>1&&i.push(t[s]);i.length&&i.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof y().TextDecoder?t=new(y().TextDecoder)("utf8"):(t=y().WebVTT.StringDecoder(),n=!0);var i=new(y().WebVTT.Parser)(y(),y().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=function(t){e.timestampmap=t},i.onparsingerror=function(e){io.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var r=e.segment.map.bytes;n&&(r=Bu(r)),i.parse(r)}var s=e.bytes;n&&(s=Bu(s)),i.parse(s),i.flush()},n.updateTimeMapping_=function(e,t,n){var i=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,s=r.MPEGTS/qt.ONE_SECOND_IN_TS-r.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=s,e.endTime+=s})),!n.syncInfo){var a=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,o-i.duration)}}}else i.empty=!0},t}(vu),Vu=function(e,t){for(var n=e.cues,i=0;i<n.length;i++){var r=n[i];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},qu=[{name:"VOD",run:function(e,t,n,i,r){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,i,r){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var s=null,a=null,o=To(t);r=r||0;for(var l=0;l<o.length;l++){var u=o[t.endList||0===r?l:o.length-(l+1)],c=u.segment,d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var h=c.dateTimeObject.getTime()/1e3+d;if(c.parts&&"number"==typeof u.partIndex)for(var p=0;p<u.partIndex;p++)h+=c.parts[p].duration;var f=Math.abs(r-h);if(null!==a&&(0===f||a<f))break;a=f,s={time:h,segmentIndex:u.segmentIndex,partIndex:u.partIndex}}}return s}},{name:"Segment",run:function(e,t,n,i,r){var s=null,a=null;r=r||0;for(var o=To(t),l=0;l<o.length;l++){var u=o[t.endList||0===r?l:o.length-(l+1)],c=u.segment,d=u.part&&u.part.start||c&&c.start;if(c.timeline===i&&void 0!==d){var h=Math.abs(r-d);if(null!==a&&a<h)break;(!s||null===a||a>=h)&&(a=h,s={time:d,segmentIndex:u.segmentIndex,partIndex:u.partIndex})}}return s}},{name:"Discontinuity",run:function(e,t,n,i,r){var s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],u=t.discontinuitySequence+o+1,c=e.discontinuities[u];if(c){var d=Math.abs(r-c.time);if(null!==a&&a<d)break;(!s||null===a||a>=d)&&(a=d,s={time:c.time,segmentIndex:l,partIndex:null})}}return s}},{name:"Playlist",run:function(e,t,n,i,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],zu=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=lo("SyncController"),n}C(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,i){var r=this.runStrategies_(e,t,n,i);return r.length?this.selectSyncPoint_(r,{key:"time",value:i}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+xo({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,i){for(var r=[],s=0;s<qu.length;s++){var a=qu[s],o=a.run(this,e,t,n,i);o&&(o.strategy=a.name,r.push({strategy:a.name,syncPoint:o}))}return r},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,s=1;s<e.length;s++){var a=Math.abs(e[s].syncPoint[t.key]-t.value);a<i&&(i=a,n=e[s].syncPoint,r=e[s].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+("number"==typeof n.partIndex?",partIndex:"+n.partIndex:"")+"]"),n},n.saveExpiredSegmentInfo=function(e,t){var n=t.mediaSequence-e.mediaSequence;if(n>86400)io.log.warn("Not saving expired segment info. Media sequence gap "+n+" is too large.");else for(var i=n-1;i>=0;i--){var r=e.segments[i];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,i=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),r=t.segment;i&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));var s=r.dateTimeObject;r.discontinuity&&n&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var i,r,s=e.segment,a=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),i=e.startOfSegment,r=t.end+o.mapping;else{if(!o)return!1;i=t.start+o.mapping,r=t.end+o.mapping}return a&&(a.start=i,a.end=r),(!s.start||i<s.start)&&(s.start=i),s.end=r,!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var i=0;i<t.discontinuityStarts.length;i++){var r=t.discontinuityStarts[i],s=t.discontinuitySequence+i+1,a=r-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){var l=void 0;l=a<0?n.start-xo({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):n.end+xo({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:l,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(io.EventTarget),Wu=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}C(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.lastTimelineChanges_[t]={type:t,from:n,to:i},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(io.EventTarget),Gu=El(wl((function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var i=t((function(e){function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e},e.exports.default=e.exports,e.exports.__esModule=!0})),r=t((function(e){function t(n,i){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,i)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),s=t((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),a=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=t.length,a=0;a<s;++a)t[a].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();var o,l=null,u=function(){function e(e){var t,n,i;l||(l=function(){var e,t,n,i,r,s,a,o,l=[[[],[],[],[],[]],[[],[],[],[],[]]],u=l[0],c=l[1],d=u[4],h=c[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=i||1,n=f[n]||1)for(s=(s=n^n<<1^n<<2^n<<3^n<<4)>>8^255&s^99,d[t]=s,h[s]=t,o=16843009*p[r=p[i=p[t]]]^65537*r^257*i^16843008*t,a=257*p[s]^16843008*s,e=0;e<4;e++)u[e][t]=a=a<<24^a>>>8,c[e][s]=o=o<<24^o>>>8;for(e=0;e<5;e++)u[e]=u[e].slice(0),c[e]=c[e].slice(0);return l}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var r=this._tables[0][4],s=this._tables[1],a=e.length,o=1;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size");var u=e.slice(0),c=[];for(this._key=[u,c],t=a;t<4*a+28;t++)i=u[t-1],(t%a==0||8===a&&t%a==4)&&(i=r[i>>>24]<<24^r[i>>16&255]<<16^r[i>>8&255]<<8^r[255&i],t%a==0&&(i=i<<8^i>>>24^o<<24,o=o<<1^283*(o>>7))),u[t]=u[t-a]^i;for(n=0;t;n++,t--)i=u[3&n?t:t-4],c[n]=t<=4||n<4?i:s[0][r[i>>>24]]^s[1][r[i>>16&255]]^s[2][r[i>>8&255]]^s[3][r[255&i]]}return e.prototype.decrypt=function(e,t,n,i,r,s){var a,o,l,u,c=this._key[1],d=e^c[0],h=i^c[1],p=n^c[2],f=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],S=v[4];for(u=0;u<m;u++)a=y[d>>>24]^_[h>>16&255]^b[p>>8&255]^T[255&f]^c[g],o=y[h>>>24]^_[p>>16&255]^b[f>>8&255]^T[255&d]^c[g+1],l=y[p>>>24]^_[f>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],f=y[f>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&p]^c[g+3],g+=4,d=a,h=o,p=l;for(u=0;u<4;u++)r[(3&-u)+s]=S[d>>>24]<<24^S[h>>16&255]<<16^S[p>>8&255]<<8^S[255&f]^c[g++],a=d,d=h,h=p,p=f,f=a},e}(),c=function(e){function t(){var t;return(t=e.call(this,a)||this).jobs=[],t.delay=1,t.timeout_=null,t}s(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(a),d=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,n,i,r){var s=e.STEP,a=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),l=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+s),n,i,o)),l=s;l<a.length;l+=s)i=new Uint32Array([d(a[l-4]),d(a[l-3]),d(a[l-2]),d(a[l-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+s),n,i,o));this.asyncStream_.push((function(){var e;r(null,(e=o).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,i){return function(){var r=function(e,t,n){var i,r,s,a,o,l,c,h,p,f=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new u(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(i=n[0],r=n[1],s=n[2],a=n[3],p=0;p<f.length;p+=4)o=d(f[p]),l=d(f[p+1]),c=d(f[p+2]),h=d(f[p+3]),m.decrypt(o,l,c,h,v,p),v[p]=d(v[p]^i),v[p+1]=d(v[p+1]^r),v[p+2]=d(v[p+2]^s),v[p+3]=d(v[p+3]^a),i=o,r=l,s=c,a=h;return g}(e,t,n);i.set(r,e.byteOffset)}},i(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();o="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var p=o.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000");var f=function(e){var t={};return Object.keys(e).forEach((function(n){var i,r=e[n];i=r,("function"===ArrayBuffer.isView?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t};self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),i=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new h(n,i,r,(function(e,n){self.postMessage(f({source:t.source,decrypted:n}),[n.buffer])}))}}))),Xu=kl(Gu),Ku=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Yu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Qu=function(e,t){t.activePlaylistLoader=e,e.load()},Ju={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;Yu(n,i);var s=i.activeTrack(),a=i.activeGroup(),o=(a.filter((function(e){return e.default}))[0]||a[0]).id,l=i.tracks[o];if(s!==l){for(var u in io.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),i.tracks)i.tracks[u].enabled=i.tracks[u]===l;i.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e];io.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Yu(n,i);var r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}}},Zu={AUDIO:function(e,t,n){if(t){var i=n.tech,r=n.requestOptions,s=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Ju[e](e,n))}},SUBTITLES:function(e,t,n){var i=n.tech,r=n.requestOptions,s=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Ju[e](e,n))}},$u={AUDIO:function(e,t){var n=t.vhs,i=t.sourceType,r=t.segmentLoaders[e],s=t.requestOptions,a=t.master.mediaGroups,o=t.mediaTypes[e],l=o.groups,u=o.tracks,c=o.logger_,d=t.masterPlaylistLoader,h=No(d.master);for(var p in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},h&&(a[e].main.default.playlists=d.master.playlists)),a[e])for(var f in l[p]||(l[p]=[]),a[e][p]){var m=a[e][p][f],g=void 0;if(h?(c("AUDIO group '"+p+"' label '"+f+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===i&&m.playlists?new Jo(m.playlists[0],n,s):m.resolvedUri?new Jo(m.resolvedUri,n,s):m.playlists&&"dash"===i?new bl(m.playlists[0],n,s,d):null,m=io.mergeOptions({id:f,playlistLoader:g},m),Zu[e](e,m.playlistLoader,t),l[p].push(m),void 0===u[f]){var v=new io.AudioTrack({id:f,kind:Ku(m),enabled:!1,language:m.language,default:m.default,label:f});u[f]=v}}r.on("error",Ju[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,i=t.vhs,r=t.sourceType,s=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[e],u=l.groups,c=l.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var p in u[h]||(u[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],m=void 0;if("hls"===r)m=new Jo(f.resolvedUri,i,a);else if("dash"===r){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new bl(f.playlists[0],i,a,d)}else"vhs-json"===r&&(m=new Jo(f.playlists?f.playlists[0]:f.resolvedUri,i,a));if(f=io.mergeOptions({id:p,playlistLoader:m},f),Zu[e](e,f.playlistLoader,t),u[h].push(f),void 0===c[p]){var g=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}s.on("error",Ju[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,i=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,a=r.tracks;for(var o in i[e])for(var l in s[o]||(s[o]=[]),i[e][o]){var u=i[e][o][l];if(/^(?:CC|SERVICE)/.test(u.instreamId)){var c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:l,language:u.language,instreamId:u.instreamId,default:u.default&&u.autoselect};if(c[d.instreamId]&&(d=io.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,s[o].push(io.mergeOptions({id:l},u)),void 0===a[l]){var h=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;a[l]=h}}}}},ec=function e(t,n){for(var i=0;i<t.length;i++){if(Do(n,t[i]))return!0;if(t[i].playlists&&e(t[i].playlists,n))return!0}return!1},tc={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if(n[i].enabled)return n[i];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if("showing"===n[i].mode||"hidden"===n[i].mode)return n[i];return null}}},nc=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){$u[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,i=e.tech,r=e.vhs,s=e.segmentLoaders,a=s.AUDIO,o=s.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var i=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,s=i.media();if(!s)return null;var a=null;s.attributes[e]&&(a=r[s.attributes[e]]);var o=Object.keys(r);if(!a)if("AUDIO"===e&&o.length>1&&No(t.master))for(var l=0;l<o.length;l++){var u=r[o[l]];if(ec(u,s)){a=u;break}}else r.main?a=r.main:1===o.length&&(a=r[o[0]]);return void 0===n?a:null!==n&&a&&a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=tc[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,i=n[e],r=n.main,s=t.mediaTypes[e],a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,u=s.lastGroup_;o&&u&&o.id===u.id||(s.lastGroup_=o,s.lastTrack_=a,Yu(i,s),o&&!o.isMasterPlaylist&&(o.playlistLoader?(i.resyncLoader(),Qu(o.playlistLoader,s)):l&&r.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,i=t.segmentLoaders,r=i[e],s=i.main,a=t.mediaTypes[e],o=a.activeTrack(),l=a.getActiveGroup(),u=a.activePlaylistLoader,c=a.lastTrack_;if((!c||!o||c.id!==o.id)&&(a.lastGroup_=l,a.lastTrack_=o,Yu(r,a),l)){if(l.isMasterPlaylist){if(!o||!c||o.id===c.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return a.logger_("track change. Switching master audio from "+c.id+" to "+o.id),n.pause(),s.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!l.playlistLoader)return s.setAudio(!0),void s.resetEverything();r.setAudio(!0),s.setAudio(!1)}u!==l.playlistLoader?(r.track&&r.track(o),r.resetEverything(),Qu(l.playlistLoader,a)):Qu(l.playlistLoader,a)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var l=t.AUDIO.activeGroup();if(l){var u=(l.filter((function(e){return e.default}))[0]||l[0]).id;t.AUDIO.tracks[u].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"}),i.trigger({type:"usage",name:"hls-audio-change"})};for(var d in i.audioTracks().addEventListener("change",c),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",(function(){i.audioTracks().removeEventListener("change",c),i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),i.clearTracks("audio"),t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[d])},ic=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],rc=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},sc=function(e){function t(t){var n;n=e.call(this)||this;var i=t.src,r=t.handleManifestRedirects,s=t.withCredentials,a=t.tech,o=t.bandwidth,l=t.externVhs,u=t.useCueTags,c=t.blacklistDuration,d=t.enableLowInitialPlaylist,h=t.sourceType,p=t.cacheEncryptionKeys,f=t.experimentalBufferBasedABR,m=t.experimentalLeastPixelDiffSelector,g=t.captionServices;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");var v=t.maxPlaylistRetries;null==v&&(v=1/0),_u=l,n.experimentalBufferBasedABR=Boolean(f),n.experimentalLeastPixelDiffSelector=Boolean(m),n.withCredentials=s,n.tech_=a,n.vhs_=a.vhs,n.sourceType_=h,n.useCueTags_=u,n.blacklistDuration=c,n.maxPlaylistRetries=v,n.enableLowInitialPlaylist=d,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:s,handleManifestRedirects:r,maxPlaylistRetries:v,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:yu,activeTrack:yu,getActiveGroup:yu,onGroupChanged:yu,onTrackChanged:yu,lastTrack_:null,logger_:lo("MediaGroups["+t+"]")}})),e}(),n.mediaSource=new(y().MediaSource),n.handleDurationChange_=n.handleDurationChange_.bind(E(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(E(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(E(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=io.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new zu(t),n.segmentMetadataTrack_=a.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Xu,n.sourceUpdater_=new Uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new Wu;var _={vhs:n.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:g,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:o,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:p,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};n.masterPlaylistLoader_="dash"===n.sourceType_?new bl(i,n.vhs_,n.requestOptions_):new Jo(i,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new vu(io.mergeOptions(_,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new vu(io.mergeOptions(_,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new Hu(io.mergeOptions(_,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),ic.forEach((function(e){n[e+"_"]=rc.bind(E(n),e)})),n.logger_=lo("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n.timeToLoadedData__=-1,n.mainAppendsToLoadedData__=-1,n.audioAppendsToLoadedData__=-1;var b="none"===n.tech_.preload()?"play":"loadstart";return n.tech_.one(b,(function(){var e=Date.now();n.tech_.one("loadeddata",(function(){n.timeToLoadedData__=Date.now()-e,n.mainAppendsToLoadedData__=n.mainSegmentLoader_.mediaAppends,n.audioAppendsToLoadedData__=n.audioSegmentLoader_.mediaAppends}))})),n}C(t,e);var n=t.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(){var e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},n.switchMedia_=function(e,t,n){var i=this.media(),r=i&&(i.id||i.uri),s=e.id||e.uri;r&&r!==s&&(this.logger_("switch media "+r+" -> "+s+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=y().setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(y().clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,i=e.mediaGroups.AUDIO,r=Object.keys(i);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var s=i.main||r.length&&i[r[0]];for(var a in s)if(s[a].default){n={label:a};break}}if(!n)return t;var o=[];for(var l in i)if(i[l][n.label]){var u=i[l][n.label];if(u.playlists&&u.playlists.length)o.push.apply(o,u.playlists);else if(u.uri)o.push(u);else if(e.playlists.length)for(var c=0;c<e.playlists.length;c++){var d=e.playlists[c];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===l&&o.push(d)}}return o.length?o:t},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Oo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),nc({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Oo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},i=!0,r=Object.keys(n.AUDIO);for(var s in n.AUDIO)for(var a in n.AUDIO[s]){n.AUDIO[s][a].uri||(i=!1)}i&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),_u.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),r.length&&Object.keys(n.AUDIO[r[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),i=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,i=e.currentTime,r=e.nextPlaylist,s=e.bufferLowWaterLine,a=e.bufferHighWaterLine,o=e.duration,l=e.experimentalBufferBasedABR,u=e.log;if(!r)return io.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return u(c+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var d=Boolean(po(n,i).length);if(!t.endList)return d||"number"!=typeof t.partTargetDuration?(u(c+" as current playlist is live"),!0):(u("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=yo(n,i),p=l?Tl.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Tl.MAX_BUFFER_LOW_WATER_LINE;if(o<p)return u(c+" as duration < max low water line ("+o+" < "+p+")"),!0;var f=r.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(f<m&&(!l||h<a)){var g=c+" as next bandwidth < current bandwidth ("+f+" < "+m+")";return l&&(g+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+a+")"),u(g),!0}if((!l||f>m)&&h>=s){var v=c+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+s+")";return l&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),u(v),!0}return u("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:r,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){io.browser.IE_VERSION||io.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(io.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=_u.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return n-i<=co;var s=r.end(r.length-1);return s-i<=co&&n-s<=co},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));n.playlistErrors_++;var i,r=this.masterPlaylistLoader_.master.playlists,s=r.filter(Po),a=1===s.length&&s[0]===n;if(1===r.length&&t!==1/0)return io.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a);if(a){var o=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(o=!0,delete e.excludeUntil)}})),o&&(io.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}i=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=i,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var l=this.selectPlaylist();if(!l)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:io.log.warn,c=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+l.id+"."),l.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=l.targetDuration/2*1e3||5e3,h="number"==typeof l.lastRequest&&Date.now()-l.lastRequest<=d;return this.switchMedia_(l,"exclude",a||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,i=[],r="all"===e;(r||"main"===e)&&i.push(this.masterPlaylistLoader_);var s=[];(r||"audio"===e)&&s.push("AUDIO"),(r||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((function(t){var r=n[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||i.push(r)})),i.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=po(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:_u.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var i=this.masterPlaylistLoader_.master,r=_u.Playlist.seekable(t,n,_u.Playlist.liveEdgeDelay(i,t));if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=_u.Playlist.seekable(t,n,_u.Playlist.liveEdgeDelay(i,t))).length)return}var s,a;this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=io.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+mo(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),i=_u.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(i=Math.max(i,n.end(n.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var i in n)n[i].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};t.video=t.main;var n=eu(this.master(),this.media()),i={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=n.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(i.video+=","+(n.audio||t.main.audioCodec||oe)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||r)&&(i.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||oe,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),i.audio||i.video){var s,a={};if(["video","audio"].forEach((function(e){if(i.hasOwnProperty(e)&&(r=t[e].isFmp4,o=i[e],!(r?se(o):ae(o)))){var n=t[e].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(i[e]),"audio"===e&&(s=n)}var r,o})),r&&s&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===o&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+s+' does not support codec(s): "'+i.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(t){var n=(ne(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(ne(i[t]||"")[0]||{}).type;n&&r&&n.toLowerCase()!==r.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+i[t]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return i}var u=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:u,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(i){var r=t[i];if(-1===n.indexOf(r.id)){n.push(r.id);var s=eu(e.master,r),a=[];!s.audio||ae(s.audio)||se(s.audio)||a.push("audio codec "+s.audio),!s.video||ae(s.video)||se(s.video)||a.push("video codec "+s.video),s.text&&"stpp.ttml.im1t"===s.text&&a.push("text codec "+s.text),a.length&&(r.excludeUntil=1/0,e.logger_("excluding "+r.id+" for unsupported: "+a.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],i=this.master().playlists,r=Zl(ne(e)),s=$l(r),a=r.video&&ne(r.video)[0]||null,o=r.audio&&ne(r.audio)[0]||null;Object.keys(i).forEach((function(e){var r=i[e];if(-1===n.indexOf(r.id)&&r.excludeUntil!==1/0){n.push(r.id);var l=[],u=eu(t.masterPlaylistLoader_.master,r),c=$l(u);if(u.audio||u.video){if(c!==s&&l.push('codec count "'+c+'" !== "'+s+'"'),!t.sourceUpdater_.canChangeType()){var d=u.video&&ne(u.video)[0]||null,h=u.audio&&ne(u.audio)[0]||null;d&&a&&d.type.toLowerCase()!==a.type.toLowerCase()&&l.push('video codec "'+d.type+'" !== "'+a.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&l.push('audio codec "'+h.type+'" !== "'+o.type+'"')}l.length&&(r.excludeUntil=1/0,t.logger_("blacklisting "+r.id+": "+l.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var i,r=n,s=0;s<e.segments.length;s++){var a=e.segments[s];if(i||(i=Vu(t,r+a.duration/2)),i){if("cueIn"in a){i.endTime=r,i.adEndTime=r,r+=a.duration,i=null;continue}if(r<i.endTime){r+=a.duration;continue}i.endTime+=a.duration}else if("cueOut"in a&&((i=new(y().VTTCue)(r,r+a.duration,a.cueOut)).adStartTime=r,i.adEndTime=r+parseFloat(a.cueOut),t.addCue(i)),"cueOutCont"in a){var o=a.cueOutCont.split("/").map(parseFloat),l=o[0],u=o[1];(i=new(y().VTTCue)(r,r+a.duration,"")).adStartTime=r-l,i.adEndTime=i.adStartTime+u,t.addCue(i)}r+=a.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Tl.GOAL_BUFFER_LENGTH,n=Tl.GOAL_BUFFER_LENGTH_RATE,i=Math.max(t,Tl.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,i)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Tl.BUFFER_LOW_WATER_LINE,n=Tl.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(t,Tl.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,Tl.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?r:i)},n.bufferHighWaterLine=function(){return Tl.BUFFER_HIGH_WATER_LINE},t}(io.EventTarget),ac=function(e,t,n){var i,r,s,a=e.masterPlaylistController_,o=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes){var l=t.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=eu(a.master(),t),this.playlist=t,this.id=n,this.enabled=(i=e.playlists,r=t.id,s=o,function(e){var t=i.master.playlists[r],n=Io(t),a=Po(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||n||(s(),e?i.trigger("renditionenabled"):i.trigger("renditiondisabled")),e)})},oc=["seeking","seeked","pause","playing","error"],lc=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=lo("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},i=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},s=function(){return t.cancelTimer_()},a=this.masterPlaylistController_,o=["main","subtitle","audio"],l={};o.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},a[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)}));var u=function(e){["main","audio"].forEach((function(n){a[n+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)}))};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=function(){return u("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(oc,s),this.tech_.on("canplay",i),this.tech_.one("play",n),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",r),t.tech_.off(oc,s),t.tech_.off("canplay",i),t.tech_.off("play",n),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),o.forEach((function(e){a[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&y().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&y().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=y().setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],i=n.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],i);this[e+"Buffered_"]=i,r?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:go(i)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+co>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var i=t.start(0);e=i+(i===t.end(0)?0:co)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+mo(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var r=this.masterPlaylistController_.sourceUpdater_,s=this.tech_.buffered(),a=r.audioBuffer?r.audioBuffered():null,o=r.videoBuffer?r.videoBuffered():null,l=this.media(),u=l.partTargetDuration?l.partTargetDuration:2*(l.targetDuration-uo),c=[a,o],d=0;d<c.length;d++){if(c[d])if(yo(c[d],n)<u)return!1}var h=fo(s,n);return 0!==h.length&&(e=h.start(0)+co,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=po(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var i=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var s=fo(r,t);if(s.length>0){var a=s.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+s.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,i){if(void 0===i&&(i=!1),!e.length)return!1;var r=e.end(e.length-1)+co;return!n.endList&&i&&(r=e.end(e.length-1)+3*n.targetDuration),t>r},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,i=e.currentTime;if(t){var r;if(t.length&&n.length){var s=po(t,i-3),a=po(t,i),o=po(n,i);o.length&&!a.length&&s.length&&(r={start:s.end(0),end:o.end(0)})}else{fo(t,i).length||(r=this.gapFromVideoUnderflow_(t,i))}return!!r&&(this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+i),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),i=fo(t,n);this.cancelTimer_(),0!==i.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+uo),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return io.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var i=e.end(n-1),r=e.start(n);t.push([i,r])}return io.createTimeRanges(t)}(e),i=0;i<n.length;i++){var r=n.start(i),s=n.end(i);if(t-r<4&&t-r>2)return{start:r,end:s}}return null},e}(),uc={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},cc=function e(t,n){var i=0,r=0,s=io.mergeOptions(uc,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},l=function(){return Date.now()-i<1e3*s.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):s.getSource&&"function"==typeof s.getSource?(i=Date.now(),s.getSource.call(t,o)):void io.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},u=function e(){t.off("loadedmetadata",a),t.off("error",l),t.off("dispose",e)};t.on("error",l),t.on("dispose",u),t.reloadSourceOnError=function(n){u(),e(t,n)}},dc="2.14.2",hc={PlaylistLoader:Jo,Playlist:Ro,utils:cl,STANDARD_PLAYLIST_SELECTOR:ou,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Ro.isEnabled);return ru(t,(function(e,t){return su(e,t)})),t.filter((function(t){return!!eu(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:ou,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var i=this.useDevicePixelRatio&&y().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),au(this.playlists.master,t,parseInt(iu(this.tech_.el(),"width"),10)*i,parseInt(iu(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:su,comparePlaylistResolution:function(e,t){var n,i;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||y().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),n===(i=i||y().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-i},xhr:tl()};Object.keys(Tl).forEach((function(e){Object.defineProperty(hc,e,{get:function(){return io.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Tl[e]},set:function(t){io.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?io.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Tl[e]=t}})}));var pc="videojs-vhs",fc=function(e,t){for(var n=t.media(),i=-1,r=0;r<e.length;r++)if(e[r].id===n.id){i=r;break}e.selectedIndex_=i,e.trigger({selectedIndex:i,type:"change"})};hc.canPlaySource=function(){return io.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var mc=function(e){var t=e.player,n=e.sourceKeySystems,i=e.audioMedia,r=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var s=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var i=t.reduce((function(e,t){var i=n.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[])}(i?r.concat([i]):r,Object.keys(n)),a=[],o=[];return s.forEach((function(e){o.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),a.push(new Promise((function(n,i){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?i(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(o)])},gc=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var i={};t&&t.attributes&&t.attributes.CODECS&&(i=Zl(ne(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(i.audio=n.attributes.CODECS);var r=re(i.video),s=re(i.audio),a={};for(var o in e)a[o]={},s&&(a[o].audioContentType=s),r&&(a[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(a[o].url=e[o]);return io.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(io.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},vc=function(){if(!y().localStorage)return null;var e=y().localStorage.getItem(pc);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};hc.supportsNativeHls=function(){if(!b()||!b().createElement)return!1;var e=b().createElement("video");if(!io.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),hc.supportsNativeDash=!!(b()&&b().createElement&&io.getTech("Html5").isSupported())&&/maybe|probably/i.test(b().createElement("video").canPlayType("application/dash+xml")),hc.supportsTypeNatively=function(e){return"hls"===e?hc.supportsNativeHls:"dash"===e&&hc.supportsNativeDash},hc.isSupported=function(){return io.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var yc=function(e){function t(t,n,i){var r;if(r=e.call(this,n,io.mergeOptions(i.hls,i.vhs))||this,i.hls&&Object.keys(i.hls).length&&io.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"==typeof i.initialBandwidth&&(r.options_.bandwidth=i.initialBandwidth),r.logger_=lo("VhsHandler"),n.options_&&n.options_.playerId){var s=io(n.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return io.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),E(r)},configurable:!0}),s.hasOwnProperty("vhs")||Object.defineProperty(s,"vhs",{get:function(){return io.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),E(r)},configurable:!0}),s.hasOwnProperty("dash")||Object.defineProperty(s,"dash",{get:function(){return io.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),E(r)},configurable:!0}),r.player_=s}if(r.tech_=n,r.source_=t,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(b(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=b().fullscreenElement||b().webkitFullscreenElement||b().mozFullScreenElement||b().msFullscreenElement;t&&t.contains(r.tech_.el())?r.masterPlaylistController_.fastQualityChange_():r.masterPlaylistController_.checkABR_()})),r.on(r.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),r.on(r.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),r.on(r.tech_,"play",r.play),r}C(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=vc();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Tl.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Tl.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var i;this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=hc,this.options_.sourceType=ce(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&io.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new sc(this.options_);var r=io.mergeOptions({liveRangeSafeTimeDelta:co},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new lc(r),this.masterPlaylistController_.on("error",(function(){var e=io.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var s=this.options_.experimentalBufferBasedABR?hc.movingAverageBandwidthSelector(.55):hc.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.masterPlaylistController_.selectInitialPlaylist=hc.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=y().navigator.connection||y().navigator.mozConnection||y().navigator.webkitConnection,n=1e7;if(this.options_.useNetworkInformationApi&&t){var i=1e3*t.downlink*1e3;e=i>=n&&e>=n?Math.max(e,i):i}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){io.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return go(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return go(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!y().localStorage)return!1;var t=vc();t=t?io.mergeOptions(t,e):e;try{y().localStorage.setItem(pc,JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=No(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!Io(e)})).map((function(t,n){return new ac(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=y().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),mc({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=gc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){"output-restricted"===t.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+t.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==io.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=io.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),fc(t,n.playlists)})),this.playlists.on("mediachange",(function(){fc(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":dc,"mux.js":"6.0.1","mpd-parser":"0.21.1","m3u8-parser":"4.7.1","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&y().URL.revokeObjectURL&&(y().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return dl({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=2),hl({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(io.getComponent("Component")),_c={name:"videojs-http-streaming",VERSION:dc,canHandleSource:function(e,t){void 0===t&&(t={});var n=io.mergeOptions(io.options,t);return _c.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var i=io.mergeOptions(io.options,n);return t.vhs=new yc(e,t,i),io.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return io.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=tl(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=io.mergeOptions(io.options,t),i=n.vhs,r=(i=void 0===i?{}:i).overrideNative,s=void 0===r?!io.browser.IS_ANY_SAFARI:r,a=n.hls,o=(a=void 0===a?{}:a).overrideNative,l=void 0!==o&&o,u=ce(e);return u&&(!hc.supportsTypeNatively(u)||l||s)?"maybe":""}};(se("avc1.4d400d,mp4a.40.2")&&io.getTech("Html5").registerSourceHandler(_c,0),io.VhsHandler=yc,Object.defineProperty(io,"HlsHandler",{get:function(){return io.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),yc},configurable:!0}),io.VhsSourceHandler=_c,Object.defineProperty(io,"HlsSourceHandler",{get:function(){return io.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),_c},configurable:!0}),io.Vhs=hc,Object.defineProperty(io,"Hls",{get:function(){return io.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),hc},configurable:!0}),io.use||(io.registerComponent("Hls",hc),io.registerComponent("Vhs",hc)),io.options.vhs=io.options.vhs||{},io.options.hls=io.options.hls||{},io.getPlugin&&io.getPlugin("reloadSourceOnError"))||(io.registerPlugin||io.plugin)("reloadSourceOnError",(function(e){cc(this,e)}));const bc=io,Tc="video";document.getElementById(Tc)&&bc(Tc)},7154:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3490:(e,t,n)=>{"use strict";var i=n(8908);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,r,s){if(n)e(n);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(i.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),i=n[0],r=n[1];return"charset"===i.trim()?r.trim():e}),"utf-8")}(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(s)}catch(e){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s)}}},9603:(e,t,n)=>{"use strict";var i=n(8908),r=n(7154),s=n(7376);o.httpHandler=n(3490);function a(e,t,n){var i=e;return s(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=r({},t,{uri:e}),i.callback=n,i}function o(e,t,n){return l(t=a(e,t,n))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,i,r){t||(t=!0,e.callback(n,i,r))};function i(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),g)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function s(){if(!l){var t;clearTimeout(c),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var r=v,s=null;return 0!==t?(r={body:i(),statusCode:t,method:h,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(r.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();void 0===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),t):t}(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),n(s,r,r.body)}}var a,l,u=e.xhr||null;u||(u=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var c,d=u.url=e.uri||e.url,h=u.method=e.method||"GET",p=e.body||e.data,f=u.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:u};if("json"in e&&!1!==e.json&&(g=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(s,0)},u.onload=s,u.onerror=r,u.onprogress=function(){},u.onabort=function(){l=!0},u.ontimeout=r,u.open(h,d,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout((function(){if(!l){l=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),u.setRequestHeader)for(a in f)f.hasOwnProperty(a)&&u.setRequestHeader(a,f[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}e.exports=o,e.exports.default=o,o.XMLHttpRequest=i.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,n,i){return(n=a(t,n,i)).method=e.toUpperCase(),l(n)}}))},2167:(e,t)=>{"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var i=n({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.freeze=n,t.MIME_TYPE=i,t.NAMESPACE=r},6129:(e,t,n)=>{var i=n(2167),r=n(1146),s=n(1045),a=n(6925),o=r.DOMImplementation,l=i.NAMESPACE,u=a.ParseError,c=a.XMLReader;function d(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function p(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function f(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function m(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}d.prototype.parseFromString=function(e,t){var n=this.options,i=new c,r=n.domBuilder||new h,a=n.errorHandler,o=n.locator,u=n.xmlns||{},d=/\/x?html?$/.test(t),p=d?s.HTML_ENTITIES:s.XML_ENTITIES;return o&&r.setDocumentLocator(o),i.errorHandler=function(e,t,n){if(!e){if(t instanceof h)return t;e=t}var i={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(n){e(t,n)}:e),i[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+function(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),i}(a,r,o),i.domBuilder=n.domBuilder||r,d&&(u[""]=l.HTML),u.xml=u.xml||l.XML,e&&"string"==typeof e?i.parse(e,u,p):i.errorHandler.error("invalid doc source"),r.doc},h.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,s=r.createElementNS(e,n||t),a=i.length;m(this,s),this.currentElement=s,this.locator&&p(this.locator,s);for(var o=0;o<a;o++){e=i.getURI(o);var l=i.getValue(o),u=(n=i.getQName(o),r.createAttributeNS(e,n));this.locator&&p(i.getLocator(o),u),u.value=u.nodeValue=l,s.setAttributeNode(u)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&p(this.locator,n),m(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=f.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&p(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=f.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&p(this.locator,i),m(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(e,t,n);this.locator&&p(this.locator,r),m(this,r),this.doc.doctype=r}},warning:function(e){},error:function(e){},fatalError:function(e){throw new u(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),t.DOMParser=d,r.DOMImplementation,r.XMLSerializer},1146:(e,t,n)=>{var i=n(2167).NAMESPACE;function r(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function a(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(r):[]}(e);return Object.keys(t.reduce(s,{}))}function o(e,t){for(var n in e)t[n]=e[n]}function l(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,o(n,i=new i),e.prototype=n=i}n.constructor!=e&&(n.constructor=e)}var u={},c=u.ELEMENT_NODE=1,d=u.ATTRIBUTE_NODE=2,h=u.TEXT_NODE=3,p=u.CDATA_SECTION_NODE=4,f=u.ENTITY_REFERENCE_NODE=5,m=u.ENTITY_NODE=6,g=u.PROCESSING_INSTRUCTION_NODE=7,v=u.COMMENT_NODE=8,y=u.DOCUMENT_NODE=9,_=u.DOCUMENT_TYPE_NODE=10,b=u.DOCUMENT_FRAGMENT_NODE=11,T=u.NOTATION_NODE=12,S={},k={},E=(S.INDEX_SIZE_ERR=(k[1]="Index size error",1),S.DOMSTRING_SIZE_ERR=(k[2]="DOMString size error",2),S.HIERARCHY_REQUEST_ERR=(k[3]="Hierarchy request error",3)),w=(S.WRONG_DOCUMENT_ERR=(k[4]="Wrong document",4),S.INVALID_CHARACTER_ERR=(k[5]="Invalid character",5),S.NO_DATA_ALLOWED_ERR=(k[6]="No data allowed",6),S.NO_MODIFICATION_ALLOWED_ERR=(k[7]="No modification allowed",7),S.NOT_FOUND_ERR=(k[8]="Not found",8)),C=(S.NOT_SUPPORTED_ERR=(k[9]="Not supported",9),S.INUSE_ATTRIBUTE_ERR=(k[10]="Attribute in use",10));S.INVALID_STATE_ERR=(k[11]="Invalid state",11),S.SYNTAX_ERR=(k[12]="Syntax error",12),S.INVALID_MODIFICATION_ERR=(k[13]="Invalid modification",13),S.NAMESPACE_ERR=(k[14]="Invalid namespace",14),S.INVALID_ACCESS_ERR=(k[15]="Invalid access",15);function x(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,k[e]),this.message=k[e],Error.captureStackTrace&&Error.captureStackTrace(this,x);return n.code=e,t&&(this.message=this.message+": "+t),n}function j(){}function A(e,t){this._node=e,this._refresh=t,I(this)}function I(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);ue(e,"length",n.length),o(n,e),e._inc=t}}function P(){}function L(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[L(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var s=e.ownerDocument;s&&(r&&F(s,e,r),function(e,t,n){e&&e._inc++,n.namespaceURI===i.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(s,e,n))}}function D(e,t,n){var i=L(t,n);if(!(i>=0))throw x(w,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var s=e.ownerDocument;s&&(F(s,e,n),n.ownerElement=null)}}function M(){}function N(){}function R(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function U(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(U(e,t))return!0}while(e=e.nextSibling)}function B(){}function F(e,t,n,r){e&&e._inc++,n.namespaceURI===i.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function H(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s}}}function V(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,H(e.ownerDocument,e),t}function q(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===b){var r=t.firstChild;if(null==r)return t;var s=t.lastChild}else r=s=t;var a=n?n.previousSibling:e.lastChild;r.previousSibling=a,s.nextSibling=n,a?a.nextSibling=r:e.firstChild=r,null==n?e.lastChild=s:n.previousSibling=s;do{r.parentNode=e}while(r!==s&&(r=r.nextSibling));return H(e.ownerDocument||e,e),t.nodeType==b&&(t.firstChild=t.lastChild=null),t}function z(){this._nsMap={}}function W(){}function G(){}function X(){}function K(){}function Y(){}function Q(){}function J(){}function Z(){}function $(){}function ee(){}function te(){}function ne(){}function ie(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,r=i.prefix,s=i.namespaceURI;if(s&&null==r&&null==(r=i.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return ae(this,n,e,t,a),n.join("")}function re(e,t,n){var r=e.prefix||"",s=e.namespaceURI;if(!s)return!1;if("xml"===r&&s===i.XML||s===i.XMLNS)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix===r)return o.namespace!==s}return!0}function se(e,t,n){e.push(" ",t,'="',n.replace(/[<&"]/g,R),'"')}function ae(e,t,n,r,s){if(s||(s=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case c:var a=e.attributes,o=a.length,l=e.firstChild,u=e.tagName,m=u;if(!(n=i.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var T,S=0;S<a.length;S++)if("xmlns"===a.item(S).name){T=a.item(S).value;break}if(!T)for(var k=s.length-1;k>=0;k--){if(""===(E=s[k]).prefix&&E.namespace===e.namespaceURI){T=E.namespace;break}}if(T!==e.namespaceURI)for(k=s.length-1;k>=0;k--){var E;if((E=s[k]).namespace===e.namespaceURI){E.prefix&&(m=E.prefix+":"+u);break}}}t.push("<",m);for(var w=0;w<o;w++){"xmlns"==(C=a.item(w)).prefix?s.push({prefix:C.localName,namespace:C.value}):"xmlns"==C.nodeName&&s.push({prefix:"",namespace:C.value})}for(w=0;w<o;w++){var C,x,j;if(re(C=a.item(w),0,s))se(t,(x=C.prefix||"")?"xmlns:"+x:"xmlns",j=C.namespaceURI),s.push({prefix:x,namespace:j});ae(C,t,n,r,s)}if(u===m&&re(e,0,s))se(t,(x=e.prefix||"")?"xmlns:"+x:"xmlns",j=e.namespaceURI),s.push({prefix:x,namespace:j});if(l||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),n&&/^script$/i.test(u))for(;l;)l.data?t.push(l.data):ae(l,t,n,r,s.slice()),l=l.nextSibling;else for(;l;)ae(l,t,n,r,s.slice()),l=l.nextSibling;t.push("</",m,">")}else t.push("/>");return;case y:case b:for(l=e.firstChild;l;)ae(l,t,n,r,s.slice()),l=l.nextSibling;return;case d:return se(t,e.name,e.value);case h:return t.push(e.data.replace(/[<&]/g,R).replace(/]]>/g,"]]&gt;"));case p:return t.push("<![CDATA[",e.data,"]]>");case v:return t.push("\x3c!--",e.data,"--\x3e");case _:var A=e.publicId,I=e.systemId;if(t.push("<!DOCTYPE ",e.name),A)t.push(" PUBLIC ",A),I&&"."!=I&&t.push(" ",I),t.push(">");else if(I&&"."!=I)t.push(" SYSTEM ",I,">");else{var P=e.internalSubset;P&&t.push(" [",P,"]"),t.push(">")}return;case g:return t.push("<?",e.target," ",e.data,"?>");case f:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function oe(e,t,n){var i;switch(t.nodeType){case c:(i=t.cloneNode(!1)).ownerDocument=e;case b:break;case d:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var r=t.firstChild;r;)i.appendChild(oe(e,r,n)),r=r.nextSibling;return i}function le(e,t,n){var i=new t.constructor;for(var r in t){var s=t[r];"object"!=typeof s&&s!=i[r]&&(i[r]=s)}switch(t.childNodes&&(i.childNodes=new j),i.ownerDocument=e,i.nodeType){case c:var a=t.attributes,o=i.attributes=new P,l=a.length;o._ownerElement=i;for(var u=0;u<l;u++)i.setAttributeNode(le(e,a.item(u),!0));break;case d:n=!0}if(n)for(var h=t.firstChild;h;)i.appendChild(le(e,h,n)),h=h.nextSibling;return i}function ue(e,t,n){e[t]=n}x.prototype=Error.prototype,o(S,x),j.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)ae(this[i],n,e,t);return n.join("")}},A.prototype.item=function(e){return I(this),this[e]},l(A,j),P.prototype={length:0,item:j.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new x(C);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new x(C);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return D(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return D(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},M.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var i=new B;if(i.implementation=this,i.childNodes=new j,i.doctype=n||null,n&&i.appendChild(n),t){var r=i.createElementNS(e,t);i.appendChild(r)}return i},createDocumentType:function(e,t,n){var i=new Q;return i.name=e,i.nodeName=e,i.publicId=t||"",i.systemId=n||"",i}},N.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return q(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return V(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return le(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==h&&e.nodeType==h?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==d?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==d?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},o(u,N),o(u,N.prototype),B.prototype={nodeName:"#document",nodeType:y,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==c&&(this.documentElement=e),q(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},importNode:function(e,t){return oe(this,e,t)},getElementById:function(e){var t=null;return U(this.documentElement,(function(n){if(n.nodeType==c&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=a(e);return new A(this,(function(n){var i=[];return t.length>0&&U(n.documentElement,(function(r){if(r!==n&&r.nodeType===c){var s=r.getAttribute("class");if(s){var o=e===s;if(!o){var l=a(s);o=t.every((u=l,function(e){return u&&-1!==u.indexOf(e)}))}o&&i.push(r)}}var u})),i}))},createElement:function(e){var t=new z;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new j,(t.attributes=new P)._ownerElement=t,t},createDocumentFragment:function(){var e=new ee;return e.ownerDocument=this,e.childNodes=new j,e},createTextNode:function(e){var t=new X;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new K;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Y;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new te;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new W;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new $;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new z,i=t.split(":"),r=n.attributes=new P;return n.childNodes=new j,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new W,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},l(B,N),z.prototype={nodeType:c,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var i=e.lastChild;n.removeChild(t),i=e.lastChild}return i=e.lastChild,t.parentNode=e,t.previousSibling=i,t.nextSibling=null,i?i.nextSibling=t:e.firstChild=t,e.lastChild=t,H(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new A(this,(function(t){var n=[];return U(t,(function(i){i===t||i.nodeType!=c||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new A(this,(function(n){var i=[];return U(n,(function(r){r===n||r.nodeType!==c||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)})),i}))}},B.prototype.getElementsByTagName=z.prototype.getElementsByTagName,B.prototype.getElementsByTagNameNS=z.prototype.getElementsByTagNameNS,l(z,N),W.prototype.nodeType=d,l(W,N),G.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(k[E])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},l(G,N),X.prototype={nodeName:"#text",nodeType:h,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},l(X,G),K.prototype={nodeName:"#comment",nodeType:v},l(K,G),Y.prototype={nodeName:"#cdata-section",nodeType:p},l(Y,G),Q.prototype.nodeType=_,l(Q,N),J.prototype.nodeType=T,l(J,N),Z.prototype.nodeType=m,l(Z,N),$.prototype.nodeType=f,l($,N),ee.prototype.nodeName="#document-fragment",ee.prototype.nodeType=b,l(ee,N),te.prototype.nodeType=g,l(te,N),ne.prototype.serializeToString=function(e,t,n){return ie.call(e,t,n)},N.prototype.toString=ie;try{if(Object.defineProperty){function ce(e){switch(e.nodeType){case c:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ce(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(A.prototype,"length",{get:function(){return I(this),this.$$length}}),Object.defineProperty(N.prototype,"textContent",{get:function(){return ce(this)},set:function(e){switch(this.nodeType){case c:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ue=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DocumentType=Q,t.DOMException=x,t.DOMImplementation=M,t.Element=z,t.Node=N,t.NodeList=j,t.XMLSerializer=ne},1045:(e,t,n)=>{var i=n(2167).freeze;t.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},3969:(e,t,n)=>{var i=n(1146);i.DOMImplementation,i.XMLSerializer,t.DOMParser=n(6129).DOMParser},6925:(e,t,n)=>{var i=n(2167).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function u(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,n,r,s,a){function o(e,t,i){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t,i)}for(var l,u=++t,c=0;;){var d=e.charAt(u);switch(d){case"=":if(1===c)l=e.slice(t,u),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(a.warning('attribute value must after "="'),l=e.slice(t,u)),t=u+1,!((u=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");o(l,h=e.slice(t,u).replace(/&#?\w+;/g,s),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');o(l,h=e.slice(t,u).replace(/&#?\w+;/g,s),t),a.warning('attribute "'+l+'" missed start quot('+d+")!!"),t=u+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,u)),u;case">":switch(c){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,u)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===c&&(h=l),4==c?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h.replace(/&#?\w+;/g,s),t)):(i.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"":d=" ";default:if(d<=" ")switch(c){case 0:n.setTagName(e.slice(t,u)),c=6;break;case 1:l=e.slice(t,u),c=2;break;case 4:var h=e.slice(t,u).replace(/&#?\w+;/g,s);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,t);case 5:c=6}else switch(c){case 2:n.tagName;i.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=u,c=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:c=1,t=u;break;case 3:c=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function d(e,t,n){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value;if((p=l.indexOf(":"))>0)var c=o.prefix=l.slice(0,p),d=l.slice(p+1),h="xmlns"===c&&d;else d=l,c=null,h="xmlns"===l&&"";o.localName=d,!1!==h&&(null==s&&(s={},f(n,n={})),n[h]=s[h]=u,o.uri=i.XMLNS,t.startPrefixMapping(h,u))}for(a=e.length;a--;){(c=(o=e[a]).prefix)&&("xml"===c&&(o.uri=i.XML),"xmlns"!==c&&(o.uri=n[c||""]))}var p;(p=r.indexOf(":"))>0?(c=e.prefix=r.slice(0,p),d=e.localName=r.slice(p+1)):(c=null,d=e.localName=r);var m=e.uri=n[c||""];if(t.startElement(m,d,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=s,!0;if(t.endElement(m,d,r),s)for(c in s)t.endPrefixMapping(c)}function h(e,t,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var s=e.indexOf("</"+n+">",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,i),r.characters(a,0,a.length),s)}return t+1}function p(e,t,n,i){var r=i[n];return null==r&&((r=e.lastIndexOf("</"+n+">"))<t&&(r=e.lastIndexOf("</"+n)),i[n]=r),r<t}function f(e,t){for(var n in e)t[n]=e[n]}function m(e,t,n,i){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,r-t-4),r+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,r-t-9),n.endCDATA(),r+3}var s=function(e,t){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;n=r.exec(e);)if(i.push(n),n[1])return i}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,u=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],u=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(u=s[3][0]));var c=s[a-1];return n.startDTD(o,l,u),n.endDTD(),c.index+c[0].length}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var r=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return n.processingInstruction(r[1],r[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,s){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function f(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,l);S&&y(w),r.characters(n,0,t-w),w=t}}function y(t,n){for(;t>=b&&(n=T.exec(e));)_=n.index,b=_+n[0].length,S.lineNumber++;S.columnNumber=t-_+1}var _=0,b=0,T=/.*(?:\r\n?|\n)|.*$/g,S=r.locator,k=[{currentNSMap:t}],E={},w=0;for(;;){try{var C=e.indexOf("<",w);if(C<0){if(!e.substr(w).match(/^\s*$/)){var x=r.doc,j=x.createTextNode(e.substr(w));x.appendChild(j),r.currentElement=j}return}switch(C>w&&f(C),e.charAt(C+1)){case"/":var A=e.indexOf(">",C+3),I=e.substring(C+2,A).replace(/[ \t\n\r]+$/g,""),P=k.pop();A<0?(I=e.substring(C+2).replace(/[\s<].*/,""),s.error("end tag name: "+I+" is not complete:"+P.tagName),A=C+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),s.error("end tag name: "+I+" maybe not complete"),A=C+1+I.length);var L=P.localNSMap,O=P.tagName==I;if(O||P.tagName&&P.tagName.toLowerCase()==I.toLowerCase()){if(r.endElement(P.uri,P.localName,I),L)for(var D in L)r.endPrefixMapping(D);O||s.fatalError("end tag name: "+I+" is not match the current start tagName:"+P.tagName)}else k.push(P);A++;break;case"?":S&&y(C),A=g(e,C,r);break;case"!":S&&y(C),A=m(e,C,r,s);break;default:S&&y(C);var M=new v,N=k[k.length-1].currentNSMap,R=(A=c(e,C,M,N,l,s),M.length);if(!M.closed&&p(e,A,M.tagName,E)&&(M.closed=!0,n.nbsp||s.warning("unclosed xml attribute")),S&&R){for(var U=u(S,{}),B=0;B<R;B++){var F=M[B];y(F.offset),F.locator=u(S,{})}r.locator=U,d(M,r,N)&&k.push(M),r.locator=S}else d(M,r,N)&&k.push(M);i.isHTML(M.uri)&&!M.closed?A=h(e,A,M.tagName,l,r):A++}}catch(e){if(e instanceof o)throw e;s.error("element parse error: "+e),A=-1}A>w?w=A:f(Math.max(C,w)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},6939:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var i=n(8081),r=n.n(i),s=n(3645),a=n.n(s),o=n(1667),l=n.n(o),u=new URL(n(2018),n.b),c=a()(r()),d=l()(u);c.push([e.id,'@charset "UTF-8";\n.vjs-modal-dialog .vjs-modal-dialog-content, .video-js .vjs-modal-dialog, .vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n}\n\n.vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n  text-align: center;\n}\n\n@font-face {\n  font-family: VideoJS;\n  src: url('+d+') format("woff");\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-play, .video-js .vjs-play-control .vjs-icon-placeholder, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-play:before, .video-js .vjs-play-control .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n  content: "\\f101";\n}\n\n.vjs-icon-play-circle {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-play-circle:before {\n  content: "\\f102";\n}\n\n.vjs-icon-pause, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-pause:before, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before {\n  content: "\\f103";\n}\n\n.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {\n  content: "\\f104";\n}\n\n.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {\n  content: "\\f105";\n}\n\n.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {\n  content: "\\f106";\n}\n\n.vjs-icon-volume-high, .video-js .vjs-mute-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-volume-high:before, .video-js .vjs-mute-control .vjs-icon-placeholder:before {\n  content: "\\f107";\n}\n\n.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {\n  content: "\\f108";\n}\n\n.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {\n  content: "\\f109";\n}\n\n.vjs-icon-square {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-square:before {\n  content: "\\f10a";\n}\n\n.vjs-icon-spinner {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-spinner:before {\n  content: "\\f10b";\n}\n\n.vjs-icon-subtitles, .video-js .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-subtitles-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-subtitles:before, .video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before {\n  content: "\\f10c";\n}\n\n.vjs-icon-captions, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-captions-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-captions:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-captions-button .vjs-icon-placeholder:before {\n  content: "\\f10d";\n}\n\n.vjs-icon-chapters, .video-js .vjs-chapters-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-chapters:before, .video-js .vjs-chapters-button .vjs-icon-placeholder:before {\n  content: "\\f10e";\n}\n\n.vjs-icon-share {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-share:before {\n  content: "\\f10f";\n}\n\n.vjs-icon-cog {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-cog:before {\n  content: "\\f110";\n}\n\n.vjs-icon-circle, .vjs-seek-to-live-control .vjs-icon-placeholder, .video-js .vjs-volume-level, .video-js .vjs-play-progress {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-circle:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before, .video-js .vjs-volume-level:before, .video-js .vjs-play-progress:before {\n  content: "\\f111";\n}\n\n.vjs-icon-circle-outline {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-circle-outline:before {\n  content: "\\f112";\n}\n\n.vjs-icon-circle-inner-circle {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-circle-inner-circle:before {\n  content: "\\f113";\n}\n\n.vjs-icon-hd {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-hd:before {\n  content: "\\f114";\n}\n\n.vjs-icon-cancel, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before {\n  content: "\\f115";\n}\n\n.vjs-icon-replay, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-replay:before, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before {\n  content: "\\f116";\n}\n\n.vjs-icon-facebook {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-facebook:before {\n  content: "\\f117";\n}\n\n.vjs-icon-gplus {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-gplus:before {\n  content: "\\f118";\n}\n\n.vjs-icon-linkedin {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-linkedin:before {\n  content: "\\f119";\n}\n\n.vjs-icon-twitter {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-twitter:before {\n  content: "\\f11a";\n}\n\n.vjs-icon-tumblr {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-tumblr:before {\n  content: "\\f11b";\n}\n\n.vjs-icon-pinterest {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-pinterest:before {\n  content: "\\f11c";\n}\n\n.vjs-icon-audio-description, .video-js .vjs-descriptions-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-audio-description:before, .video-js .vjs-descriptions-button .vjs-icon-placeholder:before {\n  content: "\\f11d";\n}\n\n.vjs-icon-audio, .video-js .vjs-audio-button .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-audio:before, .video-js .vjs-audio-button .vjs-icon-placeholder:before {\n  content: "\\f11e";\n}\n\n.vjs-icon-next-item {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-next-item:before {\n  content: "\\f11f";\n}\n\n.vjs-icon-previous-item {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-previous-item:before {\n  content: "\\f120";\n}\n\n.vjs-icon-picture-in-picture-enter, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-picture-in-picture-enter:before, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before {\n  content: "\\f121";\n}\n\n.vjs-icon-picture-in-picture-exit, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder {\n  font-family: VideoJS;\n  font-weight: normal;\n  font-style: normal;\n}\n.vjs-icon-picture-in-picture-exit:before, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before {\n  content: "\\f122";\n}\n\n.video-js {\n  display: block;\n  vertical-align: top;\n  box-sizing: border-box;\n  color: #fff;\n  background-color: #000;\n  position: relative;\n  padding: 0;\n  font-size: 10px;\n  line-height: 1;\n  font-weight: normal;\n  font-style: normal;\n  font-family: Arial, Helvetica, sans-serif;\n  word-break: initial;\n}\n.video-js:-moz-full-screen {\n  position: absolute;\n}\n.video-js:-webkit-full-screen {\n  width: 100% !important;\n  height: 100% !important;\n}\n\n.video-js[tabindex="-1"] {\n  outline: none;\n}\n\n.video-js *,\n.video-js *:before,\n.video-js *:after {\n  box-sizing: inherit;\n}\n\n.video-js ul {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n  list-style-position: outside;\n  margin-left: 0;\n  margin-right: 0;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.video-js.vjs-fluid,\n.video-js.vjs-16-9,\n.video-js.vjs-4-3,\n.video-js.vjs-9-16,\n.video-js.vjs-1-1 {\n  width: 100%;\n  max-width: 100%;\n}\n\n.video-js.vjs-fluid:not(.vjs-audio-only-mode),\n.video-js.vjs-16-9:not(.vjs-audio-only-mode),\n.video-js.vjs-4-3:not(.vjs-audio-only-mode),\n.video-js.vjs-9-16:not(.vjs-audio-only-mode),\n.video-js.vjs-1-1:not(.vjs-audio-only-mode) {\n  height: 0;\n}\n\n.video-js.vjs-16-9:not(.vjs-audio-only-mode) {\n  padding-top: 56.25%;\n}\n\n.video-js.vjs-4-3:not(.vjs-audio-only-mode) {\n  padding-top: 75%;\n}\n\n.video-js.vjs-9-16:not(.vjs-audio-only-mode) {\n  padding-top: 177.7777777778%;\n}\n\n.video-js.vjs-1-1:not(.vjs-audio-only-mode) {\n  padding-top: 100%;\n}\n\n.video-js.vjs-fill:not(.vjs-audio-only-mode) {\n  width: 100%;\n  height: 100%;\n}\n\n.video-js .vjs-tech {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n}\n\n.video-js.vjs-audio-only-mode .vjs-tech {\n  display: none;\n}\n\nbody.vjs-full-window {\n  padding: 0;\n  margin: 0;\n  height: 100%;\n}\n\n.vjs-full-window .video-js.vjs-fullscreen {\n  position: fixed;\n  overflow: hidden;\n  z-index: 1000;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  right: 0;\n}\n\n.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {\n  width: 100% !important;\n  height: 100% !important;\n  padding-top: 0 !important;\n}\n\n.video-js.vjs-fullscreen.vjs-user-inactive {\n  cursor: none;\n}\n\n.vjs-hidden {\n  display: none !important;\n}\n\n.vjs-disabled {\n  opacity: 0.5;\n  cursor: default;\n}\n\n.video-js .vjs-offscreen {\n  height: 1px;\n  left: -9999px;\n  position: absolute;\n  top: 0;\n  width: 1px;\n}\n\n.vjs-lock-showing {\n  display: block !important;\n  opacity: 1 !important;\n  visibility: visible !important;\n}\n\n.vjs-no-js {\n  padding: 20px;\n  color: #fff;\n  background-color: #000;\n  font-size: 18px;\n  font-family: Arial, Helvetica, sans-serif;\n  text-align: center;\n  width: 300px;\n  height: 150px;\n  margin: 0px auto;\n}\n\n.vjs-no-js a,\n.vjs-no-js a:visited {\n  color: #66A8CC;\n}\n\n.video-js .vjs-big-play-button {\n  font-size: 3em;\n  line-height: 1.5em;\n  height: 1.63332em;\n  width: 3em;\n  display: block;\n  position: absolute;\n  top: 10px;\n  left: 10px;\n  padding: 0;\n  cursor: pointer;\n  opacity: 1;\n  border: 0.06666em solid #fff;\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7);\n  border-radius: 0.3em;\n  transition: all 0.4s;\n}\n.vjs-big-play-centered .vjs-big-play-button {\n  top: 50%;\n  left: 50%;\n  margin-top: -0.81666em;\n  margin-left: -1.5em;\n}\n\n.video-js:hover .vjs-big-play-button,\n.video-js .vjs-big-play-button:focus {\n  border-color: #fff;\n  background-color: #73859f;\n  background-color: rgba(115, 133, 159, 0.5);\n  transition: all 0s;\n}\n\n.vjs-controls-disabled .vjs-big-play-button,\n.vjs-has-started .vjs-big-play-button,\n.vjs-using-native-controls .vjs-big-play-button,\n.vjs-error .vjs-big-play-button {\n  display: none;\n}\n\n.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button {\n  display: block;\n}\n\n.video-js button {\n  background: none;\n  border: none;\n  color: inherit;\n  display: inline-block;\n  font-size: inherit;\n  line-height: inherit;\n  text-transform: none;\n  text-decoration: none;\n  transition: none;\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n}\n\n.vjs-control .vjs-button {\n  width: 100%;\n  height: 100%;\n}\n\n.video-js .vjs-control.vjs-close-button {\n  cursor: pointer;\n  height: 3em;\n  position: absolute;\n  right: 0;\n  top: 0.5em;\n  z-index: 2;\n}\n.video-js .vjs-modal-dialog {\n  background: rgba(0, 0, 0, 0.8);\n  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0));\n  overflow: auto;\n}\n\n.video-js .vjs-modal-dialog > * {\n  box-sizing: border-box;\n}\n\n.vjs-modal-dialog .vjs-modal-dialog-content {\n  font-size: 1.2em;\n  line-height: 1.5;\n  padding: 20px 24px;\n  z-index: 1;\n}\n\n.vjs-menu-button {\n  cursor: pointer;\n}\n\n.vjs-menu-button.vjs-disabled {\n  cursor: default;\n}\n\n.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu {\n  display: none;\n}\n\n.vjs-menu .vjs-menu-content {\n  display: block;\n  padding: 0;\n  margin: 0;\n  font-family: Arial, Helvetica, sans-serif;\n  overflow: auto;\n}\n\n.vjs-menu .vjs-menu-content > * {\n  box-sizing: border-box;\n}\n\n.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu {\n  display: none;\n}\n\n.vjs-menu li {\n  list-style: none;\n  margin: 0;\n  padding: 0.2em 0;\n  line-height: 1.4em;\n  font-size: 1.2em;\n  text-align: center;\n  text-transform: lowercase;\n}\n\n.vjs-menu li.vjs-menu-item:focus,\n.vjs-menu li.vjs-menu-item:hover,\n.js-focus-visible .vjs-menu li.vjs-menu-item:hover {\n  background-color: #73859f;\n  background-color: rgba(115, 133, 159, 0.5);\n}\n\n.vjs-menu li.vjs-selected,\n.vjs-menu li.vjs-selected:focus,\n.vjs-menu li.vjs-selected:hover,\n.js-focus-visible .vjs-menu li.vjs-selected:hover {\n  background-color: #fff;\n  color: #2B333F;\n}\n\n.video-js .vjs-menu *:not(.vjs-selected):focus:not(:focus-visible),\n.js-focus-visible .vjs-menu *:not(.vjs-selected):focus:not(.focus-visible) {\n  background: none;\n}\n\n.vjs-menu li.vjs-menu-title {\n  text-align: center;\n  text-transform: uppercase;\n  font-size: 1em;\n  line-height: 2em;\n  padding: 0;\n  margin: 0 0 0.3em 0;\n  font-weight: bold;\n  cursor: default;\n}\n\n.vjs-menu-button-popup .vjs-menu {\n  display: none;\n  position: absolute;\n  bottom: 0;\n  width: 10em;\n  left: -3em;\n  height: 0em;\n  margin-bottom: 1.5em;\n  border-top-color: rgba(43, 51, 63, 0.7);\n}\n\n.vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7);\n  position: absolute;\n  width: 100%;\n  bottom: 1.5em;\n  max-height: 15em;\n}\n\n.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n  max-height: 5em;\n}\n\n.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n  max-height: 10em;\n}\n\n.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n  max-height: 14em;\n}\n\n.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n  max-height: 25em;\n}\n\n.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu,\n.vjs-menu-button-popup .vjs-menu.vjs-lock-showing {\n  display: block;\n}\n\n.video-js .vjs-menu-button-inline {\n  transition: all 0.4s;\n  overflow: hidden;\n}\n\n.video-js .vjs-menu-button-inline:before {\n  width: 2.222222222em;\n}\n\n.video-js .vjs-menu-button-inline:hover,\n.video-js .vjs-menu-button-inline:focus,\n.video-js .vjs-menu-button-inline.vjs-slider-active,\n.video-js.vjs-no-flex .vjs-menu-button-inline {\n  width: 12em;\n}\n\n.vjs-menu-button-inline .vjs-menu {\n  opacity: 0;\n  height: 100%;\n  width: auto;\n  position: absolute;\n  left: 4em;\n  top: 0;\n  padding: 0;\n  margin: 0;\n  transition: all 0.4s;\n}\n\n.vjs-menu-button-inline:hover .vjs-menu,\n.vjs-menu-button-inline:focus .vjs-menu,\n.vjs-menu-button-inline.vjs-slider-active .vjs-menu {\n  display: block;\n  opacity: 1;\n}\n\n.vjs-no-flex .vjs-menu-button-inline .vjs-menu {\n  display: block;\n  opacity: 1;\n  position: relative;\n  width: auto;\n}\n\n.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu,\n.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,\n.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu {\n  width: auto;\n}\n\n.vjs-menu-button-inline .vjs-menu-content {\n  width: auto;\n  height: 100%;\n  margin: 0;\n  overflow: hidden;\n}\n\n.video-js .vjs-control-bar {\n  display: none;\n  width: 100%;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  height: 3em;\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7);\n}\n\n.vjs-has-started .vjs-control-bar,\n.vjs-audio-only-mode .vjs-control-bar {\n  display: flex;\n  visibility: visible;\n  opacity: 1;\n  transition: visibility 0.1s, opacity 0.1s;\n}\n\n.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n  visibility: visible;\n  opacity: 0;\n  pointer-events: none;\n  transition: visibility 1s, opacity 1s;\n}\n\n.vjs-controls-disabled .vjs-control-bar,\n.vjs-using-native-controls .vjs-control-bar,\n.vjs-error .vjs-control-bar {\n  display: none !important;\n}\n\n.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,\n.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n  opacity: 1;\n  visibility: visible;\n}\n\n.vjs-has-started.vjs-no-flex .vjs-control-bar {\n  display: table;\n}\n\n.video-js .vjs-control {\n  position: relative;\n  text-align: center;\n  margin: 0;\n  padding: 0;\n  height: 100%;\n  width: 4em;\n  flex: none;\n}\n\n.video-js .vjs-control.vjs-visible-text {\n  width: auto;\n  padding-left: 1em;\n  padding-right: 1em;\n}\n\n.vjs-button > .vjs-icon-placeholder:before {\n  font-size: 1.8em;\n  line-height: 1.67;\n}\n\n.vjs-button > .vjs-icon-placeholder {\n  display: block;\n}\n\n.video-js .vjs-control:focus:before,\n.video-js .vjs-control:hover:before,\n.video-js .vjs-control:focus {\n  text-shadow: 0em 0em 1em white;\n}\n\n.video-js *:not(.vjs-visible-text) > .vjs-control-text {\n  border: 0;\n  clip: rect(0 0 0 0);\n  height: 1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n.vjs-no-flex .vjs-control {\n  display: table-cell;\n  vertical-align: middle;\n}\n\n.video-js .vjs-custom-control-spacer {\n  display: none;\n}\n\n.video-js .vjs-progress-control {\n  cursor: pointer;\n  flex: auto;\n  display: flex;\n  align-items: center;\n  min-width: 4em;\n  touch-action: none;\n}\n\n.video-js .vjs-progress-control.disabled {\n  cursor: default;\n}\n\n.vjs-live .vjs-progress-control {\n  display: none;\n}\n\n.vjs-liveui .vjs-progress-control {\n  display: flex;\n  align-items: center;\n}\n\n.vjs-no-flex .vjs-progress-control {\n  width: auto;\n}\n\n.video-js .vjs-progress-holder {\n  flex: auto;\n  transition: all 0.2s;\n  height: 0.3em;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n  margin: 0 10px;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder {\n  font-size: 1.6666666667em;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled {\n  font-size: 1em;\n}\n\n.video-js .vjs-progress-holder .vjs-play-progress,\n.video-js .vjs-progress-holder .vjs-load-progress,\n.video-js .vjs-progress-holder .vjs-load-progress div {\n  position: absolute;\n  display: block;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  width: 0;\n}\n\n.video-js .vjs-play-progress {\n  background-color: #fff;\n}\n.video-js .vjs-play-progress:before {\n  font-size: 0.9em;\n  position: absolute;\n  right: -0.5em;\n  top: -0.3333333333em;\n  z-index: 1;\n}\n\n.video-js .vjs-load-progress {\n  background: rgba(115, 133, 159, 0.5);\n}\n\n.video-js .vjs-load-progress div {\n  background: rgba(115, 133, 159, 0.75);\n}\n\n.video-js .vjs-time-tooltip {\n  background-color: #fff;\n  background-color: rgba(255, 255, 255, 0.8);\n  border-radius: 0.3em;\n  color: #000;\n  float: right;\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 1em;\n  padding: 6px 8px 8px 8px;\n  pointer-events: none;\n  position: absolute;\n  top: -3.4em;\n  visibility: hidden;\n  z-index: 1;\n}\n\n.video-js .vjs-progress-holder:focus .vjs-time-tooltip {\n  display: none;\n}\n\n.video-js .vjs-progress-control:hover .vjs-time-tooltip,\n.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip {\n  display: block;\n  font-size: 0.6em;\n  visibility: visible;\n}\n\n.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip {\n  font-size: 1em;\n}\n\n.video-js .vjs-progress-control .vjs-mouse-display {\n  display: none;\n  position: absolute;\n  width: 1px;\n  height: 100%;\n  background-color: #000;\n  z-index: 1;\n}\n\n.vjs-no-flex .vjs-progress-control .vjs-mouse-display {\n  z-index: 0;\n}\n\n.video-js .vjs-progress-control:hover .vjs-mouse-display {\n  display: block;\n}\n\n.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {\n  visibility: hidden;\n  opacity: 0;\n  transition: visibility 1s, opacity 1s;\n}\n\n.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display {\n  display: none;\n}\n\n.vjs-mouse-display .vjs-time-tooltip {\n  color: #fff;\n  background-color: #000;\n  background-color: rgba(0, 0, 0, 0.8);\n}\n\n.video-js .vjs-slider {\n  position: relative;\n  cursor: pointer;\n  padding: 0;\n  margin: 0 0.45em 0 0.45em;\n  /* iOS Safari */\n  -webkit-touch-callout: none;\n  /* Safari */\n  -webkit-user-select: none;\n  /* Konqueror HTML */\n  /* Firefox */\n  -moz-user-select: none;\n  /* Internet Explorer/Edge */\n  -ms-user-select: none;\n  /* Non-prefixed version, currently supported by Chrome and Opera */\n  user-select: none;\n  background-color: #73859f;\n  background-color: rgba(115, 133, 159, 0.5);\n}\n\n.video-js .vjs-slider.disabled {\n  cursor: default;\n}\n\n.video-js .vjs-slider:focus {\n  text-shadow: 0em 0em 1em white;\n  box-shadow: 0 0 1em #fff;\n}\n\n.video-js .vjs-mute-control {\n  cursor: pointer;\n  flex: none;\n}\n.video-js .vjs-volume-control {\n  cursor: pointer;\n  margin-right: 1em;\n  display: flex;\n}\n\n.video-js .vjs-volume-control.vjs-volume-horizontal {\n  width: 5em;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control {\n  visibility: visible;\n  opacity: 0;\n  width: 1px;\n  height: 1px;\n  margin-left: -1px;\n}\n\n.video-js .vjs-volume-panel {\n  transition: width 1s;\n}\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, .video-js .vjs-volume-panel:active .vjs-volume-control, .video-js .vjs-volume-panel:focus .vjs-volume-control, .video-js .vjs-volume-panel .vjs-volume-control:active, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active {\n  visibility: visible;\n  opacity: 1;\n  position: relative;\n  transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;\n}\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {\n  width: 5em;\n  height: 3em;\n  margin-right: 0;\n}\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical {\n  left: -3.5em;\n  transition: left 0s;\n}\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active {\n  width: 10em;\n  transition: width 0.1s;\n}\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only {\n  width: 4em;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n  height: 8em;\n  width: 3em;\n  left: -3000em;\n  transition: visibility 1s, opacity 1s, height 1s 1s, width 1s 1s, left 1s 1s, top 1s 1s;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n  transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s;\n}\n\n.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n  width: 5em;\n  height: 3em;\n  visibility: visible;\n  opacity: 1;\n  position: relative;\n  transition: none;\n}\n\n.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,\n.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n  position: absolute;\n  bottom: 3em;\n  left: 0.5em;\n}\n\n.video-js .vjs-volume-panel {\n  display: flex;\n}\n\n.video-js .vjs-volume-bar {\n  margin: 1.35em 0.45em;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal {\n  width: 5em;\n  height: 0.3em;\n}\n\n.vjs-volume-bar.vjs-slider-vertical {\n  width: 0.3em;\n  height: 5em;\n  margin: 1.35em auto;\n}\n\n.video-js .vjs-volume-level {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  background-color: #fff;\n}\n.video-js .vjs-volume-level:before {\n  position: absolute;\n  font-size: 0.9em;\n  z-index: 1;\n}\n\n.vjs-slider-vertical .vjs-volume-level {\n  width: 0.3em;\n}\n.vjs-slider-vertical .vjs-volume-level:before {\n  top: -0.5em;\n  left: -0.3em;\n  z-index: 1;\n}\n\n.vjs-slider-horizontal .vjs-volume-level {\n  height: 0.3em;\n}\n.vjs-slider-horizontal .vjs-volume-level:before {\n  top: -0.3em;\n  right: -0.5em;\n}\n\n.video-js .vjs-volume-panel.vjs-volume-panel-vertical {\n  width: 4em;\n}\n\n.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level {\n  height: 100%;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {\n  width: 100%;\n}\n\n.video-js .vjs-volume-vertical {\n  width: 3em;\n  height: 8em;\n  bottom: 8em;\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.7);\n}\n\n.video-js .vjs-volume-horizontal .vjs-menu {\n  left: -2em;\n}\n\n.video-js .vjs-volume-tooltip {\n  background-color: #fff;\n  background-color: rgba(255, 255, 255, 0.8);\n  border-radius: 0.3em;\n  color: #000;\n  float: right;\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 1em;\n  padding: 6px 8px 8px 8px;\n  pointer-events: none;\n  position: absolute;\n  top: -3.4em;\n  visibility: hidden;\n  z-index: 1;\n}\n\n.video-js .vjs-volume-control:hover .vjs-volume-tooltip,\n.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip {\n  display: block;\n  font-size: 1em;\n  visibility: visible;\n}\n\n.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip,\n.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip {\n  left: 1em;\n  top: -12px;\n}\n\n.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip {\n  font-size: 1em;\n}\n\n.video-js .vjs-volume-control .vjs-mouse-display {\n  display: none;\n  position: absolute;\n  width: 100%;\n  height: 1px;\n  background-color: #000;\n  z-index: 1;\n}\n\n.video-js .vjs-volume-horizontal .vjs-mouse-display {\n  width: 1px;\n  height: 100%;\n}\n\n.vjs-no-flex .vjs-volume-control .vjs-mouse-display {\n  z-index: 0;\n}\n\n.video-js .vjs-volume-control:hover .vjs-mouse-display {\n  display: block;\n}\n\n.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display {\n  visibility: hidden;\n  opacity: 0;\n  transition: visibility 1s, opacity 1s;\n}\n\n.video-js.vjs-user-inactive.vjs-no-flex .vjs-volume-control .vjs-mouse-display {\n  display: none;\n}\n\n.vjs-mouse-display .vjs-volume-tooltip {\n  color: #fff;\n  background-color: #000;\n  background-color: rgba(0, 0, 0, 0.8);\n}\n\n.vjs-poster {\n  display: inline-block;\n  vertical-align: middle;\n  background-repeat: no-repeat;\n  background-position: 50% 50%;\n  background-size: contain;\n  background-color: #000000;\n  cursor: pointer;\n  margin: 0;\n  padding: 0;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  height: 100%;\n}\n\n.vjs-has-started .vjs-poster,\n.vjs-using-native-controls .vjs-poster {\n  display: none;\n}\n\n.vjs-audio.vjs-has-started .vjs-poster,\n.vjs-has-started.vjs-audio-poster-mode .vjs-poster {\n  display: block;\n}\n\n.video-js .vjs-live-control {\n  display: flex;\n  align-items: flex-start;\n  flex: auto;\n  font-size: 1em;\n  line-height: 3em;\n}\n\n.vjs-no-flex .vjs-live-control {\n  display: table-cell;\n  width: auto;\n  text-align: left;\n}\n\n.video-js:not(.vjs-live) .vjs-live-control,\n.video-js.vjs-liveui .vjs-live-control {\n  display: none;\n}\n\n.video-js .vjs-seek-to-live-control {\n  align-items: center;\n  cursor: pointer;\n  flex: none;\n  display: inline-flex;\n  height: 100%;\n  padding-left: 0.5em;\n  padding-right: 0.5em;\n  font-size: 1em;\n  line-height: 3em;\n  width: auto;\n  min-width: 4em;\n}\n\n.vjs-no-flex .vjs-seek-to-live-control {\n  display: table-cell;\n  width: auto;\n  text-align: left;\n}\n\n.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,\n.video-js:not(.vjs-live) .vjs-seek-to-live-control {\n  display: none;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge {\n  cursor: auto;\n}\n\n.vjs-seek-to-live-control .vjs-icon-placeholder {\n  margin-right: 0.5em;\n  color: #888;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder {\n  color: red;\n}\n\n.video-js .vjs-time-control {\n  flex: none;\n  font-size: 1em;\n  line-height: 3em;\n  min-width: 2em;\n  width: auto;\n  padding-left: 1em;\n  padding-right: 1em;\n}\n\n.vjs-live .vjs-time-control {\n  display: none;\n}\n\n.video-js .vjs-current-time,\n.vjs-no-flex .vjs-current-time {\n  display: none;\n}\n\n.video-js .vjs-duration,\n.vjs-no-flex .vjs-duration {\n  display: none;\n}\n\n.vjs-time-divider {\n  display: none;\n  line-height: 3em;\n}\n\n.vjs-live .vjs-time-divider {\n  display: none;\n}\n\n.video-js .vjs-play-control {\n  cursor: pointer;\n}\n\n.video-js .vjs-play-control .vjs-icon-placeholder {\n  flex: none;\n}\n\n.vjs-text-track-display {\n  position: absolute;\n  bottom: 3em;\n  left: 0;\n  right: 0;\n  top: 0;\n  pointer-events: none;\n}\n\n.video-js.vjs-controls-disabled .vjs-text-track-display,\n.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {\n  bottom: 1em;\n}\n\n.video-js .vjs-text-track {\n  font-size: 1.4em;\n  text-align: center;\n  margin-bottom: 0.1em;\n}\n\n.vjs-subtitles {\n  color: #fff;\n}\n\n.vjs-captions {\n  color: #fc6;\n}\n\n.vjs-tt-cue {\n  display: block;\n}\n\nvideo::-webkit-media-text-track-display {\n  transform: translateY(-3em);\n}\n\n.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,\n.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display {\n  transform: translateY(-1.5em);\n}\n\n.video-js .vjs-picture-in-picture-control {\n  cursor: pointer;\n  flex: none;\n}\n.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control {\n  display: none;\n}\n\n.video-js .vjs-fullscreen-control {\n  cursor: pointer;\n  flex: none;\n}\n.video-js.vjs-audio-only-mode .vjs-fullscreen-control {\n  display: none;\n}\n\n.vjs-playback-rate > .vjs-menu-button,\n.vjs-playback-rate .vjs-playback-rate-value {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n}\n\n.vjs-playback-rate .vjs-playback-rate-value {\n  pointer-events: none;\n  font-size: 1.5em;\n  line-height: 2;\n  text-align: center;\n}\n\n.vjs-playback-rate .vjs-menu {\n  width: 4em;\n  left: 0em;\n}\n\n.vjs-error .vjs-error-display .vjs-modal-dialog-content {\n  font-size: 1.4em;\n  text-align: center;\n}\n\n.vjs-error .vjs-error-display:before {\n  color: #fff;\n  content: "X";\n  font-family: Arial, Helvetica, sans-serif;\n  font-size: 4em;\n  left: 0;\n  line-height: 1;\n  margin-top: -0.5em;\n  position: absolute;\n  text-shadow: 0.05em 0.05em 0.1em #000;\n  text-align: center;\n  top: 50%;\n  vertical-align: middle;\n  width: 100%;\n}\n\n.vjs-loading-spinner {\n  display: none;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  margin: -25px 0 0 -25px;\n  opacity: 0.85;\n  text-align: left;\n  border: 6px solid rgba(43, 51, 63, 0.7);\n  box-sizing: border-box;\n  background-clip: padding-box;\n  width: 50px;\n  height: 50px;\n  border-radius: 25px;\n  visibility: hidden;\n}\n\n.vjs-seeking .vjs-loading-spinner,\n.vjs-waiting .vjs-loading-spinner {\n  display: block;\n  -webkit-animation: vjs-spinner-show 0s linear 0.3s forwards;\n          animation: vjs-spinner-show 0s linear 0.3s forwards;\n}\n\n.vjs-loading-spinner:before,\n.vjs-loading-spinner:after {\n  content: "";\n  position: absolute;\n  margin: -6px;\n  box-sizing: inherit;\n  width: inherit;\n  height: inherit;\n  border-radius: inherit;\n  opacity: 1;\n  border: inherit;\n  border-color: transparent;\n  border-top-color: white;\n}\n\n.vjs-seeking .vjs-loading-spinner:before,\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:after {\n  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite;\n  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite;\n}\n\n.vjs-seeking .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:before {\n  border-top-color: white;\n}\n\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:after {\n  border-top-color: white;\n  -webkit-animation-delay: 0.44s;\n  animation-delay: 0.44s;\n}\n\n@keyframes vjs-spinner-show {\n  to {\n    visibility: visible;\n  }\n}\n@-webkit-keyframes vjs-spinner-show {\n  to {\n    visibility: visible;\n  }\n}\n@keyframes vjs-spinner-spin {\n  100% {\n    transform: rotate(360deg);\n  }\n}\n@-webkit-keyframes vjs-spinner-spin {\n  100% {\n    -webkit-transform: rotate(360deg);\n  }\n}\n@keyframes vjs-spinner-fade {\n  0% {\n    border-top-color: #73859f;\n  }\n  20% {\n    border-top-color: #73859f;\n  }\n  35% {\n    border-top-color: white;\n  }\n  60% {\n    border-top-color: #73859f;\n  }\n  100% {\n    border-top-color: #73859f;\n  }\n}\n@-webkit-keyframes vjs-spinner-fade {\n  0% {\n    border-top-color: #73859f;\n  }\n  20% {\n    border-top-color: #73859f;\n  }\n  35% {\n    border-top-color: white;\n  }\n  60% {\n    border-top-color: #73859f;\n  }\n  100% {\n    border-top-color: #73859f;\n  }\n}\n.video-js.vjs-audio-only-mode .vjs-captions-button {\n  display: none;\n}\n\n.vjs-chapters-button .vjs-menu ul {\n  width: 24em;\n}\n\n.video-js.vjs-audio-only-mode .vjs-descriptions-button {\n  display: none;\n}\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n  vertical-align: middle;\n  display: inline-block;\n  margin-bottom: -0.1em;\n}\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n  font-family: VideoJS;\n  content: "";\n  font-size: 1.5em;\n  line-height: inherit;\n}\n\n.video-js.vjs-audio-only-mode .vjs-subs-caps-button {\n  display: none;\n}\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n  vertical-align: middle;\n  display: inline-block;\n  margin-bottom: -0.1em;\n}\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n  font-family: VideoJS;\n  content: " ";\n  font-size: 1.5em;\n  line-height: inherit;\n}\n\n.video-js.vjs-layout-small .vjs-current-time,\n.video-js.vjs-layout-small .vjs-time-divider,\n.video-js.vjs-layout-small .vjs-duration,\n.video-js.vjs-layout-small .vjs-remaining-time,\n.video-js.vjs-layout-small .vjs-playback-rate,\n.video-js.vjs-layout-small .vjs-volume-control, .video-js.vjs-layout-x-small .vjs-current-time,\n.video-js.vjs-layout-x-small .vjs-time-divider,\n.video-js.vjs-layout-x-small .vjs-duration,\n.video-js.vjs-layout-x-small .vjs-remaining-time,\n.video-js.vjs-layout-x-small .vjs-playback-rate,\n.video-js.vjs-layout-x-small .vjs-volume-control, .video-js.vjs-layout-tiny .vjs-current-time,\n.video-js.vjs-layout-tiny .vjs-time-divider,\n.video-js.vjs-layout-tiny .vjs-duration,\n.video-js.vjs-layout-tiny .vjs-remaining-time,\n.video-js.vjs-layout-tiny .vjs-playback-rate,\n.video-js.vjs-layout-tiny .vjs-volume-control {\n  display: none;\n}\n.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover {\n  width: auto;\n  width: initial;\n}\n.video-js.vjs-layout-x-small .vjs-progress-control, .video-js.vjs-layout-tiny .vjs-progress-control {\n  display: none;\n}\n.video-js.vjs-layout-x-small .vjs-custom-control-spacer {\n  flex: auto;\n  display: block;\n}\n.video-js.vjs-layout-x-small.vjs-no-flex .vjs-custom-control-spacer {\n  width: auto;\n}\n\n.vjs-modal-dialog.vjs-text-track-settings {\n  background-color: #2B333F;\n  background-color: rgba(43, 51, 63, 0.75);\n  color: #fff;\n  height: 70%;\n}\n\n.vjs-text-track-settings .vjs-modal-dialog-content {\n  display: table;\n}\n\n.vjs-text-track-settings .vjs-track-settings-colors,\n.vjs-text-track-settings .vjs-track-settings-font,\n.vjs-text-track-settings .vjs-track-settings-controls {\n  display: table-cell;\n}\n\n.vjs-text-track-settings .vjs-track-settings-controls {\n  text-align: right;\n  vertical-align: bottom;\n}\n\n@supports (display: grid) {\n  .vjs-text-track-settings .vjs-modal-dialog-content {\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    grid-template-rows: 1fr;\n    padding: 20px 24px 0px 24px;\n  }\n\n  .vjs-track-settings-controls .vjs-default-button {\n    margin-bottom: 20px;\n  }\n\n  .vjs-text-track-settings .vjs-track-settings-controls {\n    grid-column: 1/-1;\n  }\n\n  .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,\n.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,\n.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content {\n    grid-template-columns: 1fr;\n  }\n}\n.vjs-track-setting > select {\n  margin-right: 1em;\n  margin-bottom: 0.5em;\n}\n\n.vjs-text-track-settings fieldset {\n  margin: 5px;\n  padding: 3px;\n  border: none;\n}\n\n.vjs-text-track-settings fieldset span {\n  display: inline-block;\n}\n\n.vjs-text-track-settings fieldset span > select {\n  max-width: 7.3em;\n}\n\n.vjs-text-track-settings legend {\n  color: #fff;\n  margin: 0 0 5px 0;\n}\n\n.vjs-text-track-settings .vjs-label {\n  position: absolute;\n  clip: rect(1px 1px 1px 1px);\n  clip: rect(1px, 1px, 1px, 1px);\n  display: block;\n  margin: 0 0 5px 0;\n  padding: 0;\n  border: 0;\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n}\n\n.vjs-track-settings-controls button:focus,\n.vjs-track-settings-controls button:active {\n  outline-style: solid;\n  outline-width: medium;\n  background-image: linear-gradient(0deg, #fff 88%, #73859f 100%);\n}\n\n.vjs-track-settings-controls button:hover {\n  color: rgba(43, 51, 63, 0.75);\n}\n\n.vjs-track-settings-controls button {\n  background-color: #fff;\n  background-image: linear-gradient(-180deg, #fff 88%, #73859f 100%);\n  color: #2B333F;\n  cursor: pointer;\n  border-radius: 2px;\n}\n\n.vjs-track-settings-controls .vjs-default-button {\n  margin-right: 1em;\n}\n\n@media print {\n  .video-js > *:not(.vjs-tech):not(.vjs-poster) {\n    visibility: hidden;\n  }\n}\n.vjs-resize-manager {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  border: none;\n  z-index: -1000;\n}\n\n.js-focus-visible .video-js *:focus:not(.focus-visible) {\n  outline: none;\n}\n\n.video-js *:focus:not(:focus-visible) {\n  outline: none;\n}\n',""]);const h=c},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,i,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var o=0;o<this.length;o++){var l=this[o][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);i&&a[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},9144:(e,t,n)=>{var i,r=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},s=n(5893);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=i},8908:(e,t,n)=>{var i;i="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=i},7376:e=>{e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"==typeof e&&"[object RegExp]"!==n||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},7537:(e,t)=>{function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,s=String(e);return(n=i[s.toLowerCase()])?n:(n=r[s.toLowerCase()])||(1===s.length?s.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var s;if(s=i[t.toLowerCase()])return s===n;if(s=r[t.toLowerCase()])return s===n}else if("number"==typeof t)return t===n;return!1}};var i=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(s=97;s<123;s++)i[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)i[s-48]=s;for(s=1;s<13;s++)i["f"+s]=s+111;for(s=0;s<10;s++)i["numpad "+s]=s+96;var a=t.names=t.title={};for(s in i)a[i[s]]=s;for(var o in r)i[o]=r[o]},4221:(e,t,n)=>{var i=n(6894).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===n.version?(n.earliestPresentationTime=t.getUint32(r),n.firstOffset=t.getUint32(r+4),r+=8):(n.earliestPresentationTime=i(e.subarray(r)),n.firstOffset=i(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)n.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return n}},1489:e=>{var t,n,i,r,s,a,o,l=9e4;t=function(e){return e*l},n=function(e,t){return e*t},i=function(e){return e/l},r=function(e,t){return e/t},s=function(e,n){return t(r(e,n))},a=function(e,t){return n(i(e),t)},o=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:l,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:i,audioTsToSeconds:r,audioTsToVideoTs:s,videoTsToAudioTs:a,metadataTsToSeconds:o}},6894:e=>{var t=Math.pow(2,32);e.exports={getUint64:function(e){var n,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(n=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(n):n:i.getUint32(0)*t+i.getUint32(4)},MAX_UINT32:t}},5974:e=>{e.exports=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,i=0;i<t.length;i++)if(t[i].identifier===e){n=i;break}return n}function i(e,i){for(var s={},a=[],o=0;o<e.length;o++){var l=e[o],u=i.base?l[0]+i.base:l[0],c=s[u]||0,d="".concat(u," ").concat(c);s[u]=c+1;var h=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var f=r(p,i);i.byIndex=o,t.splice(o,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function r(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=i(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<s.length;a++){var o=n(s[a]);t[o].references--}for(var l=i(e,r),u=0;u<s.length;u++){var c=n(s[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}s=l}}},569:e=>{"use strict";var t={};e.exports=function(e,n){var i=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9945:function(e){var t,n,i,r,s;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=n.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(d)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=i.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},3407:(e,t,n)=>{var i=n(8908),r=e.exports={WebVTT:n(3706),VTTCue:n(2230),VTTRegion:n(3710)};i.vttjs=r,i.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=i.VTTCue,l=i.VTTRegion;r.shim=function(){i.VTTCue=s,i.VTTRegion=a},r.restore=function(){i.VTTCue=o,i.VTTRegion=l},i.VTTCue||r.shim()},3706:(e,t,n)=>{var i=n(9144),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=r(null)}function l(e,t,n,i){var r=i?e.split(i):[e];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(n);if(2===a.length)t(a[0],a[1])}}function u(e,t,n){var i=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=r(),u(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),u(),t.endTime=r(),u(),function(e,t){var i=new o;l(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];i.integer(e,a),i.percent(e,a)&&i.set("snapToLines",!1),i.alt(e,a,["auto"]),2===s.length&&i.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),i.percent(e,s[0]),2===s.length&&i.alt("positionAlign",s[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");try{t.line=i.get("line","auto")}catch(e){}t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(e){t.align=i.get("align","middle")}try{t.position=i.get("position","auto")}catch(e){t.position=i.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=i.createElement&&i.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e,t){return!f[t.localName]||f[t.localName]===e.localName}function r(t,n){var i=d[t];if(!i)return null;var r=e.document.createElement(i),s=p[t];return s&&n&&(r[s]=n.trim()),r}for(var s,o,l=e.document.createElement("div"),u=l,m=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode((o=s,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===s[1]){m.length&&m[m.length-1]===s.substr(2).replace(">","")&&(m.pop(),u=u.parentNode);continue}var g,v=a(s.substr(1,s.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),u.appendChild(g);continue}var y=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=r(y[1],y[3])))continue;if(!i(u,g))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var i=t?"background-color":"color",r=h[n];g.style[i]=r}})),g.className=_.join(" ")}m.push(y[1]),u.appendChild(g),u=g}return l}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var s=n.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var s=0;s<n.length;s++)if(v(n.charCodeAt(s)))return"rtl";return"ltr"}function _(){}function b(e,t,n){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function T(e){var t,n,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,i){var r=new T(t),s=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(s),o=[];if(s.snapToLines){var l;switch(s.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var u=r.lineHeight,c=u*Math.round(a),d=n[l]+u,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),a<0&&(c+=""===s.vertical?n.height:n.width,o=o.reverse()),r.move(h,c)}else{var p=r.lineHeight/n.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var f=function(e,t){for(var r,s=new T(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(i);)e.move(t[o]);if(e.within(n))return e;var l=e.intersectPercentage(n);a>l&&(r=new T(e),a=l),e=new T(s)}return r||s}(r,o);t.move(f.toCSSCompatValues(n))}function k(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=r(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},k.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},k.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};k.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],s=T.getSimpleBoxPosition(i),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var n,o,l=0;l<t.length;l++)o=t[l],n=new b(e,o,a),i.appendChild(n.div),S(0,n,s,r),o.displayState=n.div,r.push(T.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)i.appendChild(t[o].displayState)},k.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},k.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?l(e,(function(e,n){if("X-TIMESTAMP-MAP"===e)!function(e){var n=new o;l(e,(function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}),/=/):l(e,(function(e,n){if("Region"===e)!function(e){var n=new o;if(l(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new o;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var i=new(t.vttjs.VTTRegion||t.window.VTTRegion);i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new s(s.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{u(r,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new s(s.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=k},2230:e=>{var t={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}function r(e,n,r){this.hasBeenReset=!1;var s="",a=!1,o=e,l=n,u=r,c=null,d="",h=!0,p="auto",f="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=i(e);t&&(f=t,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);t&&(g=t,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},3710:e=>{var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,i=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n||(l=n)}}})}},2018:e=>{"use strict";e.exports="data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOeG7y+qC8pU1dHusIOXxuoxaOlwZYWQB0Aea4quIEN4E9LzKbKjzDeM6H/mua6Lmc/p8yhg0lvdYx15ZG8uOLQOGjMp3EzqmzJizYMmKNRu27Nhz4MiJMxeu3Ljz4Ekqm7T8P52G8PP3lnTOVk++Z6iN6QZzNN1F7ptuN7eGOjDUoaGODHVsuvU8MdTO9Hd5aqgzQ50b6sJQl4a6MtS1oW4MdWuoO0PdG+rBUI+GejLUs6FeDPVqqDdDvRvqw1CfhpqM9At0iFLaAAB4nJ1YDXBTVRZ+5/22TUlJ8we0pHlJm7RJf5O8F2j6EymlSPkpxaL8U2xpa3DKj0CBhc2IW4eWKSokIoLsuMqssM64f+jA4HSdWXXXscBq67IOs3FXZ1ZYWVyRFdo899yXtIBQZ90k7717zz3v3HPPOfd854YCCj9cL9dL0RQFOqCbGJnrHb5EayiKIWN8iA/hWBblo6hUWm8TtCDwE80WMJus/irwyxOdxeB0MDb14VNJHnXYoLLSl6FfCUYO9nYPTA8Epg9090LprfbBbZ2hY0UlJUXHQp3/vtWkS6EBv8+rPMq5u9692f/dNxJNiqwC1xPE9TCUgCsSdQWgE3XQD25lkG4CN2xmTcOXWBOyser6RN6KnGbKSbmQ3+d0OI1m2W8QzLLkI2sykrWAgJJEtA8vGGW/2Q+CmT3n8zS9wZwu2DCvtuZKZN3xkrLh36yCZuUomQSqGpY8t/25VfHVhw8z4ebGBtfLb0ya9PCaDc+8dGTvk2dsh6z7WzvowlXKUSWo9MJ15a3KrEP2loOr2Ojhw6iW6hf2BDdEccQvZGpaAy7YovSwq8kr7HGllxpd71rkS6G0Sf11sl9OvMK1+jwPPODxjUwkOim9CU3ix1wNjXDfmJSEn618Bs6lpWwUpU+8PCqLMY650zjq8VhCIP17NEKTx3eaLL+s5Pi6yJWaWjTHLR1jYzPSV9VF/6Ojdb/1kO3Mk3uhHC0x6gc1BjlKQ+nQFxTYdaJkZ7ySVxLBbhR1dsboNXp1tCYKW2LRaEzpYcIx2BKNxaL0ZaUnSqfFoiNhHKR/GkX6PWUSAaJelQaqZL1EpoHNsajSEyPSoJ9IjhIxTdjHLmwZvhRDOiFTY/YeQnvrVZmiTQtGncECXtFTBZLOVwwMRgoXHAkXzMzPn1nAJJ8jYSbMDaqN2waGLzNhih/bZynUBMpIWSg7VYi7DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/1AvwktjQ1P7NjyMGQyfd4vjipX6M/i52D7Cq80kqlcxEcGXRr/FEcgs0u5uGgB4VWuMFfpdn2Re6Hi3PqzmxWKsz6+ae2Pn9hXXw/fqM859UiGC0oKYYILJBqJrsn1Z1E5qOs9rQCiUQRREjm8yJcbHF5cUJufX1vAHlefw0XgUoboS3ETfQlTxBC4SOtuE8VPRJTBSCQSjZCpk7Gqzu+masaZ2y7Zjehho4F3g82BNDkAHpORG4+OCS+f6JTPmtRn/PH1kch6d04sp7AQb25aQ/pqUyXeQ8vrebG8OYQdXOQ+585u0sdW9rqalzRURiJ+9F4MweRFrKUjl1GUYhH1A27WOHw5cTFSFPMo9EeUIGnQTZHIaJ7AHLaOKsOODaNF9jkBjYG2QEsQ2xjMUAx2bBEbeTBWMHwskBjngq56S/yfgkBnWBa4K9sqKtq2t1UI8S9He5XuBRbawAdatrQEAi30Aks2+LM8WeCbalVZkWNylvJ+dqJnzVb+OHlSoKW8nPCP7Rd+CcZ2DdWAGqJ2CBFOphgywFFCFBNtfAbGtNPBCwxvygHeYMZMY9ZboBqwq/pVrsbgN5tkv152ODlbMfiqwGMBgxa4Exz3QhovRIUp6acqZmQzRq0ypDXS2TPLT02YIkQETnOE445oOGxOmXAqUJNNG7XgupMjPq2ua9asrj5yY/yuKteO1Kx0YNJTufrirLe1mZnat7OL6rnUdCWenpW6I8mAnbsY8KWs1PuSovCW9A/Z25PQ24a7cNOqgmTkLmBMgh4THgc4b9k2IVv1/g/F5nGljwPLfOgHAzJzh45V/4+WenTzmMtR5Z7us2Tys909UHqrPY7KbckoxRvRHhmVc3cJGE97uml0R1S0jdULVl7EvZtDFVBF35N9cEdjpgmAiOlFZ+Dtoh93+D3zzHr8RRNZQhnCNMNbcegOvpEwZoL+06cJQ07h+th3fZ/7PVbVC6ngTAV/KoLFuO6+2KFcU651gEb5ugPSIb1D+Xp8V4+k3sEIGnw5mYe4If4k1lFYr6SCzmM2EQ8iWtmwjnBI9kTwe1TlfAmXh7H02by9fW2gsjKwtv0aaURKil4OdV7rDL1MXIFNrhdxohcZXYTnq47WisrKitaObbf5+yvkLi5J6lCNZZ+B6GC38VNBZBDidSS/+mSvh6s+srgC8pyKMvDtt+de3c9fU76ZPfuM8ud4Kv0fyP/LqfepMT/3oZxSqpZaTa1DaQYLY8TFsHYbWYsPoRhRWfL5eSSQbhUGgGC3YLbVMk6PitTFNGpAsNrC6D1VNBKgBHMejaiuRWEWGgsSDBTJjqWIl8kJLlsaLJ2tXDr6xGfT85bM2Q06a46x2HTgvdnV8z5YDy/27J4zt6x2VtkzjoYpkq36kaBr4eQSg7tyiVweWubXZugtadl58ydapfbORfKsDTuZ0OBgx4cfdjCf5tbWNITnL120fdOi1RV1C3uKGzNdwYLcMvZ3BxoPyTOCD1XvXTp7U10gWCVmTV9b3r2z0SkGWovb2hp9I89O8a2smlyaO8muMU+dRmtzp60IzAoFpjLr1n388boLyf0dRvxhsHZ0qbWqDkwqvvpkj4l0fY6EIXRi5sQSrAvsVYwXRy4qJ2EVtD1AN7a0HWth9ymvL1xc3WTUKK/TAHA/bXDVtVWfOMfuGxGZv4Ln/jVr9jc3j1yMv0tndmyt9Vq88Y9gH1wtLX3KWjot5++jWHgAoZZkQ14wGQ20Fli71UmKJAy4xKMSTGbVdybW7FDDAut9XpD5AzWrYO7zQ8qffqF8+Ynd/clrHcdyxGy3a/3+mfNnzC/cBsveTjnTvXf1o6vzOlZw7WtqtdmPK/Errz/6NNtD72zmNOZfbmYdTGHfoofqI79Oc+R2n1lrnL6pOm0Up7kwxhTW12Amm7WYkXR2qYrF2AmgmbAsxZjwy1xpg/m1Je2vrp8v/nz2xpmlBg4E9hrMU341wVpTOh/OfmGvAnra8q6uctr60ZQHV3Q+WMQJykMj8ZsWn2QBOmmHMB+m5pDIpTFonYigiaKAhGEiAHF7EliVnQkjoLVIMPtJpBKHYd3A8GYH9jJzrWwmHx5Qjp7vDAX0suGRym1vtm/9W1/HyR8vczfMs6Sk8DSv855/5dlX9oQq52hT8syyp2rx5Id17IAyAM3wIjQPMOHzytEB64q6D5zT91yNbnx3V/nqnd017S9Y0605k3izoXLpsxde2n38yoOV9s1LcjwzNjbdX6asnBVaBj/6/DwKwPkpcqbDG7BnsXoSqWnUAmottYF6jMSdVyYZh3zVXCjwTiwwHH6sGuRiEHQGzuRX6whZkp123oy1BWE2mEfJ/tvIRtM4ZM5bDXiMsPMaAKOTyc5uL57rqyyc5y5JE5pm1i2S2iUX0CcaQ6lC6Zog7JqSqZmYlosl2K6pwNA84zRnQW6SaALYZQGW5lhCtU/W34N6o+bKfZ8cf3/Cl/+iTX3wBzpOY4mRkeNf3rptycGSshQWgGbYt5jFc2e0+DglIrwl6DVWQ7BuwaJ3Xk1J4VL5urnLl/Wf+gHU/hZoZdKNym6lG+I34FaNeZKcSpJIo2IeCVvpdsDGfKvzJnAwmeD37Ow65ZWwSowpgwX5T69s/rB55dP5BcpgDKFV8p7q2sn/1uc93bVzT/w6UrCqDTWvfCq/oCD/qZXNoUj8BL5Kp6GU017frfNXkAtiiyf/SOCEeLqnd8R/Ql9GlCRfctS6k5chvIBuQ1zCCjoCHL2DHNHIXxMJ3kQeO8lbsUXONeSfA5EjcG6/E+KdhN4bP04vBhdi883+BFBzQbxFbvZzQeY9LNBZc0FNfn5NwfDn6rCTnTw6R8o+gfpf5hCom33cRuiTlss3KHmZjD+BPN+5gXuA2ziS/Q73mLxUkpbKN/eqwz5uK0X9F3h2d1V4nGNgZGBgAOJd776+iue3+crAzc4AAje5Bfcg0xz9YHEOBiYQBQA8FQlFAHicY2BkYGBnAAGOPgaG//85+hkYGVCBMgBGGwNYAAAAeJxjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA=="},5893:()=>{}},e=>{var t;t=6316,e(e.s=t)}]);