@clickview/player 1.1.3 → 1.1.4-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/player.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@clickview/player"]=e():t["@clickview/player"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=852)}([,function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(4),a=n.n(o),s=n(47),u=n.n(s),c=n(9),l=n.n(c),f=(n(234),n(236),n(5)),h=n.n(f),p=n(179),d=n.n(p),y=n(11),m=n.n(y),v=n(114),g=n.n(v),b=n(115),_=n.n(b),w=n(180),T=n.n(w),S=n(181),E=n.n(S),k=n(61),O=n.n(k),C=n(87),P=n.n(C),x=n(84),L=n.n(x),A=function(t){function e(){var e;return(e=t.call(this)||this).buffer="",e}return h()(e,t),e.prototype.push=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},e}(P.a),I=function(t){for(var e,n=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((e=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=e[0].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^['"](.*)['"]$/g,"$1"),r[e[0]]=e[1]);return r},j=function(t){function e(){var e;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}h()(e,t);var n=e.prototype;return n.push=function(t){var e,n,r=this;0!==(t=t.trim()).length&&("#"===t[0]?this.tagMappers.reduce((function(e,n){var r=n(t);return r===t?e:e.concat([r])}),[t]).forEach((function(t){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return n={type:"tag",tagType:"inf"},e[1]&&(n.duration=parseFloat(e[1])),e[2]&&(n.title=e[2]),void r.trigger("data",n);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"targetduration"},e[1]&&(n.duration=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"totalduration"},e[1]&&(n.duration=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"version"},e[1]&&(n.version=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return n={type:"tag",tagType:"media-sequence"},e[1]&&(n.number=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return n={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(n.number=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return n={type:"tag",tagType:"playlist-type"},e[1]&&(n.playlistType=e[1]),void r.trigger("data",n);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"byterange"},e[1]&&(n.length=parseInt(e[1],10)),e[2]&&(n.offset=parseInt(e[2],10)),void r.trigger("data",n);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return n={type:"tag",tagType:"allow-cache"},e[1]&&(n.allowed=!/NO/.test(e[1])),void r.trigger("data",n);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(n={type:"tag",tagType:"map"},e[1]){var o=I(e[1]);if(o.URI&&(n.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),s=a[0],u=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),u&&(n.byterange.offset=parseInt(u,10))}}r.trigger("data",n)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(n={type:"tag",tagType:"stream-inf"},e[1]){if(n.attributes=I(e[1]),n.attributes.RESOLUTION){var c=n.attributes.RESOLUTION.split("x"),l={};c[0]&&(l.width=parseInt(c[0],10)),c[1]&&(l.height=parseInt(c[1],10)),n.attributes.RESOLUTION=l}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))}r.trigger("data",n)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return n={type:"tag",tagType:"media"},e[1]&&(n.attributes=I(e[1])),void r.trigger("data",n);if(e=/^#EXT-X-ENDLIST/.exec(t))r.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return n={type:"tag",tagType:"program-date-time"},e[1]&&(n.dateTimeString=e[1],n.dateTimeObject=new Date(e[1])),void r.trigger("data",n);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return n={type:"tag",tagType:"key"},e[1]&&(n.attributes=I(e[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 r.trigger("data",n);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return n={type:"tag",tagType:"start"},e[1]&&(n.attributes=I(e[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-out-cont"},e[1]?n.data=e[1]:n.data="",void r.trigger("data",n);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-out"},e[1]?n.data=e[1]:n.data="",void r.trigger("data",n);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-in"},e[1]?n.data=e[1]:n.data="",void r.trigger("data",n);r.trigger("data",{type:"tag",data:t.slice(4)})}}}else r.trigger("data",{type:"comment",text:t.slice(1)})})):this.trigger("data",{type:"uri",uri:t}))},n.addParser=function(t){var e=this,n=t.expression,r=t.customType,i=t.dataParser,o=t.segment;"function"!=typeof i&&(i=function(t){return t}),this.customParsers.push((function(t){if(n.exec(t))return e.trigger("data",{type:"custom",data:i(t),customType:r,segment:o}),!0}))},n.addTagMapper=function(t){var e=t.expression,n=t.map;this.tagMappers.push((function(t){return e.test(t)?n(t):t}))},e}(P.a),R=function(t){function e(){var e;(e=t.call(this)||this).lineStream=new A,e.parseStream=new j,e.lineStream.pipe(e.parseStream);var n,r,i=l()(e),o=[],a={},s=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f=0;e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var h=0;return e.parseStream.on("data",(function(t){var e,l;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&(a.byterange=e,e.length=t.length,"offset"in t||(t.offset=h)),"offset"in t&&(a.byterange=e,e.offset=t.offset),h=e.offset+e.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"})),t.duration>0&&(a.duration=t.duration),0===t.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:L()(t.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(r.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,f=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){n={},t.uri&&(n.uri=t.uri),t.byterange&&(n.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||c,t.attributes?(a.attributes||(a.attributes={}),u()(a.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var n=this.manifest.mediaGroups[t.attributes.TYPE];n[t.attributes["GROUP-ID"]]=n[t.attributes["GROUP-ID"]]||{},e=n[t.attributes["GROUP-ID"]],(l={default:/yes/i.test(t.attributes.DEFAULT)}).default?l.autoselect=!0:l.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(l.language=t.attributes.LANGUAGE),t.attributes.URI&&(l.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(l.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(l.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(l.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),a.dateTimeString=t.dateTimeString,a.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=t.data},"cue-out-cont":function(){a.cueOutCont=t.data},"cue-in":function(){a.cueIn=t.data}}[t.tagType]||s).call(i)},uri:function(){a.uri=t.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=f,n&&(a.map=n),a={}},comment:function(){},custom:function(){t.segment?(a.custom=a.custom||{},a.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(i)})),e}h()(e,t);var n=e.prototype;return n.push=function(t){this.lineStream.push(t)},n.end=function(){this.lineStream.push("\n")},n.addParser=function(t){this.parseStream.addParser(t)},n.addTagMapper=function(t){this.parseStream.addTagMapper(t)},e}(P.a),D=n(116),M=n(46),N=n.n(M),B=n(182),U=function(t){return!!t&&"object"==typeof t},F=function t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.reduce((function(e,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=e[r].concat(n[r]):U(e[r])&&U(n[r])?e[r]=t(e[r],n[r]):e[r]=n[r]})),e}),{})},V=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},H=function(t){if(!t.length)return[];for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e},q="INVALID_NUMBER_OF_PERIOD",W="DASH_EMPTY_MANIFEST",z="DASH_INVALID_XML",G="NO_BASE_URL",Y="SEGMENT_TIME_UNSPECIFIED",X="UNSUPPORTED_UTC_TIMING_SCHEME",K=function(t){var e=t.baseUrl,n=void 0===e?"":e,r=t.source,i=void 0===r?"":r,o=t.range,a=void 0===o?"":o,s=t.indexRange,u=void 0===s?"":s,c={uri:i,resolvedUri:O()(n||"",i)};if(a||u){var l=(a||u).split("-"),f=parseInt(l[0],10),h=parseInt(l[1],10);c.byterange={length:h-f+1,offset:f}}return c},Q={static:function(t){var e=t.duration,n=t.timescale,r=void 0===n?1:n,i=t.sourceDuration;return{start:0,end:Math.ceil(i/(e/r))}},dynamic:function(t){var e=t.NOW,n=t.clientOffset,r=t.availabilityStartTime,i=t.timescale,o=void 0===i?1:i,a=t.duration,s=t.start,u=void 0===s?0:s,c=t.minimumUpdatePeriod,l=void 0===c?0:c,f=t.timeShiftBufferDepth,h=void 0===f?1/0:f,p=(e+n)/1e3,d=r+u,y=p+l-d,m=Math.ceil(y*o/a),v=Math.floor((p-d-h)*o/a),g=Math.floor((p-d)*o/a);return{start:Math.max(0,v),end:Math.min(m,g)}}},$=function(t){var e=t.type,n=void 0===e?"static":e,r=t.duration,i=t.timescale,o=void 0===i?1:i,a=t.sourceDuration,s=Q[n](t),u=function(t,e){for(var n=[],r=t;r<e;r++)n.push(r);return n}(s.start,s.end).map(function(t){return function(e,n){var r=t.duration,i=t.timescale,o=void 0===i?1:i,a=t.periodIndex,s=t.startNumber;return{number:(void 0===s?1:s)+e,duration:r/o,timeline:a,time:n*r}}}(t));if("static"===n){var c=u.length-1;u[c].duration=a-r/o*c}return u},J=function(t){var e=t.baseUrl,n=t.initialization,r=void 0===n?{}:n,i=t.sourceDuration,o=t.indexRange,a=void 0===o?"":o,s=t.duration;if(!e)throw new Error(G);var u=K({baseUrl:e,source:r.sourceURL,range:r.range}),c=K({baseUrl:e,source:e,indexRange:a});if(c.map=u,s){var l=$(t);l.length&&(c.duration=l[0].duration,c.timeline=l[0].timeline)}else i&&(c.duration=i,c.timeline=0);return c.number=0,[c]},Z=function(t,e,n){for(var r=t.sidx.map?t.sidx.map:null,i=t.sidx.duration,o=t.timeline||0,a=t.sidx.byterange,s=a.offset+a.length,u=e.timescale,c=e.references.filter((function(t){return 1!==t.referenceType})),l=[],f=s+e.firstOffset,h=0;h<c.length;h++){var p=e.references[h],d=p.referencedSize,y=p.subsegmentDuration,m=J({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:y,sourceDuration:i,indexRange:f+"-"+(f+d-1)})[0];r&&(m.map=r),l.push(m),f+=d}return t.segments=l,t},tt=function(t){var e;return(e=t.reduce((function(t,e){var n,r=e.attributes.id+(e.attributes.lang||"");return t[r]?(e.segments[0]&&(e.segments[0].discontinuity=!0),(n=t[r].segments).push.apply(n,e.segments),e.attributes.contentProtection&&(t[r].attributes.contentProtection=e.attributes.contentProtection)):t[r]=e,t}),{}),Object.keys(e).map((function(t){return e[t]}))).map((function(t){var e,n;return t.discontinuityStarts=(e=t.segments,n="discontinuity",e.reduce((function(t,e,r){return e[n]&&t.push(r),t}),[])),t}))},et=function(t,e){if(void 0===e&&(e={}),!Object.keys(e).length)return t;for(var n in t){var r=t[n];if(r.sidx){var i=r.sidx.uri+"-"+(a=r.sidx.byterange,s=void 0,s=a.offset+a.length-1,a.offset+"-"+s),o=e[i]&&e[i].sidx;r.sidx&&o&&Z(r,o,r.sidx.resolvedUri)}}var a,s;return t},nt=function(t){var e,n=t.attributes,r=t.segments,i=t.sidx,o={attributes:(e={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},rt=function(t){var e,n=t.attributes,r=t.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((e={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,e);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}},it=function(t){var e,n=t.attributes,r=t.segments,i=t.sidx,o={attributes:(e={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ot=function(t,e,n){var r;if(void 0===n&&(n={}),!t.length)return{};var i=t[0].attributes,o=i.sourceDuration,a=i.type,s=void 0===a?"static":a,u=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,l=tt(t.filter((function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType}))).map(it),f=tt(t.filter((function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType}))),h=t.filter((function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType})),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:o,playlists:et(l,n)};return c>=0&&(p.minimumUpdatePeriod=1e3*c),e&&(p.locations=e),"dynamic"===s&&(p.suggestedPresentationDelay=u),f.length&&(p.mediaGroups.AUDIO.audio=function(t,e){var n;void 0===e&&(e={});var r=t.reduce((function(t,r){var i=r.attributes.role&&r.attributes.role.value||"",o=r.attributes.lang||"",a="main";if(o){var s=i?" ("+i+")":"";a=""+r.attributes.lang+s}return t[a]&&t[a].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth||(t[a]={language:o,autoselect:!0,default:"main"===i,playlists:et([nt(r)],e),uri:""},void 0===n&&"main"===i&&((n=r).default=!0)),t}),{});n||(r[Object.keys(r)[0]].default=!0);return r}(f,n)),h.length&&(p.mediaGroups.SUBTITLES.subs=function(t,e){return void 0===e&&(e={}),t.reduce((function(t,n){var r=n.attributes.lang||"text";return t[r]||(t[r]={language:r,default:!1,autoselect:!1,playlists:et([rt(n)],e),uri:""}),t}),{})}(h,n)),p},at=function(t,e,n){var r=t.NOW,i=t.clientOffset,o=t.availabilityStartTime,a=t.timescale,s=void 0===a?1:a,u=t.start,c=void 0===u?0:u,l=t.minimumUpdatePeriod,f=(r+i)/1e3+(void 0===l?0:l)-(o+c);return Math.ceil((f*s-e)/n)},st=function(t,e){for(var n=t.type,r=void 0===n?"static":n,i=t.minimumUpdatePeriod,o=void 0===i?0:i,a=t.media,s=void 0===a?"":a,u=t.sourceDuration,c=t.timescale,l=void 0===c?1:c,f=t.startNumber,h=void 0===f?1:f,p=t.periodIndex,d=[],y=-1,m=0;m<e.length;m++){var v=e[m],g=v.d,b=v.r||0,_=v.t||0;y<0&&(y=_),_&&_>y&&(y=_);var w=void 0;if(b<0){var T=m+1;w=T===e.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?at(t,y,g):(u*l-y)/g:(e[T].t-y)/g}else w=b+1;for(var S=h+d.length+w,E=h+d.length;E<S;)d.push({number:E,duration:g/l,time:y,timeline:p}),y+=g,E++}return d},ut=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ct=function(t,e){return t.replace(ut,function(t){return function(e,n,r,i){if("$$"===e)return"$";if(void 0===t[n])return e;var o=""+t[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(e))},lt=function(t,e){var n={RepresentationID:t.id,Bandwidth:t.bandwidth||0},r=t.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=K({baseUrl:t.baseUrl,source:ct(i.sourceURL,n),range:i.range});return function(t,e){return t.duration||e?t.duration?$(t):st(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(t,e).map((function(e){n.Number=e.number,n.Time=e.time;var r=ct(t.media||"",n);return{uri:r,timeline:e.timeline,duration:e.duration,resolvedUri:O()(t.baseUrl||"",r),map:o,number:e.number}}))},ft=function(t,e){var n=t.duration,r=t.segmentUrls,i=void 0===r?[]:r;if(!n&&!e||n&&e)throw new Error(Y);var o,a=i.map((function(e){return function(t,e){var n=t.baseUrl,r=t.initialization,i=void 0===r?{}:r,o=K({baseUrl:n,source:i.sourceURL,range:i.range}),a=K({baseUrl:n,source:e.media,range:e.mediaRange});return a.map=o,a}(t,e)}));return n&&(o=$(t)),e&&(o=st(t,e)),o.map((function(t,e){if(a[e]){var n=a[e];return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n}})).filter((function(t){return t}))},ht=function(t){var e,n,r=t.attributes,i=t.segmentInfo;i.template?(n=lt,e=F(r,i.template)):i.base?(n=J,e=F(r,i.base)):i.list&&(n=ft,e=F(r,i.list));var o={attributes:r};if(!n)return o;var a=n(e,i.timeline);if(e.duration){var s=e,u=s.duration,c=s.timescale,l=void 0===c?1:c;e.duration=u/l}else a.length?e.duration=a.reduce((function(t,e){return Math.max(t,Math.ceil(e.duration))}),0):e.duration=0;return o.attributes=e,o.segments=a,i.base&&e.indexRange&&(o.sidx=a[0],o.segments=[]),o},pt=function(t,e){return H(t.childNodes).filter((function(t){return t.tagName===e}))},dt=function(t){return t.textContent.trim()},yt=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var n=e.slice(1),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},mt={mediaPresentationDuration:function(t){return yt(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return yt(t)},suggestedPresentationDelay:function(t){return yt(t)},type:function(t){return t},timeShiftBufferDepth:function(t){return yt(t)},start:function(t){return yt(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?yt(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},vt=function(t){return t&&t.attributes?H(t.attributes).reduce((function(t,e){var n=mt[e.name]||mt.DEFAULT;return t[e.name]=n(e.value),t}),{}):{}},gt={"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"},bt=function(t,e){return e.length?V(t.map((function(t){return e.map((function(e){return O()(t,dt(e))}))}))):t},_t=function(t){var e=pt(t,"SegmentTemplate")[0],n=pt(t,"SegmentList")[0],r=n&&pt(n,"SegmentURL").map((function(t){return F({tag:"SegmentURL"},vt(t))})),i=pt(t,"SegmentBase")[0],o=n||e,a=o&&pt(o,"SegmentTimeline")[0],s=n||i||e,u=s&&pt(s,"Initialization")[0],c=e&&vt(e);c&&u?c.initialization=u&&vt(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var l={template:c,timeline:a&&pt(a,"S").map((function(t){return vt(t)})),list:n&&F(vt(n),{segmentUrls:r,initialization:vt(u)}),base:i&&F(vt(i),{initialization:vt(u)})};return Object.keys(l).forEach((function(t){l[t]||delete l[t]})),l},wt=function(t,e,n){return function(r){var i=vt(r),o=bt(e,pt(r,"BaseURL")),a=pt(r,"Role")[0],s={role:vt(a)},u=F(t,i,s),c=pt(r,"ContentProtection").reduce((function(t,e){var n=vt(e),r=gt[n.schemeIdUri];if(r){t[r]={attributes:n};var i=pt(e,"cenc:pssh")[0];if(i){var o=dt(i),a=o&&L()(o);t[r].pssh=a}}return t}),{});Object.keys(c).length&&(u=F(u,{contentProtection:c}));var l=_t(r),f=pt(r,"Representation"),h=F(n,l);return V(f.map(function(t,e,n){return function(r){var i=pt(r,"BaseURL"),o=bt(e,i),a=F(t,vt(r)),s=_t(r);return o.map((function(t){return{segmentInfo:F(n,s),attributes:F(a,{baseUrl:t})}}))}}(u,o,h)))}},Tt=function(t,e){return function(n,r){var i=bt(e,pt(n,"BaseURL")),o=vt(n),a=parseInt(o.id,10),s=N.a.isNaN(a)?r:a,u=F(t,{periodIndex:s}),c=pt(n,"AdaptationSet"),l=_t(n);return V(c.map(wt(u,i,l)))}},St=function(t){if(""===t)throw new Error(W);var e,n,r=new B.DOMParser;try{n=(e=r.parseFromString(t,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(t){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(z);return n},Et=function(t,e){void 0===e&&(e={});var n=function(t,e){void 0===e&&(e={});var n=e,r=n.manifestUri,i=void 0===r?"":r,o=n.NOW,a=void 0===o?Date.now():o,s=n.clientOffset,u=void 0===s?0:s,c=pt(t,"Period");if(!c.length)throw new Error(q);var l=pt(t,"Location"),f=vt(t),h=bt([i],pt(t,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=a,f.clientOffset=u,l.length&&(f.locations=l.map(dt)),{locations:f.locations,representationInfo:V(c.map(Tt(f,h)))}}(St(t),e),r=n.representationInfo.map(ht);return ot(r,n.locations,e.sidxMapping)},kt=function(t){return function(t){var e=pt(t,"UTCTiming")[0];if(!e)return null;var n=vt(e);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;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(X)}return n}(St(t))},Ot=Z,Ct=n(183),Pt=n.n(Ct),xt=n(52),Lt=n(88),At=n(184),It=n.n(At),jt=n(51),Rt=n(117),Dt=n.n(Rt),Mt=n(17),Nt=[];var Bt=function t(e){var n,r="info",o=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n("log",r,e)};return n=function(t,e){return function(n,r,o){var a=e.levels[r],s=new RegExp("^("+a+")$");if("log"!==n&&o.unshift(n.toUpperCase()+":"),o.unshift(t+":"),Nt){Nt.push([].concat(o));var u=Nt.length-1e3;Nt.splice(0,u>0?u:0)}if(i.a.console){var c=i.a.console[n];c||"debug"!==n||(c=i.a.console.info||i.a.console.log),c&&a&&s.test(n)&&c[Array.isArray(o)?"apply":"call"](i.a.console,o)}}}(e,o),o.createLogger=function(n){return t(e+": "+n)},o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},o.level=function(t){if("string"==typeof t){if(!o.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');r=t}return r},(o.history=function(){return Nt?[].concat(Nt):[]}).filter=function(t){return(Nt||[]).filter((function(e){return new RegExp(".*"+t+".*").test(e[0])}))},o.history.clear=function(){Nt&&(Nt.length=0)},o.history.disable=function(){null!==Nt&&(Nt.length=0,Nt=null)},o.history.enable=function(){null===Nt&&(Nt=[])},o.error=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("error",r,e)},o.warn=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("warn",r,e)},o.debug=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("debug",r,e)},o}("VIDEOJS"),Ut=Bt.createLogger,Ft=Object.prototype.toString,Vt=function(t){return Wt(t)?Object.keys(t):[]};function Ht(t,e){Vt(t).forEach((function(n){return e(t[n],n)}))}function qt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object.assign?u.a.apply(void 0,[t].concat(n)):(n.forEach((function(e){e&&Ht(e,(function(e,n){t[n]=e}))})),t)}function Wt(t){return!!t&&"object"==typeof t}function zt(t){return Wt(t)&&"[object Object]"===Ft.call(t)&&t.constructor===Object}function Gt(t,e){if(!t||!e)return"";if("function"==typeof i.a.getComputedStyle){var n=i.a.getComputedStyle(t);return n?n.getPropertyValue(e)||n[e]:""}return""}function Yt(t){return"string"==typeof t&&Boolean(t.trim())}function Xt(t){if(t.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Kt(){return a.a===i.a.document}function Qt(t){return Wt(t)&&1===t.nodeType}function $t(){try{return i.a.parent!==i.a.self}catch(t){return!0}}function Jt(t){return function(e,n){if(!Yt(e))return a.a[t](null);Yt(n)&&(n=a.a.querySelector(n));var r=Qt(n)?n:a.a;return r[t]&&r[t](e)}}function Zt(t,e,n,r){void 0===t&&(t="div"),void 0===e&&(e={}),void 0===n&&(n={});var i=a.a.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Bt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+t+" to "+n+"."),i.setAttribute(t,n)):"textContent"===t?te(i,n):i[t]===n&&"tabIndex"!==t||(i[t]=n)})),Object.getOwnPropertyNames(n).forEach((function(t){i.setAttribute(t,n[t])})),r&&be(i,r),i}function te(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function ee(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function ne(t,e){return Xt(e),t.classList?t.classList.contains(e):(n=e,new RegExp("(^|\\s)"+n+"($|\\s)")).test(t.className);var n}function re(t,e){return t.classList?t.classList.add(e):ne(t,e)||(t.className=(t.className+" "+e).trim()),t}function ie(t,e){return t.classList?t.classList.remove(e):(Xt(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function oe(t,e,n){var r=ne(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?re(t,e):ie(t,e),t}function ae(t,e){Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];null==r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)}))}function se(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,a=r[i].value;"boolean"!=typeof t[o]&&-1===n.indexOf(","+o+",")||(a=null!==a),e[o]=a}return e}function ue(t,e){return t.getAttribute(e)}function ce(t,e,n){t.setAttribute(e,n)}function le(t,e){t.removeAttribute(e)}function fe(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function he(){a.a.onselectstart=function(){return!0}}function pe(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n.height||(n.height=parseFloat(Gt(t,"height"))),n.width||(n.width=parseFloat(Gt(t,"width"))),n}}function de(t){if(!t||t&&!t.offsetParent)return{left:0,top:0,width:0,height:0};var e=t.offsetWidth,n=t.offsetHeight,r=0,i=0;do{r+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent}while(t);return{left:r,top:i,width:e,height:n}}function ye(t,e){var n={},r=de(e.target),i=de(t),o=i.width,a=i.height,s=e.offsetY-(i.top-r.top),u=e.offsetX-(i.left-r.left);return e.changedTouches&&(u=e.changedTouches[0].pageX-i.left,s=e.changedTouches[0].pageY+i.top),n.y=1-Math.max(0,Math.min(1,s/a)),n.x=Math.max(0,Math.min(1,u/o)),n}function me(t){return Wt(t)&&3===t.nodeType}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function ge(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),Qt(t)||me(t)?t:"string"==typeof t&&/\S/.test(t)?a.a.createTextNode(t):void 0})).filter((function(t){return t}))}function be(t,e){return ge(e).forEach((function(e){return t.appendChild(e)})),t}function _e(t,e){return be(ve(t),e)}function we(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||("mouseup"===t.type&&0===t.button&&0===t.buttons||0===t.button&&1===t.buttons))}var Te,Se=Jt("querySelector"),Ee=Jt("querySelectorAll"),ke=Object.freeze({__proto__:null,isReal:Kt,isEl:Qt,isInFrame:$t,createEl:Zt,textContent:te,prependTo:ee,hasClass:ne,addClass:re,removeClass:ie,toggleClass:oe,setAttributes:ae,getAttributes:se,getAttribute:ue,setAttribute:ce,removeAttribute:le,blockTextSelection:fe,unblockTextSelection:he,getBoundingClientRect:pe,findPosition:de,getPointerPosition:ye,isTextNode:me,emptyEl:ve,normalizeContent:ge,appendContent:be,insertContent:_e,isSingleLeftClick:we,$:Se,$$:Ee}),Oe=!1,Ce=function(){if(Kt()&&!1!==Te.options.autoSetup){var t=Array.prototype.slice.call(a.a.getElementsByTagName("video")),e=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(!s||!s.getAttribute){Pe(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Te(s)}else Oe||Pe(1)}};function Pe(t,e){e&&(Te=e),i.a.setTimeout(Ce,t)}function xe(){Oe=!0,i.a.removeEventListener("load",xe)}Kt()&&("complete"===a.a.readyState?xe():i.a.addEventListener("load",xe));var Le,Ae=function(t){var e=a.a.createElement("style");return e.className=t,e},Ie=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},je=3;function Re(){return je++}i.a.WeakMap||(Le=function(){function t(){this.vdata="vdata"+Math.floor(i.a.performance&&i.a.performance.now()||Date.now()),this.data={}}var e=t.prototype;return e.set=function(t,e){var n=t[this.vdata]||Re();return t[this.vdata]||(t[this.vdata]=n),this.data[n]=e,this},e.get=function(t){var e=t[this.vdata];if(e)return this.data[e];Bt("We have no data for this element",t)},e.has=function(t){return t[this.vdata]in this.data},e.delete=function(t){var e=t[this.vdata];e&&(delete this.data[e],delete t[this.vdata])},t}());var De,Me=i.a.WeakMap?new WeakMap:new Le;function Ne(t,e){if(Me.has(t)){var n=Me.get(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Me.delete(t)}}function Be(t,e,n,r){n.forEach((function(n){t(e,n,r)}))}function Ue(t){if(t.fixed_)return t;function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||i.a.event;for(var o in t={},r)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&r.preventDefault||(t[o]=r[o]));if(t.target||(t.target=t.srcElement||a.a),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var s=a.a.documentElement,u=a.a.body;t.pageX=t.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t.fixed_=!0,t}var Fe=["touchstart","touchmove"];function Ve(t,e,n){if(Array.isArray(e))return Be(Ve,t,e,n);Me.has(t)||Me.set(t,{});var r=Me.get(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=Re()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=Ue(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!e.isImmediatePropagationStopped();a++)try{o[a].call(t,e,n)}catch(t){Bt.error(t)}}}),1===r.handlers[e].length)if(t.addEventListener){var o=!1;(function(){if("boolean"!=typeof De){De=!1;try{var t=Object.defineProperty({},"passive",{get:function(){De=!0}});i.a.addEventListener("test",null,t),i.a.removeEventListener("test",null,t)}catch(t){}}return De})()&&Fe.indexOf(e)>-1&&(o={passive:!0}),t.addEventListener(e,r.dispatcher,o)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function He(t,e,n){if(Me.has(t)){var r=Me.get(t);if(r.handlers){if(Array.isArray(e))return Be(He,t,e,n);var i=function(t,e){r.handlers[e]=[],Ne(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);Ne(t,e)}else i(t,e)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(t,s)}}}function qe(t,e,n){var r=Me.has(t)?Me.get(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=Ue(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)qe.call(null,i,e,n);else if(!i&&!e.defaultPrevented&&e.target&&e.target[e.type]){Me.has(e.target)||Me.set(e.target,{});var o=Me.get(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function We(t,e,n){if(Array.isArray(e))return Be(We,t,e,n);var r=function r(){He(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Re(),Ve(t,e,r)}function ze(t,e,n){var r=function r(){He(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Re(),Ve(t,e,r)}var Ge,Ye=Object.freeze({__proto__:null,fixEvent:Ue,on:Ve,off:He,trigger:qe,one:We,any:ze}),Xe=function(t,e,n){e.guid||(e.guid=Re());var r=e.bind(t);return r.guid=n?n+"_"+e.guid:e.guid,r},Ke=function(t,e){var n=i.a.performance.now();return function(){var r=i.a.performance.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},Qe=function(){};Qe.prototype.allowedEvents_={},Qe.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Ve(this,t,e),this.addEventListener=n},Qe.prototype.addEventListener=Qe.prototype.on,Qe.prototype.off=function(t,e){He(this,t,e)},Qe.prototype.removeEventListener=Qe.prototype.off,Qe.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},We(this,t,e),this.addEventListener=n},Qe.prototype.any=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},ze(this,t,e),this.addEventListener=n},Qe.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=Ue(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),qe(this,t)},Qe.prototype.dispatchEvent=Qe.prototype.trigger,Qe.prototype.queueTrigger=function(t){var e=this;Ge||(Ge=new Map);var n=t.type||t,r=Ge.get(this);r||(r=new Map,Ge.set(this,r));var o=r.get(n);r.delete(n),i.a.clearTimeout(o);var a=i.a.setTimeout((function(){0===r.size&&(r=null,Ge.delete(e)),e.trigger(t)}),0);r.set(n,a)};var $e=function(t){return t instanceof Qe||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"==typeof t[e]}))},Je=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Ze=function(t){if(!t.nodeName&&!$e(t))throw new Error("Invalid target; must be a DOM node or evented object.")},tn=function(t){if(!Je(t))throw new Error("Invalid event type; must be a non-empty string or array.")},en=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},nn=function(t,e){var n,r,i,o=e.length<3||e[0]===t||e[0]===t.eventBusEl_;return o?(n=t.eventBusEl_,e.length>=3&&e.shift(),r=e[0],i=e[1]):(n=e[0],r=e[1],i=e[2]),Ze(n),tn(r),en(i),{isTargetingSelf:o,target:n,type:r,listener:i=Xe(t,i)}},rn=function(t,e,n,r){Ze(t),t.nodeName?Ye[e](t,n,r):t[e](n,r)},on={on:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=nn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(rn(a,"on",s,u),!o){var c=function(){return t.off(a,s,u)};c.guid=u.guid;var l=function(){return t.off("dispose",c)};l.guid=u.guid,rn(this,"on","dispose",c),rn(a,"on","dispose",l)}},one:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=nn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)rn(a,"one",s,u);else{var c=function e(){t.off(a,s,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,rn(a,"one",s,c)}},any:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=nn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)rn(a,"any",s,u);else{var c=function e(){t.off(a,s,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,rn(a,"any",s,c)}},off:function(t,e,n){if(!t||Je(t))He(this.eventBusEl_,t,e);else{var r=t,i=e;Ze(r),tn(i),en(n),n=Xe(this,n),this.off("dispose",n),r.nodeName?(He(r,i,n),He(r,"dispose",n)):$e(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return qe(this.eventBusEl_,t,e)}};function an(t,e){void 0===e&&(e={});var n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=Zt("span",{className:"vjs-event-bus"});return qt(t,on),t.eventedCallbacks&&t.eventedCallbacks.forEach((function(t){t()})),t.on("dispose",(function(){t.off(),i.a.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var sn={state:{},setState:function(t){var e,n=this;return"function"==typeof t&&(t=t()),Ht(t,(function(t,r){n.state[r]!==t&&((e=e||{})[r]={from:n.state[r],to:t}),n.state[r]=t})),e&&$e(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function un(t,e){return qt(t,sn),t.state=qt({},t.state,e),"function"==typeof t.handleStateChanged&&$e(t)&&t.on("statechanged",t.handleStateChanged),t}var cn=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toLowerCase()}))},ln=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))};function fn(){for(var t={},e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){e&&Ht(e,(function(e,n){zt(e)?(zt(t[n])||(t[n]={}),t[n]=fn(t[n],e)):t[n]=e}))})),t}var hn=function(){function t(){this.map_={}}var e=t.prototype;return e.has=function(t){return t in this.map_},e.delete=function(t){var e=this.has(t);return delete this.map_[t],e},e.set=function(t,e){return this.map_[t]=e,this},e.forEach=function(t,e){for(var n in this.map_)t.call(e,this.map_[n],n,this)},t}(),pn=i.a.Map?i.a.Map:hn,dn=function(){function t(){this.set_={}}var e=t.prototype;return e.has=function(t){return t in this.set_},e.delete=function(t){var e=this.has(t);return delete this.set_[t],e},e.add=function(t){return this.set_[t]=1,this},e.forEach=function(t,e){for(var n in this.set_)t.call(e,n,n,this)},t}(),yn=i.a.Set?i.a.Set:dn,mn=function(){function t(t,e,n){if(!t&&this.play?this.player_=t=this:this.player_=t,this.isDisposed_=!1,this.parentComponent_=null,this.options_=fn({},this.options_),e=this.options_=fn(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var r=t&&t.id&&t.id()||"no_player";this.id_=r+"_component_"+Re()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&(an(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),un(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new yn,this.setIntervalIds_=new yn,this.rafIds_=new yn,this.namedRafs_=new pn,this.clearingTimersOnDispose_=!1,!1!==e.initChildren&&this.initChildren(),this.ready(n),!1!==e.reportTouchActivity&&this.enableTouchActivity()}var e=t.prototype;return e.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 t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Me.has(this.el_)&&Me.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(t){return t?(this.options_=fn(this.options_,t),this.options_):this.options_},e.el=function(){return this.el_},e.createEl=function(t,e,n){return Zt(t,e,n)},e.localize=function(t,e,n){void 0===n&&(n=t);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[t]?u=o[t]:s&&s[t]&&(u=s[t]),e&&(u=u.replace(/\{(\d+)\}/g,(function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i}))),u},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(t){return this.childIndex_[t]},e.getChild=function(t){if(t)return this.childNameIndex_[t]},e.getDescendant=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e=e.reduce((function(t,e){return t.concat(e)}),[]);for(var r=this,i=0;i<e.length;i++)if(!(r=r.getChild(e[i]))||!r.getChild)return;return r},e.addChild=function(e,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof e){o=ln(e);var a=n.componentClass||o;n.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=e;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&ln(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[cn(o)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Qt(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},e.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){t.parentComponent_=null,this.childIndex_[t.id()]=null,this.childNameIndex_[ln(t.name())]=null,this.childNameIndex_[cn(t.name())]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},e.initChildren=function(){var e=this,n=this.options_.children;if(n){var r,i=this.options_,o=t.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(t){return!r.some((function(e){return"string"==typeof e?t===e:t===e.name}))}))).map((function(t){var r,i;return"string"==typeof t?i=n[r=t]||e.options_[r]||{}:(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||ln(e.name));return n&&!o.isTech(n)})).forEach((function(t){var n=t.name,r=t.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var o=e.addChild(n,r);o&&(e[n]=o)}}))}},e.buildCSSClass=function(){return""},e.ready=function(t,e){if(void 0===e&&(e=!1),t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},e.$=function(t,e){return Se(t,e||this.contentEl())},e.$$=function(t,e){return Ee(t,e||this.contentEl())},e.hasClass=function(t){return ne(this.el_,t)},e.addClass=function(t){re(this.el_,t)},e.removeClass=function(t){ie(this.el_,t)},e.toggleClass=function(t,e){oe(this.el_,t,e)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(t){return ue(this.el_,t)},e.setAttribute=function(t,e){ce(this.el_,t,e)},e.removeAttribute=function(t){le(this.el_,t)},e.width=function(t,e){return this.dimension("width",t,e)},e.height=function(t,e){return this.dimension("height",t,e)},e.dimensions=function(t,e){this.width(t,!0),this.height(e)},e.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+ln(t)],10)},e.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if(e=Gt(this.el_,t),0===(e=parseFloat(e))||isNaN(e)){var n="offset"+ln(t);e=this.el_[n]}return e},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(t){this.player_&&(t.stopPropagation(),this.player_.handleKeyDown(t))},e.handleKeyPress=function(t){this.handleKeyDown(t)},e.emitTapEvents=function(){var t,e=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},e=i.a.performance.now(),t=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)t=!1;else if(n){var r=e.touches[0].pageX-n.pageX,i=e.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(t=!1)}}));var r=function(){t=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===t)&&(i.a.performance.now()-e<200&&(r.preventDefault(),this.trigger("tap")))}))},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,e=Xe(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}},e.setTimeout=function(t,e){var n,r=this;return t=Xe(this,t),this.clearTimersOnDispose_(),n=i.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),t()}),e),this.setTimeoutIds_.add(n),n},e.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),i.a.clearTimeout(t)),t},e.setInterval=function(t,e){t=Xe(this,t),this.clearTimersOnDispose_();var n=i.a.setInterval(t,e);return this.setIntervalIds_.add(n),n},e.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),i.a.clearInterval(t)),t},e.requestAnimationFrame=function(t){var e,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=Xe(this,t),e=i.a.requestAnimationFrame((function(){n.rafIds_.has(e)&&n.rafIds_.delete(e),t()})),this.rafIds_.add(e),e):this.setTimeout(t,1e3/60)},e.requestNamedAnimationFrame=function(t,e){var n=this;if(!this.namedRafs_.has(t)){this.clearTimersOnDispose_(),e=Xe(this,e);var r=this.requestAnimationFrame((function(){e(),n.namedRafs_.has(t)&&n.namedRafs_.delete(t)}));return this.namedRafs_.set(t,r),t}},e.cancelNamedAnimationFrame=function(t){this.namedRafs_.has(t)&&(this.cancelAnimationFrame(this.namedRafs_.get(t)),this.namedRafs_.delete(t))},e.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),i.a.cancelAnimationFrame(t)),t):this.clearTimeout(t)},e.clearTimersOnDispose_=function(){var t=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(e){var n=e[0],r=e[1];t[n].forEach((function(e,n){return t[r](n)}))})),t.clearingTimersOnDispose_=!1})))},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r,i=t.getComponent("Tech"),o=i&&i.isTech(n),a=t===n||t.prototype.isPrototypeOf(n.prototype);if(o||!a)throw r=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+r+".");e=ln(e),t.components_||(t.components_={});var s=t.getComponent("Player");if("Player"===e&&s&&s.players){var u=s.players,c=Object.keys(u);if(u&&c.length>0&&c.map((function(t){return u[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[cn(e)]=n,n},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();mn.prototype.supportsRaf_="function"==typeof i.a.requestAnimationFrame&&"function"==typeof i.a.cancelAnimationFrame,mn.registerComponent("Component",mn);var vn,gn=i.a.navigator&&i.a.navigator.userAgent||"",bn=/AppleWebKit\/([\d.]+)/i.exec(gn),_n=bn?parseFloat(bn.pop()):null,wn=/iPod/i.test(gn),Tn=(vn=gn.match(/OS (\d+)_/i))&&vn[1]?vn[1]:null,Sn=/Android/i.test(gn),En=function(){var t=gn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),kn=Sn&&En<5&&_n<537,On=/Firefox/i.test(gn),Cn=/Edg/i.test(gn),Pn=!Cn&&(/Chrome/i.test(gn)||/CriOS/i.test(gn)),xn=function(){var t=gn.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),Ln=function(){var t=/MSIE\s(\d+)\.\d/.exec(gn),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(gn)&&/rv:11.0/.test(gn)&&(e=11),e}(),An=/Safari/i.test(gn)&&!Pn&&!Sn&&!Cn,In=/Windows/i.test(gn),jn=Boolean(Kt()&&("ontouchstart"in i.a||i.a.navigator.maxTouchPoints||i.a.DocumentTouch&&i.a.document instanceof i.a.DocumentTouch)),Rn=/iPad/i.test(gn)||An&&jn&&!/iPhone/i.test(gn),Dn=/iPhone/i.test(gn)&&!Rn,Mn=Dn||Rn||wn,Nn=(An||Mn)&&!Pn,Bn=Object.freeze({__proto__:null,IS_IPOD:wn,IOS_VERSION:Tn,IS_ANDROID:Sn,ANDROID_VERSION:En,IS_NATIVE_ANDROID:kn,IS_FIREFOX:On,IS_EDGE:Cn,IS_CHROME:Pn,CHROME_VERSION:xn,IE_VERSION:Ln,IS_SAFARI:An,IS_WINDOWS:In,TOUCH_ENABLED:jn,IS_IPAD:Rn,IS_IPHONE:Dn,IS_IOS:Mn,IS_ANY_SAFARI:Nn});function Un(t,e,n,r){return function(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}(t,r,n.length-1),n[r][e]}function Fn(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:Un.bind(null,"start",0,t),end:Un.bind(null,"end",1,t)}}function Vn(t,e){return Array.isArray(t)?Fn(t):void 0===t||void 0===e?Fn():Fn([[t,e]])}function Hn(t,e){var n,r,i=0;if(!e)return 0;t&&t.length||(t=Vn(0,0));for(var o=0;o<t.length;o++)n=t.start(o),(r=t.end(o))>e&&(r=e),i+=r-n;return i/e}for(var qn,Wn={prefixed:!0},zn=[["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"]],Gn=zn[0],Yn=0;Yn<zn.length;Yn++)if(zn[Yn][1]in a.a){qn=zn[Yn];break}if(qn){for(var Xn=0;Xn<qn.length;Xn++)Wn[Gn[Xn]]=qn[Xn];Wn.prefixed=qn[0]!==Gn[0]}function Kn(t){if(t instanceof Kn)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Wt(t)&&("number"==typeof t.code&&(this.code=t.code),qt(this,t)),this.message||(this.message=Kn.defaultMessages[this.code]||"")}Kn.prototype.code=0,Kn.prototype.message="",Kn.prototype.status=null,Kn.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Kn.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 Qn=0;Qn<Kn.errorTypes.length;Qn++)Kn[Kn.errorTypes[Qn]]=Qn,Kn.prototype[Kn.errorTypes[Qn]]=Qn;function $n(t){return null!=t&&"function"==typeof t.then}function Jn(t){$n(t)&&t.then(null,(function(t){}))}var Zn=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(e,n,r){return t[n]&&(e[n]=t[n]),e}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},tr=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,(function(t){return t.track}));return Array.prototype.map.call(e,(function(t){var e=Zn(t.track);return t.src&&(e.src=t.src),e})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===n.indexOf(t)})).map(Zn))},er=function(t,e){return t.forEach((function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return n.addCue(t)}))})),e.textTracks()},nr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=Zt("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=Zt("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),te(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.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,t.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+t.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},n.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&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(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),_e(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),ve(this.contentEl()),this.trigger("modalempty")},n.content=function(t){return void 0!==t&&(this.content_=t),this.content_},n.conditionalFocus_=function(){var t=a.a.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(t){if(t.stopPropagation(),m.a.isEventKey(t,"Escape")&&this.closeable())return t.preventDefault(),void this.close();if(m.a.isEventKey(t,"Tab")){for(var e,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){e=i;break}a.a.activeElement===this.el_&&(e=0),t.shiftKey&&0===e?(n[n.length-1].focus(),t.preventDefault()):t.shiftKey||e!==n.length-1||(n[0].focus(),t.preventDefault())}},n.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,(function(t){return(t instanceof i.a.HTMLAnchorElement||t instanceof i.a.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof i.a.HTMLInputElement||t instanceof i.a.HTMLSelectElement||t instanceof i.a.HTMLTextAreaElement||t instanceof i.a.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof i.a.HTMLIFrameElement||t instanceof i.a.HTMLObjectElement||t instanceof i.a.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")}))},e}(mn);nr.prototype.options_={pauseOnOpen:!0,temporary:!0},mn.registerComponent("ModalDialog",nr);var rr=function(t){function e(e){var n;void 0===e&&(e=[]),(n=t.call(this)||this).tracks_=[],Object.defineProperty(l()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<e.length;r++)n.addTrack(e[r]);return n}h()(e,t);var n=e.prototype;return n.addTrack=function(t){var e=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack",target:this})),t.labelchange_=function(){e.trigger({track:t,type:"labelchange",target:e})},$e(t)&&t.addEventListener("labelchange",t.labelchange_)},n.removeTrack=function(t){for(var e,n=0,r=this.length;n<r;n++)if(this[n]===t){(e=this[n]).off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack",target:this})},n.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(Qe);for(var ir in rr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},rr.prototype.allowedEvents_)rr.prototype["on"+ir]=null;var or=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},ar=function(t){function e(e){var n;void 0===e&&(e=[]);for(var r=e.length-1;r>=0;r--)if(e[r].enabled){or(e,e[r]);break}return(n=t.call(this,e)||this).changing_=!1,n}h()(e,t);var n=e.prototype;return n.addTrack=function(e){var n=this;e.enabled&&or(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){n.changing_||(n.changing_=!0,or(n,e),n.changing_=!1,n.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},n.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(rr),sr=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},ur=function(t){function e(e){var n;void 0===e&&(e=[]);for(var r=e.length-1;r>=0;r--)if(e[r].selected){sr(e,e[r]);break}return(n=t.call(this,e)||this).changing_=!1,Object.defineProperty(l()(n),"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n}h()(e,t);var n=e.prototype;return n.addTrack=function(e){var n=this;e.selected&&sr(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){n.changing_||(n.changing_=!0,sr(n,e),n.changing_=!1,n.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},n.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},e}(rr),cr=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.addTrack=function(e){var n=this;t.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e}(rr),lr=function(){function t(t){void 0===t&&(t=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,n=t.length;e<n;e++)this.addTrackElement_(t[e])}var e=t.prototype;return e.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},e.getTrackElementByTrack_=function(t){for(var e,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},e.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_[e].track&&"function"==typeof this.trackElements_[e].track.off&&this.trackElements_[e].track.off(),"function"==typeof this.trackElements_[e].off&&this.trackElements_[e].off(),this.trackElements_.splice(e,1);break}},t}(),fr=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},e.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),hr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},pr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},dr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},yr={disabled:"disabled",hidden:"hidden",showing:"showing"},mr=function(t){function e(e){var n;void 0===e&&(e={}),n=t.call(this)||this;var r={id:e.id||"vjs_track_"+Re(),kind:e.kind||"",language:e.language||""},i=e.label||"",o=function(t){Object.defineProperty(l()(n),t,{get:function(){return r[t]},set:function(){}})};for(var a in r)o(a);return Object.defineProperty(l()(n),"label",{get:function(){return i},set:function(t){t!==i&&(i=t,this.trigger("labelchange"))}}),n}return h()(e,t),e}(Qe),vr=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=a.a.createElement("a");n.href=t;var r,o=""===n.host&&"file:"!==n.protocol;o&&((r=a.a.createElement("div")).innerHTML='<a href="'+t+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),a.a.body.appendChild(r));for(var s={},u=0;u<e.length;u++)s[e[u]]=n[e[u]];return"http:"===s.protocol&&(s.host=s.host.replace(/:80$/,"")),"https:"===s.protocol&&(s.host=s.host.replace(/:443$/,"")),s.protocol||(s.protocol=i.a.location.protocol),o&&a.a.body.removeChild(r),s},gr=function(t){if(!t.match(/^https?:\/\//)){var e=a.a.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},br=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(t);if(e)return e.pop().toLowerCase()}return""},_r=function(t,e){void 0===e&&(e=i.a.location);var n=vr(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},wr=Object.freeze({__proto__:null,parseUrl:vr,getAbsoluteURL:gr,getFileExtension:br,isCrossOrigin:_r}),Tr=function(t,e){var n=new i.a.WebVTT.Parser(i.a,i.a.vttjs,i.a.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(i.a.console&&i.a.console.groupCollapsed&&i.a.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach((function(t){return Bt.error(t)})),i.a.console&&i.a.console.groupEnd&&i.a.console.groupEnd()),n.flush()},Sr=function(t,e){var n={uri:t},r=_r(t);r&&(n.cors=r);var o="use-credentials"===e.tech_.crossOrigin();o&&(n.withCredentials=o),g()(n,Xe(this,(function(t,n,r){if(t)return Bt.error(t,n);e.loaded_=!0,"function"!=typeof i.a.WebVTT?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],(function(t){if("vttjserror"!==t.type)return Tr(r,e);Bt.error("vttjs failed to load, stopping trying to process "+e.src)})):Tr(r,e)})))},Er=function(t){function e(e){var n;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var r=fn(e,{kind:dr[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=yr[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=t.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new fr(n.cues_),s=new fr(n.activeCues_),u=!1,c=Xe(l()(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",c)}),!0),Object.defineProperties(l()(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(t){var e=this;yr[t]&&(i=t,this.preload_||"disabled"===i||0!==this.cues.length||Sr(this.src,this),"disabled"!==i?this.tech_.ready((function(){e.tech_.on("timeupdate",c)}),!0):this.tech_.off("timeupdate",c),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 s;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=t&&i.endTime>=t||i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t)&&e.push(i)}if(u=!1,e.length!==this.activeCues_.length)u=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(u=!0);return this.activeCues_=e,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||o||"subtitles"!==r.kind&&"captions"!==r.kind)&&Sr(n.src,l()(n))):n.loaded_=!0,n}h()(e,t);var n=e.prototype;return n.addCue=function(t){var e=t;if(i.a.vttjs&&!(t instanceof i.a.vttjs.VTTCue)){for(var n in e=new i.a.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),o=0;o<r.length;o++)r[o]!==this&&r[o].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},n.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(mr);Er.prototype.allowedEvents_={cuechange:"cuechange"};var kr=function(t){function e(e){var n;void 0===e&&(e={});var r=fn(e,{kind:pr[e.kind]||""});n=t.call(this,r)||this;var i=!1;return Object.defineProperty(l()(n),"enabled",{get:function(){return i},set:function(t){"boolean"==typeof t&&t!==i&&(i=t,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return h()(e,t),e}(mr),Or=function(t){function e(e){var n;void 0===e&&(e={});var r=fn(e,{kind:hr[e.kind]||""});n=t.call(this,r)||this;var i=!1;return Object.defineProperty(l()(n),"selected",{get:function(){return i},set:function(t){"boolean"==typeof t&&t!==i&&(i=t,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return h()(e,t),e}(mr),Cr=function(t){function e(e){var n,r;void 0===e&&(e={}),n=t.call(this)||this;var i=new Er(e);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(l()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:l()(n)})})),n}return h()(e,t),e}(Qe);Cr.prototype.allowedEvents_={load:"load"},Cr.NONE=0,Cr.LOADING=1,Cr.LOADED=2,Cr.ERROR=3;var Pr={audio:{ListClass:ar,TrackClass:kr,capitalName:"Audio"},video:{ListClass:ur,TrackClass:Or,capitalName:"Video"},text:{ListClass:cr,TrackClass:Er,capitalName:"Text"}};Object.keys(Pr).forEach((function(t){Pr[t].getterName=t+"Tracks",Pr[t].privateName=t+"Tracks_"}));var xr={remoteText:{ListClass:cr,TrackClass:Er,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:lr,TrackClass:Cr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Lr=u()({},Pr,xr);xr.names=Object.keys(xr),Pr.names=Object.keys(Pr),Lr.names=[].concat(xr.names).concat(Pr.names);var Ar=function(t){function e(e,n){var r;return void 0===e&&(e={}),void 0===n&&(n=function(){}),e.reportTouchActivity=!1,(r=t.call(this,null,e,n)||this).hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Lr.names.forEach((function(t){var n=Lr[t];e&&e[n.getterName]&&(r[n.privateName]=e[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===e["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==e.preloadTextTracks,r.autoRemoteTextTracks_=new Lr.text.ListClass,r.initTrackListeners(),e.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}h()(e,t);var n=e.prototype;return n.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,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(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xe(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(t){this.duration_=this.duration()},n.buffered=function(){return Vn(0,0)},n.bufferedPercent=function(){return Hn(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(Pr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},n.clearTracks=function(t){var e=this;(t=[].concat(t)).forEach((function(t){for(var n=e[t+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(t){return void 0!==t&&(this.error_=new Kn(t),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Vn(0,0):Vn()},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 t=this;Pr.names.forEach((function(e){var n=Pr[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var t=this;if(!i.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&zt(_.a)&&Object.keys(_.a).length>0)return void this.trigger("vttjsloaded");var e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),i.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},a=function(){o();for(var t=0;t<e.length;t++){var n=e[t];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",o)}}))},n.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,n,r,i){void 0===i&&(i={});var o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var a=new Lr.text.TrackClass(i);return o.addTrack(a),a}(this,t,e,n)},n.createRemoteTextTrack=function(t){var e=fn(t,{tech:this});return new xr.remoteTextEl.TrackClass(e)},n.addRemoteTextTrack=function(t,e){var n=this;void 0===t&&(t={});var r=this.createRemoteTextTrack(t);return!0!==e&&!1!==e&&(Bt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),e=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==e&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var t=this.options_.Promise||i.a.Promise;if(t)return t.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=ln(t),e.techs_[t]=n,e.techs_[cn(t)]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return e.techs_&&e.techs_[t]?e.techs_[t]:(t=ln(t),i.a&&i.a.videojs&&i.a.videojs[t]?(Bt.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.a.videojs[t]):void 0)},e}(mn);Lr.names.forEach((function(t){var e=Lr[t];Ar.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),Ar.prototype.featuresVolumeControl=!0,Ar.prototype.featuresMuteControl=!0,Ar.prototype.featuresFullscreenResize=!1,Ar.prototype.featuresPlaybackRate=!1,Ar.prototype.featuresProgressEvents=!1,Ar.prototype.featuresSourceset=!1,Ar.prototype.featuresTimeupdateEvents=!1,Ar.prototype.featuresNativeTextTracks=!1,Ar.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n,r=t.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(e))return n;return""},t.selectSourceHandler=function(e,n){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(e,n))return r[i];return null},t.canPlaySource=function(e,n){var r=t.selectSourceHandler(e,n);return r?r.canHandleSource(e,n):""};["seekable","seeking","duration"].forEach((function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(e){var n=t.selectSourceHandler(e,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:Bt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=n.handleSource(e,this,this.options_),this.one("dispose",this.disposeSourceHandler)},t.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)}},mn.registerComponent("Tech",Ar),Ar.registerTech("Tech",Ar),Ar.defaultTechOrder_=[];var Ir={},jr={},Rr={};function Dr(t,e,n){t.setTimeout((function(){return function t(e,n,r,i,o,a){void 0===e&&(e={});void 0===n&&(n=[]);void 0===o&&(o=[]);void 0===a&&(a=!1);var s=n,u=s[0],c=s.slice(1);if("string"==typeof u)t(e,Ir[u],r,i,o,a);else if(u){var l=function(t,e){var n=jr[t.id()],r=null;if(null==n)return r=e(t),jr[t.id()]=[[e,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===e&&(r=s)}null===r&&(r=e(t),n.push([e,r]));return r}(i,u);if(!l.setSource)return o.push(l),t(e,c,r,i,o,a);l.setSource(qt({},e),(function(n,s){if(n)return t(e,c,r,i,o,a);o.push(l),t(s,e.type===s.type?c:Ir[s.type],r,i,o,a)}))}else c.length?t(e,c,r,i,o,a):a?r(e,o):t(e,Ir["*"],r,i,o,!0)}(e,Ir[e.type],n,t)}),1)}function Mr(t,e,n,r){void 0===r&&(r=null);var i="call"+ln(n),o=t.reduce(Fr(i),r),a=o===Rr,s=a?null:e[n](o);return function(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}(t,n,s,a),s}var Nr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Br={setCurrentTime:1,setMuted:1,setVolume:1},Ur={play:1,pause:1};function Fr(t){return function(e,n){return e===Rr?Rr:n[t]?n[t](e):e}}var Vr={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",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Hr=function(t){void 0===t&&(t="");var e=br(t);return Vr[e.toLowerCase()]||""};function qr(t){if(!t.type){var e=Hr(t.src);e&&(t.type=e)}return t}var Wr=function(t){function e(e,n,r){var i,o=fn({createEl:!1},n);if(i=t.call(this,e,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)e.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=ln(s[a]),c=Ar.getTech(u);if(u||(c=mn.getComponent(u)),c&&c.isSupported()){e.loadTech_(u);break}}return i}return h()(e,t),e}(mn);mn.registerComponent("MediaLoader",Wr);var zr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).emitTapEvents(),r.enable(),r}h()(e,t);var n=e.prototype;return n.createEl=function(e,n,r){void 0===e&&(e="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=qt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&Bt.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=qt({role:"button"},r),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},n.createControlTextEl=function(t){return this.controlTextEl_=Zt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},n.controlText=function(t,e){if(void 0===e&&(e=this.el()),void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,te(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+t.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(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(e){m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):t.prototype.handleKeyDown.call(this,e)},e}(mn);mn.registerComponent("ClickableComponent",zr);var Gr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update(),e.on("posterchange",Xe(l()(r),r.update)),r}h()(e,t);var n=e.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},n.createEl=function(){return Zt("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},n.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},n.handleClick=function(t){if(this.player_.controls()){var e=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(Ln||Cn)&&e||this.player_.tech(!0).focus(),this.player_.paused()?Jn(this.player_.play()):this.player_.pause()}},e}(zr);mn.registerComponent("PosterImage",Gr);var Yr={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 Xr(t,e){var n;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Kr(t,e,n){try{t.style[e]=n}catch(t){return}}var Qr=function(t){function e(e,n,r){var o;o=t.call(this,e,n,r)||this;var a=Xe(l()(o),o.updateDisplay);return e.on("loadstart",Xe(l()(o),o.toggleDisplay)),e.on("texttrackchange",a),e.on("loadedmetadata",Xe(l()(o),o.preselectTrack)),e.ready(Xe(l()(o),(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)this.hide();else{e.on("fullscreenchange",a),e.on("playerresize",a),i.a.addEventListener("orientationchange",a),e.on("dispose",(function(){return i.a.removeEventListener("orientationchange",a)}));for(var t=this.options_.playerOptions.tracks||[],n=0;n<t.length;n++)this.player_.addRemoteTextTrack(t[n],!0);this.preselectTrack()}}))),o}h()(e,t);var n=e.prototype;return n.preselectTrack=function(){for(var t,e,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.enabled?(n=null,t=null,e=null):s.default&&("descriptions"!==s.kind||t?s.kind in r&&!e&&(e=s):t=s)}n?n.mode="showing":e?e.mode="showing":t&&(t.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof i.a.WebVTT&&i.a.WebVTT.processCues(i.a,[],this.el_)},n.updateDisplay=function(){var t=this.player_.textTracks(),e=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),e){for(var n=[],r=0;r<t.length;++r){var i=t[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,a=null,s=t.length;s--;){var u=t[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},n.updateDisplayState=function(t){for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var o=n[r];if(o){var a=o.displayState;if(e.color&&(a.firstChild.style.color=e.color),e.textOpacity&&Kr(a.firstChild,"color",Xr(e.color||"#fff",e.textOpacity)),e.backgroundColor&&(a.firstChild.style.backgroundColor=e.backgroundColor),e.backgroundOpacity&&Kr(a.firstChild,"backgroundColor",Xr(e.backgroundColor||"#000",e.backgroundOpacity)),e.windowColor&&(e.windowOpacity?Kr(a,"backgroundColor",Xr(e.windowColor,e.windowOpacity)):a.style.backgroundColor=e.windowColor),e.edgeStyle&&("dropshadow"===e.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===e.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===e.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===e.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),e.fontPercent&&1!==e.fontPercent){var s=i.a.parseFloat(a.style.fontSize);a.style.fontSize=s*e.fontPercent+"px",a.style.height="auto",a.style.top="auto"}e.fontFamily&&"default"!==e.fontFamily&&("small-caps"===e.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Yr[e.fontFamily])}}},n.updateForTrack=function(t){if(Array.isArray(t)||(t=[t]),"function"==typeof i.a.WebVTT&&!t.every((function(t){return!t.activeCues}))){for(var e=[],n=0;n<t.length;++n)for(var r=t[n],o=0;o<r.activeCues.length;++o)e.push(r.activeCues[o]);i.a.WebVTT.processCues(i.a,e,this.el_);for(var a=0;a<t.length;++a){for(var s=t[a],u=0;u<s.activeCues.length;++u){var c=s.activeCues[u].displayState;re(c,"vjs-text-track-cue"),re(c,"vjs-text-track-cue-"+(s.language?s.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},e}(mn);mn.registerComponent("TextTrackDisplay",Qr);var $r=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),n=this.localize(e?"Audio Player":"Video Player"),r=Zt("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},e}(mn);mn.registerComponent("LoadingSpinner",$r);var Jr=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.createEl=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={}),e=qt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=qt({type:"button"},n);var r=mn.prototype.createEl.call(this,"button",e,n);return this.createControlTextEl(r),r},n.addChild=function(t,e){void 0===e&&(e={});var n=this.constructor.name;return Bt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),mn.prototype.addChild.call(this,t,e)},n.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(e){m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(zr);mn.registerComponent("Button",Jr);var Zr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Jn(e),void(!this.player_.tech(!0)||(Ln||Cn)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var o=function(){return i.focus()};$n(e)?e.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(e){this.mouseused_=!1,t.prototype.handleKeyDown.call(this,e)},n.handleMouseDown=function(t){this.mouseused_=!0},e}(Jr);Zr.prototype.controlText_="Play Video",mn.registerComponent("BigPlayButton",Zr);var ti=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(e){m.a.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):t.prototype.handleKeyDown.call(this,e)},e}(Jr);mn.registerComponent("CloseButton",ti);var ei=function(t){function e(e,n){var r;return void 0===n&&(n={}),r=t.call(this,e,n)||this,n.replay=void 0===n.replay||n.replay,r.on(e,"play",r.handlePlay),r.on(e,"pause",r.handlePause),n.replay&&r.on(e,"ended",r.handleEnded),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},n.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Jr);ei.prototype.controlText_="Play",mn.registerComponent("PlayToggle",ei);var ni=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},ri=ni;function ii(t,e){return void 0===e&&(e=t),ri(t,e)}var oi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,["timeupdate","ended"],r.updateContent),r.updateTextNode_(),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=Zt("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},n.updateTextNode_=function(t){var e=this;void 0===t&&(t=0),t=ii(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(e.contentEl_){var t=e.textNode_;t&&!e.contentEl_.contains(t)&&(t=null,Bt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),e.textNode_=a.a.createTextNode(e.formattedTime_),e.textNode_&&(t?e.contentEl_.replaceChild(e.textNode_,t):e.contentEl_.appendChild(e.textNode_))}})))},n.updateContent=function(t){},e}(mn);oi.prototype.labelText_="Time",oi.prototype.controlText_="Time",mn.registerComponent("TimeDisplay",oi);var ai=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(t){var e;e=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(e)},e}(oi);ai.prototype.labelText_="Current Time",ai.prototype.controlText_="Current Time",mn.registerComponent("CurrentTimeDisplay",ai);var si=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"durationchange",r.updateContent),r.on(e,"loadstart",r.updateContent),r.on(e,"loadedmetadata",r.updateContent),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(t){var e=this.player_.duration();this.updateTextNode_(e)},e}(oi);si.prototype.labelText_="Duration",si.prototype.controlText_="Duration",mn.registerComponent("DurationDisplay",si);var ui=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},e}(mn);mn.registerComponent("TimeDivider",ui);var ci=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"durationchange",r.updateContent),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var e=t.prototype.createEl.call(this);return e.insertBefore(Zt("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},n.updateContent=function(t){var e;"number"==typeof this.player_.duration()&&(e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e))},e}(oi);ci.prototype.labelText_="Remaining Time",ci.prototype.controlText_="Remaining Time",mn.registerComponent("RemainingTimeDisplay",ci);var li=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Zt("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},n.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},n.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(mn);mn.registerComponent("LiveDisplay",li);var fi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Zt("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},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.updateLiveEdgeStatus),this.textEl_=null,t.prototype.dispose.call(this)},e}(Jr);fi.prototype.controlText_="Seek to live, currently playing live",mn.registerComponent("SeekToLive",fi);var hi=function(t,e,n){return t=Number(t),Math.min(n,Math.max(e,isNaN(t)?e:t))},pi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}h()(e,t);var n=e.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 t=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(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"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(e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=qt({tabIndex:0},n),r=qt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,e,n,r)},n.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||Pn||t.preventDefault(),fe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},n.handleMouseMove=function(t){},n.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;he(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},n.update=function(){var t=this;if(this.el_&&this.bar){var e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(function(){var n=t.vertical()?"height":"width";t.bar.el().style[n]=(100*e).toFixed(2)+"%"}))),e}},n.getProgress=function(){return Number(hi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(t){var e=ye(this.el_,t);return this.vertical()?e.y:e.x},n.handleKeyDown=function(e){m.a.isEventKey(e,"Left")||m.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):m.a.isEventKey(e,"Right")||m.a.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):t.prototype.handleKeyDown.call(this,e)},n.handleClick=function(t){t.stopPropagation(),t.preventDefault()},n.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(mn);mn.registerComponent("Slider",pi);var di=function(t,e){return hi(t/e*100,0,100).toFixed(2)+"%"},yi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).partEls_=[],r.on(e,"progress",r.update),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Zt("span",{className:"vjs-control-text"}),r=Zt("span",{textContent:this.localize("Loaded")}),i=a.a.createTextNode(": ");return this.percentageEl_=Zt("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),e},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,t.prototype.dispose.call(this)},n.update=function(t){var e=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var t=e.player_.liveTracker,n=e.player_.buffered(),r=t&&t.isLive()?t.seekableEnd():e.player_.duration(),i=e.player_.bufferedEnd(),o=e.partEls_,a=di(i,r);e.percent_!==a&&(e.el_.style.width=a,te(e.percentageEl_,a),e.percent_=a);for(var s=0;s<n.length;s++){var u=n.start(s),c=n.end(s),l=o[s];l||(l=e.el_.appendChild(Zt()),o[s]=l),l.dataset.start===u&&l.dataset.end===c||(l.dataset.start=u,l.dataset.end=c,l.style.left=di(u,i),l.style.width=di(c-u,i))}for(var f=o.length;f>n.length;f--)e.el_.removeChild(o[f-1]);o.length=n.length}))},e}(mn);mn.registerComponent("LoadProgressBar",yi);var mi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update=Ke(Xe(l()(r),r.update),30),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(t,e,n){var r=de(this.el_),i=pe(this.player_.el()),o=t.width*e;if(i&&r){var a=t.left-i.left+o,s=t.width-o+(i.right-t.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(t){te(this.el_,t)},n.updateTime=function(t,e,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-e*s;o=(u<1?"":"-")+ii(u,s)}else o=ii(n,a);i.update(t,e,o),r&&r()}))},e}(mn);mn.registerComponent("TimeTooltip",mi);var vi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update=Ke(Xe(l()(r),r.update),30),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(t,e){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(t,e,r)}},e}(mn);vi.prototype.options_={children:[]},Mn||Sn||vi.prototype.options_.children.push("timeTooltip"),mn.registerComponent("PlayProgressBar",vi);var gi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update=Ke(Xe(l()(r),r.update),30),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(t,e){var n=this,r=e*this.player_.duration();this.getChild("timeTooltip").updateTime(t,e,r,(function(){n.el_.style.left=t.width*e+"px"}))},e}(mn);gi.prototype.options_={children:["timeTooltip"]},mn.registerComponent("MouseTimeDisplay",gi);var bi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).setEventHandlers_(),r}h()(e,t);var n=e.prototype;return n.setEventHandlers_=function(){this.update_=Xe(this,this.update),this.update=Ke(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(t){a.a.hidden?this.disableInterval_(t):(this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&"ended"!==t.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(e){var n=this,r=t.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var t=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),e=n.player_.liveTracker,i=n.player_.duration();e&&e.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===t&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ii(t,i),ii(i,i)],"{1} of {2}")),n.currentTime_=t,n.duration_=i),n.bar&&n.bar.update(pe(n.el()),n.getProgress())})),r},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var t,e=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(t=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t},n.handleMouseDown=function(e){we(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},n.handleMouseMove=function(t){if(we(t)){var e,n=this.calculateDistance(t),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),o=r.liveCurrentTime();if((e=i+n*r.liveWindow())>=o&&(e=o),e<=i&&(e=i+.1),e===1/0)return}else(e=n*this.player_.duration())===this.player_.duration()&&(e-=.1);this.player_.currentTime(e)}},n.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},n.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},n.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Jn(this.player_.play()):this.update_()},n.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},n.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},n.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(e){if(m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(m.a.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(m.a.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(m()(e))){e.preventDefault(),e.stopPropagation();var n=10*(m.a.codes[m()(e)]-m.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else m.a.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):m.a.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):t.prototype.handleKeyDown.call(this,e)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),t.prototype.dispose.call(this)},e}(pi);bi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Mn||Sn||bi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),mn.registerComponent("SeekBar",bi);var _i=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).handleMouseMove=Ke(Xe(l()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Ke(Xe(l()(r),r.handleMouseSeek),30),r.enable(),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("playProgressBar"),r=e.getChild("mouseTimeDisplay");if(n||r){var i=e.el(),o=de(i),a=ye(i,t).x;a=hi(a,0,1),r&&r.update(o,a),n&&n.update(o,e.getProgress())}}},n.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(t){return t.disable&&t.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(t){return t.enable&&t.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},n.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(mn);_i.prototype.options_={children:["seekBar"]},mn.registerComponent("ProgressControl",_i);var wi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,["enterpictureinpicture","leavepictureinpicture"],r.handlePictureInPictureChange),r.on(e,["disablepictureinpicturechanged","loadedmetadata"],r.handlePictureInPictureEnabledChange),r.disable(),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+t.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(t){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(Jr);wi.prototype.controlText_="Picture-in-Picture",mn.registerComponent("PictureInPictureToggle",wi);var Ti=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"fullscreenchange",r.handleFullscreenChange),!1===a.a[e.fsApi_.fullscreenEnabled]&&r.disable(),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Jr);Ti.prototype.controlText_="Fullscreen",mn.registerComponent("FullscreenToggle",Ti);var Si=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(mn);mn.registerComponent("VolumeLevel",Si);var Ei=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on("slideractive",r.updateLastVolume_),r.on(e,"volumechange",r.updateARIAAttributes),e.ready((function(){return r.updateARIAAttributes()})),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(e){we(e)&&t.prototype.handleMouseDown.call(this,e)},n.handleMouseMove=function(t){we(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},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(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(pi);Ei.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Ei.prototype.playerEvent="volumechange",mn.registerComponent("VolumeBar",Ei);var ki=function(t){function e(e,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||zt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=t.call(this,e,n)||this,function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(l()(r),e),r.throttledHandleMouseMove=Ke(Xe(l()(r),r.handleMouseMove),30),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},n.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},n.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},n.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(mn);ki.prototype.options_={children:["volumeBar"]},mn.registerComponent("VolumeControl",ki);var Oi=function(t){function e(e,n){var r;return r=t.call(this,e,n)||this,function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(l()(r),e),r.on(e,["loadstart","volumechange"],r.update),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(t){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var t=this.player_.volume(),e=3;Mn&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)ie(this.el_,"vjs-vol-"+n);re(this.el_,"vjs-vol-"+e)},n.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},e}(Jr);Oi.prototype.controlText_="Mute",mn.registerComponent("MuteToggle",Oi);var Ci=function(t){function e(e,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||zt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=t.call(this,e,n)||this).on(e,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}h()(e,t);var n=e.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 e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},n.dispose=function(){this.handleMouseOut(),t.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(t){m.a.isEventKey(t,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(t){this.addClass("vjs-hover"),Ve(a.a,"keyup",Xe(this,this.handleKeyPress))},n.handleMouseOut=function(t){this.removeClass("vjs-hover"),He(a.a,"keyup",Xe(this,this.handleKeyPress))},n.handleKeyPress=function(t){m.a.isEventKey(t,"Esc")&&this.handleMouseOut()},e}(mn);Ci.prototype.options_={children:["muteToggle","volumeControl"]},mn.registerComponent("VolumePanel",Ci);var Pi=function(t){function e(e,n){var r;return r=t.call(this,e,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=Xe(l()(r),r.handleBlur),r.boundHandleTapClick_=Xe(l()(r),r.handleTapClick),r}h()(e,t);var n=e.prototype;return n.addEventListenerForItem=function(t){t instanceof mn&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(t){t instanceof mn&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),t.prototype.removeChild.call(this,e)},n.addItem=function(t){var e=this.addChild(t);e&&this.addEventListenerForItem(e)},n.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=Zt(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ve(n,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,t.prototype.dispose.call(this)},n.handleBlur=function(t){var e=t.relatedTarget||a.a.activeElement;if(!this.children().some((function(t){return t.el()===e}))){var n=this.menuButton_;n&&n.buttonPressed_&&e!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var n=e.filter((function(e){return e.el()===t.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(t){m.a.isEventKey(t,"Left")||m.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(m.a.isEventKey(t,"Right")||m.a.isEventKey(t,"Up"))&&(t.preventDefault(),t.stopPropagation(),this.stepBack())},n.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},n.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},n.focus=function(t){void 0===t&&(t=0);var e=this.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(mn);mn.registerComponent("Menu",Pi);var xi=function(t){function e(e,n){var r;void 0===n&&(n={}),(r=t.call(this,e,n)||this).menuButton_=new Jr(e,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Jr.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"keydown",r.handleKeyDown),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),Ve(a.a,"keyup",Xe(l()(r),r.handleMenuKeyUp))})),r.on("mouseleave",r.handleMouseLeave),r.on("keydown",r.handleSubmenuKeyDown),r}h()(e,t);var n=e.prototype;return n.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var t=new Pi(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=Zt("li",{className:"vjs-menu-title",innerHTML:ln(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new mn(this.player_,{el:e});t.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)t.addItem(this.items[r]);return t},n.createItems=function(){},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Jr.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},n.controlText=function(t,e){return void 0===e&&(e=this.menuButton_.el()),this.menuButton_.controlText(t,e)},n.dispose=function(){this.handleMouseLeave(),t.prototype.dispose.call(this)},n.handleClick=function(t){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(t){this.removeClass("vjs-hover"),He(a.a,"keyup",Xe(this,this.handleMenuKeyUp))},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(t){m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab")?(this.buttonPressed_&&this.unpressButton(),m.a.isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus())):(m.a.isEventKey(t,"Up")||m.a.isEventKey(t,"Down"))&&(this.buttonPressed_||(t.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(t){(m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(t){this.handleSubmenuKeyDown(t)},n.handleSubmenuKeyDown=function(t){(m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),m.a.isEventKey(t,"Tab")||(t.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"),Mn&&$t())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()},e}(mn);mn.registerComponent("MenuButton",xi);var Li=function(t){function e(e,n){var r,i=n.tracks;if((r=t.call(this,e,n)||this).items.length<=1&&r.hide(),!i)return l()(r);var o=Xe(l()(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),i.addEventListener("labelchange",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o),i.removeEventListener("labelchange",o)})),r}return h()(e,t),e}(xi);mn.registerComponent("TrackButton",Li);var Ai=["Tab","Esc","Up","Down","Right","Left"],Ii=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}h()(e,t);var n=e.prototype;return n.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",qt({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(e){Ai.some((function(t){return m.a.isEventKey(e,t)}))||t.prototype.handleKeyDown.call(this,e)},n.handleClick=function(t){this.selected(!0)},n.selected=function(t){this.selectable&&(t?(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))},e}(zr);mn.registerComponent("MenuItem",Ii);var ji=function(t){function e(e,n){var r,o=n.track,s=e.textTracks();n.label=o.label||o.language||"Unknown",n.selected="showing"===o.mode,(r=t.call(this,e,n)||this).track=o,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var u,c=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.handleTracksChange.apply(l()(r),e)},f=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.handleSelectedLanguageChange.apply(l()(r),e)};(e.on(["loadstart","texttrackchange"],c),s.addEventListener("change",c),s.addEventListener("selectedlanguagechange",f),r.on("dispose",(function(){e.off(["loadstart","texttrackchange"],c),s.removeEventListener("change",c),s.removeEventListener("selectedlanguagechange",f)})),void 0===s.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof i.a.Event)try{u=new i.a.Event("change")}catch(t){}u||(u=a.a.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(u)}));return r.handleTracksChange(),r}h()(e,t);var n=e.prototype;return n.handleClick=function(e){var n=this.track,r=this.player_.textTracks();if(t.prototype.handleClick.call(this,e),r)for(var i=0;i<r.length;i++){var o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===n?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},n.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},n.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.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,t.prototype.dispose.call(this)},e}(Ii);mn.registerComponent("TextTrackMenuItem",ji);var Ri=function(t){function e(e,n){return n.track={player:e,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,t.call(this,e,n)||this}h()(e,t);var n=e.prototype;return n.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(ji);mn.registerComponent("OffTextTrackMenuItem",Ri);var Di=function(t){function e(e,n){return void 0===n&&(n={}),n.tracks=e.textTracks(),t.call(this,e,n)||this}return h()(e,t),e.prototype.createItems=function(t,e){var n;void 0===t&&(t=[]),void 0===e&&(e=ji),this.label_&&(n=this.label_+" off"),t.push(new Ri(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new e(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),t.push(a)}}return t},e}(Li);mn.registerComponent("TextTrackButton",Di);var Mi=function(t){function e(e,n){var r,i=n.track,o=n.cue,a=e.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=t.call(this,e,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",Xe(l()(r),r.update)),r}h()(e,t);var n=e.prototype;return n.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(t){var e=this.cue,n=this.player_.currentTime();this.selected(e.startTime<=n&&n<e.endTime)},e}(Ii);mn.registerComponent("ChaptersTrackMenuItem",Mi);var Ni=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},n.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},n.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=0;e--){var n=t[e];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ln(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},n.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new Mi(this.player_,{track:this.track_,cue:i});t.push(o)}return t},e}(Di);Ni.prototype.kind_="chapters",Ni.prototype.controlText_="Chapters",mn.registerComponent("ChaptersButton",Ni);var Bi=function(t){function e(e,n,r){var i;i=t.call(this,e,n,r)||this;var o=e.textTracks(),a=Xe(l()(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}h()(e,t);var n=e.prototype;return n.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!1,r=0,i=e.length;r<i;r++){var o=e[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(Di);Bi.prototype.kind_="descriptions",Bi.prototype.controlText_="Descriptions",mn.registerComponent("DescriptionsButton",Bi);var Ui=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(Di);Ui.prototype.kind_="subtitles",Ui.prototype.controlText_="Subtitles",mn.registerComponent("SubtitlesButton",Ui);var Fi=function(t){function e(e,n){var r;return n.track={player:e,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=t.call(this,e,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return h()(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(ji);mn.registerComponent("CaptionSettingsMenuItem",Fi);var Vi=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(Di);Vi.prototype.kind_="captions",Vi.prototype.controlText_="Captions",mn.registerComponent("CaptionsButton",Vi);var Hi=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(e,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",t.prototype.createEl.call(this,e,qt({innerHTML:i},n),r)},e}(ji);mn.registerComponent("SubsCapsMenuItem",Hi);var qi=function(t){function e(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,e,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(ln(r.label_)),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,Hi)},e}(Di);qi.prototype.kinds_=["captions","subtitles"],qi.prototype.controlText_="Subtitles",mn.registerComponent("SubsCapsButton",qi);var Wi=function(t){function e(e,n){var r,i=n.track,o=e.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=t.call(this,e,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.handleTracksChange.apply(l()(r),e)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}h()(e,t);var n=e.prototype;return n.createEl=function(e,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",t.prototype.createEl.call(this,e,qt({innerHTML:i},n),r)},n.handleClick=function(e){var n=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},n.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(Ii);mn.registerComponent("AudioTrackMenuItem",Wi);var zi=function(t){function e(e,n){return void 0===n&&(n={}),n.tracks=e.audioTracks(),t.call(this,e,n)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(t){void 0===t&&(t=[]),this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n<e.length;n++){var r=e[n];t.push(new Wi(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return t},e}(Li);zi.prototype.controlText_="Audio Track",mn.registerComponent("AudioTrackButton",zi);var Gi=function(t){function e(e,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=t.call(this,e,n)||this).label=i,r.rate=o,r.on(e,"ratechange",r.update),r}h()(e,t);var n=e.prototype;return n.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(Ii);Gi.prototype.contentElType="button",mn.registerComponent("PlaybackRateMenuItem",Gi);var Yi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).updateVisibility(),r.updateLabel(),r.on(e,"loadstart",r.updateVisibility),r.on(e,"ratechange",r.updateLabel),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=Zt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},n.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var t=new Pi(this.player()),e=this.playbackRates();if(e)for(var n=e.length-1;n>=0;n--)t.addChild(new Gi(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>e){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(xi);Yi.prototype.controlText_="Playback Rate",mn.registerComponent("PlaybackRateMenuButton",Yi);var Xi=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(mn);mn.registerComponent("Spacer",Xi);var Ki=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Xi);mn.registerComponent("CustomControlSpacer",Ki);var Qi=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(mn);Qi.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a.a&&Qi.prototype.options_.children.splice(Qi.prototype.options_.children.length-1,0,"pictureInPictureToggle"),mn.registerComponent("ControlBar",Qi);var $i=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"error",r.open),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},n.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(nr);$i.prototype.options_=u()({},nr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),mn.registerComponent("ErrorDisplay",$i);var Ji=["#000","Black"],Zi=["#00F","Blue"],to=["#0FF","Cyan"],eo=["#0F0","Green"],no=["#F0F","Magenta"],ro=["#F00","Red"],io=["#FFF","White"],oo=["#FF0","Yellow"],ao=["1","Opaque"],so=["0.5","Semi-Transparent"],uo=["0","Transparent"],co={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ji,io,ro,eo,Zi,oo,no,to]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ao,so,uo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[io,Ji,ro,eo,Zi,oo,no,to]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ao,so]},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:[uo,so,ao]}};function lo(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}co.windowColor.options=co.backgroundColor.options;var fo=function(t){function e(e,n){var r;return n.temporary=!1,(r=t.call(this,e,n)||this).updateDisplay=Xe(l()(r),r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Zt("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),Ht(co,(function(t){r.on(r.$(t.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}h()(e,t);var n=e.prototype;return n.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},n.createElSelect_=function(t,e,n){var r=this;void 0===e&&(e=""),void 0===n&&(n="label");var i=co[t],o=i.id.replace("%s",this.id_),a=[e,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(t){var e=o+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+a+" "+e+'">',r.localize(t[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return Zt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Zt("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 t=this.localize("restore all settings to the default values");return Zt("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</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 t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var t,e,n,r=this;return e=function(t,e,n){var i,o,a=(i=r.$(e.selector),o=e.parser,lo(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(t[n]=a),t},void 0===(n={})&&(n=0),Vt(t=co).reduce((function(n,r){return e(n,t[r],r)}),n)},n.setValues=function(t){var e=this;Ht(co,(function(n,r){!function(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(lo(t.options[r].value,n)===e){t.selectedIndex=r;break}}(e.$(n.selector),t[r],n.parser)}))},n.setDefaults=function(){var t=this;Ht(co,(function(e){var n=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=n}))},n.restoreSettings=function(){var t;try{t=JSON.parse(i.a.localStorage.getItem("vjs-text-track-settings"))}catch(t){Bt.warn(t)}t&&this.setValues(t)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?i.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):i.a.localStorage.removeItem("vjs-text-track-settings")}catch(t){Bt.warn(t)}}},n.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},e}(nr);mn.registerComponent("TextTrackSettings",fo);var ho=function(t){function e(e,n){var r,o=n.ResizeObserver||i.a.ResizeObserver;null===n.ResizeObserver&&(o=!1);var a=fn({createEl:!o,reportTouchActivity:!1},n);return(r=t.call(this,e,a)||this).ResizeObserver=n.ResizeObserver||i.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(t,e,n,r){var o;void 0===r&&(r=i.a);var a=function(){var i=this,a=arguments,s=function(){o=null,s=null,n||t.apply(i,a)};!o&&n&&t.apply(i,a),r.clearTimeout(o),o=r.setTimeout(s,e)};return a.cancel=function(){r.clearTimeout(o),o=null},a}((function(){r.resizeHandler()}),100,!1,l()(r)),o?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(e.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var t=r.debouncedHandler_,e=r.unloadListener_=function(){He(this,"resize",t),He(this,"unload",e),e=null};Ve(r.el_.contentWindow,"unload",e),Ve(r.el_.contentWindow,"resize",t)}},r.one("load",r.loadListener_)),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.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,t.prototype.dispose.call(this)},e}(mn);mn.registerComponent("ResizeManager",ho);var po={trackingThreshold:30,liveTolerance:15},yo=function(t){function e(e,n){var r,i=fn(po,n,{createEl:!1});return(r=t.call(this,e,i)||this).reset_(),r.on(r.player_,"durationchange",r.handleDurationchange),Ln&&"hidden"in a.a&&"visibilityState"in a.a&&r.on(a.a,"visibilitychange",r.handleVisibilityChange),r}h()(e,t);var n=e.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(a.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var t=this.player_.seekable();if(t&&t.length){var e=Number(i.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(e-this.lastTime_)/1e3;this.lastTime_=e,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),o=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-o)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},n.handleDurationchange=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.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),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 t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&t>2,this.skipNextSeeked_=!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.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),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.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var t=this.player_.seekable(),e=[],n=t?t.length:0;n--;)e.push(t.end(n));return e.length?e.sort()[e.length-1]:1/0},n.seekableStart=function(){for(var t=this.player_.seekable(),e=[],n=t?t.length:0;n--;)e.push(t.start(n));return e.length?e.sort()[0]:0},n.liveWindow=function(){var t=this.liveCurrentTime();return t===1/0?0:t-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 t=this.seekableEnd();return-1!==this.lastSeekEnd_&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,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.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(a.a,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),t.prototype.dispose.call(this)},e}(mn);mn.registerComponent("LiveTracker",yo);var mo,vo=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var n=t.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),t.triggerSourceset(i),!0)},go=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=a.a.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var n=a.a.createDocumentFragment();e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",i.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),bo=function(t,e){for(var n={},r=0;r<t.length&&!((n=Object.getOwnPropertyDescriptor(t[r],e))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},_o=function(t){var e=t.el();if(!e.resetSourceWatch_){var n={},r=function(t){return bo([t.el(),i.a.HTMLMediaElement.prototype,i.a.Element.prototype,go],"innerHTML")}(t),o=function(n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(e,i);return vo(t),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(t){e[t]&&(n[t]=e[t],e[t]=o(n[t]))})),Object.defineProperty(e,"innerHTML",fn(r,{set:o(r.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(n).forEach((function(t){e[t]=n[t]})),Object.defineProperty(e,"innerHTML",r)},t.one("sourceset",e.resetSourceWatch_)}},wo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?gr(i.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return i.a.Element.prototype.setAttribute.call(this,"src",t),t}}),To=function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var n=function(t){return bo([t.el(),i.a.HTMLMediaElement.prototype,wo],"src")}(t),r=e.setAttribute,o=e.load;Object.defineProperty(e,"src",fn(n,{set:function(r){var i=n.set.call(e,r);return t.triggerSourceset(e.src),i}})),e.setAttribute=function(n,i){var o=r.call(e,n,i);return/src/i.test(n)&&t.triggerSourceset(e.src),o},e.load=function(){var n=o.call(e);return vo(t)||(t.triggerSourceset(""),_o(t)),n},e.currentSrc?t.triggerSourceset(e.currentSrc):vo(t)||_o(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=o,e.setAttribute=r,Object.defineProperty(e,"src",n),e.resetSourceWatch_&&e.resetSourceWatch_()}}}},So=function(t,e,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(t,e,{value:n,enumerable:!0,writable:!0})},o={configurable:!0,enumerable:!0,get:function(){var t=n();return i(t),t}};return r&&(o.set=i),Object.defineProperty(t,e,o)},Eo=function(t){function e(e,n){var r;r=t.call(this,e,n)||this;var i=e.source,o=!1;if(i&&(r.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),e.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var a=r.el_.childNodes,s=a.length,u=[];s--;){var c=a[s];"track"===c.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(c),r.remoteTextTracks().addTrack(c.track),r.textTracks().addTrack(c.track),o||r.el_.hasAttribute("crossorigin")||!_r(c.src)||(o=!0)):u.push(c))}for(var l=0;l<u.length;l++)r.el_.removeChild(u[l])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Bt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(jn||Dn||kn)&&!0===e.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}h()(e,t);var n=e.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){To(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var t,e=this.textTracks(),n=function(){t=[];for(var n=0;n<e.length;n++){var r=e[n];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};n(),e.addEventListener("change",n),this.on("dispose",(function(){return e.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<t.length;r++){var i=t[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r)}))},n.overrideNative_=function(t,e){var n=this;if(e===this["featuresNative"+t+"Tracks"]){var r=t.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(t){n.el()[r+"Tracks"].removeEventListener(t,n[r+"TracksListeners_"][t])})),this["featuresNative"+t+"Tracks"]=!e,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},n.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},n.proxyNativeTracksForType_=function(t){var e=this,n=Pr[t],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===t&&e[xr.remoteText.getterName]().trigger(r)},addtrack:function(t){i.addTrack(t.track)},removetrack:function(t){i.removeTrack(t.track)}},a=function(){for(var t=[],e=0;e<i.length;e++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[e]){n=!0;break}n||t.push(i[e])}for(;t.length;)i.removeTrack(t.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(t){var n=o[t];r.addEventListener(t,n),e.on("dispose",(function(e){return r.removeEventListener(t,n)}))})),this.on("loadstart",a),this.on("dispose",(function(t){return e.off("loadstart",a)}))}},n.proxyNativeTracks_=function(){var t=this;Pr.names.forEach((function(e){t.proxyNativeTracksForType_(e)}))},n.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),e.disposeMediaElement(t),t=n}else{t=a.a.createElement("video");var r=fn({},this.options_.tag&&se(this.options_.tag));jn&&!0===this.options_.nativeControlsForTouch||delete r.controls,ae(t,qt(r,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&ce(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],o=0;o<i.length;o++){var s=i[o],u=this.options_[s];void 0!==u&&(u?ce(t,s,s):le(t,s),t[s]=u)}return t},n.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),t.readyState>=2&&i.push("loadeddata"),t.readyState>=3&&i.push("canplay"),t.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(t){this.trigger(t)}),this)}))}},n.setScrubbing=function(t){this.isScrubbing_=t},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(t){try{this.isScrubbing_&&this.el_.fastSeek&&Nn?this.el_.fastSeek(t):this.el_.currentTime=t}catch(t){Bt(t,"Video is not ready. (Video.js)")}},n.duration=function(){var t=this;if(this.el_.duration===1/0&&Sn&&Pn&&0===this.el_.currentTime){return this.on("timeupdate",(function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=i.a.navigator&&i.a.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},n.enterFullScreen=function(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)Jn(this.el_.play()),this.setTimeout((function(){t.pause();try{t.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{t.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},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.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},n.reset=function(){e.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(t){this.el_.controls=!!t},n.addTextTrack=function(e,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):t.prototype.addTextTrack.call(this,e,n,r)},n.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var n=a.a.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e.default&&(n.default=e.default),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n},n.addRemoteTextTrack=function(e,n){var r=t.prototype.addRemoteTextTrack.call(this,e,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)e!==n[r]&&e!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),i.a.performance&&"function"==typeof i.a.performance.now?t.creationTime=i.a.performance.now():i.a.performance&&i.a.performance.timing&&"number"==typeof i.a.performance.timing.navigationStart&&(t.creationTime=i.a.Date.now()-i.a.performance.timing.navigationStart),t},e}(Ar);So(Eo,"TEST_VID",(function(){if(Kt()){var t=a.a.createElement("video"),e=a.a.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t}})),Eo.isSupported=function(){try{Eo.TEST_VID.volume=.5}catch(t){return!1}return!(!Eo.TEST_VID||!Eo.TEST_VID.canPlayType)},Eo.canPlayType=function(t){return Eo.TEST_VID.canPlayType(t)},Eo.canPlaySource=function(t,e){return Eo.canPlayType(t.type)},Eo.canControlVolume=function(){try{var t=Eo.TEST_VID.volume;return Eo.TEST_VID.volume=t/2+.1,t!==Eo.TEST_VID.volume}catch(t){return!1}},Eo.canMuteVolume=function(){try{var t=Eo.TEST_VID.muted;return Eo.TEST_VID.muted=!t,Eo.TEST_VID.muted?ce(Eo.TEST_VID,"muted","muted"):le(Eo.TEST_VID,"muted"),t!==Eo.TEST_VID.muted}catch(t){return!1}},Eo.canControlPlaybackRate=function(){if(Sn&&Pn&&xn<58)return!1;try{var t=Eo.TEST_VID.playbackRate;return Eo.TEST_VID.playbackRate=t/2+.1,t!==Eo.TEST_VID.playbackRate}catch(t){return!1}},Eo.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(a.a.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(a.a.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},Eo.supportsNativeTextTracks=function(){return Nn||Mn&&Pn},Eo.supportsNativeVideoTracks=function(){return!(!Eo.TEST_VID||!Eo.TEST_VID.videoTracks)},Eo.supportsNativeAudioTracks=function(){return!(!Eo.TEST_VID||!Eo.TEST_VID.audioTracks)},Eo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(t){var e=t[0],n=t[1];So(Eo.prototype,e,(function(){return Eo[n]()}),!0)})),Eo.prototype.movingMediaElementInDOM=!Mn,Eo.prototype.featuresFullscreenResize=!0,Eo.prototype.featuresProgressEvents=!0,Eo.prototype.featuresTimeupdateEvents=!0,Eo.patchCanPlayType=function(){En>=4&&!On&&!Pn&&(mo=Eo.TEST_VID&&Eo.TEST_VID.constructor.prototype.canPlayType,Eo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(t)?"maybe":mo.call(this,t)})},Eo.unpatchCanPlayType=function(){var t=Eo.TEST_VID.constructor.prototype.canPlayType;return mo&&(Eo.TEST_VID.constructor.prototype.canPlayType=mo),t},Eo.patchCanPlayType(),Eo.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},Eo.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Eo.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Eo.prototype["set"+ln(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(t){Eo.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(t){Eo.prototype["set"+ln(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){Eo.prototype[t]=function(){return this.el_[t]()}})),Ar.withSourceHandlers(Eo),Eo.nativeSourceHandler={},Eo.nativeSourceHandler.canPlayType=function(t){try{return Eo.TEST_VID.canPlayType(t)}catch(t){return""}},Eo.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Eo.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=br(t.src);return Eo.nativeSourceHandler.canPlayType("video/"+n)}return""},Eo.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Eo.nativeSourceHandler.dispose=function(){},Eo.registerSourceHandler(Eo.nativeSourceHandler),Ar.registerTech("Html5",Eo);var ko=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Oo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Co=["tiny","xsmall","small","medium","large","xlarge","huge"],Po={};Co.forEach((function(t){var e="x"===t.charAt(0)?"x-"+t.substring(1):t;Po[t]="vjs-layout-"+e}));var xo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Lo=function(t){function e(n,r,i){var o;if(n.id=n.id||r.id||"vjs_video_"+Re(),(r=qt(e.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var s=n.closest("[lang]");s&&s.getAttribute&&(r.language=s.getAttribute("lang"))}else for(var u=n;u&&1===u.nodeType;){if(se(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}if((o=t.call(this,null,r,i)||this).boundDocumentFullscreenChange_=Xe(l()(o),o.documentFullscreenChange_),o.boundFullWindowOnEscKey_=Xe(l()(o),o.fullWindowOnEscKey),o.isFullscreen_=!1,o.log=Ut(o.id_),o.fsApi_=Wn,o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,o.debugEnabled_=!1,!o.options_||!o.options_.techOrder||!o.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(o.tag=n,o.tagAttributes=n&&se(n),o.language(o.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(t){c[t.toLowerCase()]=r.languages[t]})),o.languages_=c}else o.languages_=e.prototype.options_.languages;o.resetCache_(),o.poster_=r.poster||"",o.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),o.changingSrc_=!1,o.playCallbacks_=[],o.playTerminatedQueue_=[],n.hasAttribute("autoplay")?o.autoplay(!0):o.autoplay(o.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(t){if("function"!=typeof o[t])throw new Error('plugin "'+t+'" does not exist')})),o.scrubbing_=!1,o.el_=o.createEl(),an(l()(o),{eventBusKey:"el_"}),o.fsApi_.requestFullscreen&&(Ve(a.a,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_),o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)),o.fluid_&&o.on(["playerreset","resize"],o.updateStyleEl_);var f=fn(o.options_);r.plugins&&Object.keys(r.plugins).forEach((function(t){o[t](r.plugins[t])})),r.debug&&o.debug(!0),o.options_.playerOptions=f,o.middleware_=[],o.initChildren(),o.isAudio("audio"===n.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),jn&&o.addClass("vjs-touch-enabled"),Mn||o.addClass("vjs-workinghover"),e.players[o.id_]=l()(o);var h="7.11.2".split(".")[0];return o.addClass("vjs-v"+h),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("stageclick",o.handleStageClick_),o.on("keydown",o.handleKeyDown),o.on("languagechange",o.handleLanguagechange),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o}h()(e,t);var n=e.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),He(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),He(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.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),jr[this.id()]=null,Lr.names.forEach((function(t){var e=Lr[t],r=n[e.getterName]();r&&r.off&&r.off()})),t.prototype.dispose.call(this)},n.createEl=function(){var e,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();r?e=this.el_=n.parentNode:o||(e=this.el_=t.prototype.createEl.call(this,"div"));var s=se(n);if(o){for(e=this.el_=n,n=this.tag=a.a.createElement("video");e.children.length;)n.appendChild(e.firstChild);ne(e,"video-js")||re(e,"video-js"),e.appendChild(n),r=this.playerElIngest_=e,Object.keys(e).forEach((function(t){try{n[t]=e[t]}catch(t){}}))}if(n.setAttribute("tabindex","-1"),s.tabindex="-1",(Ln||Pn&&In)&&(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(t){o&&"class"===t||e.setAttribute(t,s[t]),o&&n.setAttribute(t,s[t])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=e.player=this,this.addClass("vjs-paused"),!0!==i.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Ae("vjs-styles-dimensions");var u=Se(".vjs-styles-defaults"),c=Se("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.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"),f=0;f<l.length;f++){var h=l.item(f);re(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(e,n),ee(n,e),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=e,e},n.crossOrigin=function(t){if(!t)return this.techGet_("crossOrigin");"anonymous"===t||"use-credentials"===t?this.techCall_("setCrossOrigin",t):Bt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+t+'"')},n.width=function(t){return this.dimension("width",t)},n.height=function(t){return this.dimension("height",t)},n.dimension=function(t,e){var n=t+"_";if(void 0===e)return this[n]||0;if(""===e||"auto"===e)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(e);isNaN(r)?Bt.error('Improper value "'+e+'" supplied for for '+t):(this[n]=r,this.updateStyleEl_())},n.fluid=function(t){var e,n,r=this;if(void 0===t)return!!this.fluid_;this.fluid_=!!t,$e(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.updateStyleEl_)},$e(e=this)?n():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==i.a.VIDEOJS_NO_DYNAMIC_STYLE){var t,e,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=r[1]/r[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*o,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Ie(this.styleEl_,"\n ."+n+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(a>=0&&(u.width=a),s>=0&&(u.height=s))}},n.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=ln(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(Ar.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:e,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_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};Lr.names.forEach((function(t){var e=Lr[t];o[e.getterName]=n[e.privateName]})),qt(o,this.options_[r]),qt(o,this.options_[i]),qt(o,this.options_[t.toLowerCase()]),this.tag&&(o.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Ar.getTech(t);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(o),this.tech_.ready(Xe(this,this.handleTechReady_),!0),er(this.textTracksJson_||[],this.tech_),ko.forEach((function(t){n.on(n.tech_,t,n["handleTech"+ln(t)+"_"])})),Object.keys(Oo).forEach((function(t){n.on(n.tech_,t,(function(e){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Oo[t]+"_"].bind(n),event:e}):n["handleTech"+Oo[t]+"_"](e)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||ee(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var t=this;Lr.names.forEach((function(e){var n=Lr[e];t[n.privateName]=t[n.getterName]()})),this.textTracksJson_=tr(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(t){return void 0===t&&Bt.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_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},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_(this.autoplay())},n.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"==typeof t){var n,r=function(){var t=e.muted();e.muted(!0);var n=function(){e.muted(t)};e.playTerminatedQueue_.push(n);var r=e.play();if($n(r))return r.catch(n)};if("any"===t&&!0!==this.muted()?$n(n=this.play())&&(n=n.catch(r)):n="muted"===t&&!0!==this.muted()?r():this.play(),$n(n))return n.then((function(){e.trigger({type:"autoplay-success",autoplay:t})})).catch((function(n){e.trigger({type:"autoplay-failure",autoplay:t})}))}},n.updateSourceCaches_=function(t){void 0===t&&(t="");var e=t,n="";"string"!=typeof e&&(e=t.src,n=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!n&&(n=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter((function(t){return t.src===e}));if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===e)return o.type}return Hr(e)}(this,e)),this.cache_.source=fn({},t,{src:e,type:n});for(var r=this.cache_.sources.filter((function(t){return t.src&&t.src===e})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=se(o[s]);i.push(u),u.src&&u.src===e&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},n.handleTechSourceset_=function(t){var e=this;if(!this.changingSrc_){var n=function(t){return e.updateSourceCaches_(t)},r=this.currentSource().src,i=t.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),t.src||this.tech_.any(["sourceset","loadstart"],(function(t){if("sourceset"!==t.type){var n=e.techGet("currentSrc");e.lastSource_.tech=n,e.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},n.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,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(t){return t.callback(t.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var e=this.currentTime();this.on("timeupdate",(function n(){e!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.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&&(Bt.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.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(t){we(t)&&this.controls_&&(this.paused()?Jn(this.play()):this.pause())},n.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(e){return e.contains(t.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,t):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(t){t.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(t){var e=t.target.player;if(!e||e===this){var n=this.el(),r=a.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(t,e){e&&(e.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(e.isFullscreen))},n.handleTechFullscreenError_=function(t,e){this.trigger("fullscreenerror",e)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(t){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(t){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var t=this.tech_.error();this.error(t)},n.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},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:[],volume:1}},n.techCall_=function(t,e){this.ready((function(){if(t in Br)return function(t,e,n,r){return e[n](t.reduce(Fr(n),r))}(this.middleware_,this.tech_,t,e);if(t in Ur)return Mr(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw Bt(t),t}}),!0)},n.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Nr)return function(t,e,n){return t.reduceRight(Fr(n),e[n]())}(this.middleware_,this.tech_,t);if(t in Ur)return Mr(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw Bt("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw Bt("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw Bt(e),e}}},n.play=function(){var t=this,e=this.options_.Promise||i.a.Promise;return e?new e((function(e){t.play_(e)})):this.play_()},n.play_=function(t){var e=this;void 0===t&&(t=Jn),this.playCallbacks_.push(t);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(t){e.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!Nn&&!Mn||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach((function(t){t()}))},n.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach((function(e){e(t)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Vn(0,0)},n.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(t){return void 0!==t?(t<0&&(t=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",t),void(this.cache_.initTime=0)):(this.cache_.initTime=t,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||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 t=this.techGet_("buffered");return t&&t.length||(t=Vn(0,0)),t},n.bufferedPercent=function(){return Hn(this.buffered(),this.duration())},n.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return n>e&&(n=e),n},n.volume=function(t){var e;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},n.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},n.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(t){if(void 0!==t){var e=this.isFullscreen_;return this.isFullscreen_=Boolean(t),this.isFullscreen_!==e&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(t){var e=this.options_.Promise||i.a.Promise;if(e){var n=this;return new e((function(e,r){function i(){n.off("fullscreenerror",a),n.off("fullscreenchange",o)}function o(){i(),e()}function a(t,e){i(),r(e)}n.one("fullscreenchange",o),n.one("fullscreenerror",a);var s=n.requestFullscreenHelper_(t);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(t){var e,n=this;if(this.fsApi_.prefixed||(e=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==t&&(e=t)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](e);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var t=this.options_.Promise||i.a.Promise;if(t){var e=this;return new t((function(t,n){function r(){e.off("fullscreenerror",o),e.off("fullscreenchange",i)}function i(){r(),t()}function o(t,e){r(),n(e)}e.one("fullscreenchange",i),e.one("fullscreenerror",o);var a=e.exitFullscreenHelper_();if(a)return a.then(r,r),a}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var t=this;if(this.fsApi_.requestFullscreen){var e=a.a[this.fsApi_.exitFullscreen]();return e&&e.then((function(){return t.isFullscreen(!1)})),e}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,Ve(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",re(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(t){m.a.isEventKey(t,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,He(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,ie(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(t){if(void 0===t)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(t){return void 0!==t?(this.isInPictureInPicture_=!!t,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in a.a)return a.a.exitPictureInPicture()},n.handleKeyDown=function(t){var e=this.options_.userActions;if(e&&e.hotkeys){(function(t){var e=t.tagName.toLowerCase();if(t.isContentEditable)return!0;if("input"===e)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type);return-1!==["textarea"].indexOf(e)})(this.el_.ownerDocument.activeElement)||("function"==typeof e.hotkeys?e.hotkeys.call(this,t):this.handleHotkeys(t))}},n.handleHotkeys=function(t){var e=this.options_.userActions?this.options_.userActions.hotkeys:{},n=e.fullscreenKey,r=void 0===n?function(t){return m.a.isEventKey(t,"f")}:n,i=e.muteKey,o=void 0===i?function(t){return m.a.isEventKey(t,"m")}:i,s=e.playPauseKey,u=void 0===s?function(t){return m.a.isEventKey(t,"k")||m.a.isEventKey(t,"Space")}:s;if(r.call(this,t)){t.preventDefault(),t.stopPropagation();var c=mn.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,t)}else if(o.call(this,t)){t.preventDefault(),t.stopPropagation(),mn.getComponent("MuteToggle").prototype.handleClick.call(this,t)}else if(u.call(this,t)){t.preventDefault(),t.stopPropagation(),mn.getComponent("PlayToggle").prototype.handleClick.call(this,t)}},n.canPlayType=function(t){for(var e,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Ar.getTech(i);if(o||(o=mn.getComponent(i)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else Bt.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(t){var e,n=this,r=this.options_.techOrder.map((function(t){return[t,Ar.getTech(t)]})).filter((function(t){var e=t[0],n=t[1];return n?n.isSupported():(Bt.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(t,e,n){var r;return t.some((function(t){return e.some((function(e){if(r=n(t,e))return!0}))})),r},o=function(t,e){var r=t[0];if(t[1].canPlaySource(e,n.options_[r.toLowerCase()]))return{source:e,tech:r}};return(this.options_.sourceOrder?i(t,r,(e=o,function(t,n){return e(n,t)})):i(r,t,o))||!1},n.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var n=function t(e){if(Array.isArray(e)){var n=[];e.forEach((function(e){e=t(e),Array.isArray(e)?n=n.concat(e):Wt(e)&&n.push(e)})),e=n}else e="string"==typeof e&&e.trim()?[qr({src:e})]:Wt(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[qr(e)]:[];return e}(t);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Dr(this,n[0],(function(t,r){var i,o;if(e.middleware_=r,e.cache_.sources=n,e.updateSourceCaches_(t),e.src_(t))return n.length>1?e.src(n.slice(1)):(e.changingSrc_=!1,e.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void e.triggerReady());i=r,o=e.tech_,i.forEach((function(t){return t.setTech&&t.setTech(o)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src_=function(t){var e,n,r=this,i=this.selectSource([t]);return!i||(e=i.tech,n=this.techName_,ln(e)!==ln(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var t=this,e=this.options_.Promise||i.a.Promise;this.paused()||!e?this.doReset_():Jn(this.play().then((function(){return t.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_(),$e(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var t=this.controlBar,e=t.durationDisplay,n=t.remainingTimeDisplay;e&&e.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 t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},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(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},n.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=void 0===e?this.options_.autoplay:e,this.tech_&&this.techCall_("setAutoplay",e)},n.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},n.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},n.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),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(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(t){if(void 0===t)return this.error_||null;if(this.options_.suppressNotSupportedError&&t&&4===t.code){var e=function(){this.error(t)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],e),void this.one("loadstart",(function(){this.off(["click","touchstart"],e)}))}if(null===t)return this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Kn(t),this.addClass("vjs-error"),Bt.error("(CODE:"+this.error_.code+" "+Kn.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(t){this.userActivity_=!0},n.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,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(t){t.stopPropagation(),t.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var t,e,n,r=Xe(this,this.reportUserActivity),i=function(e){r(),this.clearInterval(t)};this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===e&&t.screenY===n||(e=t.screenX,n=t.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var o,a=this.getChild("controlBar");!a||Mn||Sn||(a.on("mouseenter",(function(t){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(t){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var t=this.options_.inactivityTimeout;t<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),t))}}),250)},n.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},n.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},n.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},n.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},n.removeRemoteTextTrack=function(t){void 0===t&&(t={});var e=t.track;if(e||(e=t),this.tech_)return this.tech_.removeRemoteTextTrack(e)},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(t){if(void 0===t)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),$e(this)&&this.trigger("languagechange"))},n.languages=function(){return fn(e.prototype.options_.languages,this.languages_)},n.toJSON=function(){var t=fn(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var r=e[n];(r=fn(r)).player=void 0,t.tracks[n]=r}return t},n.createModal=function(t,e){var n=this;(e=e||{}).content=t||"";var r=new nr(this,e);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),e=this.currentWidth(),n=0;n<Co.length;n++){var r=Co[n];if(e<=this.breakpoints_[r]){if(t===r)return;t&&this.removeClass(Po[t]),this.addClass(Po[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},n.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=qt({},xo,t),this.updateCurrentBreakpoint_()),qt(this.breakpoints_)},n.responsive=function(t){return void 0===t?this.responsive_:(t=Boolean(t))!==this.responsive_?(this.responsive_=t,t?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Po[this.breakpoint_]||""},n.loadMedia=function(t,e){var n=this;if(t&&"object"==typeof t){this.reset(),this.cache_.media=fn(t);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:Hr(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(t){return n.addRemoteTextTrack(t,!1)})),this.ready(e)}},n.getMedia=function(){if(!this.cache_.media){var t=this.poster(),e={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(t){return{kind:t.kind,label:t.label,language:t.language,src:t.src}}))};return t&&(e.poster=t,e.artwork=[{src:e.poster,type:Hr(e.poster)}]),e}return fn(this.cache_.media)},e.getTagSettings=function(t){var e={sources:[],tracks:[]},n=se(t),r=n["data-setup"];if(ne(t,"vjs-fill")&&(n.fill=!0),ne(t,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=d()(r||"{}"),o=i[0],a=i[1];o&&Bt.error(o),qt(n,a)}if(qt(e,n),t.hasChildNodes())for(var s=t.childNodes,u=0,c=s.length;u<c;u++){var l=s[u],f=l.nodeName.toLowerCase();"source"===f?e.sources.push(se(l)):"track"===f&&e.tracks.push(se(l))}return e},n.flexNotSupported_=function(){var t=a.a.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},n.debug=function(t){if(void 0===t)return this.debugEnabled_;t?(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)},e}(mn);Lr.names.forEach((function(t){var e=Lr[t];Lo.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}})),Lo.prototype.crossorigin=Lo.prototype.crossOrigin,Lo.players={};var Ao=i.a.navigator;Lo.prototype.options_={techOrder:Ar.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ao&&(Ao.languages&&Ao.languages[0]||Ao.userLanguage||Ao.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Lo.prototype[t]=function(){return this.techGet_(t)}})),ko.forEach((function(t){Lo.prototype["handleTech"+ln(t)+"_"]=function(){return this.trigger(t)}})),mn.registerComponent("Player",Lo);var Io={},jo=function(t){return Io.hasOwnProperty(t)},Ro=function(t){return jo(t)?Io[t]:void 0},Do=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},Mo=function(t,e,n){var r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},No=function(t,e){return e.prototype.name=t,function(){Mo(this,{name:t,plugin:e,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=T()(e,[this].concat(r));return this[t]=function(){return o},Mo(this,o.getEventHash()),o}},Bo=function(){function t(e){if(this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),an(this),delete this.trigger,un(this,this.constructor.defaultState),Do(e,this.name),this.dispose=Xe(this,this.dispose),e.on("dispose",this.dispose)}var e=t.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(t){return void 0===t&&(t={}),t.name=this.name,t.plugin=this.constructor,t.instance=this,t},e.trigger=function(t,e){return void 0===e&&(e={}),qe(this.eventBusEl_,t,this.getEventHash(e))},e.handleStateChanged=function(t){},e.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e.activePlugins_[t]=!1,this.player=this.state=null,e[t]=No(t,Io[t])},t.isBasic=function(e){var n="string"==typeof e?Ro(e):e;return"function"==typeof n&&!t.prototype.isPrototypeOf(n.prototype)},t.registerPlugin=function(e,n){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+typeof e+".");if(jo(e))Bt.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Lo.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+typeof n+".");return Io[e]=n,"plugin"!==e&&(t.isBasic(n)?Lo.prototype[e]=function(t,e){var n=function(){Mo(this,{name:t,plugin:e,instance:null},!0);var n=e.apply(this,arguments);return Do(this,t),Mo(this,{name:t,plugin:e,instance:n}),n};return Object.keys(e).forEach((function(t){n[t]=e[t]})),n}(e,n):Lo.prototype[e]=No(e,n)),n},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");jo(t)&&(delete Io[t],delete Lo.prototype[t])},t.getPlugins=function(t){var e;return void 0===t&&(t=Object.keys(Io)),t.forEach((function(t){var n=Ro(t);n&&((e=e||{})[t]=n)})),e},t.getPluginVersion=function(t){var e=Ro(t);return e&&e.VERSION||""},t}();Bo.getPlugin=Ro,Bo.BASE_PLUGIN_NAME="plugin",Bo.registerPlugin("plugin",Bo),Lo.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},Lo.prototype.hasPlugin=function(t){return!!jo(t)};var Uo=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Fo(t,e,n){var r=Fo.getPlayer(t);if(r)return e&&Bt.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof t?Se("#"+Uo(t)):t;if(!Qt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Bt.warn("The element supplied is not included in the DOM"),e=e||{},Fo.hooks("beforesetup").forEach((function(t){var n=t(i,fn(e));Wt(n)&&!Array.isArray(n)?e=fn(e,n):Bt.error("please return an object in beforesetup hooks")}));var o=mn.getComponent("Player");return r=new o(i,e,n),Fo.hooks("setup").forEach((function(t){return t(r)})),r}if(Fo.hooks_={},Fo.hooks=function(t,e){return Fo.hooks_[t]=Fo.hooks_[t]||[],e&&(Fo.hooks_[t]=Fo.hooks_[t].concat(e)),Fo.hooks_[t]},Fo.hook=function(t,e){Fo.hooks(t,e)},Fo.hookOnce=function(t,e){Fo.hooks(t,[].concat(e).map((function(e){return function n(){return Fo.removeHook(t,n),e.apply(void 0,arguments)}})))},Fo.removeHook=function(t,e){var n=Fo.hooks(t).indexOf(e);return!(n<=-1)&&(Fo.hooks_[t]=Fo.hooks_[t].slice(),Fo.hooks_[t].splice(n,1),!0)},!0!==i.a.VIDEOJS_NO_DYNAMIC_STYLE&&Kt()){var Vo=Se(".vjs-styles-defaults");if(!Vo){Vo=Ae("vjs-styles-defaults");var Ho=Se("head");Ho&&Ho.insertBefore(Vo,Ho.firstChild),Ie(Vo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Pe(1,Fo),Fo.VERSION="7.11.2",Fo.options=Lo.prototype.options_,Fo.getPlayers=function(){return Lo.players},Fo.getPlayer=function(t){var e,n=Lo.players;if("string"==typeof t){var r=Uo(t),i=n[r];if(i)return i;e=Se("#"+r)}else e=t;if(Qt(e)){var o=e,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},Fo.getAllPlayers=function(){return Object.keys(Lo.players).map((function(t){return Lo.players[t]})).filter(Boolean)},Fo.players=Lo.players,Fo.getComponent=mn.getComponent,Fo.registerComponent=function(t,e){Ar.isTech(e)&&Bt.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),mn.registerComponent.call(mn,t,e)},Fo.getTech=Ar.getTech,Fo.registerTech=Ar.registerTech,Fo.use=function(t,e){Ir[t]=Ir[t]||[],Ir[t].push(e)},Object.defineProperty(Fo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Fo.middleware,"TERMINATOR",{value:Rr,writeable:!1,enumerable:!0}),Fo.browser=Bn,Fo.TOUCH_ENABLED=jn,Fo.extend=function(t,e){void 0===e&&(e={});var n=function(){t.apply(this,arguments)},r={};for(var i in"object"==typeof e?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"==typeof e&&(n=e),E()(n,t),t&&(n.super_=t),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Fo.mergeOptions=fn,Fo.bind=Xe,Fo.registerPlugin=Bo.registerPlugin,Fo.deregisterPlugin=Bo.deregisterPlugin,Fo.plugin=function(t,e){return Bt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Bo.registerPlugin(t,e)},Fo.getPlugins=Bo.getPlugins,Fo.getPlugin=Bo.getPlugin,Fo.getPluginVersion=Bo.getPluginVersion,Fo.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),Fo.options.languages=fn(Fo.options.languages,((n={})[t]=e,n)),Fo.options.languages[t]},Fo.log=Bt,Fo.createLogger=Ut,Fo.createTimeRange=Fo.createTimeRanges=Vn,Fo.formatTime=ii,Fo.setFormatTime=function(t){ri=t},Fo.resetFormatTime=function(){ri=ni},Fo.parseUrl=vr,Fo.isCrossOrigin=_r,Fo.EventTarget=Qe,Fo.on=Ve,Fo.one=We,Fo.off=He,Fo.trigger=qe,Fo.xhr=g.a,Fo.TextTrack=Er,Fo.AudioTrack=kr,Fo.VideoTrack=Or,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){Fo[t]=function(){return Bt.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),ke[t].apply(null,arguments)}})),Fo.computedStyle=Gt,Fo.dom=ke,Fo.url=wr,Fo.defineLazyProperty=So;
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@clickview/player"]=e():t["@clickview/player"]=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=855)}([,function(t,e,n){"use strict";var r=n(2),i=n.n(r),o=n(4),a=n.n(o),s=n(47),u=n.n(s),c=n(9),l=n.n(c),f=(n(234),n(236),n(5)),h=n.n(f),p=n(179),d=n.n(p),y=n(11),m=n.n(y),v=n(114),g=n.n(v),b=n(115),_=n.n(b),w=n(180),T=n.n(w),S=n(181),E=n.n(S),k=n(61),O=n.n(k),C=n(87),P=n.n(C),x=n(84),L=n.n(x),A=function(t){function e(){var e;return(e=t.call(this)||this).buffer="",e}return h()(e,t),e.prototype.push=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},e}(P.a),I=function(t){for(var e,n=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((e=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=e[0].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^['"](.*)['"]$/g,"$1"),r[e[0]]=e[1]);return r},j=function(t){function e(){var e;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}h()(e,t);var n=e.prototype;return n.push=function(t){var e,n,r=this;0!==(t=t.trim()).length&&("#"===t[0]?this.tagMappers.reduce((function(e,n){var r=n(t);return r===t?e:e.concat([r])}),[t]).forEach((function(t){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return n={type:"tag",tagType:"inf"},e[1]&&(n.duration=parseFloat(e[1])),e[2]&&(n.title=e[2]),void r.trigger("data",n);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"targetduration"},e[1]&&(n.duration=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"totalduration"},e[1]&&(n.duration=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"version"},e[1]&&(n.version=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return n={type:"tag",tagType:"media-sequence"},e[1]&&(n.number=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return n={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(n.number=parseInt(e[1],10)),void r.trigger("data",n);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return n={type:"tag",tagType:"playlist-type"},e[1]&&(n.playlistType=e[1]),void r.trigger("data",n);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"byterange"},e[1]&&(n.length=parseInt(e[1],10)),e[2]&&(n.offset=parseInt(e[2],10)),void r.trigger("data",n);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return n={type:"tag",tagType:"allow-cache"},e[1]&&(n.allowed=!/NO/.test(e[1])),void r.trigger("data",n);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(n={type:"tag",tagType:"map"},e[1]){var o=I(e[1]);if(o.URI&&(n.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),s=a[0],u=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),u&&(n.byterange.offset=parseInt(u,10))}}r.trigger("data",n)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(n={type:"tag",tagType:"stream-inf"},e[1]){if(n.attributes=I(e[1]),n.attributes.RESOLUTION){var c=n.attributes.RESOLUTION.split("x"),l={};c[0]&&(l.width=parseInt(c[0],10)),c[1]&&(l.height=parseInt(c[1],10)),n.attributes.RESOLUTION=l}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))}r.trigger("data",n)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return n={type:"tag",tagType:"media"},e[1]&&(n.attributes=I(e[1])),void r.trigger("data",n);if(e=/^#EXT-X-ENDLIST/.exec(t))r.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return n={type:"tag",tagType:"program-date-time"},e[1]&&(n.dateTimeString=e[1],n.dateTimeObject=new Date(e[1])),void r.trigger("data",n);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return n={type:"tag",tagType:"key"},e[1]&&(n.attributes=I(e[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 r.trigger("data",n);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return n={type:"tag",tagType:"start"},e[1]&&(n.attributes=I(e[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-out-cont"},e[1]?n.data=e[1]:n.data="",void r.trigger("data",n);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-out"},e[1]?n.data=e[1]:n.data="",void r.trigger("data",n);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-in"},e[1]?n.data=e[1]:n.data="",void r.trigger("data",n);r.trigger("data",{type:"tag",data:t.slice(4)})}}}else r.trigger("data",{type:"comment",text:t.slice(1)})})):this.trigger("data",{type:"uri",uri:t}))},n.addParser=function(t){var e=this,n=t.expression,r=t.customType,i=t.dataParser,o=t.segment;"function"!=typeof i&&(i=function(t){return t}),this.customParsers.push((function(t){if(n.exec(t))return e.trigger("data",{type:"custom",data:i(t),customType:r,segment:o}),!0}))},n.addTagMapper=function(t){var e=t.expression,n=t.map;this.tagMappers.push((function(t){return e.test(t)?n(t):t}))},e}(P.a),R=function(t){function e(){var e;(e=t.call(this)||this).lineStream=new A,e.parseStream=new j,e.lineStream.pipe(e.parseStream);var n,r,i=l()(e),o=[],a={},s=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f=0;e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var h=0;return e.parseStream.on("data",(function(t){var e,l;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&(a.byterange=e,e.length=t.length,"offset"in t||(t.offset=h)),"offset"in t&&(a.byterange=e,e.offset=t.offset),h=e.offset+e.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"})),t.duration>0&&(a.duration=t.duration),0===t.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:L()(t.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(r.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,f=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){n={},t.uri&&(n.uri=t.uri),t.byterange&&(n.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||c,t.attributes?(a.attributes||(a.attributes={}),u()(a.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var n=this.manifest.mediaGroups[t.attributes.TYPE];n[t.attributes["GROUP-ID"]]=n[t.attributes["GROUP-ID"]]||{},e=n[t.attributes["GROUP-ID"]],(l={default:/yes/i.test(t.attributes.DEFAULT)}).default?l.autoselect=!0:l.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(l.language=t.attributes.LANGUAGE),t.attributes.URI&&(l.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(l.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(l.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(l.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),a.dateTimeString=t.dateTimeString,a.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=t.data},"cue-out-cont":function(){a.cueOutCont=t.data},"cue-in":function(){a.cueIn=t.data}}[t.tagType]||s).call(i)},uri:function(){a.uri=t.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=f,n&&(a.map=n),a={}},comment:function(){},custom:function(){t.segment?(a.custom=a.custom||{},a.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(i)})),e}h()(e,t);var n=e.prototype;return n.push=function(t){this.lineStream.push(t)},n.end=function(){this.lineStream.push("\n")},n.addParser=function(t){this.parseStream.addParser(t)},n.addTagMapper=function(t){this.parseStream.addTagMapper(t)},e}(P.a),D=n(116),M=n(46),N=n.n(M),B=n(182),U=function(t){return!!t&&"object"==typeof t},F=function t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.reduce((function(e,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=e[r].concat(n[r]):U(e[r])&&U(n[r])?e[r]=t(e[r],n[r]):e[r]=n[r]})),e}),{})},V=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},H=function(t){if(!t.length)return[];for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e},q="INVALID_NUMBER_OF_PERIOD",W="DASH_EMPTY_MANIFEST",z="DASH_INVALID_XML",G="NO_BASE_URL",Y="SEGMENT_TIME_UNSPECIFIED",X="UNSUPPORTED_UTC_TIMING_SCHEME",K=function(t){var e=t.baseUrl,n=void 0===e?"":e,r=t.source,i=void 0===r?"":r,o=t.range,a=void 0===o?"":o,s=t.indexRange,u=void 0===s?"":s,c={uri:i,resolvedUri:O()(n||"",i)};if(a||u){var l=(a||u).split("-"),f=parseInt(l[0],10),h=parseInt(l[1],10);c.byterange={length:h-f+1,offset:f}}return c},Q={static:function(t){var e=t.duration,n=t.timescale,r=void 0===n?1:n,i=t.sourceDuration;return{start:0,end:Math.ceil(i/(e/r))}},dynamic:function(t){var e=t.NOW,n=t.clientOffset,r=t.availabilityStartTime,i=t.timescale,o=void 0===i?1:i,a=t.duration,s=t.start,u=void 0===s?0:s,c=t.minimumUpdatePeriod,l=void 0===c?0:c,f=t.timeShiftBufferDepth,h=void 0===f?1/0:f,p=(e+n)/1e3,d=r+u,y=p+l-d,m=Math.ceil(y*o/a),v=Math.floor((p-d-h)*o/a),g=Math.floor((p-d)*o/a);return{start:Math.max(0,v),end:Math.min(m,g)}}},$=function(t){var e=t.type,n=void 0===e?"static":e,r=t.duration,i=t.timescale,o=void 0===i?1:i,a=t.sourceDuration,s=Q[n](t),u=function(t,e){for(var n=[],r=t;r<e;r++)n.push(r);return n}(s.start,s.end).map(function(t){return function(e,n){var r=t.duration,i=t.timescale,o=void 0===i?1:i,a=t.periodIndex,s=t.startNumber;return{number:(void 0===s?1:s)+e,duration:r/o,timeline:a,time:n*r}}}(t));if("static"===n){var c=u.length-1;u[c].duration=a-r/o*c}return u},J=function(t){var e=t.baseUrl,n=t.initialization,r=void 0===n?{}:n,i=t.sourceDuration,o=t.indexRange,a=void 0===o?"":o,s=t.duration;if(!e)throw new Error(G);var u=K({baseUrl:e,source:r.sourceURL,range:r.range}),c=K({baseUrl:e,source:e,indexRange:a});if(c.map=u,s){var l=$(t);l.length&&(c.duration=l[0].duration,c.timeline=l[0].timeline)}else i&&(c.duration=i,c.timeline=0);return c.number=0,[c]},Z=function(t,e,n){for(var r=t.sidx.map?t.sidx.map:null,i=t.sidx.duration,o=t.timeline||0,a=t.sidx.byterange,s=a.offset+a.length,u=e.timescale,c=e.references.filter((function(t){return 1!==t.referenceType})),l=[],f=s+e.firstOffset,h=0;h<c.length;h++){var p=e.references[h],d=p.referencedSize,y=p.subsegmentDuration,m=J({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:y,sourceDuration:i,indexRange:f+"-"+(f+d-1)})[0];r&&(m.map=r),l.push(m),f+=d}return t.segments=l,t},tt=function(t){var e;return(e=t.reduce((function(t,e){var n,r=e.attributes.id+(e.attributes.lang||"");return t[r]?(e.segments[0]&&(e.segments[0].discontinuity=!0),(n=t[r].segments).push.apply(n,e.segments),e.attributes.contentProtection&&(t[r].attributes.contentProtection=e.attributes.contentProtection)):t[r]=e,t}),{}),Object.keys(e).map((function(t){return e[t]}))).map((function(t){var e,n;return t.discontinuityStarts=(e=t.segments,n="discontinuity",e.reduce((function(t,e,r){return e[n]&&t.push(r),t}),[])),t}))},et=function(t,e){if(void 0===e&&(e={}),!Object.keys(e).length)return t;for(var n in t){var r=t[n];if(r.sidx){var i=r.sidx.uri+"-"+(a=r.sidx.byterange,s=void 0,s=a.offset+a.length-1,a.offset+"-"+s),o=e[i]&&e[i].sidx;r.sidx&&o&&Z(r,o,r.sidx.resolvedUri)}}var a,s;return t},nt=function(t){var e,n=t.attributes,r=t.segments,i=t.sidx,o={attributes:(e={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},rt=function(t){var e,n=t.attributes,r=t.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((e={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,e);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}},it=function(t){var e,n=t.attributes,r=t.segments,i=t.sidx,o={attributes:(e={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ot=function(t,e,n){var r;if(void 0===n&&(n={}),!t.length)return{};var i=t[0].attributes,o=i.sourceDuration,a=i.type,s=void 0===a?"static":a,u=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,l=tt(t.filter((function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType}))).map(it),f=tt(t.filter((function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType}))),h=t.filter((function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType})),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:o,playlists:et(l,n)};return c>=0&&(p.minimumUpdatePeriod=1e3*c),e&&(p.locations=e),"dynamic"===s&&(p.suggestedPresentationDelay=u),f.length&&(p.mediaGroups.AUDIO.audio=function(t,e){var n;void 0===e&&(e={});var r=t.reduce((function(t,r){var i=r.attributes.role&&r.attributes.role.value||"",o=r.attributes.lang||"",a="main";if(o){var s=i?" ("+i+")":"";a=""+r.attributes.lang+s}return t[a]&&t[a].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth||(t[a]={language:o,autoselect:!0,default:"main"===i,playlists:et([nt(r)],e),uri:""},void 0===n&&"main"===i&&((n=r).default=!0)),t}),{});n||(r[Object.keys(r)[0]].default=!0);return r}(f,n)),h.length&&(p.mediaGroups.SUBTITLES.subs=function(t,e){return void 0===e&&(e={}),t.reduce((function(t,n){var r=n.attributes.lang||"text";return t[r]||(t[r]={language:r,default:!1,autoselect:!1,playlists:et([rt(n)],e),uri:""}),t}),{})}(h,n)),p},at=function(t,e,n){var r=t.NOW,i=t.clientOffset,o=t.availabilityStartTime,a=t.timescale,s=void 0===a?1:a,u=t.start,c=void 0===u?0:u,l=t.minimumUpdatePeriod,f=(r+i)/1e3+(void 0===l?0:l)-(o+c);return Math.ceil((f*s-e)/n)},st=function(t,e){for(var n=t.type,r=void 0===n?"static":n,i=t.minimumUpdatePeriod,o=void 0===i?0:i,a=t.media,s=void 0===a?"":a,u=t.sourceDuration,c=t.timescale,l=void 0===c?1:c,f=t.startNumber,h=void 0===f?1:f,p=t.periodIndex,d=[],y=-1,m=0;m<e.length;m++){var v=e[m],g=v.d,b=v.r||0,_=v.t||0;y<0&&(y=_),_&&_>y&&(y=_);var w=void 0;if(b<0){var T=m+1;w=T===e.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?at(t,y,g):(u*l-y)/g:(e[T].t-y)/g}else w=b+1;for(var S=h+d.length+w,E=h+d.length;E<S;)d.push({number:E,duration:g/l,time:y,timeline:p}),y+=g,E++}return d},ut=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ct=function(t,e){return t.replace(ut,function(t){return function(e,n,r,i){if("$$"===e)return"$";if(void 0===t[n])return e;var o=""+t[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(e))},lt=function(t,e){var n={RepresentationID:t.id,Bandwidth:t.bandwidth||0},r=t.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=K({baseUrl:t.baseUrl,source:ct(i.sourceURL,n),range:i.range});return function(t,e){return t.duration||e?t.duration?$(t):st(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(t,e).map((function(e){n.Number=e.number,n.Time=e.time;var r=ct(t.media||"",n);return{uri:r,timeline:e.timeline,duration:e.duration,resolvedUri:O()(t.baseUrl||"",r),map:o,number:e.number}}))},ft=function(t,e){var n=t.duration,r=t.segmentUrls,i=void 0===r?[]:r;if(!n&&!e||n&&e)throw new Error(Y);var o,a=i.map((function(e){return function(t,e){var n=t.baseUrl,r=t.initialization,i=void 0===r?{}:r,o=K({baseUrl:n,source:i.sourceURL,range:i.range}),a=K({baseUrl:n,source:e.media,range:e.mediaRange});return a.map=o,a}(t,e)}));return n&&(o=$(t)),e&&(o=st(t,e)),o.map((function(t,e){if(a[e]){var n=a[e];return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n}})).filter((function(t){return t}))},ht=function(t){var e,n,r=t.attributes,i=t.segmentInfo;i.template?(n=lt,e=F(r,i.template)):i.base?(n=J,e=F(r,i.base)):i.list&&(n=ft,e=F(r,i.list));var o={attributes:r};if(!n)return o;var a=n(e,i.timeline);if(e.duration){var s=e,u=s.duration,c=s.timescale,l=void 0===c?1:c;e.duration=u/l}else a.length?e.duration=a.reduce((function(t,e){return Math.max(t,Math.ceil(e.duration))}),0):e.duration=0;return o.attributes=e,o.segments=a,i.base&&e.indexRange&&(o.sidx=a[0],o.segments=[]),o},pt=function(t,e){return H(t.childNodes).filter((function(t){return t.tagName===e}))},dt=function(t){return t.textContent.trim()},yt=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var n=e.slice(1),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},mt={mediaPresentationDuration:function(t){return yt(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return yt(t)},suggestedPresentationDelay:function(t){return yt(t)},type:function(t){return t},timeShiftBufferDepth:function(t){return yt(t)},start:function(t){return yt(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?yt(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},vt=function(t){return t&&t.attributes?H(t.attributes).reduce((function(t,e){var n=mt[e.name]||mt.DEFAULT;return t[e.name]=n(e.value),t}),{}):{}},gt={"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"},bt=function(t,e){return e.length?V(t.map((function(t){return e.map((function(e){return O()(t,dt(e))}))}))):t},_t=function(t){var e=pt(t,"SegmentTemplate")[0],n=pt(t,"SegmentList")[0],r=n&&pt(n,"SegmentURL").map((function(t){return F({tag:"SegmentURL"},vt(t))})),i=pt(t,"SegmentBase")[0],o=n||e,a=o&&pt(o,"SegmentTimeline")[0],s=n||i||e,u=s&&pt(s,"Initialization")[0],c=e&&vt(e);c&&u?c.initialization=u&&vt(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var l={template:c,timeline:a&&pt(a,"S").map((function(t){return vt(t)})),list:n&&F(vt(n),{segmentUrls:r,initialization:vt(u)}),base:i&&F(vt(i),{initialization:vt(u)})};return Object.keys(l).forEach((function(t){l[t]||delete l[t]})),l},wt=function(t,e,n){return function(r){var i=vt(r),o=bt(e,pt(r,"BaseURL")),a=pt(r,"Role")[0],s={role:vt(a)},u=F(t,i,s),c=pt(r,"ContentProtection").reduce((function(t,e){var n=vt(e),r=gt[n.schemeIdUri];if(r){t[r]={attributes:n};var i=pt(e,"cenc:pssh")[0];if(i){var o=dt(i),a=o&&L()(o);t[r].pssh=a}}return t}),{});Object.keys(c).length&&(u=F(u,{contentProtection:c}));var l=_t(r),f=pt(r,"Representation"),h=F(n,l);return V(f.map(function(t,e,n){return function(r){var i=pt(r,"BaseURL"),o=bt(e,i),a=F(t,vt(r)),s=_t(r);return o.map((function(t){return{segmentInfo:F(n,s),attributes:F(a,{baseUrl:t})}}))}}(u,o,h)))}},Tt=function(t,e){return function(n,r){var i=bt(e,pt(n,"BaseURL")),o=vt(n),a=parseInt(o.id,10),s=N.a.isNaN(a)?r:a,u=F(t,{periodIndex:s}),c=pt(n,"AdaptationSet"),l=_t(n);return V(c.map(wt(u,i,l)))}},St=function(t){if(""===t)throw new Error(W);var e,n,r=new B.DOMParser;try{n=(e=r.parseFromString(t,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(t){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(z);return n},Et=function(t,e){void 0===e&&(e={});var n=function(t,e){void 0===e&&(e={});var n=e,r=n.manifestUri,i=void 0===r?"":r,o=n.NOW,a=void 0===o?Date.now():o,s=n.clientOffset,u=void 0===s?0:s,c=pt(t,"Period");if(!c.length)throw new Error(q);var l=pt(t,"Location"),f=vt(t),h=bt([i],pt(t,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=a,f.clientOffset=u,l.length&&(f.locations=l.map(dt)),{locations:f.locations,representationInfo:V(c.map(Tt(f,h)))}}(St(t),e),r=n.representationInfo.map(ht);return ot(r,n.locations,e.sidxMapping)},kt=function(t){return function(t){var e=pt(t,"UTCTiming")[0];if(!e)return null;var n=vt(e);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;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(X)}return n}(St(t))},Ot=Z,Ct=n(183),Pt=n.n(Ct),xt=n(52),Lt=n(88),At=n(184),It=n.n(At),jt=n(51),Rt=n(117),Dt=n.n(Rt),Mt=n(17),Nt=[];var Bt=function t(e){var n,r="info",o=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n("log",r,e)};return n=function(t,e){return function(n,r,o){var a=e.levels[r],s=new RegExp("^("+a+")$");if("log"!==n&&o.unshift(n.toUpperCase()+":"),o.unshift(t+":"),Nt){Nt.push([].concat(o));var u=Nt.length-1e3;Nt.splice(0,u>0?u:0)}if(i.a.console){var c=i.a.console[n];c||"debug"!==n||(c=i.a.console.info||i.a.console.log),c&&a&&s.test(n)&&c[Array.isArray(o)?"apply":"call"](i.a.console,o)}}}(e,o),o.createLogger=function(n){return t(e+": "+n)},o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},o.level=function(t){if("string"==typeof t){if(!o.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');r=t}return r},(o.history=function(){return Nt?[].concat(Nt):[]}).filter=function(t){return(Nt||[]).filter((function(e){return new RegExp(".*"+t+".*").test(e[0])}))},o.history.clear=function(){Nt&&(Nt.length=0)},o.history.disable=function(){null!==Nt&&(Nt.length=0,Nt=null)},o.history.enable=function(){null===Nt&&(Nt=[])},o.error=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("error",r,e)},o.warn=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("warn",r,e)},o.debug=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("debug",r,e)},o}("VIDEOJS"),Ut=Bt.createLogger,Ft=Object.prototype.toString,Vt=function(t){return Wt(t)?Object.keys(t):[]};function Ht(t,e){Vt(t).forEach((function(n){return e(t[n],n)}))}function qt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object.assign?u.a.apply(void 0,[t].concat(n)):(n.forEach((function(e){e&&Ht(e,(function(e,n){t[n]=e}))})),t)}function Wt(t){return!!t&&"object"==typeof t}function zt(t){return Wt(t)&&"[object Object]"===Ft.call(t)&&t.constructor===Object}function Gt(t,e){if(!t||!e)return"";if("function"==typeof i.a.getComputedStyle){var n=i.a.getComputedStyle(t);return n?n.getPropertyValue(e)||n[e]:""}return""}function Yt(t){return"string"==typeof t&&Boolean(t.trim())}function Xt(t){if(t.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Kt(){return a.a===i.a.document}function Qt(t){return Wt(t)&&1===t.nodeType}function $t(){try{return i.a.parent!==i.a.self}catch(t){return!0}}function Jt(t){return function(e,n){if(!Yt(e))return a.a[t](null);Yt(n)&&(n=a.a.querySelector(n));var r=Qt(n)?n:a.a;return r[t]&&r[t](e)}}function Zt(t,e,n,r){void 0===t&&(t="div"),void 0===e&&(e={}),void 0===n&&(n={});var i=a.a.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Bt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+t+" to "+n+"."),i.setAttribute(t,n)):"textContent"===t?te(i,n):i[t]===n&&"tabIndex"!==t||(i[t]=n)})),Object.getOwnPropertyNames(n).forEach((function(t){i.setAttribute(t,n[t])})),r&&be(i,r),i}function te(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function ee(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function ne(t,e){return Xt(e),t.classList?t.classList.contains(e):(n=e,new RegExp("(^|\\s)"+n+"($|\\s)")).test(t.className);var n}function re(t,e){return t.classList?t.classList.add(e):ne(t,e)||(t.className=(t.className+" "+e).trim()),t}function ie(t,e){return t.classList?t.classList.remove(e):(Xt(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function oe(t,e,n){var r=ne(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?re(t,e):ie(t,e),t}function ae(t,e){Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];null==r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)}))}function se(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,a=r[i].value;"boolean"!=typeof t[o]&&-1===n.indexOf(","+o+",")||(a=null!==a),e[o]=a}return e}function ue(t,e){return t.getAttribute(e)}function ce(t,e,n){t.setAttribute(e,n)}function le(t,e){t.removeAttribute(e)}function fe(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function he(){a.a.onselectstart=function(){return!0}}function pe(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n.height||(n.height=parseFloat(Gt(t,"height"))),n.width||(n.width=parseFloat(Gt(t,"width"))),n}}function de(t){if(!t||t&&!t.offsetParent)return{left:0,top:0,width:0,height:0};var e=t.offsetWidth,n=t.offsetHeight,r=0,i=0;do{r+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent}while(t);return{left:r,top:i,width:e,height:n}}function ye(t,e){var n={},r=de(e.target),i=de(t),o=i.width,a=i.height,s=e.offsetY-(i.top-r.top),u=e.offsetX-(i.left-r.left);return e.changedTouches&&(u=e.changedTouches[0].pageX-i.left,s=e.changedTouches[0].pageY+i.top),n.y=1-Math.max(0,Math.min(1,s/a)),n.x=Math.max(0,Math.min(1,u/o)),n}function me(t){return Wt(t)&&3===t.nodeType}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function ge(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),Qt(t)||me(t)?t:"string"==typeof t&&/\S/.test(t)?a.a.createTextNode(t):void 0})).filter((function(t){return t}))}function be(t,e){return ge(e).forEach((function(e){return t.appendChild(e)})),t}function _e(t,e){return be(ve(t),e)}function we(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||("mouseup"===t.type&&0===t.button&&0===t.buttons||0===t.button&&1===t.buttons))}var Te,Se=Jt("querySelector"),Ee=Jt("querySelectorAll"),ke=Object.freeze({__proto__:null,isReal:Kt,isEl:Qt,isInFrame:$t,createEl:Zt,textContent:te,prependTo:ee,hasClass:ne,addClass:re,removeClass:ie,toggleClass:oe,setAttributes:ae,getAttributes:se,getAttribute:ue,setAttribute:ce,removeAttribute:le,blockTextSelection:fe,unblockTextSelection:he,getBoundingClientRect:pe,findPosition:de,getPointerPosition:ye,isTextNode:me,emptyEl:ve,normalizeContent:ge,appendContent:be,insertContent:_e,isSingleLeftClick:we,$:Se,$$:Ee}),Oe=!1,Ce=function(){if(Kt()&&!1!==Te.options.autoSetup){var t=Array.prototype.slice.call(a.a.getElementsByTagName("video")),e=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(!s||!s.getAttribute){Pe(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Te(s)}else Oe||Pe(1)}};function Pe(t,e){e&&(Te=e),i.a.setTimeout(Ce,t)}function xe(){Oe=!0,i.a.removeEventListener("load",xe)}Kt()&&("complete"===a.a.readyState?xe():i.a.addEventListener("load",xe));var Le,Ae=function(t){var e=a.a.createElement("style");return e.className=t,e},Ie=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},je=3;function Re(){return je++}i.a.WeakMap||(Le=function(){function t(){this.vdata="vdata"+Math.floor(i.a.performance&&i.a.performance.now()||Date.now()),this.data={}}var e=t.prototype;return e.set=function(t,e){var n=t[this.vdata]||Re();return t[this.vdata]||(t[this.vdata]=n),this.data[n]=e,this},e.get=function(t){var e=t[this.vdata];if(e)return this.data[e];Bt("We have no data for this element",t)},e.has=function(t){return t[this.vdata]in this.data},e.delete=function(t){var e=t[this.vdata];e&&(delete this.data[e],delete t[this.vdata])},t}());var De,Me=i.a.WeakMap?new WeakMap:new Le;function Ne(t,e){if(Me.has(t)){var n=Me.get(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Me.delete(t)}}function Be(t,e,n,r){n.forEach((function(n){t(e,n,r)}))}function Ue(t){if(t.fixed_)return t;function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||i.a.event;for(var o in t={},r)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&r.preventDefault||(t[o]=r[o]));if(t.target||(t.target=t.srcElement||a.a),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var s=a.a.documentElement,u=a.a.body;t.pageX=t.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t.fixed_=!0,t}var Fe=["touchstart","touchmove"];function Ve(t,e,n){if(Array.isArray(e))return Be(Ve,t,e,n);Me.has(t)||Me.set(t,{});var r=Me.get(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=Re()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=Ue(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!e.isImmediatePropagationStopped();a++)try{o[a].call(t,e,n)}catch(t){Bt.error(t)}}}),1===r.handlers[e].length)if(t.addEventListener){var o=!1;(function(){if("boolean"!=typeof De){De=!1;try{var t=Object.defineProperty({},"passive",{get:function(){De=!0}});i.a.addEventListener("test",null,t),i.a.removeEventListener("test",null,t)}catch(t){}}return De})()&&Fe.indexOf(e)>-1&&(o={passive:!0}),t.addEventListener(e,r.dispatcher,o)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function He(t,e,n){if(Me.has(t)){var r=Me.get(t);if(r.handlers){if(Array.isArray(e))return Be(He,t,e,n);var i=function(t,e){r.handlers[e]=[],Ne(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);Ne(t,e)}else i(t,e)}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(t,s)}}}function qe(t,e,n){var r=Me.has(t)?Me.get(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=Ue(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)qe.call(null,i,e,n);else if(!i&&!e.defaultPrevented&&e.target&&e.target[e.type]){Me.has(e.target)||Me.set(e.target,{});var o=Me.get(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function We(t,e,n){if(Array.isArray(e))return Be(We,t,e,n);var r=function r(){He(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Re(),Ve(t,e,r)}function ze(t,e,n){var r=function r(){He(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Re(),Ve(t,e,r)}var Ge,Ye=Object.freeze({__proto__:null,fixEvent:Ue,on:Ve,off:He,trigger:qe,one:We,any:ze}),Xe=function(t,e,n){e.guid||(e.guid=Re());var r=e.bind(t);return r.guid=n?n+"_"+e.guid:e.guid,r},Ke=function(t,e){var n=i.a.performance.now();return function(){var r=i.a.performance.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},Qe=function(){};Qe.prototype.allowedEvents_={},Qe.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Ve(this,t,e),this.addEventListener=n},Qe.prototype.addEventListener=Qe.prototype.on,Qe.prototype.off=function(t,e){He(this,t,e)},Qe.prototype.removeEventListener=Qe.prototype.off,Qe.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},We(this,t,e),this.addEventListener=n},Qe.prototype.any=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},ze(this,t,e),this.addEventListener=n},Qe.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=Ue(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),qe(this,t)},Qe.prototype.dispatchEvent=Qe.prototype.trigger,Qe.prototype.queueTrigger=function(t){var e=this;Ge||(Ge=new Map);var n=t.type||t,r=Ge.get(this);r||(r=new Map,Ge.set(this,r));var o=r.get(n);r.delete(n),i.a.clearTimeout(o);var a=i.a.setTimeout((function(){0===r.size&&(r=null,Ge.delete(e)),e.trigger(t)}),0);r.set(n,a)};var $e=function(t){return t instanceof Qe||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"==typeof t[e]}))},Je=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Ze=function(t){if(!t.nodeName&&!$e(t))throw new Error("Invalid target; must be a DOM node or evented object.")},tn=function(t){if(!Je(t))throw new Error("Invalid event type; must be a non-empty string or array.")},en=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},nn=function(t,e){var n,r,i,o=e.length<3||e[0]===t||e[0]===t.eventBusEl_;return o?(n=t.eventBusEl_,e.length>=3&&e.shift(),r=e[0],i=e[1]):(n=e[0],r=e[1],i=e[2]),Ze(n),tn(r),en(i),{isTargetingSelf:o,target:n,type:r,listener:i=Xe(t,i)}},rn=function(t,e,n,r){Ze(t),t.nodeName?Ye[e](t,n,r):t[e](n,r)},on={on:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=nn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(rn(a,"on",s,u),!o){var c=function(){return t.off(a,s,u)};c.guid=u.guid;var l=function(){return t.off("dispose",c)};l.guid=u.guid,rn(this,"on","dispose",c),rn(a,"on","dispose",l)}},one:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=nn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)rn(a,"one",s,u);else{var c=function e(){t.off(a,s,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,rn(a,"one",s,c)}},any:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=nn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)rn(a,"any",s,u);else{var c=function e(){t.off(a,s,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};c.guid=u.guid,rn(a,"any",s,c)}},off:function(t,e,n){if(!t||Je(t))He(this.eventBusEl_,t,e);else{var r=t,i=e;Ze(r),tn(i),en(n),n=Xe(this,n),this.off("dispose",n),r.nodeName?(He(r,i,n),He(r,"dispose",n)):$e(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return qe(this.eventBusEl_,t,e)}};function an(t,e){void 0===e&&(e={});var n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=Zt("span",{className:"vjs-event-bus"});return qt(t,on),t.eventedCallbacks&&t.eventedCallbacks.forEach((function(t){t()})),t.on("dispose",(function(){t.off(),i.a.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var sn={state:{},setState:function(t){var e,n=this;return"function"==typeof t&&(t=t()),Ht(t,(function(t,r){n.state[r]!==t&&((e=e||{})[r]={from:n.state[r],to:t}),n.state[r]=t})),e&&$e(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function un(t,e){return qt(t,sn),t.state=qt({},t.state,e),"function"==typeof t.handleStateChanged&&$e(t)&&t.on("statechanged",t.handleStateChanged),t}var cn=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toLowerCase()}))},ln=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))};function fn(){for(var t={},e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){e&&Ht(e,(function(e,n){zt(e)?(zt(t[n])||(t[n]={}),t[n]=fn(t[n],e)):t[n]=e}))})),t}var hn=function(){function t(){this.map_={}}var e=t.prototype;return e.has=function(t){return t in this.map_},e.delete=function(t){var e=this.has(t);return delete this.map_[t],e},e.set=function(t,e){return this.map_[t]=e,this},e.forEach=function(t,e){for(var n in this.map_)t.call(e,this.map_[n],n,this)},t}(),pn=i.a.Map?i.a.Map:hn,dn=function(){function t(){this.set_={}}var e=t.prototype;return e.has=function(t){return t in this.set_},e.delete=function(t){var e=this.has(t);return delete this.set_[t],e},e.add=function(t){return this.set_[t]=1,this},e.forEach=function(t,e){for(var n in this.set_)t.call(e,n,n,this)},t}(),yn=i.a.Set?i.a.Set:dn,mn=function(){function t(t,e,n){if(!t&&this.play?this.player_=t=this:this.player_=t,this.isDisposed_=!1,this.parentComponent_=null,this.options_=fn({},this.options_),e=this.options_=fn(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var r=t&&t.id&&t.id()||"no_player";this.id_=r+"_component_"+Re()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&(an(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),un(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new yn,this.setIntervalIds_=new yn,this.rafIds_=new yn,this.namedRafs_=new pn,this.clearingTimersOnDispose_=!1,!1!==e.initChildren&&this.initChildren(),this.ready(n),!1!==e.reportTouchActivity&&this.enableTouchActivity()}var e=t.prototype;return e.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 t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Me.has(this.el_)&&Me.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(t){return t?(this.options_=fn(this.options_,t),this.options_):this.options_},e.el=function(){return this.el_},e.createEl=function(t,e,n){return Zt(t,e,n)},e.localize=function(t,e,n){void 0===n&&(n=t);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[t]?u=o[t]:s&&s[t]&&(u=s[t]),e&&(u=u.replace(/\{(\d+)\}/g,(function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i}))),u},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(t){return this.childIndex_[t]},e.getChild=function(t){if(t)return this.childNameIndex_[t]},e.getDescendant=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e=e.reduce((function(t,e){return t.concat(e)}),[]);for(var r=this,i=0;i<e.length;i++)if(!(r=r.getChild(e[i]))||!r.getChild)return;return r},e.addChild=function(e,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof e){o=ln(e);var a=n.componentClass||o;n.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=e;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&ln(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[cn(o)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Qt(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},e.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){t.parentComponent_=null,this.childIndex_[t.id()]=null,this.childNameIndex_[ln(t.name())]=null,this.childNameIndex_[cn(t.name())]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},e.initChildren=function(){var e=this,n=this.options_.children;if(n){var r,i=this.options_,o=t.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(t){return!r.some((function(e){return"string"==typeof e?t===e:t===e.name}))}))).map((function(t){var r,i;return"string"==typeof t?i=n[r=t]||e.options_[r]||{}:(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||ln(e.name));return n&&!o.isTech(n)})).forEach((function(t){var n=t.name,r=t.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var o=e.addChild(n,r);o&&(e[n]=o)}}))}},e.buildCSSClass=function(){return""},e.ready=function(t,e){if(void 0===e&&(e=!1),t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},e.$=function(t,e){return Se(t,e||this.contentEl())},e.$$=function(t,e){return Ee(t,e||this.contentEl())},e.hasClass=function(t){return ne(this.el_,t)},e.addClass=function(t){re(this.el_,t)},e.removeClass=function(t){ie(this.el_,t)},e.toggleClass=function(t,e){oe(this.el_,t,e)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(t){return ue(this.el_,t)},e.setAttribute=function(t,e){ce(this.el_,t,e)},e.removeAttribute=function(t){le(this.el_,t)},e.width=function(t,e){return this.dimension("width",t,e)},e.height=function(t,e){return this.dimension("height",t,e)},e.dimensions=function(t,e){this.width(t,!0),this.height(e)},e.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+ln(t)],10)},e.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if(e=Gt(this.el_,t),0===(e=parseFloat(e))||isNaN(e)){var n="offset"+ln(t);e=this.el_[n]}return e},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(t){this.player_&&(t.stopPropagation(),this.player_.handleKeyDown(t))},e.handleKeyPress=function(t){this.handleKeyDown(t)},e.emitTapEvents=function(){var t,e=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},e=i.a.performance.now(),t=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)t=!1;else if(n){var r=e.touches[0].pageX-n.pageX,i=e.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(t=!1)}}));var r=function(){t=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===t)&&(i.a.performance.now()-e<200&&(r.preventDefault(),this.trigger("tap")))}))},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,e=Xe(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var n=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}},e.setTimeout=function(t,e){var n,r=this;return t=Xe(this,t),this.clearTimersOnDispose_(),n=i.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),t()}),e),this.setTimeoutIds_.add(n),n},e.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),i.a.clearTimeout(t)),t},e.setInterval=function(t,e){t=Xe(this,t),this.clearTimersOnDispose_();var n=i.a.setInterval(t,e);return this.setIntervalIds_.add(n),n},e.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),i.a.clearInterval(t)),t},e.requestAnimationFrame=function(t){var e,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=Xe(this,t),e=i.a.requestAnimationFrame((function(){n.rafIds_.has(e)&&n.rafIds_.delete(e),t()})),this.rafIds_.add(e),e):this.setTimeout(t,1e3/60)},e.requestNamedAnimationFrame=function(t,e){var n=this;if(!this.namedRafs_.has(t)){this.clearTimersOnDispose_(),e=Xe(this,e);var r=this.requestAnimationFrame((function(){e(),n.namedRafs_.has(t)&&n.namedRafs_.delete(t)}));return this.namedRafs_.set(t,r),t}},e.cancelNamedAnimationFrame=function(t){this.namedRafs_.has(t)&&(this.cancelAnimationFrame(this.namedRafs_.get(t)),this.namedRafs_.delete(t))},e.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),i.a.cancelAnimationFrame(t)),t):this.clearTimeout(t)},e.clearTimersOnDispose_=function(){var t=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(e){var n=e[0],r=e[1];t[n].forEach((function(e,n){return t[r](n)}))})),t.clearingTimersOnDispose_=!1})))},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r,i=t.getComponent("Tech"),o=i&&i.isTech(n),a=t===n||t.prototype.isPrototypeOf(n.prototype);if(o||!a)throw r=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+r+".");e=ln(e),t.components_||(t.components_={});var s=t.getComponent("Player");if("Player"===e&&s&&s.players){var u=s.players,c=Object.keys(u);if(u&&c.length>0&&c.map((function(t){return u[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[cn(e)]=n,n},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();mn.prototype.supportsRaf_="function"==typeof i.a.requestAnimationFrame&&"function"==typeof i.a.cancelAnimationFrame,mn.registerComponent("Component",mn);var vn,gn=i.a.navigator&&i.a.navigator.userAgent||"",bn=/AppleWebKit\/([\d.]+)/i.exec(gn),_n=bn?parseFloat(bn.pop()):null,wn=/iPod/i.test(gn),Tn=(vn=gn.match(/OS (\d+)_/i))&&vn[1]?vn[1]:null,Sn=/Android/i.test(gn),En=function(){var t=gn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),kn=Sn&&En<5&&_n<537,On=/Firefox/i.test(gn),Cn=/Edg/i.test(gn),Pn=!Cn&&(/Chrome/i.test(gn)||/CriOS/i.test(gn)),xn=function(){var t=gn.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),Ln=function(){var t=/MSIE\s(\d+)\.\d/.exec(gn),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(gn)&&/rv:11.0/.test(gn)&&(e=11),e}(),An=/Safari/i.test(gn)&&!Pn&&!Sn&&!Cn,In=/Windows/i.test(gn),jn=Boolean(Kt()&&("ontouchstart"in i.a||i.a.navigator.maxTouchPoints||i.a.DocumentTouch&&i.a.document instanceof i.a.DocumentTouch)),Rn=/iPad/i.test(gn)||An&&jn&&!/iPhone/i.test(gn),Dn=/iPhone/i.test(gn)&&!Rn,Mn=Dn||Rn||wn,Nn=(An||Mn)&&!Pn,Bn=Object.freeze({__proto__:null,IS_IPOD:wn,IOS_VERSION:Tn,IS_ANDROID:Sn,ANDROID_VERSION:En,IS_NATIVE_ANDROID:kn,IS_FIREFOX:On,IS_EDGE:Cn,IS_CHROME:Pn,CHROME_VERSION:xn,IE_VERSION:Ln,IS_SAFARI:An,IS_WINDOWS:In,TOUCH_ENABLED:jn,IS_IPAD:Rn,IS_IPHONE:Dn,IS_IOS:Mn,IS_ANY_SAFARI:Nn});function Un(t,e,n,r){return function(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}(t,r,n.length-1),n[r][e]}function Fn(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:Un.bind(null,"start",0,t),end:Un.bind(null,"end",1,t)}}function Vn(t,e){return Array.isArray(t)?Fn(t):void 0===t||void 0===e?Fn():Fn([[t,e]])}function Hn(t,e){var n,r,i=0;if(!e)return 0;t&&t.length||(t=Vn(0,0));for(var o=0;o<t.length;o++)n=t.start(o),(r=t.end(o))>e&&(r=e),i+=r-n;return i/e}for(var qn,Wn={prefixed:!0},zn=[["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"]],Gn=zn[0],Yn=0;Yn<zn.length;Yn++)if(zn[Yn][1]in a.a){qn=zn[Yn];break}if(qn){for(var Xn=0;Xn<qn.length;Xn++)Wn[Gn[Xn]]=qn[Xn];Wn.prefixed=qn[0]!==Gn[0]}function Kn(t){if(t instanceof Kn)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Wt(t)&&("number"==typeof t.code&&(this.code=t.code),qt(this,t)),this.message||(this.message=Kn.defaultMessages[this.code]||"")}Kn.prototype.code=0,Kn.prototype.message="",Kn.prototype.status=null,Kn.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Kn.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 Qn=0;Qn<Kn.errorTypes.length;Qn++)Kn[Kn.errorTypes[Qn]]=Qn,Kn.prototype[Kn.errorTypes[Qn]]=Qn;function $n(t){return null!=t&&"function"==typeof t.then}function Jn(t){$n(t)&&t.then(null,(function(t){}))}var Zn=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(e,n,r){return t[n]&&(e[n]=t[n]),e}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},tr=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,(function(t){return t.track}));return Array.prototype.map.call(e,(function(t){var e=Zn(t.track);return t.src&&(e.src=t.src),e})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===n.indexOf(t)})).map(Zn))},er=function(t,e){return t.forEach((function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return n.addCue(t)}))})),e.textTracks()},nr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=Zt("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=Zt("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),te(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.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,t.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+t.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},n.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&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(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),_e(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),ve(this.contentEl()),this.trigger("modalempty")},n.content=function(t){return void 0!==t&&(this.content_=t),this.content_},n.conditionalFocus_=function(){var t=a.a.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(t){if(t.stopPropagation(),m.a.isEventKey(t,"Escape")&&this.closeable())return t.preventDefault(),void this.close();if(m.a.isEventKey(t,"Tab")){for(var e,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){e=i;break}a.a.activeElement===this.el_&&(e=0),t.shiftKey&&0===e?(n[n.length-1].focus(),t.preventDefault()):t.shiftKey||e!==n.length-1||(n[0].focus(),t.preventDefault())}},n.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,(function(t){return(t instanceof i.a.HTMLAnchorElement||t instanceof i.a.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof i.a.HTMLInputElement||t instanceof i.a.HTMLSelectElement||t instanceof i.a.HTMLTextAreaElement||t instanceof i.a.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof i.a.HTMLIFrameElement||t instanceof i.a.HTMLObjectElement||t instanceof i.a.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")}))},e}(mn);nr.prototype.options_={pauseOnOpen:!0,temporary:!0},mn.registerComponent("ModalDialog",nr);var rr=function(t){function e(e){var n;void 0===e&&(e=[]),(n=t.call(this)||this).tracks_=[],Object.defineProperty(l()(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<e.length;r++)n.addTrack(e[r]);return n}h()(e,t);var n=e.prototype;return n.addTrack=function(t){var e=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack",target:this})),t.labelchange_=function(){e.trigger({track:t,type:"labelchange",target:e})},$e(t)&&t.addEventListener("labelchange",t.labelchange_)},n.removeTrack=function(t){for(var e,n=0,r=this.length;n<r;n++)if(this[n]===t){(e=this[n]).off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack",target:this})},n.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(Qe);for(var ir in rr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},rr.prototype.allowedEvents_)rr.prototype["on"+ir]=null;var or=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},ar=function(t){function e(e){var n;void 0===e&&(e=[]);for(var r=e.length-1;r>=0;r--)if(e[r].enabled){or(e,e[r]);break}return(n=t.call(this,e)||this).changing_=!1,n}h()(e,t);var n=e.prototype;return n.addTrack=function(e){var n=this;e.enabled&&or(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){n.changing_||(n.changing_=!0,or(n,e),n.changing_=!1,n.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},n.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(rr),sr=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},ur=function(t){function e(e){var n;void 0===e&&(e=[]);for(var r=e.length-1;r>=0;r--)if(e[r].selected){sr(e,e[r]);break}return(n=t.call(this,e)||this).changing_=!1,Object.defineProperty(l()(n),"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n}h()(e,t);var n=e.prototype;return n.addTrack=function(e){var n=this;e.selected&&sr(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){n.changing_||(n.changing_=!0,sr(n,e),n.changing_=!1,n.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},n.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},e}(rr),cr=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.addTrack=function(e){var n=this;t.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e}(rr),lr=function(){function t(t){void 0===t&&(t=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,n=t.length;e<n;e++)this.addTrackElement_(t[e])}var e=t.prototype;return e.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},e.getTrackElementByTrack_=function(t){for(var e,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},e.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_[e].track&&"function"==typeof this.trackElements_[e].track.off&&this.trackElements_[e].track.off(),"function"==typeof this.trackElements_[e].off&&this.trackElements_[e].off(),this.trackElements_.splice(e,1);break}},t}(),fr=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},e.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),hr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},pr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},dr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},yr={disabled:"disabled",hidden:"hidden",showing:"showing"},mr=function(t){function e(e){var n;void 0===e&&(e={}),n=t.call(this)||this;var r={id:e.id||"vjs_track_"+Re(),kind:e.kind||"",language:e.language||""},i=e.label||"",o=function(t){Object.defineProperty(l()(n),t,{get:function(){return r[t]},set:function(){}})};for(var a in r)o(a);return Object.defineProperty(l()(n),"label",{get:function(){return i},set:function(t){t!==i&&(i=t,this.trigger("labelchange"))}}),n}return h()(e,t),e}(Qe),vr=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=a.a.createElement("a");n.href=t;var r,o=""===n.host&&"file:"!==n.protocol;o&&((r=a.a.createElement("div")).innerHTML='<a href="'+t+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),a.a.body.appendChild(r));for(var s={},u=0;u<e.length;u++)s[e[u]]=n[e[u]];return"http:"===s.protocol&&(s.host=s.host.replace(/:80$/,"")),"https:"===s.protocol&&(s.host=s.host.replace(/:443$/,"")),s.protocol||(s.protocol=i.a.location.protocol),o&&a.a.body.removeChild(r),s},gr=function(t){if(!t.match(/^https?:\/\//)){var e=a.a.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},br=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(t);if(e)return e.pop().toLowerCase()}return""},_r=function(t,e){void 0===e&&(e=i.a.location);var n=vr(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},wr=Object.freeze({__proto__:null,parseUrl:vr,getAbsoluteURL:gr,getFileExtension:br,isCrossOrigin:_r}),Tr=function(t,e){var n=new i.a.WebVTT.Parser(i.a,i.a.vttjs,i.a.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(i.a.console&&i.a.console.groupCollapsed&&i.a.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach((function(t){return Bt.error(t)})),i.a.console&&i.a.console.groupEnd&&i.a.console.groupEnd()),n.flush()},Sr=function(t,e){var n={uri:t},r=_r(t);r&&(n.cors=r);var o="use-credentials"===e.tech_.crossOrigin();o&&(n.withCredentials=o),g()(n,Xe(this,(function(t,n,r){if(t)return Bt.error(t,n);e.loaded_=!0,"function"!=typeof i.a.WebVTT?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],(function(t){if("vttjserror"!==t.type)return Tr(r,e);Bt.error("vttjs failed to load, stopping trying to process "+e.src)})):Tr(r,e)})))},Er=function(t){function e(e){var n;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var r=fn(e,{kind:dr[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=yr[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=t.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new fr(n.cues_),s=new fr(n.activeCues_),u=!1,c=Xe(l()(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",c)}),!0),Object.defineProperties(l()(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(t){var e=this;yr[t]&&(i=t,this.preload_||"disabled"===i||0!==this.cues.length||Sr(this.src,this),"disabled"!==i?this.tech_.ready((function(){e.tech_.on("timeupdate",c)}),!0):this.tech_.off("timeupdate",c),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 s;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=t&&i.endTime>=t||i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t)&&e.push(i)}if(u=!1,e.length!==this.activeCues_.length)u=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(u=!0);return this.activeCues_=e,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||o||"subtitles"!==r.kind&&"captions"!==r.kind)&&Sr(n.src,l()(n))):n.loaded_=!0,n}h()(e,t);var n=e.prototype;return n.addCue=function(t){var e=t;if(i.a.vttjs&&!(t instanceof i.a.vttjs.VTTCue)){for(var n in e=new i.a.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),o=0;o<r.length;o++)r[o]!==this&&r[o].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},n.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(mr);Er.prototype.allowedEvents_={cuechange:"cuechange"};var kr=function(t){function e(e){var n;void 0===e&&(e={});var r=fn(e,{kind:pr[e.kind]||""});n=t.call(this,r)||this;var i=!1;return Object.defineProperty(l()(n),"enabled",{get:function(){return i},set:function(t){"boolean"==typeof t&&t!==i&&(i=t,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return h()(e,t),e}(mr),Or=function(t){function e(e){var n;void 0===e&&(e={});var r=fn(e,{kind:hr[e.kind]||""});n=t.call(this,r)||this;var i=!1;return Object.defineProperty(l()(n),"selected",{get:function(){return i},set:function(t){"boolean"==typeof t&&t!==i&&(i=t,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return h()(e,t),e}(mr),Cr=function(t){function e(e){var n,r;void 0===e&&(e={}),n=t.call(this)||this;var i=new Er(e);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(l()(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:l()(n)})})),n}return h()(e,t),e}(Qe);Cr.prototype.allowedEvents_={load:"load"},Cr.NONE=0,Cr.LOADING=1,Cr.LOADED=2,Cr.ERROR=3;var Pr={audio:{ListClass:ar,TrackClass:kr,capitalName:"Audio"},video:{ListClass:ur,TrackClass:Or,capitalName:"Video"},text:{ListClass:cr,TrackClass:Er,capitalName:"Text"}};Object.keys(Pr).forEach((function(t){Pr[t].getterName=t+"Tracks",Pr[t].privateName=t+"Tracks_"}));var xr={remoteText:{ListClass:cr,TrackClass:Er,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:lr,TrackClass:Cr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Lr=u()({},Pr,xr);xr.names=Object.keys(xr),Pr.names=Object.keys(Pr),Lr.names=[].concat(xr.names).concat(Pr.names);var Ar=function(t){function e(e,n){var r;return void 0===e&&(e={}),void 0===n&&(n=function(){}),e.reportTouchActivity=!1,(r=t.call(this,null,e,n)||this).hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Lr.names.forEach((function(t){var n=Lr[t];e&&e[n.getterName]&&(r[n.privateName]=e[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===e["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==e.preloadTextTracks,r.autoRemoteTextTracks_=new Lr.text.ListClass,r.initTrackListeners(),e.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}h()(e,t);var n=e.prototype;return n.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,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(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Xe(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(t){this.duration_=this.duration()},n.buffered=function(){return Vn(0,0)},n.bufferedPercent=function(){return Hn(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(Pr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},n.clearTracks=function(t){var e=this;(t=[].concat(t)).forEach((function(t){for(var n=e[t+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(t){return void 0!==t&&(this.error_=new Kn(t),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Vn(0,0):Vn()},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 t=this;Pr.names.forEach((function(e){var n=Pr[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var t=this;if(!i.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&zt(_.a)&&Object.keys(_.a).length>0)return void this.trigger("vttjsloaded");var e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),i.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},a=function(){o();for(var t=0;t<e.length;t++){var n=e[t];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",o)}}))},n.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,n,r,i){void 0===i&&(i={});var o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var a=new Lr.text.TrackClass(i);return o.addTrack(a),a}(this,t,e,n)},n.createRemoteTextTrack=function(t){var e=fn(t,{tech:this});return new xr.remoteTextEl.TrackClass(e)},n.addRemoteTextTrack=function(t,e){var n=this;void 0===t&&(t={});var r=this.createRemoteTextTrack(t);return!0!==e&&!1!==e&&(Bt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),e=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==e&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var t=this.options_.Promise||i.a.Promise;if(t)return t.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=ln(t),e.techs_[t]=n,e.techs_[cn(t)]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return e.techs_&&e.techs_[t]?e.techs_[t]:(t=ln(t),i.a&&i.a.videojs&&i.a.videojs[t]?(Bt.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.a.videojs[t]):void 0)},e}(mn);Lr.names.forEach((function(t){var e=Lr[t];Ar.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),Ar.prototype.featuresVolumeControl=!0,Ar.prototype.featuresMuteControl=!0,Ar.prototype.featuresFullscreenResize=!1,Ar.prototype.featuresPlaybackRate=!1,Ar.prototype.featuresProgressEvents=!1,Ar.prototype.featuresSourceset=!1,Ar.prototype.featuresTimeupdateEvents=!1,Ar.prototype.featuresNativeTextTracks=!1,Ar.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n,r=t.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(e))return n;return""},t.selectSourceHandler=function(e,n){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(e,n))return r[i];return null},t.canPlaySource=function(e,n){var r=t.selectSourceHandler(e,n);return r?r.canHandleSource(e,n):""};["seekable","seeking","duration"].forEach((function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(e){var n=t.selectSourceHandler(e,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:Bt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=n.handleSource(e,this,this.options_),this.one("dispose",this.disposeSourceHandler)},t.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)}},mn.registerComponent("Tech",Ar),Ar.registerTech("Tech",Ar),Ar.defaultTechOrder_=[];var Ir={},jr={},Rr={};function Dr(t,e,n){t.setTimeout((function(){return function t(e,n,r,i,o,a){void 0===e&&(e={});void 0===n&&(n=[]);void 0===o&&(o=[]);void 0===a&&(a=!1);var s=n,u=s[0],c=s.slice(1);if("string"==typeof u)t(e,Ir[u],r,i,o,a);else if(u){var l=function(t,e){var n=jr[t.id()],r=null;if(null==n)return r=e(t),jr[t.id()]=[[e,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===e&&(r=s)}null===r&&(r=e(t),n.push([e,r]));return r}(i,u);if(!l.setSource)return o.push(l),t(e,c,r,i,o,a);l.setSource(qt({},e),(function(n,s){if(n)return t(e,c,r,i,o,a);o.push(l),t(s,e.type===s.type?c:Ir[s.type],r,i,o,a)}))}else c.length?t(e,c,r,i,o,a):a?r(e,o):t(e,Ir["*"],r,i,o,!0)}(e,Ir[e.type],n,t)}),1)}function Mr(t,e,n,r){void 0===r&&(r=null);var i="call"+ln(n),o=t.reduce(Fr(i),r),a=o===Rr,s=a?null:e[n](o);return function(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}(t,n,s,a),s}var Nr={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Br={setCurrentTime:1,setMuted:1,setVolume:1},Ur={play:1,pause:1};function Fr(t){return function(e,n){return e===Rr?Rr:n[t]?n[t](e):e}}var Vr={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",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Hr=function(t){void 0===t&&(t="");var e=br(t);return Vr[e.toLowerCase()]||""};function qr(t){if(!t.type){var e=Hr(t.src);e&&(t.type=e)}return t}var Wr=function(t){function e(e,n,r){var i,o=fn({createEl:!1},n);if(i=t.call(this,e,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)e.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=ln(s[a]),c=Ar.getTech(u);if(u||(c=mn.getComponent(u)),c&&c.isSupported()){e.loadTech_(u);break}}return i}return h()(e,t),e}(mn);mn.registerComponent("MediaLoader",Wr);var zr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).emitTapEvents(),r.enable(),r}h()(e,t);var n=e.prototype;return n.createEl=function(e,n,r){void 0===e&&(e="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=qt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&Bt.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=qt({role:"button"},r),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},n.createControlTextEl=function(t){return this.controlTextEl_=Zt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},n.controlText=function(t,e){if(void 0===e&&(e=this.el()),void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,te(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+t.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(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(e){m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):t.prototype.handleKeyDown.call(this,e)},e}(mn);mn.registerComponent("ClickableComponent",zr);var Gr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update(),e.on("posterchange",Xe(l()(r),r.update)),r}h()(e,t);var n=e.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},n.createEl=function(){return Zt("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},n.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},n.handleClick=function(t){if(this.player_.controls()){var e=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(Ln||Cn)&&e||this.player_.tech(!0).focus(),this.player_.paused()?Jn(this.player_.play()):this.player_.pause()}},e}(zr);mn.registerComponent("PosterImage",Gr);var Yr={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 Xr(t,e){var n;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Kr(t,e,n){try{t.style[e]=n}catch(t){return}}var Qr=function(t){function e(e,n,r){var o;o=t.call(this,e,n,r)||this;var a=Xe(l()(o),o.updateDisplay);return e.on("loadstart",Xe(l()(o),o.toggleDisplay)),e.on("texttrackchange",a),e.on("loadedmetadata",Xe(l()(o),o.preselectTrack)),e.ready(Xe(l()(o),(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)this.hide();else{e.on("fullscreenchange",a),e.on("playerresize",a),i.a.addEventListener("orientationchange",a),e.on("dispose",(function(){return i.a.removeEventListener("orientationchange",a)}));for(var t=this.options_.playerOptions.tracks||[],n=0;n<t.length;n++)this.player_.addRemoteTextTrack(t[n],!0);this.preselectTrack()}}))),o}h()(e,t);var n=e.prototype;return n.preselectTrack=function(){for(var t,e,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.enabled?(n=null,t=null,e=null):s.default&&("descriptions"!==s.kind||t?s.kind in r&&!e&&(e=s):t=s)}n?n.mode="showing":e?e.mode="showing":t&&(t.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof i.a.WebVTT&&i.a.WebVTT.processCues(i.a,[],this.el_)},n.updateDisplay=function(){var t=this.player_.textTracks(),e=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),e){for(var n=[],r=0;r<t.length;++r){var i=t[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,a=null,s=t.length;s--;){var u=t[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},n.updateDisplayState=function(t){for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var o=n[r];if(o){var a=o.displayState;if(e.color&&(a.firstChild.style.color=e.color),e.textOpacity&&Kr(a.firstChild,"color",Xr(e.color||"#fff",e.textOpacity)),e.backgroundColor&&(a.firstChild.style.backgroundColor=e.backgroundColor),e.backgroundOpacity&&Kr(a.firstChild,"backgroundColor",Xr(e.backgroundColor||"#000",e.backgroundOpacity)),e.windowColor&&(e.windowOpacity?Kr(a,"backgroundColor",Xr(e.windowColor,e.windowOpacity)):a.style.backgroundColor=e.windowColor),e.edgeStyle&&("dropshadow"===e.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===e.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===e.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===e.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),e.fontPercent&&1!==e.fontPercent){var s=i.a.parseFloat(a.style.fontSize);a.style.fontSize=s*e.fontPercent+"px",a.style.height="auto",a.style.top="auto"}e.fontFamily&&"default"!==e.fontFamily&&("small-caps"===e.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Yr[e.fontFamily])}}},n.updateForTrack=function(t){if(Array.isArray(t)||(t=[t]),"function"==typeof i.a.WebVTT&&!t.every((function(t){return!t.activeCues}))){for(var e=[],n=0;n<t.length;++n)for(var r=t[n],o=0;o<r.activeCues.length;++o)e.push(r.activeCues[o]);i.a.WebVTT.processCues(i.a,e,this.el_);for(var a=0;a<t.length;++a){for(var s=t[a],u=0;u<s.activeCues.length;++u){var c=s.activeCues[u].displayState;re(c,"vjs-text-track-cue"),re(c,"vjs-text-track-cue-"+(s.language?s.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},e}(mn);mn.registerComponent("TextTrackDisplay",Qr);var $r=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),n=this.localize(e?"Audio Player":"Video Player"),r=Zt("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},e}(mn);mn.registerComponent("LoadingSpinner",$r);var Jr=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.createEl=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={}),e=qt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=qt({type:"button"},n);var r=mn.prototype.createEl.call(this,"button",e,n);return this.createControlTextEl(r),r},n.addChild=function(t,e){void 0===e&&(e={});var n=this.constructor.name;return Bt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),mn.prototype.addChild.call(this,t,e)},n.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(e){m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(zr);mn.registerComponent("Button",Jr);var Zr=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Jn(e),void(!this.player_.tech(!0)||(Ln||Cn)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var o=function(){return i.focus()};$n(e)?e.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(e){this.mouseused_=!1,t.prototype.handleKeyDown.call(this,e)},n.handleMouseDown=function(t){this.mouseused_=!0},e}(Jr);Zr.prototype.controlText_="Play Video",mn.registerComponent("BigPlayButton",Zr);var ti=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(e){m.a.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):t.prototype.handleKeyDown.call(this,e)},e}(Jr);mn.registerComponent("CloseButton",ti);var ei=function(t){function e(e,n){var r;return void 0===n&&(n={}),r=t.call(this,e,n)||this,n.replay=void 0===n.replay||n.replay,r.on(e,"play",r.handlePlay),r.on(e,"pause",r.handlePause),n.replay&&r.on(e,"ended",r.handleEnded),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},n.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Jr);ei.prototype.controlText_="Play",mn.registerComponent("PlayToggle",ei);var ni=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},ri=ni;function ii(t,e){return void 0===e&&(e=t),ri(t,e)}var oi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,["timeupdate","ended"],r.updateContent),r.updateTextNode_(),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=Zt("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},n.updateTextNode_=function(t){var e=this;void 0===t&&(t=0),t=ii(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(e.contentEl_){var t=e.textNode_;t&&!e.contentEl_.contains(t)&&(t=null,Bt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),e.textNode_=a.a.createTextNode(e.formattedTime_),e.textNode_&&(t?e.contentEl_.replaceChild(e.textNode_,t):e.contentEl_.appendChild(e.textNode_))}})))},n.updateContent=function(t){},e}(mn);oi.prototype.labelText_="Time",oi.prototype.controlText_="Time",mn.registerComponent("TimeDisplay",oi);var ai=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(t){var e;e=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(e)},e}(oi);ai.prototype.labelText_="Current Time",ai.prototype.controlText_="Current Time",mn.registerComponent("CurrentTimeDisplay",ai);var si=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"durationchange",r.updateContent),r.on(e,"loadstart",r.updateContent),r.on(e,"loadedmetadata",r.updateContent),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(t){var e=this.player_.duration();this.updateTextNode_(e)},e}(oi);si.prototype.labelText_="Duration",si.prototype.controlText_="Duration",mn.registerComponent("DurationDisplay",si);var ui=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},e}(mn);mn.registerComponent("TimeDivider",ui);var ci=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"durationchange",r.updateContent),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var e=t.prototype.createEl.call(this);return e.insertBefore(Zt("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},n.updateContent=function(t){var e;"number"==typeof this.player_.duration()&&(e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e))},e}(oi);ci.prototype.labelText_="Remaining Time",ci.prototype.controlText_="Remaining Time",mn.registerComponent("RemainingTimeDisplay",ci);var li=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Zt("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},n.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},n.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(mn);mn.registerComponent("LiveDisplay",li);var fi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Zt("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},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.updateLiveEdgeStatus),this.textEl_=null,t.prototype.dispose.call(this)},e}(Jr);fi.prototype.controlText_="Seek to live, currently playing live",mn.registerComponent("SeekToLive",fi);var hi=function(t,e,n){return t=Number(t),Math.min(n,Math.max(e,isNaN(t)?e:t))},pi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}h()(e,t);var n=e.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 t=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(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"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(e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=qt({tabIndex:0},n),r=qt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,e,n,r)},n.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||Pn||t.preventDefault(),fe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},n.handleMouseMove=function(t){},n.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;he(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},n.update=function(){var t=this;if(this.el_&&this.bar){var e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(function(){var n=t.vertical()?"height":"width";t.bar.el().style[n]=(100*e).toFixed(2)+"%"}))),e}},n.getProgress=function(){return Number(hi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(t){var e=ye(this.el_,t);return this.vertical()?e.y:e.x},n.handleKeyDown=function(e){m.a.isEventKey(e,"Left")||m.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):m.a.isEventKey(e,"Right")||m.a.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):t.prototype.handleKeyDown.call(this,e)},n.handleClick=function(t){t.stopPropagation(),t.preventDefault()},n.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(mn);mn.registerComponent("Slider",pi);var di=function(t,e){return hi(t/e*100,0,100).toFixed(2)+"%"},yi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).partEls_=[],r.on(e,"progress",r.update),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Zt("span",{className:"vjs-control-text"}),r=Zt("span",{textContent:this.localize("Loaded")}),i=a.a.createTextNode(": ");return this.percentageEl_=Zt("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),e},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,t.prototype.dispose.call(this)},n.update=function(t){var e=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var t=e.player_.liveTracker,n=e.player_.buffered(),r=t&&t.isLive()?t.seekableEnd():e.player_.duration(),i=e.player_.bufferedEnd(),o=e.partEls_,a=di(i,r);e.percent_!==a&&(e.el_.style.width=a,te(e.percentageEl_,a),e.percent_=a);for(var s=0;s<n.length;s++){var u=n.start(s),c=n.end(s),l=o[s];l||(l=e.el_.appendChild(Zt()),o[s]=l),l.dataset.start===u&&l.dataset.end===c||(l.dataset.start=u,l.dataset.end=c,l.style.left=di(u,i),l.style.width=di(c-u,i))}for(var f=o.length;f>n.length;f--)e.el_.removeChild(o[f-1]);o.length=n.length}))},e}(mn);mn.registerComponent("LoadProgressBar",yi);var mi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update=Ke(Xe(l()(r),r.update),30),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(t,e,n){var r=de(this.el_),i=pe(this.player_.el()),o=t.width*e;if(i&&r){var a=t.left-i.left+o,s=t.width-o+(i.right-t.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(t){te(this.el_,t)},n.updateTime=function(t,e,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-e*s;o=(u<1?"":"-")+ii(u,s)}else o=ii(n,a);i.update(t,e,o),r&&r()}))},e}(mn);mn.registerComponent("TimeTooltip",mi);var vi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update=Ke(Xe(l()(r),r.update),30),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(t,e){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(t,e,r)}},e}(mn);vi.prototype.options_={children:[]},Mn||Sn||vi.prototype.options_.children.push("timeTooltip"),mn.registerComponent("PlayProgressBar",vi);var gi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).update=Ke(Xe(l()(r),r.update),30),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(t,e){var n=this,r=e*this.player_.duration();this.getChild("timeTooltip").updateTime(t,e,r,(function(){n.el_.style.left=t.width*e+"px"}))},e}(mn);gi.prototype.options_={children:["timeTooltip"]},mn.registerComponent("MouseTimeDisplay",gi);var bi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).setEventHandlers_(),r}h()(e,t);var n=e.prototype;return n.setEventHandlers_=function(){this.update_=Xe(this,this.update),this.update=Ke(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(t){a.a.hidden?this.disableInterval_(t):(this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&"ended"!==t.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(e){var n=this,r=t.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var t=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),e=n.player_.liveTracker,i=n.player_.duration();e&&e.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===t&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ii(t,i),ii(i,i)],"{1} of {2}")),n.currentTime_=t,n.duration_=i),n.bar&&n.bar.update(pe(n.el()),n.getProgress())})),r},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var t,e=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(t=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t},n.handleMouseDown=function(e){we(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},n.handleMouseMove=function(t){if(we(t)){var e,n=this.calculateDistance(t),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),o=r.liveCurrentTime();if((e=i+n*r.liveWindow())>=o&&(e=o),e<=i&&(e=i+.1),e===1/0)return}else(e=n*this.player_.duration())===this.player_.duration()&&(e-=.1);this.player_.currentTime(e)}},n.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},n.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},n.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Jn(this.player_.play()):this.update_()},n.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},n.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},n.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(e){if(m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(m.a.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(m.a.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(m()(e))){e.preventDefault(),e.stopPropagation();var n=10*(m.a.codes[m()(e)]-m.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else m.a.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):m.a.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):t.prototype.handleKeyDown.call(this,e)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),t.prototype.dispose.call(this)},e}(pi);bi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Mn||Sn||bi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),mn.registerComponent("SeekBar",bi);var _i=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).handleMouseMove=Ke(Xe(l()(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=Ke(Xe(l()(r),r.handleMouseSeek),30),r.enable(),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("playProgressBar"),r=e.getChild("mouseTimeDisplay");if(n||r){var i=e.el(),o=de(i),a=ye(i,t).x;a=hi(a,0,1),r&&r.update(o,a),n&&n.update(o,e.getProgress())}}},n.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(t){return t.disable&&t.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(t){return t.enable&&t.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},n.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(mn);_i.prototype.options_={children:["seekBar"]},mn.registerComponent("ProgressControl",_i);var wi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,["enterpictureinpicture","leavepictureinpicture"],r.handlePictureInPictureChange),r.on(e,["disablepictureinpicturechanged","loadedmetadata"],r.handlePictureInPictureEnabledChange),r.disable(),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+t.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(t){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(Jr);wi.prototype.controlText_="Picture-in-Picture",mn.registerComponent("PictureInPictureToggle",wi);var Ti=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"fullscreenchange",r.handleFullscreenChange),!1===a.a[e.fsApi_.fullscreenEnabled]&&r.disable(),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Jr);Ti.prototype.controlText_="Fullscreen",mn.registerComponent("FullscreenToggle",Ti);var Si=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(mn);mn.registerComponent("VolumeLevel",Si);var Ei=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on("slideractive",r.updateLastVolume_),r.on(e,"volumechange",r.updateARIAAttributes),e.ready((function(){return r.updateARIAAttributes()})),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(e){we(e)&&t.prototype.handleMouseDown.call(this,e)},n.handleMouseMove=function(t){we(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},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(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(pi);Ei.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Ei.prototype.playerEvent="volumechange",mn.registerComponent("VolumeBar",Ei);var ki=function(t){function e(e,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||zt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=t.call(this,e,n)||this,function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(l()(r),e),r.throttledHandleMouseMove=Ke(Xe(l()(r),r.handleMouseMove),30),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},n.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},n.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},n.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(mn);ki.prototype.options_={children:["volumeBar"]},mn.registerComponent("VolumeControl",ki);var Oi=function(t){function e(e,n){var r;return r=t.call(this,e,n)||this,function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(l()(r),e),r.on(e,["loadstart","volumechange"],r.update),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},n.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(t){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var t=this.player_.volume(),e=3;Mn&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)ie(this.el_,"vjs-vol-"+n);re(this.el_,"vjs-vol-"+e)},n.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},e}(Jr);Oi.prototype.controlText_="Mute",mn.registerComponent("MuteToggle",Oi);var Ci=function(t){function e(e,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||zt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=t.call(this,e,n)||this).on(e,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}h()(e,t);var n=e.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 e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},n.dispose=function(){this.handleMouseOut(),t.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(t){m.a.isEventKey(t,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(t){this.addClass("vjs-hover"),Ve(a.a,"keyup",Xe(this,this.handleKeyPress))},n.handleMouseOut=function(t){this.removeClass("vjs-hover"),He(a.a,"keyup",Xe(this,this.handleKeyPress))},n.handleKeyPress=function(t){m.a.isEventKey(t,"Esc")&&this.handleMouseOut()},e}(mn);Ci.prototype.options_={children:["muteToggle","volumeControl"]},mn.registerComponent("VolumePanel",Ci);var Pi=function(t){function e(e,n){var r;return r=t.call(this,e,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=Xe(l()(r),r.handleBlur),r.boundHandleTapClick_=Xe(l()(r),r.handleTapClick),r}h()(e,t);var n=e.prototype;return n.addEventListenerForItem=function(t){t instanceof mn&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(t){t instanceof mn&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),t.prototype.removeChild.call(this,e)},n.addItem=function(t){var e=this.addChild(t);e&&this.addEventListenerForItem(e)},n.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=Zt(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ve(n,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,t.prototype.dispose.call(this)},n.handleBlur=function(t){var e=t.relatedTarget||a.a.activeElement;if(!this.children().some((function(t){return t.el()===e}))){var n=this.menuButton_;n&&n.buttonPressed_&&e!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var n=e.filter((function(e){return e.el()===t.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(t){m.a.isEventKey(t,"Left")||m.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(m.a.isEventKey(t,"Right")||m.a.isEventKey(t,"Up"))&&(t.preventDefault(),t.stopPropagation(),this.stepBack())},n.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},n.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},n.focus=function(t){void 0===t&&(t=0);var e=this.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(mn);mn.registerComponent("Menu",Pi);var xi=function(t){function e(e,n){var r;void 0===n&&(n={}),(r=t.call(this,e,n)||this).menuButton_=new Jr(e,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Jr.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"keydown",r.handleKeyDown),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),Ve(a.a,"keyup",Xe(l()(r),r.handleMenuKeyUp))})),r.on("mouseleave",r.handleMouseLeave),r.on("keydown",r.handleSubmenuKeyDown),r}h()(e,t);var n=e.prototype;return n.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var t=new Pi(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=Zt("li",{className:"vjs-menu-title",innerHTML:ln(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new mn(this.player_,{el:e});t.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)t.addItem(this.items[r]);return t},n.createItems=function(){},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Jr.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},n.controlText=function(t,e){return void 0===e&&(e=this.menuButton_.el()),this.menuButton_.controlText(t,e)},n.dispose=function(){this.handleMouseLeave(),t.prototype.dispose.call(this)},n.handleClick=function(t){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(t){this.removeClass("vjs-hover"),He(a.a,"keyup",Xe(this,this.handleMenuKeyUp))},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(t){m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab")?(this.buttonPressed_&&this.unpressButton(),m.a.isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus())):(m.a.isEventKey(t,"Up")||m.a.isEventKey(t,"Down"))&&(this.buttonPressed_||(t.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(t){(m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(t){this.handleSubmenuKeyDown(t)},n.handleSubmenuKeyDown=function(t){(m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),m.a.isEventKey(t,"Tab")||(t.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"),Mn&&$t())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()},e}(mn);mn.registerComponent("MenuButton",xi);var Li=function(t){function e(e,n){var r,i=n.tracks;if((r=t.call(this,e,n)||this).items.length<=1&&r.hide(),!i)return l()(r);var o=Xe(l()(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),i.addEventListener("labelchange",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o),i.removeEventListener("labelchange",o)})),r}return h()(e,t),e}(xi);mn.registerComponent("TrackButton",Li);var Ai=["Tab","Esc","Up","Down","Right","Left"],Ii=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}h()(e,t);var n=e.prototype;return n.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",qt({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(e){Ai.some((function(t){return m.a.isEventKey(e,t)}))||t.prototype.handleKeyDown.call(this,e)},n.handleClick=function(t){this.selected(!0)},n.selected=function(t){this.selectable&&(t?(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))},e}(zr);mn.registerComponent("MenuItem",Ii);var ji=function(t){function e(e,n){var r,o=n.track,s=e.textTracks();n.label=o.label||o.language||"Unknown",n.selected="showing"===o.mode,(r=t.call(this,e,n)||this).track=o,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var u,c=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.handleTracksChange.apply(l()(r),e)},f=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.handleSelectedLanguageChange.apply(l()(r),e)};(e.on(["loadstart","texttrackchange"],c),s.addEventListener("change",c),s.addEventListener("selectedlanguagechange",f),r.on("dispose",(function(){e.off(["loadstart","texttrackchange"],c),s.removeEventListener("change",c),s.removeEventListener("selectedlanguagechange",f)})),void 0===s.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof i.a.Event)try{u=new i.a.Event("change")}catch(t){}u||(u=a.a.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(u)}));return r.handleTracksChange(),r}h()(e,t);var n=e.prototype;return n.handleClick=function(e){var n=this.track,r=this.player_.textTracks();if(t.prototype.handleClick.call(this,e),r)for(var i=0;i<r.length;i++){var o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===n?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},n.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},n.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.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,t.prototype.dispose.call(this)},e}(Ii);mn.registerComponent("TextTrackMenuItem",ji);var Ri=function(t){function e(e,n){return n.track={player:e,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,t.call(this,e,n)||this}h()(e,t);var n=e.prototype;return n.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(ji);mn.registerComponent("OffTextTrackMenuItem",Ri);var Di=function(t){function e(e,n){return void 0===n&&(n={}),n.tracks=e.textTracks(),t.call(this,e,n)||this}return h()(e,t),e.prototype.createItems=function(t,e){var n;void 0===t&&(t=[]),void 0===e&&(e=ji),this.label_&&(n=this.label_+" off"),t.push(new Ri(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new e(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),t.push(a)}}return t},e}(Li);mn.registerComponent("TextTrackButton",Di);var Mi=function(t){function e(e,n){var r,i=n.track,o=n.cue,a=e.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=t.call(this,e,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",Xe(l()(r),r.update)),r}h()(e,t);var n=e.prototype;return n.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(t){var e=this.cue,n=this.player_.currentTime();this.selected(e.startTime<=n&&n<e.endTime)},e}(Ii);mn.registerComponent("ChaptersTrackMenuItem",Mi);var Ni=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},n.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},n.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=0;e--){var n=t[e];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ln(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},n.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new Mi(this.player_,{track:this.track_,cue:i});t.push(o)}return t},e}(Di);Ni.prototype.kind_="chapters",Ni.prototype.controlText_="Chapters",mn.registerComponent("ChaptersButton",Ni);var Bi=function(t){function e(e,n,r){var i;i=t.call(this,e,n,r)||this;var o=e.textTracks(),a=Xe(l()(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}h()(e,t);var n=e.prototype;return n.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!1,r=0,i=e.length;r<i;r++){var o=e[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(Di);Bi.prototype.kind_="descriptions",Bi.prototype.controlText_="Descriptions",mn.registerComponent("DescriptionsButton",Bi);var Ui=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(Di);Ui.prototype.kind_="subtitles",Ui.prototype.controlText_="Subtitles",mn.registerComponent("SubtitlesButton",Ui);var Fi=function(t){function e(e,n){var r;return n.track={player:e,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=t.call(this,e,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return h()(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(ji);mn.registerComponent("CaptionSettingsMenuItem",Fi);var Vi=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(Di);Vi.prototype.kind_="captions",Vi.prototype.controlText_="Captions",mn.registerComponent("CaptionsButton",Vi);var Hi=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(e,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",t.prototype.createEl.call(this,e,qt({innerHTML:i},n),r)},e}(ji);mn.registerComponent("SubsCapsMenuItem",Hi);var qi=function(t){function e(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,e,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(ln(r.label_)),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,Hi)},e}(Di);qi.prototype.kinds_=["captions","subtitles"],qi.prototype.controlText_="Subtitles",mn.registerComponent("SubsCapsButton",qi);var Wi=function(t){function e(e,n){var r,i=n.track,o=e.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=t.call(this,e,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.handleTracksChange.apply(l()(r),e)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}h()(e,t);var n=e.prototype;return n.createEl=function(e,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",t.prototype.createEl.call(this,e,qt({innerHTML:i},n),r)},n.handleClick=function(e){var n=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},n.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(Ii);mn.registerComponent("AudioTrackMenuItem",Wi);var zi=function(t){function e(e,n){return void 0===n&&(n={}),n.tracks=e.audioTracks(),t.call(this,e,n)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(t){void 0===t&&(t=[]),this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n<e.length;n++){var r=e[n];t.push(new Wi(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return t},e}(Li);zi.prototype.controlText_="Audio Track",mn.registerComponent("AudioTrackButton",zi);var Gi=function(t){function e(e,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=t.call(this,e,n)||this).label=i,r.rate=o,r.on(e,"ratechange",r.update),r}h()(e,t);var n=e.prototype;return n.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(Ii);Gi.prototype.contentElType="button",mn.registerComponent("PlaybackRateMenuItem",Gi);var Yi=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).updateVisibility(),r.updateLabel(),r.on(e,"loadstart",r.updateVisibility),r.on(e,"ratechange",r.updateLabel),r}h()(e,t);var n=e.prototype;return n.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=Zt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},n.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var t=new Pi(this.player()),e=this.playbackRates();if(e)for(var n=e.length-1;n>=0;n--)t.addChild(new Gi(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>e){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(xi);Yi.prototype.controlText_="Playback Rate",mn.registerComponent("PlaybackRateMenuButton",Yi);var Xi=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(mn);mn.registerComponent("Spacer",Xi);var Ki=function(t){function e(){return t.apply(this,arguments)||this}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Xi);mn.registerComponent("CustomControlSpacer",Ki);var Qi=function(t){function e(){return t.apply(this,arguments)||this}return h()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(mn);Qi.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a.a&&Qi.prototype.options_.children.splice(Qi.prototype.options_.children.length-1,0,"pictureInPictureToggle"),mn.registerComponent("ControlBar",Qi);var $i=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).on(e,"error",r.open),r}h()(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},n.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(nr);$i.prototype.options_=u()({},nr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),mn.registerComponent("ErrorDisplay",$i);var Ji=["#000","Black"],Zi=["#00F","Blue"],to=["#0FF","Cyan"],eo=["#0F0","Green"],no=["#F0F","Magenta"],ro=["#F00","Red"],io=["#FFF","White"],oo=["#FF0","Yellow"],ao=["1","Opaque"],so=["0.5","Semi-Transparent"],uo=["0","Transparent"],co={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ji,io,ro,eo,Zi,oo,no,to]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ao,so,uo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[io,Ji,ro,eo,Zi,oo,no,to]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ao,so]},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:[uo,so,ao]}};function lo(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}co.windowColor.options=co.backgroundColor.options;var fo=function(t){function e(e,n){var r;return n.temporary=!1,(r=t.call(this,e,n)||this).updateDisplay=Xe(l()(r),r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Zt("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),Ht(co,(function(t){r.on(r.$(t.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}h()(e,t);var n=e.prototype;return n.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},n.createElSelect_=function(t,e,n){var r=this;void 0===e&&(e=""),void 0===n&&(n="label");var i=co[t],o=i.id.replace("%s",this.id_),a=[e,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(t){var e=o+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+a+" "+e+'">',r.localize(t[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return Zt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Zt("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 t=this.localize("restore all settings to the default values");return Zt("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</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 t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var t,e,n,r=this;return e=function(t,e,n){var i,o,a=(i=r.$(e.selector),o=e.parser,lo(i.options[i.options.selectedIndex].value,o));return void 0!==a&&(t[n]=a),t},void 0===(n={})&&(n=0),Vt(t=co).reduce((function(n,r){return e(n,t[r],r)}),n)},n.setValues=function(t){var e=this;Ht(co,(function(n,r){!function(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(lo(t.options[r].value,n)===e){t.selectedIndex=r;break}}(e.$(n.selector),t[r],n.parser)}))},n.setDefaults=function(){var t=this;Ht(co,(function(e){var n=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=n}))},n.restoreSettings=function(){var t;try{t=JSON.parse(i.a.localStorage.getItem("vjs-text-track-settings"))}catch(t){Bt.warn(t)}t&&this.setValues(t)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?i.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):i.a.localStorage.removeItem("vjs-text-track-settings")}catch(t){Bt.warn(t)}}},n.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},e}(nr);mn.registerComponent("TextTrackSettings",fo);var ho=function(t){function e(e,n){var r,o=n.ResizeObserver||i.a.ResizeObserver;null===n.ResizeObserver&&(o=!1);var a=fn({createEl:!o,reportTouchActivity:!1},n);return(r=t.call(this,e,a)||this).ResizeObserver=n.ResizeObserver||i.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(t,e,n,r){var o;void 0===r&&(r=i.a);var a=function(){var i=this,a=arguments,s=function(){o=null,s=null,n||t.apply(i,a)};!o&&n&&t.apply(i,a),r.clearTimeout(o),o=r.setTimeout(s,e)};return a.cancel=function(){r.clearTimeout(o),o=null},a}((function(){r.resizeHandler()}),100,!1,l()(r)),o?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(e.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var t=r.debouncedHandler_,e=r.unloadListener_=function(){He(this,"resize",t),He(this,"unload",e),e=null};Ve(r.el_.contentWindow,"unload",e),Ve(r.el_.contentWindow,"resize",t)}},r.one("load",r.loadListener_)),r}h()(e,t);var n=e.prototype;return n.createEl=function(){return t.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,t.prototype.dispose.call(this)},e}(mn);mn.registerComponent("ResizeManager",ho);var po={trackingThreshold:30,liveTolerance:15},yo=function(t){function e(e,n){var r,i=fn(po,n,{createEl:!1});return(r=t.call(this,e,i)||this).reset_(),r.on(r.player_,"durationchange",r.handleDurationchange),Ln&&"hidden"in a.a&&"visibilityState"in a.a&&r.on(a.a,"visibilitychange",r.handleVisibilityChange),r}h()(e,t);var n=e.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(a.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var t=this.player_.seekable();if(t&&t.length){var e=Number(i.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(e-this.lastTime_)/1e3;this.lastTime_=e,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),o=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-o)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},n.handleDurationchange=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.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),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 t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&t>2,this.skipNextSeeked_=!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.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),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.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var t=this.player_.seekable(),e=[],n=t?t.length:0;n--;)e.push(t.end(n));return e.length?e.sort()[e.length-1]:1/0},n.seekableStart=function(){for(var t=this.player_.seekable(),e=[],n=t?t.length:0;n--;)e.push(t.start(n));return e.length?e.sort()[0]:0},n.liveWindow=function(){var t=this.liveCurrentTime();return t===1/0?0:t-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 t=this.seekableEnd();return-1!==this.lastSeekEnd_&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,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.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(a.a,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),t.prototype.dispose.call(this)},e}(mn);mn.registerComponent("LiveTracker",yo);var mo,vo=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var n=t.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),t.triggerSourceset(i),!0)},go=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=a.a.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var n=a.a.createDocumentFragment();e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",i.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),bo=function(t,e){for(var n={},r=0;r<t.length&&!((n=Object.getOwnPropertyDescriptor(t[r],e))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},_o=function(t){var e=t.el();if(!e.resetSourceWatch_){var n={},r=function(t){return bo([t.el(),i.a.HTMLMediaElement.prototype,i.a.Element.prototype,go],"innerHTML")}(t),o=function(n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(e,i);return vo(t),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(t){e[t]&&(n[t]=e[t],e[t]=o(n[t]))})),Object.defineProperty(e,"innerHTML",fn(r,{set:o(r.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(n).forEach((function(t){e[t]=n[t]})),Object.defineProperty(e,"innerHTML",r)},t.one("sourceset",e.resetSourceWatch_)}},wo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?gr(i.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return i.a.Element.prototype.setAttribute.call(this,"src",t),t}}),To=function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var n=function(t){return bo([t.el(),i.a.HTMLMediaElement.prototype,wo],"src")}(t),r=e.setAttribute,o=e.load;Object.defineProperty(e,"src",fn(n,{set:function(r){var i=n.set.call(e,r);return t.triggerSourceset(e.src),i}})),e.setAttribute=function(n,i){var o=r.call(e,n,i);return/src/i.test(n)&&t.triggerSourceset(e.src),o},e.load=function(){var n=o.call(e);return vo(t)||(t.triggerSourceset(""),_o(t)),n},e.currentSrc?t.triggerSourceset(e.currentSrc):vo(t)||_o(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=o,e.setAttribute=r,Object.defineProperty(e,"src",n),e.resetSourceWatch_&&e.resetSourceWatch_()}}}},So=function(t,e,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(t,e,{value:n,enumerable:!0,writable:!0})},o={configurable:!0,enumerable:!0,get:function(){var t=n();return i(t),t}};return r&&(o.set=i),Object.defineProperty(t,e,o)},Eo=function(t){function e(e,n){var r;r=t.call(this,e,n)||this;var i=e.source,o=!1;if(i&&(r.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),e.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var a=r.el_.childNodes,s=a.length,u=[];s--;){var c=a[s];"track"===c.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(c),r.remoteTextTracks().addTrack(c.track),r.textTracks().addTrack(c.track),o||r.el_.hasAttribute("crossorigin")||!_r(c.src)||(o=!0)):u.push(c))}for(var l=0;l<u.length;l++)r.el_.removeChild(u[l])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&Bt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(jn||Dn||kn)&&!0===e.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}h()(e,t);var n=e.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){To(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var t,e=this.textTracks(),n=function(){t=[];for(var n=0;n<e.length;n++){var r=e[n];"metadata"===r.kind&&t.push({track:r,storedMode:r.mode})}};n(),e.addEventListener("change",n),this.on("dispose",(function(){return e.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<t.length;r++){var i=t[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",n),e.removeEventListener("change",r),e.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",r)}))},n.overrideNative_=function(t,e){var n=this;if(e===this["featuresNative"+t+"Tracks"]){var r=t.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(t){n.el()[r+"Tracks"].removeEventListener(t,n[r+"TracksListeners_"][t])})),this["featuresNative"+t+"Tracks"]=!e,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},n.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},n.proxyNativeTracksForType_=function(t){var e=this,n=Pr[t],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===t&&e[xr.remoteText.getterName]().trigger(r)},addtrack:function(t){i.addTrack(t.track)},removetrack:function(t){i.removeTrack(t.track)}},a=function(){for(var t=[],e=0;e<i.length;e++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[e]){n=!0;break}n||t.push(i[e])}for(;t.length;)i.removeTrack(t.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(t){var n=o[t];r.addEventListener(t,n),e.on("dispose",(function(e){return r.removeEventListener(t,n)}))})),this.on("loadstart",a),this.on("dispose",(function(t){return e.off("loadstart",a)}))}},n.proxyNativeTracks_=function(){var t=this;Pr.names.forEach((function(e){t.proxyNativeTracksForType_(e)}))},n.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),e.disposeMediaElement(t),t=n}else{t=a.a.createElement("video");var r=fn({},this.options_.tag&&se(this.options_.tag));jn&&!0===this.options_.nativeControlsForTouch||delete r.controls,ae(t,qt(r,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&ce(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],o=0;o<i.length;o++){var s=i[o],u=this.options_[s];void 0!==u&&(u?ce(t,s,s):le(t,s),t[s]=u)}return t},n.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),t.readyState>=2&&i.push("loadeddata"),t.readyState>=3&&i.push("canplay"),t.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(t){this.trigger(t)}),this)}))}},n.setScrubbing=function(t){this.isScrubbing_=t},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(t){try{this.isScrubbing_&&this.el_.fastSeek&&Nn?this.el_.fastSeek(t):this.el_.currentTime=t}catch(t){Bt(t,"Video is not ready. (Video.js)")}},n.duration=function(){var t=this;if(this.el_.duration===1/0&&Sn&&Pn&&0===this.el_.currentTime){return this.on("timeupdate",(function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=i.a.navigator&&i.a.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},n.enterFullScreen=function(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)Jn(this.el_.play()),this.setTimeout((function(){t.pause();try{t.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{t.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},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.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},n.reset=function(){e.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(t){this.el_.controls=!!t},n.addTextTrack=function(e,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):t.prototype.addTextTrack.call(this,e,n,r)},n.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var n=a.a.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e.default&&(n.default=e.default),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n},n.addRemoteTextTrack=function(e,n){var r=t.prototype.addRemoteTextTrack.call(this,e,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)e!==n[r]&&e!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),i.a.performance&&"function"==typeof i.a.performance.now?t.creationTime=i.a.performance.now():i.a.performance&&i.a.performance.timing&&"number"==typeof i.a.performance.timing.navigationStart&&(t.creationTime=i.a.Date.now()-i.a.performance.timing.navigationStart),t},e}(Ar);So(Eo,"TEST_VID",(function(){if(Kt()){var t=a.a.createElement("video"),e=a.a.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t}})),Eo.isSupported=function(){try{Eo.TEST_VID.volume=.5}catch(t){return!1}return!(!Eo.TEST_VID||!Eo.TEST_VID.canPlayType)},Eo.canPlayType=function(t){return Eo.TEST_VID.canPlayType(t)},Eo.canPlaySource=function(t,e){return Eo.canPlayType(t.type)},Eo.canControlVolume=function(){try{var t=Eo.TEST_VID.volume;return Eo.TEST_VID.volume=t/2+.1,t!==Eo.TEST_VID.volume}catch(t){return!1}},Eo.canMuteVolume=function(){try{var t=Eo.TEST_VID.muted;return Eo.TEST_VID.muted=!t,Eo.TEST_VID.muted?ce(Eo.TEST_VID,"muted","muted"):le(Eo.TEST_VID,"muted"),t!==Eo.TEST_VID.muted}catch(t){return!1}},Eo.canControlPlaybackRate=function(){if(Sn&&Pn&&xn<58)return!1;try{var t=Eo.TEST_VID.playbackRate;return Eo.TEST_VID.playbackRate=t/2+.1,t!==Eo.TEST_VID.playbackRate}catch(t){return!1}},Eo.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(a.a.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(a.a.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},Eo.supportsNativeTextTracks=function(){return Nn||Mn&&Pn},Eo.supportsNativeVideoTracks=function(){return!(!Eo.TEST_VID||!Eo.TEST_VID.videoTracks)},Eo.supportsNativeAudioTracks=function(){return!(!Eo.TEST_VID||!Eo.TEST_VID.audioTracks)},Eo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(t){var e=t[0],n=t[1];So(Eo.prototype,e,(function(){return Eo[n]()}),!0)})),Eo.prototype.movingMediaElementInDOM=!Mn,Eo.prototype.featuresFullscreenResize=!0,Eo.prototype.featuresProgressEvents=!0,Eo.prototype.featuresTimeupdateEvents=!0,Eo.patchCanPlayType=function(){En>=4&&!On&&!Pn&&(mo=Eo.TEST_VID&&Eo.TEST_VID.constructor.prototype.canPlayType,Eo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(t)?"maybe":mo.call(this,t)})},Eo.unpatchCanPlayType=function(){var t=Eo.TEST_VID.constructor.prototype.canPlayType;return mo&&(Eo.TEST_VID.constructor.prototype.canPlayType=mo),t},Eo.patchCanPlayType(),Eo.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},Eo.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Eo.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Eo.prototype["set"+ln(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(t){Eo.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(t){Eo.prototype["set"+ln(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){Eo.prototype[t]=function(){return this.el_[t]()}})),Ar.withSourceHandlers(Eo),Eo.nativeSourceHandler={},Eo.nativeSourceHandler.canPlayType=function(t){try{return Eo.TEST_VID.canPlayType(t)}catch(t){return""}},Eo.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Eo.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=br(t.src);return Eo.nativeSourceHandler.canPlayType("video/"+n)}return""},Eo.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Eo.nativeSourceHandler.dispose=function(){},Eo.registerSourceHandler(Eo.nativeSourceHandler),Ar.registerTech("Html5",Eo);var ko=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Oo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Co=["tiny","xsmall","small","medium","large","xlarge","huge"],Po={};Co.forEach((function(t){var e="x"===t.charAt(0)?"x-"+t.substring(1):t;Po[t]="vjs-layout-"+e}));var xo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Lo=function(t){function e(n,r,i){var o;if(n.id=n.id||r.id||"vjs_video_"+Re(),(r=qt(e.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var s=n.closest("[lang]");s&&s.getAttribute&&(r.language=s.getAttribute("lang"))}else for(var u=n;u&&1===u.nodeType;){if(se(u).hasOwnProperty("lang")){r.language=u.getAttribute("lang");break}u=u.parentNode}if((o=t.call(this,null,r,i)||this).boundDocumentFullscreenChange_=Xe(l()(o),o.documentFullscreenChange_),o.boundFullWindowOnEscKey_=Xe(l()(o),o.fullWindowOnEscKey),o.isFullscreen_=!1,o.log=Ut(o.id_),o.fsApi_=Wn,o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,o.debugEnabled_=!1,!o.options_||!o.options_.techOrder||!o.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(o.tag=n,o.tagAttributes=n&&se(n),o.language(o.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(t){c[t.toLowerCase()]=r.languages[t]})),o.languages_=c}else o.languages_=e.prototype.options_.languages;o.resetCache_(),o.poster_=r.poster||"",o.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),o.changingSrc_=!1,o.playCallbacks_=[],o.playTerminatedQueue_=[],n.hasAttribute("autoplay")?o.autoplay(!0):o.autoplay(o.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(t){if("function"!=typeof o[t])throw new Error('plugin "'+t+'" does not exist')})),o.scrubbing_=!1,o.el_=o.createEl(),an(l()(o),{eventBusKey:"el_"}),o.fsApi_.requestFullscreen&&(Ve(a.a,o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_),o.on(o.fsApi_.fullscreenchange,o.boundDocumentFullscreenChange_)),o.fluid_&&o.on(["playerreset","resize"],o.updateStyleEl_);var f=fn(o.options_);r.plugins&&Object.keys(r.plugins).forEach((function(t){o[t](r.plugins[t])})),r.debug&&o.debug(!0),o.options_.playerOptions=f,o.middleware_=[],o.initChildren(),o.isAudio("audio"===n.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),jn&&o.addClass("vjs-touch-enabled"),Mn||o.addClass("vjs-workinghover"),e.players[o.id_]=l()(o);var h="7.11.2".split(".")[0];return o.addClass("vjs-v"+h),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("stageclick",o.handleStageClick_),o.on("keydown",o.handleKeyDown),o.on("languagechange",o.handleLanguagechange),o.breakpoints(o.options_.breakpoints),o.responsive(o.options_.responsive),o}h()(e,t);var n=e.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),He(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),He(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.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),jr[this.id()]=null,Lr.names.forEach((function(t){var e=Lr[t],r=n[e.getterName]();r&&r.off&&r.off()})),t.prototype.dispose.call(this)},n.createEl=function(){var e,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();r?e=this.el_=n.parentNode:o||(e=this.el_=t.prototype.createEl.call(this,"div"));var s=se(n);if(o){for(e=this.el_=n,n=this.tag=a.a.createElement("video");e.children.length;)n.appendChild(e.firstChild);ne(e,"video-js")||re(e,"video-js"),e.appendChild(n),r=this.playerElIngest_=e,Object.keys(e).forEach((function(t){try{n[t]=e[t]}catch(t){}}))}if(n.setAttribute("tabindex","-1"),s.tabindex="-1",(Ln||Pn&&In)&&(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(t){o&&"class"===t||e.setAttribute(t,s[t]),o&&n.setAttribute(t,s[t])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=e.player=this,this.addClass("vjs-paused"),!0!==i.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Ae("vjs-styles-dimensions");var u=Se(".vjs-styles-defaults"),c=Se("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.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"),f=0;f<l.length;f++){var h=l.item(f);re(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(e,n),ee(n,e),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=e,e},n.crossOrigin=function(t){if(!t)return this.techGet_("crossOrigin");"anonymous"===t||"use-credentials"===t?this.techCall_("setCrossOrigin",t):Bt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+t+'"')},n.width=function(t){return this.dimension("width",t)},n.height=function(t){return this.dimension("height",t)},n.dimension=function(t,e){var n=t+"_";if(void 0===e)return this[n]||0;if(""===e||"auto"===e)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(e);isNaN(r)?Bt.error('Improper value "'+e+'" supplied for for '+t):(this[n]=r,this.updateStyleEl_())},n.fluid=function(t){var e,n,r=this;if(void 0===t)return!!this.fluid_;this.fluid_=!!t,$e(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.updateStyleEl_)},$e(e=this)?n():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==i.a.VIDEOJS_NO_DYNAMIC_STYLE){var t,e,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=r[1]/r[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*o,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Ie(this.styleEl_,"\n ."+n+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(a>=0&&(u.width=a),s>=0&&(u.height=s))}},n.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=ln(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(Ar.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:e,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_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};Lr.names.forEach((function(t){var e=Lr[t];o[e.getterName]=n[e.privateName]})),qt(o,this.options_[r]),qt(o,this.options_[i]),qt(o,this.options_[t.toLowerCase()]),this.tag&&(o.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var a=Ar.getTech(t);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(o),this.tech_.ready(Xe(this,this.handleTechReady_),!0),er(this.textTracksJson_||[],this.tech_),ko.forEach((function(t){n.on(n.tech_,t,n["handleTech"+ln(t)+"_"])})),Object.keys(Oo).forEach((function(t){n.on(n.tech_,t,(function(e){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Oo[t]+"_"].bind(n),event:e}):n["handleTech"+Oo[t]+"_"](e)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||ee(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var t=this;Lr.names.forEach((function(e){var n=Lr[e];t[n.privateName]=t[n.getterName]()})),this.textTracksJson_=tr(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(t){return void 0===t&&Bt.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_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},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_(this.autoplay())},n.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"==typeof t){var n,r=function(){var t=e.muted();e.muted(!0);var n=function(){e.muted(t)};e.playTerminatedQueue_.push(n);var r=e.play();if($n(r))return r.catch(n)};if("any"===t&&!0!==this.muted()?$n(n=this.play())&&(n=n.catch(r)):n="muted"===t&&!0!==this.muted()?r():this.play(),$n(n))return n.then((function(){e.trigger({type:"autoplay-success",autoplay:t})})).catch((function(n){e.trigger({type:"autoplay-failure",autoplay:t})}))}},n.updateSourceCaches_=function(t){void 0===t&&(t="");var e=t,n="";"string"!=typeof e&&(e=t.src,n=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!n&&(n=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter((function(t){return t.src===e}));if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===e)return o.type}return Hr(e)}(this,e)),this.cache_.source=fn({},t,{src:e,type:n});for(var r=this.cache_.sources.filter((function(t){return t.src&&t.src===e})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=se(o[s]);i.push(u),u.src&&u.src===e&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},n.handleTechSourceset_=function(t){var e=this;if(!this.changingSrc_){var n=function(t){return e.updateSourceCaches_(t)},r=this.currentSource().src,i=t.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),t.src||this.tech_.any(["sourceset","loadstart"],(function(t){if("sourceset"!==t.type){var n=e.techGet("currentSrc");e.lastSource_.tech=n,e.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},n.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,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(t){return t.callback(t.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var e=this.currentTime();this.on("timeupdate",(function n(){e!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.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&&(Bt.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.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(t){we(t)&&this.controls_&&(this.paused()?Jn(this.play()):this.pause())},n.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(e){return e.contains(t.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,t):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(t){t.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(t){var e=t.target.player;if(!e||e===this){var n=this.el(),r=a.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(t,e){e&&(e.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(e.isFullscreen))},n.handleTechFullscreenError_=function(t,e){this.trigger("fullscreenerror",e)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(t){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(t){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var t=this.tech_.error();this.error(t)},n.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},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:[],volume:1}},n.techCall_=function(t,e){this.ready((function(){if(t in Br)return function(t,e,n,r){return e[n](t.reduce(Fr(n),r))}(this.middleware_,this.tech_,t,e);if(t in Ur)return Mr(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw Bt(t),t}}),!0)},n.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Nr)return function(t,e,n){return t.reduceRight(Fr(n),e[n]())}(this.middleware_,this.tech_,t);if(t in Ur)return Mr(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw Bt("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw Bt("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw Bt(e),e}}},n.play=function(){var t=this,e=this.options_.Promise||i.a.Promise;return e?new e((function(e){t.play_(e)})):this.play_()},n.play_=function(t){var e=this;void 0===t&&(t=Jn),this.playCallbacks_.push(t);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(t){e.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!Nn&&!Mn||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach((function(t){t()}))},n.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach((function(e){e(t)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Vn(0,0)},n.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(t){return void 0!==t?(t<0&&(t=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",t),void(this.cache_.initTime=0)):(this.cache_.initTime=t,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||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 t=this.techGet_("buffered");return t&&t.length||(t=Vn(0,0)),t},n.bufferedPercent=function(){return Hn(this.buffered(),this.duration())},n.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return n>e&&(n=e),n},n.volume=function(t){var e;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},n.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},n.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(t){if(void 0!==t){var e=this.isFullscreen_;return this.isFullscreen_=Boolean(t),this.isFullscreen_!==e&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(t){var e=this.options_.Promise||i.a.Promise;if(e){var n=this;return new e((function(e,r){function i(){n.off("fullscreenerror",a),n.off("fullscreenchange",o)}function o(){i(),e()}function a(t,e){i(),r(e)}n.one("fullscreenchange",o),n.one("fullscreenerror",a);var s=n.requestFullscreenHelper_(t);if(s)return s.then(i,i),s}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(t){var e,n=this;if(this.fsApi_.prefixed||(e=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==t&&(e=t)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](e);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var t=this.options_.Promise||i.a.Promise;if(t){var e=this;return new t((function(t,n){function r(){e.off("fullscreenerror",o),e.off("fullscreenchange",i)}function i(){r(),t()}function o(t,e){r(),n(e)}e.one("fullscreenchange",i),e.one("fullscreenerror",o);var a=e.exitFullscreenHelper_();if(a)return a.then(r,r),a}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var t=this;if(this.fsApi_.requestFullscreen){var e=a.a[this.fsApi_.exitFullscreen]();return e&&e.then((function(){return t.isFullscreen(!1)})),e}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,Ve(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",re(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(t){m.a.isEventKey(t,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,He(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,ie(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(t){if(void 0===t)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(t){return void 0!==t?(this.isInPictureInPicture_=!!t,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in a.a)return a.a.exitPictureInPicture()},n.handleKeyDown=function(t){var e=this.options_.userActions;if(e&&e.hotkeys){(function(t){var e=t.tagName.toLowerCase();if(t.isContentEditable)return!0;if("input"===e)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type);return-1!==["textarea"].indexOf(e)})(this.el_.ownerDocument.activeElement)||("function"==typeof e.hotkeys?e.hotkeys.call(this,t):this.handleHotkeys(t))}},n.handleHotkeys=function(t){var e=this.options_.userActions?this.options_.userActions.hotkeys:{},n=e.fullscreenKey,r=void 0===n?function(t){return m.a.isEventKey(t,"f")}:n,i=e.muteKey,o=void 0===i?function(t){return m.a.isEventKey(t,"m")}:i,s=e.playPauseKey,u=void 0===s?function(t){return m.a.isEventKey(t,"k")||m.a.isEventKey(t,"Space")}:s;if(r.call(this,t)){t.preventDefault(),t.stopPropagation();var c=mn.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,t)}else if(o.call(this,t)){t.preventDefault(),t.stopPropagation(),mn.getComponent("MuteToggle").prototype.handleClick.call(this,t)}else if(u.call(this,t)){t.preventDefault(),t.stopPropagation(),mn.getComponent("PlayToggle").prototype.handleClick.call(this,t)}},n.canPlayType=function(t){for(var e,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Ar.getTech(i);if(o||(o=mn.getComponent(i)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else Bt.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(t){var e,n=this,r=this.options_.techOrder.map((function(t){return[t,Ar.getTech(t)]})).filter((function(t){var e=t[0],n=t[1];return n?n.isSupported():(Bt.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),i=function(t,e,n){var r;return t.some((function(t){return e.some((function(e){if(r=n(t,e))return!0}))})),r},o=function(t,e){var r=t[0];if(t[1].canPlaySource(e,n.options_[r.toLowerCase()]))return{source:e,tech:r}};return(this.options_.sourceOrder?i(t,r,(e=o,function(t,n){return e(n,t)})):i(r,t,o))||!1},n.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var n=function t(e){if(Array.isArray(e)){var n=[];e.forEach((function(e){e=t(e),Array.isArray(e)?n=n.concat(e):Wt(e)&&n.push(e)})),e=n}else e="string"==typeof e&&e.trim()?[qr({src:e})]:Wt(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[qr(e)]:[];return e}(t);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Dr(this,n[0],(function(t,r){var i,o;if(e.middleware_=r,e.cache_.sources=n,e.updateSourceCaches_(t),e.src_(t))return n.length>1?e.src(n.slice(1)):(e.changingSrc_=!1,e.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void e.triggerReady());i=r,o=e.tech_,i.forEach((function(t){return t.setTech&&t.setTech(o)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src_=function(t){var e,n,r=this,i=this.selectSource([t]);return!i||(e=i.tech,n=this.techName_,ln(e)!==ln(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var t=this,e=this.options_.Promise||i.a.Promise;this.paused()||!e?this.doReset_():Jn(this.play().then((function(){return t.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_(),$e(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var t=this.controlBar,e=t.durationDisplay,n=t.remainingTimeDisplay;e&&e.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 t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},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(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},n.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=void 0===e?this.options_.autoplay:e,this.tech_&&this.techCall_("setAutoplay",e)},n.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},n.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},n.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),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(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(t){if(void 0===t)return this.error_||null;if(this.options_.suppressNotSupportedError&&t&&4===t.code){var e=function(){this.error(t)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],e),void this.one("loadstart",(function(){this.off(["click","touchstart"],e)}))}if(null===t)return this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Kn(t),this.addClass("vjs-error"),Bt.error("(CODE:"+this.error_.code+" "+Kn.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(t){this.userActivity_=!0},n.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,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(t){t.stopPropagation(),t.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var t,e,n,r=Xe(this,this.reportUserActivity),i=function(e){r(),this.clearInterval(t)};this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===e&&t.screenY===n||(e=t.screenX,n=t.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var o,a=this.getChild("controlBar");!a||Mn||Sn||(a.on("mouseenter",(function(t){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(t){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var t=this.options_.inactivityTimeout;t<=0||(o=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),t))}}),250)},n.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},n.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},n.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},n.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},n.removeRemoteTextTrack=function(t){void 0===t&&(t={});var e=t.track;if(e||(e=t),this.tech_)return this.tech_.removeRemoteTextTrack(e)},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(t){if(void 0===t)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),$e(this)&&this.trigger("languagechange"))},n.languages=function(){return fn(e.prototype.options_.languages,this.languages_)},n.toJSON=function(){var t=fn(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var r=e[n];(r=fn(r)).player=void 0,t.tracks[n]=r}return t},n.createModal=function(t,e){var n=this;(e=e||{}).content=t||"";var r=new nr(this,e);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),e=this.currentWidth(),n=0;n<Co.length;n++){var r=Co[n];if(e<=this.breakpoints_[r]){if(t===r)return;t&&this.removeClass(Po[t]),this.addClass(Po[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},n.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=qt({},xo,t),this.updateCurrentBreakpoint_()),qt(this.breakpoints_)},n.responsive=function(t){return void 0===t?this.responsive_:(t=Boolean(t))!==this.responsive_?(this.responsive_=t,t?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Po[this.breakpoint_]||""},n.loadMedia=function(t,e){var n=this;if(t&&"object"==typeof t){this.reset(),this.cache_.media=fn(t);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:Hr(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(t){return n.addRemoteTextTrack(t,!1)})),this.ready(e)}},n.getMedia=function(){if(!this.cache_.media){var t=this.poster(),e={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(t){return{kind:t.kind,label:t.label,language:t.language,src:t.src}}))};return t&&(e.poster=t,e.artwork=[{src:e.poster,type:Hr(e.poster)}]),e}return fn(this.cache_.media)},e.getTagSettings=function(t){var e={sources:[],tracks:[]},n=se(t),r=n["data-setup"];if(ne(t,"vjs-fill")&&(n.fill=!0),ne(t,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=d()(r||"{}"),o=i[0],a=i[1];o&&Bt.error(o),qt(n,a)}if(qt(e,n),t.hasChildNodes())for(var s=t.childNodes,u=0,c=s.length;u<c;u++){var l=s[u],f=l.nodeName.toLowerCase();"source"===f?e.sources.push(se(l)):"track"===f&&e.tracks.push(se(l))}return e},n.flexNotSupported_=function(){var t=a.a.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},n.debug=function(t){if(void 0===t)return this.debugEnabled_;t?(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)},e}(mn);Lr.names.forEach((function(t){var e=Lr[t];Lo.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}})),Lo.prototype.crossorigin=Lo.prototype.crossOrigin,Lo.players={};var Ao=i.a.navigator;Lo.prototype.options_={techOrder:Ar.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ao&&(Ao.languages&&Ao.languages[0]||Ao.userLanguage||Ao.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Lo.prototype[t]=function(){return this.techGet_(t)}})),ko.forEach((function(t){Lo.prototype["handleTech"+ln(t)+"_"]=function(){return this.trigger(t)}})),mn.registerComponent("Player",Lo);var Io={},jo=function(t){return Io.hasOwnProperty(t)},Ro=function(t){return jo(t)?Io[t]:void 0},Do=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},Mo=function(t,e,n){var r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},No=function(t,e){return e.prototype.name=t,function(){Mo(this,{name:t,plugin:e,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=T()(e,[this].concat(r));return this[t]=function(){return o},Mo(this,o.getEventHash()),o}},Bo=function(){function t(e){if(this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),an(this),delete this.trigger,un(this,this.constructor.defaultState),Do(e,this.name),this.dispose=Xe(this,this.dispose),e.on("dispose",this.dispose)}var e=t.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(t){return void 0===t&&(t={}),t.name=this.name,t.plugin=this.constructor,t.instance=this,t},e.trigger=function(t,e){return void 0===e&&(e={}),qe(this.eventBusEl_,t,this.getEventHash(e))},e.handleStateChanged=function(t){},e.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e.activePlugins_[t]=!1,this.player=this.state=null,e[t]=No(t,Io[t])},t.isBasic=function(e){var n="string"==typeof e?Ro(e):e;return"function"==typeof n&&!t.prototype.isPrototypeOf(n.prototype)},t.registerPlugin=function(e,n){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+typeof e+".");if(jo(e))Bt.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Lo.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+typeof n+".");return Io[e]=n,"plugin"!==e&&(t.isBasic(n)?Lo.prototype[e]=function(t,e){var n=function(){Mo(this,{name:t,plugin:e,instance:null},!0);var n=e.apply(this,arguments);return Do(this,t),Mo(this,{name:t,plugin:e,instance:n}),n};return Object.keys(e).forEach((function(t){n[t]=e[t]})),n}(e,n):Lo.prototype[e]=No(e,n)),n},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");jo(t)&&(delete Io[t],delete Lo.prototype[t])},t.getPlugins=function(t){var e;return void 0===t&&(t=Object.keys(Io)),t.forEach((function(t){var n=Ro(t);n&&((e=e||{})[t]=n)})),e},t.getPluginVersion=function(t){var e=Ro(t);return e&&e.VERSION||""},t}();Bo.getPlugin=Ro,Bo.BASE_PLUGIN_NAME="plugin",Bo.registerPlugin("plugin",Bo),Lo.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},Lo.prototype.hasPlugin=function(t){return!!jo(t)};var Uo=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Fo(t,e,n){var r=Fo.getPlayer(t);if(r)return e&&Bt.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof t?Se("#"+Uo(t)):t;if(!Qt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||Bt.warn("The element supplied is not included in the DOM"),e=e||{},Fo.hooks("beforesetup").forEach((function(t){var n=t(i,fn(e));Wt(n)&&!Array.isArray(n)?e=fn(e,n):Bt.error("please return an object in beforesetup hooks")}));var o=mn.getComponent("Player");return r=new o(i,e,n),Fo.hooks("setup").forEach((function(t){return t(r)})),r}if(Fo.hooks_={},Fo.hooks=function(t,e){return Fo.hooks_[t]=Fo.hooks_[t]||[],e&&(Fo.hooks_[t]=Fo.hooks_[t].concat(e)),Fo.hooks_[t]},Fo.hook=function(t,e){Fo.hooks(t,e)},Fo.hookOnce=function(t,e){Fo.hooks(t,[].concat(e).map((function(e){return function n(){return Fo.removeHook(t,n),e.apply(void 0,arguments)}})))},Fo.removeHook=function(t,e){var n=Fo.hooks(t).indexOf(e);return!(n<=-1)&&(Fo.hooks_[t]=Fo.hooks_[t].slice(),Fo.hooks_[t].splice(n,1),!0)},!0!==i.a.VIDEOJS_NO_DYNAMIC_STYLE&&Kt()){var Vo=Se(".vjs-styles-defaults");if(!Vo){Vo=Ae("vjs-styles-defaults");var Ho=Se("head");Ho&&Ho.insertBefore(Vo,Ho.firstChild),Ie(Vo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Pe(1,Fo),Fo.VERSION="7.11.2",Fo.options=Lo.prototype.options_,Fo.getPlayers=function(){return Lo.players},Fo.getPlayer=function(t){var e,n=Lo.players;if("string"==typeof t){var r=Uo(t),i=n[r];if(i)return i;e=Se("#"+r)}else e=t;if(Qt(e)){var o=e,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},Fo.getAllPlayers=function(){return Object.keys(Lo.players).map((function(t){return Lo.players[t]})).filter(Boolean)},Fo.players=Lo.players,Fo.getComponent=mn.getComponent,Fo.registerComponent=function(t,e){Ar.isTech(e)&&Bt.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),mn.registerComponent.call(mn,t,e)},Fo.getTech=Ar.getTech,Fo.registerTech=Ar.registerTech,Fo.use=function(t,e){Ir[t]=Ir[t]||[],Ir[t].push(e)},Object.defineProperty(Fo,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Fo.middleware,"TERMINATOR",{value:Rr,writeable:!1,enumerable:!0}),Fo.browser=Bn,Fo.TOUCH_ENABLED=jn,Fo.extend=function(t,e){void 0===e&&(e={});var n=function(){t.apply(this,arguments)},r={};for(var i in"object"==typeof e?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"==typeof e&&(n=e),E()(n,t),t&&(n.super_=t),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Fo.mergeOptions=fn,Fo.bind=Xe,Fo.registerPlugin=Bo.registerPlugin,Fo.deregisterPlugin=Bo.deregisterPlugin,Fo.plugin=function(t,e){return Bt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Bo.registerPlugin(t,e)},Fo.getPlugins=Bo.getPlugins,Fo.getPlugin=Bo.getPlugin,Fo.getPluginVersion=Bo.getPluginVersion,Fo.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),Fo.options.languages=fn(Fo.options.languages,((n={})[t]=e,n)),Fo.options.languages[t]},Fo.log=Bt,Fo.createLogger=Ut,Fo.createTimeRange=Fo.createTimeRanges=Vn,Fo.formatTime=ii,Fo.setFormatTime=function(t){ri=t},Fo.resetFormatTime=function(){ri=ni},Fo.parseUrl=vr,Fo.isCrossOrigin=_r,Fo.EventTarget=Qe,Fo.on=Ve,Fo.one=We,Fo.off=He,Fo.trigger=qe,Fo.xhr=g.a,Fo.TextTrack=Er,Fo.AudioTrack=kr,Fo.VideoTrack=Or,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){Fo[t]=function(){return Bt.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),ke[t].apply(null,arguments)}})),Fo.computedStyle=Gt,Fo.dom=ke,Fo.url=wr,Fo.defineLazyProperty=So;
2
2
  /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */
3
3
  var qo,Wo=O.a,zo=function(t,e,n){return t&&n&&n.responseURL&&e!==n.responseURL?n.responseURL:e},Go=Fo.log,Yo=function(t,e){return t+"-"+e},Xo=function(t){var e=t.manifestString,n=t.customTagParsers,r=void 0===n?[]:n,i=t.customTagMappers,o=void 0===i?[]:i,a=new R;return r.forEach((function(t){return a.addParser(t)})),o.forEach((function(t){return a.addTagMapper(t)})),a.push(e),a.end(),a.manifest},Ko=function(t,e){["AUDIO","SUBTITLES"].forEach((function(n){for(var r in t.mediaGroups[n])for(var i in t.mediaGroups[n][r]){var o=t.mediaGroups[n][r][i];e(o,n,r,i)}}))},Qo=function(t){var e=t.playlist,n=t.uri,r=t.id;e.id=r,n&&(e.uri=n),e.attributes=e.attributes||{}},$o=function(t,e){t.uri=e;for(var n=0;n<t.playlists.length;n++)if(!t.playlists[n].uri){var r="placeholder-uri-"+n;t.playlists[n].uri=r}Ko(t,(function(e,n,r,i){if(e.playlists&&e.playlists.length&&!e.playlists[0].uri){var o="placeholder-uri-"+n+"-"+r+"-"+i,a=Yo(0,o);e.playlists[0].uri=o,e.playlists[0].id=a,t.playlists[a]=e.playlists[0],t.playlists[o]=e.playlists[0]}})),function(t){for(var e=t.playlists.length;e--;){var n=t.playlists[e];Qo({playlist:n,id:Yo(e,n.uri)}),n.resolvedUri=Wo(t.uri,n.uri),t.playlists[n.id]=n,t.playlists[n.uri]=n,n.attributes.BANDWIDTH||Go.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(t),function(t){Ko(t,(function(e){e.uri&&(e.resolvedUri=Wo(t.uri,e.uri))}))}(t)},Jo=Fo.mergeOptions,Zo=Fo.EventTarget,ta=function(t,e){t.resolvedUri||(t.resolvedUri=Wo(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=Wo(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=Wo(e,t.map.uri))},ea=function(t,e){var n=Jo(t,{}),r=n.playlists[e.id];if(!r)return null;if(r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence)return null;var i=Jo(r,e);r.segments&&(i.segments=function(t,e,n){var r=e.slice();n=n||0;for(var i=Math.min(t.length,e.length+n),o=n;o<i;o++)r[o-n]=Jo(t[o],r[o-n]);return r}(r.segments,e.segments,e.mediaSequence-r.mediaSequence)),i.segments.forEach((function(t){ta(t,i.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].id===e.id&&(n.playlists[o]=i);return n.playlists[e.id]=i,n.playlists[e.uri]=i,n},na=function(t,e){var n=t.segments[t.segments.length-1];return e&&n&&n.duration?1e3*n.duration:500*(t.targetDuration||10)},ra=function(t){function e(e,n,r){var i;if(void 0===r&&(r={}),i=t.call(this)||this,!e)throw new Error("A non-empty playlist URL or object is required");var o=r,a=o.withCredentials,s=void 0!==a&&a,u=o.handleManifestRedirects,c=void 0!==u&&u;i.src=e,i.vhs_=n,i.withCredentials=s,i.handleManifestRedirects=c;var l=n.options_;return i.customTagParsers=l&&l.customTagParsers||[],i.customTagMappers=l&&l.customTagMappers||[],i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.vhs_.xhr({uri:Wo(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(t,e){if(i.request)return t?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata({playlistString:i.request.responseText,url:i.media().uri,id:i.media().id})})))})),i}h()(e,t);var n=e.prototype;return n.playlistRequestError=function(t,e,n){var r=e.uri,i=e.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:t.status,message:"HLS playlist request error at URL: "+r+".",responseText:t.responseText,code:t.status>=500?4:2},this.trigger("error")},n.haveMetadata=function(t){var e=this,n=t.playlistString,r=t.playlistObject,o=t.url,a=t.id;this.request=null,this.state="HAVE_METADATA";var s=r||Xo({manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});s.lastRequest=Date.now(),Qo({playlist:s,uri:o,id:a});var u=ea(this.master,s);this.targetDuration=s.targetDuration,u?(this.master=u,this.media_=this.master.playlists[a]):this.trigger("playlistunchanged"),this.media().endList||(i.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=i.a.setTimeout((function(){e.trigger("mediaupdatetimeout")}),na(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),i.a.clearTimeout(this.mediaUpdateTimeout),i.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},n.media=function(t,e){var n=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(i.a.clearTimeout(this.finalRenditionTimeout),e){var r=t.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=i.a.setTimeout(this.media.bind(this,t,!1),r)}else{var o=this.state,a=!this.media_||t.id!==this.media_.id;if(this.master.playlists[t.id].endList||t.endList&&t.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===o?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(a){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},(function(e,r){if(n.request){if(t.lastRequest=Date.now(),t.resolvedUri=zo(n.handleManifestRedirects,t.resolvedUri,r),e)return n.playlistRequestError(n.request,t,o);n.haveMetadata({playlistString:r.responseText,url:t.uri,id:t.id}),"HAVE_MASTER"===o?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),i.a.clearTimeout(this.mediaUpdateTimeout),"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(t){var e=this;i.a.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(t){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=i.a.setTimeout((function(){return e.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var t=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=i.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){t.setupInitialPlaylist(t.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(e,n){if(t.request){if(t.request=null,e)return t.error={status:n.status,message:"HLS playlist request error at URL: "+t.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.src=zo(t.handleManifestRedirects,t.src,n);var r=Xo({manifestString:n.responseText,customTagParsers:t.customTagParsers,customTagMappers:t.customTagMappers});t.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(t){if(this.state="HAVE_MASTER",t.playlists)return this.master=t,$o(this.master,this.srcUri()),t.playlists.forEach((function(t){t.segments&&t.segments.forEach((function(e){ta(e,t.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var e=this.srcUri()||i.a.location.href;this.master=function(t,e){var n=Yo(0,e),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:i.a.location.href,resolvedUri:i.a.location.href,playlists:[{uri:e,id:n,resolvedUri:e,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[e]=r.playlists[0],r}(0,e),this.haveMetadata({playlistObject:t,url:e,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},e}(Zo),ia=function(t,e){var n,r=[];if(t&&t.length)for(n=0;n<t.length;n++)e(t.start(n),t.end(n))&&r.push([t.start(n),t.end(n)]);return Fo.createTimeRanges(r)},oa=function(t,e){return ia(t,(function(t,n){return t-.1<=e&&n+.1>=e}))},aa=function(t,e){return ia(t,(function(t){return t-1/30>=e}))},sa=function(t){var e=[];if(!t||!t.length)return"";for(var n=0;n<t.length;n++)e.push(t.start(n)+" => "+t.end(n));return e.join(", ")},ua=function(t){for(var e=[],n=0;n<t.length;n++)e.push({start:t.start(n),end:t.end(n)});return e},ca=Fo.createTimeRange,la=function(t,e,n){if(void 0===e&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence)return 0;var r=function(t,e){var n=0,r=e-t.mediaSequence,i=t.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=t.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(t,e);if(r.precise)return r.result;var i=function(t,e){for(var n,r=0,i=e-t.mediaSequence;i<t.segments.length;i++){if(void 0!==(n=t.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=n.duration,void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(t,e);return i.precise?i.result:r.result+n},fa=function(t,e,n){if(!t)return 0;if("number"!=typeof n&&(n=0),void 0===e){if(t.totalDuration)return t.totalDuration;if(!t.endList)return i.a.Infinity}return la(t,e,n)},ha=function(t,e,n){var r=0;if(e>n){var i=[n,e];e=i[0],n=i[1]}if(e<0){for(var o=e;o<Math.min(0,n);o++)r+=t.targetDuration;e=0}for(var a=e;a<n;a++)r+=t.segments[a].duration;return r},pa=function(t,e){if(!t.segments.length)return 0;var n=t.segments.length,r=t.segments[n-1].duration||t.targetDuration,i="number"==typeof e?e:r+2*t.targetDuration;if(0===i)return n;for(var o=0;n--&&!((o+=t.segments[n].duration)>=i););return Math.max(0,n)},da=function(t,e,n,r){if(!t||!t.segments)return null;if(t.endList)return fa(t);if(null===e)return null;e=e||0;var i=n?pa(t,r):t.segments.length;return la(t,t.mediaSequence+i,e)},ya=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},ma=function(t){return t.excludeUntil&&t.excludeUntil===1/0},va=function(t){var e=ya(t);return!t.disabled&&!e},ga=function(t,e){return e.attributes&&e.attributes[t]},ba=function(t,e){if(1===t.playlists.length)return!0;var n=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter((function(t){return!!va(t)&&(t.attributes.BANDWIDTH||0)<n})).length},_a={duration:fa,seekable:function(t,e,n){var r=e||0,i=da(t,e,!0,n);return null===i?ca():ca(r,i)},safeLiveIndex:pa,getMediaInfoForTime:function(t,e,n,r){var i,o=t.segments.length,a=e-r;if(a<0){if(n>0)for(i=n-1;i>=0;i--)if((a+=t.segments[i].duration+1/30)>0)return{mediaIndex:i,startTime:r-ha(t,n,i)};return{mediaIndex:0,startTime:e}}if(n<0){for(i=n;i<0;i++)if((a-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};n=0}for(i=n;i<o;i++)if((a-=t.segments[i].duration+1/30)<0)return{mediaIndex:i,startTime:r+ha(t,n,i)};return{mediaIndex:o-1,startTime:e}},isEnabled:va,isDisabled:function(t){return t.disabled},isBlacklisted:ya,isIncompatible:ma,playlistEnd:da,isAes:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},hasAttribute:ga,estimateSegmentRequestTime:function(t,e,n,r){return void 0===r&&(r=0),ga("BANDWIDTH",n)?(t*n.attributes.BANDWIDTH-8*r)/e:NaN},isLowestEnabledRendition:ba},wa=Fo.xhr,Ta=Fo.mergeOptions,Sa=function(t,e,n,r){var i="arraybuffer"===t.responseType?t.response:t.responseText;!e&&i&&(t.responseTime=Date.now(),t.roundTripTime=t.responseTime-t.requestTime,t.bytesReceived=i.byteLength||i.length,t.bandwidth||(t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3))),n.headers&&(t.responseHeaders=n.headers),e&&"ETIMEDOUT"===e.code&&(t.timedout=!0),e||t.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(e=new Error("XHR Failed with a response of: "+(t&&(i||t.responseText)))),r(e,t)},Ea=function(){return function t(e,n){e=Ta({timeout:45e3},e);var r=t.beforeRequest||Fo.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(e);i&&(e=i)}var o=wa(e,(function(t,e){return Sa(o,t,e,n)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=e.uri,o.requestTime=Date.now(),o}},ka=function(t){var e,n,r={};return t.byterange&&(r.Range=(e=t.byterange,n=e.offset+e.length-1,"bytes="+e.offset+"-"+n)),r},Oa=function(t,e){return t.start(e)+"-"+t.end(e)},Ca=function(t,e){var n=t.toString(16);return"00".substring(0,2-n.length)+n+(e%2?" ":"")},Pa=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},xa=function(t){var e={};return Object.keys(t).forEach((function(n){var r=t[n];ArrayBuffer.isView(r)?e[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[n]=r})),e},La=function(t){var e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},Aa=function(t){return t.resolvedUri},Ia=function(t){for(var e=Array.prototype.slice.call(t),n="",r=0;r<e.length/16;r++)n+=e.slice(16*r,16*r+16).map(Ca).join("")+" "+e.slice(16*r,16*r+16).map(Pa).join("")+"\n";return n},ja=Object.freeze({__proto__:null,createTransferableMessage:xa,initSegmentId:La,segmentKeyId:Aa,hexDump:Ia,tagDump:function(t){var e=t.bytes;return Ia(e)},textRanges:function(t){var e,n="";for(e=0;e<t.length;e++)n+=Oa(t,e)+" ";return n}}),Ra=function(t){var e=t.playlist,n=t.time,r=void 0===n?void 0:n,i=t.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var o=function(t,e){if(!e||!e.segments||0===e.segments.length)return null;for(var n,r=0,i=0;i<e.segments.length&&!(t<=(r=(n=e.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var o=e.segments[e.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<t)return null;if(t>r){if(t>r+.25*o.duration)return null;n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,e);if(!o)return i({message:"valid programTime was not found"});if("estimate"===o.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var a={mediaSeconds:r},s=function(t,e){if(!e.dateTimeObject)return null;var n=e.videoTimingInfo.transmuxerPrependedSeconds,r=t-(e.videoTimingInfo.transmuxedPresentationStart+n);return new Date(e.dateTimeObject.getTime()+1e3*r)}(r,o.segment);return s&&(a.programDateTime=s.toISOString()),i(null,a)},Da=function t(e){var n=e.programTime,r=e.playlist,i=e.retryCount,o=void 0===i?2:i,a=e.seekTo,s=e.pauseAfterSeek,u=void 0===s||s,c=e.tech,l=e.callback;if(!l)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!a)return l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!c.hasStarted_)return l({message:"player must be playing a live stream to start buffering"});if(!function(t){if(!t.segments||0===t.segments.length)return!1;for(var e=0;e<t.segments.length;e++){if(!t.segments[e].dateTimeObject)return!1}return!0}(r))return l({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var f=function(t,e){var n;try{n=new Date(t)}catch(t){return null}if(!e||!e.segments||0===e.segments.length)return null;var r=e.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<e.segments.length-1;i++){if(r=e.segments[i],n<e.segments[i+1].dateTimeObject)break}var o,a=e.segments[e.segments.length-1],s=a.dateTimeObject,u=a.videoTimingInfo?(o=a.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:a.duration+.25*a.duration;return n>new Date(s.getTime()+1e3*u)?null:(n>s&&(r=a),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:_a.duration(e,e.mediaSequence+e.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!f)return l({message:n+" was not found in the stream"});var h=f.segment,p=function(t,e){var n,r;try{n=new Date(t),r=new Date(e)}catch(t){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===f.type)return 0===o?l({message:n+" is not buffered yet. Try again"}):(a(f.estimatedStart+p),void c.one("seeked",(function(){t({programTime:n,playlist:r,retryCount:o-1,seekTo:a,pauseAfterSeek:u,tech:c,callback:l})})));var d=h.start+p;c.one("seeked",(function(){return l(null,c.currentTime())})),u&&c.pause(),a(d)},Ma=function(t,e){if(4===t.readyState)return e()},Na=Fo.EventTarget,Ba=Fo.mergeOptions,Ua=function(t){var e=t.byterange.offset+t.byterange.length-1;return t.uri+"-"+t.byterange.offset+"-"+e},Fa=function(t,e){var n,r,i={};for(var o in t){var a=t[o].sidx;if(a){var s=Ua(a);if(!e[s])break;var u=e[s].sidxInfo;n=u,r=a,(Boolean(!n.map&&!r.map)||Boolean(n.map&&r.map&&n.map.byterange.offset===r.map.byterange.offset&&n.map.byterange.length===r.map.byterange.length))&&n.uri===r.uri&&n.byterange.offset===r.byterange.offset&&n.byterange.length===r.byterange.length&&(i[s]=e[s])}}return i},Va=function(t){function e(e,n,r,i){var o;void 0===r&&(r={}),(o=t.call(this)||this).masterPlaylistLoader_=i||l()(o),i||(o.isMaster_=!0);var a=r,s=a.withCredentials,u=void 0!==s&&s,c=a.handleManifestRedirects,f=void 0!==c&&c;if(o.vhs_=n,o.withCredentials=u,o.handleManifestRedirects=f,!e)throw new Error("A non-empty playlist URL or object is required");return o.on("minimumUpdatePeriod",(function(){o.refreshXml_()})),o.on("mediaupdatetimeout",(function(){o.refreshMedia_(o.media().id)})),o.state="HAVE_NOTHING",o.loadedPlaylists_={},o.isMaster_?(o.masterPlaylistLoader_.srcUrl=e,o.masterPlaylistLoader_.sidxMapping_={}):o.childPlaylist_=e,o}h()(e,t);var n=e.prototype;return n.requestErrored_=function(t,e,n){return!this.request||(this.request=null,t?(this.error="object"!=typeof t||t instanceof Error?{status:e.status,message:"DASH request error at URL: "+e.uri,response:e.response,code:2}:t,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(t,e,n){var r=this,o=t.sidx&&Ua(t.sidx);if(t.sidx&&o&&!this.masterPlaylistLoader_.sidxMapping_[o]){var a=zo(this.handleManifestRedirects,t.sidx.resolvedUri),s=this.masterPlaylistLoader_.sidxMapping_;s[o]={sidxInfo:t.sidx};var u=function(i,a){if(!r.requestErrored_(i,a,e)){var u=Pt()(Object(Lt.toUint8)(a.response).subarray(8));return s[o].sidx=u,Ot(t,u,t.sidx.resolvedUri),n(!0)}};this.request=function(t,e,n){var r,i=[],o=!1,a=function(t,e,r,i){return e.abort(),o=!0,n(t,e,r,i)},s=function(t,e){if(!o){if(t)return a(t,e,"",i);var n=e.responseText.substring(i&&i.byteLength||0,e.responseText.length);if(i=Object(Lt.concatTypedArrays)(i,Object(Lt.stringToBytes)(n,!0)),r=r||Object(xt.getId3Offset)(i),i.length<10||r&&i.length<r+2)return Ma(e,(function(){return a(t,e,"",i)}));var s=Object(xt.detectContainerForBytes)(i);return"ts"===s&&i.length<188||!s&&i.length<376?Ma(e,(function(){return a(t,e,"",i)})):a(null,e,s,i)}},u=e({uri:t,beforeSend:function(t){t.overrideMimeType("text/plain; charset=x-user-defined"),t.addEventListener("progress",(function(e){e.total,e.loaded;return Sa(t,null,{statusCode:t.status},s)}))}},(function(t,e){return Sa(u,t,e,s)}));return u}(a,this.vhs_.xhr,(function(e,n,i,o){if(e)return u(e,n);if(!i||"mp4"!==i)return u({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:t,internal:!0,blacklistDuration:1/0,code:2},n);var s=t.sidx.byterange,c=s.offset,l=s.length;if(o.length>=l+c)return u(e,{response:o.subarray(c,c+l),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:ka({byterange:t.sidx.byterange})},u)}))}else this.mediaRequest_=i.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},i.a.clearTimeout(this.minimumUpdatePeriodTimeout_),i.a.clearTimeout(this.mediaRequest_),i.a.clearTimeout(this.mediaUpdateTimeout),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},n.media=function(t){var e=this;if(!t)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 t){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.masterPlaylistLoader_.master.playlists[t]}var r=!this.media_||t.id!==this.media_.id;if(r&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state="HAVE_METADATA",this.media_=t,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,n,(function(r){e.haveMetadata({startingState:n,playlist:t})})))},n.haveMetadata=function(t){var e=t.startingState,n=t.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.stopRequest(),i.a.clearTimeout(this.mediaUpdateTimeout),i.a.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(t){var e=this;i.a.clearTimeout(this.mediaUpdateTimeout),i.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var n=this.media();if(t){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=i.a.setTimeout((function(){return e.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var t=this;this.started=!0,this.isMaster_?this.requestMaster_((function(e,n){t.haveMaster_(),t.hasPendingRequest()||t.media_||t.media(t.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=i.a.setTimeout((function(){return t.haveMaster_()}),0)},n.requestMaster_=function(t){var e=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!e.requestErrored_(n,r)){var i=r.responseText!==e.masterPlaylistLoader_.masterXml_;return e.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?e.masterLoaded_=Date.parse(r.responseHeaders.date):e.masterLoaded_=Date.now(),e.masterPlaylistLoader_.srcUrl=zo(e.handleManifestRedirects,e.masterPlaylistLoader_.srcUrl,r),i?(e.handleMaster_(),void e.syncClientServerClock_((function(){return t(r,i)}))):t(r,i)}"HAVE_NOTHING"===e.state&&(e.started=!1)}))},n.syncClientServerClock_=function(t){var e=this,n=kt(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),t()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),t()):void(this.request=this.vhs_.xhr({uri:Wo(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(e.request){if(r)return e.masterPlaylistLoader_.clientOffset_=e.masterLoaded_-Date.now(),t();var o;o="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):e.masterLoaded_:Date.parse(i.responseText),e.masterPlaylistLoader_.clientOffset_=o-Date.now(),t()}})))},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 t,e,n,r,i,o,a=(t={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},e=t.masterXml,n=t.srcUrl,r=t.clientOffset,i=t.sidxMapping,o=Et(e,{manifestUri:n,clientOffset:r,sidxMapping:i}),$o(o,n),o),s=this.masterPlaylistLoader_.master;s&&(a=function(t,e,n){for(var r=!0,i=Ba(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod}),o=0;o<e.playlists.length;o++){var a=e.playlists[o];if(a.sidx){var s=Ua(a.sidx);n&&n[s]&&Ot(a,n[s].sidx,a.sidx.resolvedUri)}var u=ea(i,a);u&&(i=u,r=!1)}return Ko(e,(function(t,e,n,o){if(t.playlists&&t.playlists.length){var a=t.playlists[0].id,s=ea(i,t.playlists[0]);s&&((i=s).mediaGroups[e][n][o].playlists[0]=i.playlists[a],r=!1)}})),e.minimumUpdatePeriod!==t.minimumUpdatePeriod&&(r=!1),r?null:i}(s,a,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=a||s;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!s||a&&s.minimumUpdatePeriod!==a.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(a)},n.updateMinimumUpdatePeriodTimeout_=function(){var t=this;i.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var e=function e(n){t.minimumUpdatePeriodTimeout_=i.a.setTimeout((function(){t.trigger("minimumUpdatePeriod"),e(n)}),n)},n=this.masterPlaylistLoader_.master&&this.masterPlaylistLoader_.master.minimumUpdatePeriod;n>0?e(n):0===n&&(this.media()?e(1e3*this.media().targetDuration):this.one("loadedplaylist",(function(){e(1e3*t.media().targetDuration)})))},n.refreshXml_=function(){var t=this;this.requestMaster_((function(e,n){var r,i,o;n&&(t.media_&&(t.media_=t.masterPlaylistLoader_.master.playlists[t.media_.id]),t.masterPlaylistLoader_.sidxMapping_=(r=t.masterPlaylistLoader_.master,i=t.masterPlaylistLoader_.sidxMapping_,o=Fa(r.playlists,i),Ko(r,(function(t,e,n,r){if(t.playlists&&t.playlists.length){var a=t.playlists;o=Ba(o,Fa(a,i))}})),o),t.addSidxSegments_(t.media(),t.state,(function(e){t.refreshMedia_(t.media().id)})))}))},n.refreshMedia_=function(t){var e=this;if(!t)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[t];r?this.media_=n[t]:this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=i.a.setTimeout((function(){e.trigger("mediaupdatetimeout")}),na(this.media(),Boolean(r)))),this.trigger("loadedplaylist")},e}(Na),Ha={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},qa=function(t){for(var e=new Uint8Array(new ArrayBuffer(t.length)),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e.buffer},Wa=[],za=function(t){var e=t.transmuxer,n=t.bytes,r=t.audioAppendStart,i=t.gopsToAlignWith,o=t.isPartial,a=t.remux,s=t.onData,u=t.onTrackInfo,c=t.onAudioTimingInfo,l=t.onVideoTimingInfo,f=t.onVideoSegmentTimingInfo,h=t.onAudioSegmentTimingInfo,p=t.onId3,d=t.onCaptions,y=t.onDone,m={isPartial:o,buffer:[]};if(e.onmessage=function(t){qo&&("data"===t.data.action&&function(t,e,n){var r=t.data.segment,i=r.type,o=r.initSegment,a=r.captions,s=r.captionStreams,u=r.metadata,c=r.videoFrameDtsTime,l=r.videoFramePtsTime;e.buffer.push({captions:a,captionStreams:s,metadata:u});var f=t.data.segment.boxes||{data:t.data.segment.data},h={type:i,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};void 0!==c&&(h.videoFrameDtsTime=c),void 0!==l&&(h.videoFramePtsTime=l),n(h)}(t,m,s),"trackinfo"===t.data.action&&u(t.data.trackInfo),"gopInfo"===t.data.action&&function(t,e){e.gopInfo=t.data.gopInfo}(t,m),"audioTimingInfo"===t.data.action&&c(t.data.audioTimingInfo),"videoTimingInfo"===t.data.action&&l(t.data.videoTimingInfo),"videoSegmentTimingInfo"===t.data.action&&f(t.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===t.data.action&&h(t.data.audioSegmentTimingInfo),"id3Frame"===t.data.action&&p([t.data.id3Frame],t.data.id3Frame.dispatchType),"caption"===t.data.action&&d(t.data.caption),"transmuxed"===t.data.type&&(e.onmessage=null,function(t){var e=t.transmuxedData,n=t.callback;e.buffer=[],n(e)}({transmuxedData:m,callback:y}),Ga()))},r&&e.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&e.postMessage({action:"setRemux",remux:a}),n.byteLength){var v=n instanceof ArrayBuffer?n:n.buffer,g=n instanceof ArrayBuffer?0:n.byteOffset;e.postMessage({action:"push",data:v,byteOffset:g,byteLength:n.byteLength},[v])}e.postMessage({action:o?"partialFlush":"flush"})},Ga=function(){qo=null,Wa.length&&("function"==typeof(qo=Wa.shift())?qo():za(qo))},Ya=function(t,e){t.postMessage({action:e}),Ga()},Xa=function(t,e){if(!qo)return qo=t,void Ya(e,t);Wa.push(Ya.bind(null,e,t))},Ka=function(t){if(!qo)return qo=t,void za(t);Wa.push(t)},Qa=function(t){Xa("reset",t)},$a=function(){qo=null,Wa.length=0},Ja=function(t){Xa("endTimeline",t)},Za=2,ts=-101,es=-102,ns=function(t){t.forEach((function(t){t.abort()}))},rs=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:ts,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:es,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Za,xhr:e}:null},is=function(t){var e=t.segment,n=t.bytes,r=t.isPartial,i=t.trackInfoFn,o=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,s=t.audioSegmentTimingInfoFn,u=t.id3Fn,c=t.captionsFn,l=t.dataFn,f=t.doneFn,h=e.map&&e.map.tracks||{},p=Boolean(h.audio&&h.video),d=o.bind(null,e,"audio","start"),y=o.bind(null,e,"audio","end"),m=o.bind(null,e,"video","start"),v=o.bind(null,e,"video","end");if(!r&&!e.lastReachedChar){var g=function(t,e){var n=It.a.inspect(t,e*jt.ONE_SECOND_IN_TS);if(!n)return null;var r={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1};return r.hasVideo&&(r.videoStart=n.video[0].ptsTime),r.hasAudio&&(r.audioStart=n.audio[0].ptsTime),r}(n,e.baseStartTime);g&&(i(e,{hasAudio:g.hasAudio,hasVideo:g.hasVideo,isMuxed:p}),i=null,g.hasAudio&&!p&&d(g.audioStart),g.hasVideo&&m(g.videoStart),d=null,m=null)}Ka({bytes:n,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,isPartial:r,remux:p,onData:function(t){t.type="combined"===t.type?"video":t.type,l(e,t)},onTrackInfo:function(t){i&&(p&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:function(t){d&&void 0!==t.start&&(d(t.start),d=null),y&&void 0!==t.end&&y(t.end)},onVideoTimingInfo:function(t){m&&void 0!==t.start&&(m(t.start),m=null),v&&void 0!==t.end&&v(t.end)},onVideoSegmentTimingInfo:function(t){a(t)},onAudioSegmentTimingInfo:function(t){s(t)},onId3:function(t,n){u(e,t,n)},onCaptions:function(t){c(e,[t])},onDone:function(t){f&&!r&&(t.type="combined"===t.type?"video":t.type,f(null,e,t))}})},os=function(t){var e=t.segment,n=t.bytes,r=t.isPartial,i=t.trackInfoFn,o=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,s=t.audioSegmentTimingInfoFn,u=t.id3Fn,c=t.captionsFn,l=t.dataFn,f=t.doneFn,h=new Uint8Array(n);if(Object(xt.isLikelyFmp4MediaSegment)(h)){e.isFmp4=!0;var p=e.map.tracks,d={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&"enca"!==p.audio.codec&&(d.audioCodec=p.audio.codec),p.video&&p.video.codec&&"encv"!==p.video.codec&&(d.videoCodec=p.video.codec),p.video&&p.audio&&(d.isMuxed=!0),i(e,d);var y=Dt.a.startTime(e.map.timescales,h);d.hasAudio&&!d.isMuxed&&o(e,"audio","start",y),d.hasVideo&&o(e,"video","start",y);var m=function(t){l(e,{data:n,type:d.hasAudio&&!d.isMuxed?"audio":"video"}),t&&t.length&&c(e,t),f(null,e,{})};if(!p.video||!n.byteLength||!e.transmuxer)return void m();var v=n instanceof ArrayBuffer?n:n.buffer,g=n instanceof ArrayBuffer?0:n.byteOffset;return e.transmuxer.addEventListener("message",(function t(r){if("mp4Captions"===r.data.action){e.transmuxer.removeEventListener("message",t);var i=r.data.data;e.bytes=n=new Uint8Array(i,i.byteOffset||0,i.byteLength),m(r.data.captions)}})),void e.transmuxer.postMessage({action:"pushMp4Captions",timescales:e.map.timescales,trackIds:[p.video.id],data:v,byteOffset:g,byteLength:n.byteLength},[v])}if(e.transmuxer){if(void 0===e.container&&(e.container=Object(xt.detectContainerForBytes)(h)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void f(null,e,{});is({segment:e,bytes:n,isPartial:r,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:c,dataFn:l,doneFn:f})}else f(null,e,{})},as=function(t){var e=t.activeXhrs,n=t.decryptionWorker,r=t.trackInfoFn,i=t.timingInfoFn,o=t.videoSegmentTimingInfoFn,a=t.audioSegmentTimingInfoFn,s=t.id3Fn,u=t.captionsFn,c=t.dataFn,l=t.doneFn,f=0,h=!1;return function(t,p){if(!h){if(t)return h=!0,ns(e),l(t,p);if((f+=1)===e.length){if(p.endOfAllRequests=Date.now(),p.encryptedBytes)return function(t){var e,n=t.decryptionWorker,r=t.segment,i=t.trackInfoFn,o=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,s=t.audioSegmentTimingInfoFn,u=t.id3Fn,c=t.captionsFn,l=t.dataFn,f=t.doneFn;n.addEventListener("message",(function t(e){if(e.data.source===r.requestId){n.removeEventListener("message",t);var h=e.data.decrypted;r.bytes=new Uint8Array(h.bytes,h.byteOffset,h.byteLength),os({segment:r,bytes:r.bytes,isPartial:!1,trackInfoFn:i,timingInfoFn:o,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:u,captionsFn:c,dataFn:l,doneFn:f})}})),e=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(xa({source:r.requestId,encrypted:r.encryptedBytes,key:e,iv:r.key.iv}),[r.encryptedBytes.buffer,e.buffer])}({decryptionWorker:n,segment:p,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:c,doneFn:l});os({segment:p,bytes:p.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:c,doneFn:l})}}}},ss=function(t){var e=t.segment,n=t.progressFn,r=t.trackInfoFn,i=t.timingInfoFn,o=t.videoSegmentTimingInfoFn,a=t.audioSegmentTimingInfoFn,s=t.id3Fn,u=t.captionsFn,c=t.dataFn,l=t.handlePartialData;return function(t){var f=t.target;if(!f.aborted){if(l&&!e.key&&f.responseText&&f.responseText.length>=8){var h=qa(f.responseText.substring(e.lastReachedChar||0));!e.lastReachedChar&&Object(xt.isLikelyFmp4MediaSegment)(new Uint8Array(h))||(e.lastReachedChar=f.responseText.length,os({segment:e,bytes:h,isPartial:!0,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:a,id3Fn:s,captionsFn:u,dataFn:c}))}return e.stats=Fo.mergeOptions(e.stats,function(t){var e=t.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return n.bytesReceived=t.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(t)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),n(t,e)}}},us=function(t){var e=t.xhr,n=t.xhrOptions,r=t.decryptionWorker,i=t.segment,o=t.abortFn,a=t.progressFn,s=t.trackInfoFn,u=t.timingInfoFn,c=t.videoSegmentTimingInfoFn,l=t.audioSegmentTimingInfoFn,f=t.id3Fn,h=t.captionsFn,p=t.dataFn,d=t.doneFn,y=t.handlePartialData,m=[],v=as({activeXhrs:m,decryptionWorker:r,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:l,id3Fn:f,captionsFn:h,dataFn:p,doneFn:d});if(i.key&&!i.key.bytes){var g=e(Fo.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),function(t,e){return function(n,r){var i=r.response,o=rs(n,r);if(o)return e(o,t);if(16!==i.byteLength)return e({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Za,xhr:r},t);var a=new DataView(i);return t.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),e(null,t)}}(i,v));m.push(g)}if(i.map&&!i.map.bytes){var b=e(Fo.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:ka(i.map)}),function(t){var e=t.segment,n=t.finishProcessingFn;return function(t,r){var i=r.response,o=rs(t,r);if(o)return n(o,e);if(0===i.byteLength)return n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:Za,xhr:r},e);e.map.bytes=new Uint8Array(r.response);var a=Object(xt.detectContainerForBytes)(e.map.bytes);return"mp4"!==a?n({status:r.status,message:"Found unsupported "+(a||"unknown")+" container for initialization segment at URL: "+r.uri,code:Za,internal:!0,xhr:r},e):(Dt.a.tracks(e.map.bytes).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))})),n(null,e))}}({segment:i,finishProcessingFn:v}));m.push(b)}var _=Fo.mergeOptions(n,{uri:i.resolvedUri,responseType:"arraybuffer",headers:ka(i)});y&&(_.responseType="text",_.beforeSend=function(t){t.overrideMimeType("text/plain; charset=x-user-defined")});var w=e(_,function(t){var e=t.segment,n=t.finishProcessingFn,r=t.responseType;return function(t,i){var o=i.response,a=rs(t,i);if(a)return n(a,e);var s="arraybuffer"!==r&&i.responseText?qa(i.responseText.substring(e.lastReachedChar||0)):i.response;return 0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:Za,xhr:i},e):(e.stats=function(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}}(i),e.key?e.encryptedBytes=new Uint8Array(s):e.bytes=new Uint8Array(s),n(null,e))}}({segment:i,finishProcessingFn:v,responseType:_.responseType}));w.addEventListener("progress",ss({segment:i,progressFn:a,trackInfoFn:s,timingInfoFn:u,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:l,id3Fn:f,captionsFn:h,dataFn:p,handlePartialData:y})),m.push(w);var T={};return m.forEach((function(t){t.addEventListener("loadend",function(t){var e=t.loadendState,n=t.abortFn;return function(t){t.target.aborted&&n&&!e.calledAbortFn&&(n(),e.calledAbortFn=!0)}}({loadendState:T,abortFn:o}))})),function(){return ns(m)}},cs="undefined"!=typeof window?window:{},ls="undefined"==typeof Symbol?"__target":Symbol(),fs=cs.BlobBuilder||cs.WebKitBlobBuilder||cs.MozBlobBuilder||cs.MSBlobBuilder,hs=cs.URL||cs.webkitURL||hs&&hs.msURL,ps=cs.Worker;function ds(t,e){return function(n){var r=this;if(!e)return new ps(t);if(ps&&!n){var i=gs(e.toString().replace(/^function.+?{/,"").slice(0,-1));return this[ls]=new ps(i),function(t,e){if(!t||!e)return;var n=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&hs.revokeObjectURL(t.objURL),n.call(t)}}(this[ls],i),this[ls]}var o={postMessage:function(t){r.onmessage&&setTimeout((function(){r.onmessage({data:t,target:o})}))}};e.call(o),this.postMessage=function(t){setTimeout((function(){o.onmessage({data:t,target:r})}))},this.isThisThread=!0}}if(ps){var ys,ms=gs("self.onmessage = function () {}"),vs=new Uint8Array(1);try{(ys=new ps(ms)).postMessage(vs,[vs.buffer])}catch(t){ps=null}finally{hs.revokeObjectURL(ms),ys&&ys.terminate()}}function gs(t){try{return hs.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch(n){var e=new fs;return e.append(t),hs.createObjectURL(e.getBlob(type))}}var bs=new ds("./transmuxer-worker.worker.js",(function(t,e){var n=this;
4
4
  /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!function(){var t=function(){this.init=function(){var t={};this.on=function(e,n){t[e]||(t[e]=[]),t[e]=t[e].concat(n)},this.off=function(e,n){var r;return!!t[e]&&(r=t[e].indexOf(n),t[e]=t[e].slice(),t[e].splice(r,1),r>-1)},this.trigger=function(e){var n,r,i,o;if(n=t[e])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){t={}}}};t.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},t.prototype.push=function(t){this.trigger("data",t)},t.prototype.flush=function(t){this.trigger("done",t)},t.prototype.partialFlush=function(t){this.trigger("partialdone",t)},t.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},t.prototype.reset=function(t){this.trigger("reset",t)};var e,r,i,o,a,s,u,c,l,f,h,p,d,y,m,v,g,b,_,w,T,S,E,k,O,C,P,x,L,A,I,j,R,D,M,N,B,U,F,V,H=t,q=Math.pow(2,32)-1;!function(){var t;if(S={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(t in S)S.hasOwnProperty(t)&&(S[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),O=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),C=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]),P=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]),x={video:C,audio:P},I=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]),j=new Uint8Array([0,0,0,0,0,0,0,0]),R=j,D=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=j,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(t){var e,n,r=[],i=0;for(e=1;e<arguments.length;e++)r.push(arguments[e]);for(e=r.length;e--;)i+=r[e].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(t,4),e=0,i=8;e<r.length;e++)n.set(r[e],i),i+=r[e].byteLength;return n},r=function(){return e(S.dinf,e(S.dref,I))},i=function(t){return e(S.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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},m=function(t){return e(S.hdlr,x[t])},y=function(t){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(n[12]=t.samplerate>>>24&255,n[13]=t.samplerate>>>16&255,n[14]=t.samplerate>>>8&255,n[15]=255&t.samplerate),e(S.mdhd,n)},d=function(t){return e(S.mdia,y(t),m(t.type),s(t))},a=function(t){return e(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},s=function(t){return e(S.minf,"video"===t.type?e(S.vmhd,L):e(S.smhd,A),r(),g(t))},u=function(t,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return e.apply(null,[S.moof,a(t)].concat(r))},c=function(t){for(var n=t.length,r=[];n--;)r[n]=h(t[n]);return e.apply(null,[S.moov,f(4294967295)].concat(r).concat(l(t)))},l=function(t){for(var n=t.length,r=[];n--;)r[n]=w(t[n]);return e.apply(null,[S.mvex].concat(r))},f=function(t){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 e(S.mvhd,n)},v=function(t){var n,r,i=t.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e(S.sdtp,o)},g=function(t){return e(S.stbl,b(t),e(S.stts,M),e(S.stsc,R),e(S.stsz,D),e(S.stco,j))},b=function(t){return e(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?N(t):B(t))},N=function(t){var n,r,i=t.sps||[],o=t.pps||[],a=[],s=[];for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));for(n=0;n<o.length;n++)s.push((65280&o[n].byteLength)>>>8),s.push(255&o[n].byteLength),s=s.concat(Array.prototype.slice.call(o[n]));if(r=[S.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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),e(S.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length],a,[o.length],s))),e(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],t.sarRatio){var u=t.sarRatio[0],c=t.sarRatio[1];r.push(e(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c])))}return e.apply(null,r)},B=function(t){return e(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),i(t))},p=function(t){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return e(S.tkhd,n)},_=function(t){var n,r,i,o,a,s;return n=e(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(q+1)),s=Math.floor(t.baseMediaDecodeTime%(q+1)),r=e(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===t.type?(i=T(t,92),e(S.traf,n,r,i)):(o=v(t),i=T(t,o.length+92),e(S.traf,n,r,i,o))},h=function(t){return t.duration=t.duration||4294967295,e(S.trak,p(t),d(t))},w=function(t){var n=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(n[n.length-1]=0),e(S.trex,n)},V=function(t,e){var n=0,r=0,i=0,o=0;return t.length&&(void 0!==t[0].duration&&(n=1),void 0!==t[0].size&&(r=2),void 0!==t[0].flags&&(i=4),void 0!==t[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},F=function(t,n){var r,i,o,a,s,u;for(n+=20+16*(a=t.samples||[]).length,o=V(a,n),(i=new Uint8Array(o.length+16*a.length)).set(o),r=o.length,u=0;u<a.length;u++)s=a[u],i[r++]=(4278190080&s.duration)>>>24,i[r++]=(16711680&s.duration)>>>16,i[r++]=(65280&s.duration)>>>8,i[r++]=255&s.duration,i[r++]=(4278190080&s.size)>>>24,i[r++]=(16711680&s.size)>>>16,i[r++]=(65280&s.size)>>>8,i[r++]=255&s.size,i[r++]=s.flags.isLeading<<2|s.flags.dependsOn,i[r++]=s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,i[r++]=61440&s.flags.degradationPriority,i[r++]=15&s.flags.degradationPriority,i[r++]=(4278190080&s.compositionTimeOffset)>>>24,i[r++]=(16711680&s.compositionTimeOffset)>>>16,i[r++]=(65280&s.compositionTimeOffset)>>>8,i[r++]=255&s.compositionTimeOffset;return e(S.trun,i)},U=function(t,n){var r,i,o,a,s,u;for(n+=20+8*(a=t.samples||[]).length,o=V(a,n),(r=new Uint8Array(o.length+8*a.length)).set(o),i=o.length,u=0;u<a.length;u++)s=a[u],r[i++]=(4278190080&s.duration)>>>24,r[i++]=(16711680&s.duration)>>>16,r[i++]=(65280&s.duration)>>>8,r[i++]=255&s.duration,r[i++]=(4278190080&s.size)>>>24,r[i++]=(16711680&s.size)>>>16,r[i++]=(65280&s.size)>>>8,r[i++]=255&s.size;return e(S.trun,r)},T=function(t,e){return"audio"===t.type?U(t,e):F(t,e)};o=function(){return e(S.ftyp,E,k,E,O)};var W,z,G,Y,X,K,Q,$,J=function(t){return e(S.mdat,t)},Z=u,tt=function(t){var e,n=o(),r=c(t);return(e=new Uint8Array(n.byteLength+r.byteLength)).set(n),e.set(r,n.byteLength),e},et=function(t,e){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=e,n.compositionTimeOffset=t.pts-t.dts,n.duration=t.duration,n.size=4*t.length,n.size+=t.byteLength,t.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},nt=function(t){var e,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,e=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(n=t[e]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i},rt=function(t){var e,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=t[0].pts,i.dts=t[0].dts,e=0;e<t.length;e++)(n=t[e]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},it=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},ot=function(t,e){var n,r,i,o,a,s=e||0,u=[];for(n=0;n<t.length;n++)for(o=t[n],r=0;r<o.length;r++)a=o[r],s+=(i=et(a,s)).size,u.push(i);return u},at=function(t){var e,n,r,i,o,a,s=0,u=t.byteLength,c=t.nalCount,l=new Uint8Array(u+4*c),f=new DataView(l.buffer);for(e=0;e<t.length;e++)for(i=t[e],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],f.setUint32(s,a.data.byteLength),s+=4,l.set(a.data,s),s+=a.data.byteLength;return l},st=function(t,e){var n,r=[];return n=et(t,e||0),r.push(n),r},ut=function(t){var e,n,r=0,i=t.byteLength,o=t.length,a=new Uint8Array(i+4*o),s=new DataView(a.buffer);for(e=0;e<t.length;e++)n=t[e],s.setUint32(r,n.data.byteLength),r+=4,a.set(n.data,r),r+=n.data.byteLength;return a},ct=[33,16,5,32,164,27],lt=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ft=function(t){for(var e=[];t--;)e.push(0);return e},ht=function(){if(!W){var t={96e3:[ct,[227,64],ft(154),[56]],88200:[ct,[231],ft(170),[56]],64e3:[ct,[248,192],ft(240),[56]],48e3:[ct,[255,192],ft(268),[55,148,128],ft(54),[112]],44100:[ct,[255,192],ft(268),[55,163,128],ft(84),[112]],32e3:[ct,[255,192],ft(268),[55,234],ft(226),[112]],24e3:[ct,[255,192],ft(268),[55,255,128],ft(268),[111,112],ft(126),[224]],16e3:[ct,[255,192],ft(268),[55,255,128],ft(268),[111,255],ft(269),[223,108],ft(195),[1,192]],12e3:[lt,ft(268),[3,127,248],ft(268),[6,255,240],ft(268),[13,255,224],ft(268),[27,253,128],ft(259),[56]],11025:[lt,ft(268),[3,127,248],ft(268),[6,255,240],ft(268),[13,255,224],ft(268),[27,255,192],ft(268),[55,175,128],ft(108),[112]],8e3:[lt,ft(268),[3,121,16],ft(47),[7]]};e=t,W=Object.keys(e).reduce((function(t,n){return t[n]=new Uint8Array(e[n].reduce((function(t,e){return t.concat(e)}),[])),t}),{})}var e;return W};K=function(t,e){return z(X(t,e))},Q=function(t,e){return G(Y(t),e)},$=function(t,e,n){return Y(n?t:t-e)};var pt=9e4,dt=z=function(t){return 9e4*t},yt=(G=function(t,e){return t*e},Y=function(t){return t/9e4}),mt=(X=function(t,e){return t/e},K),vt=Q,gt=$,bt=function(t,e,n,r){var i,o,a,s,u,c=0,l=0,f=0;if(e.length&&(i=mt(t.baseMediaDecodeTime,t.samplerate),o=Math.ceil(pt/(t.samplerate/1024)),n&&r&&(c=i-Math.max(n,r),f=(l=Math.floor(c/o))*o),!(l<1||f>pt/2))){for((a=ht()[t.samplerate])||(a=e[0].data),s=0;s<l;s++)u=e[0],e.splice(0,0,{data:a,dts:u.dts-o,pts:u.pts-o});return t.baseMediaDecodeTime-=Math.floor(vt(f,t.samplerate)),f}},_t=function(t,e,n){return e.minSegmentDts>=n?t:(e.minSegmentDts=1/0,t.filter((function(t){return t.dts>=n&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)})))},wt=function(t){var e,n,r=[];for(e=0;e<t.length;e++)n=t[e],r.push({size:n.data.byteLength,duration:1024});return r},Tt=function(t){var e,n,r=0,i=new Uint8Array(function(t){var e,n=0;for(e=0;e<t.length;e++)n+=t[e].data.byteLength;return n}(t));for(e=0;e<t.length;e++)n=t[e],i.set(n.data,r),r+=n.data.byteLength;return i},St=pt,Et=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},kt=function(t,e){var n,r=t.minSegmentDts;return e||(r-=t.timelineStartInfo.dts),n=t.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===t.type&&(n*=t.samplerate/St,n=Math.floor(n)),n},Ot=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},Ct=function(t){for(var e=0,n={payloadType:-1,payloadSize:0},r=0,i=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)r+=255,e++;for(r+=t[e++];255===t[e];)i+=255,e++;if(i+=t[e++],!n.payload&&4===r){if("GA94"===String.fromCharCode(t[e+3],t[e+4],t[e+5],t[e+6])){n.payloadType=r,n.payloadSize=i,n.payload=t.subarray(e,e+i);break}n.payload=void 0}e+=i,r=0,i=0}return n},Pt=function(t){return 181!==t.payload[0]||49!=(t.payload[1]<<8|t.payload[2])||"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])||3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},xt=function(t,e){var n,r,i,o,a=[];if(!(64&e[0]))return a;for(r=31&e[0],n=0;n<r;n++)o={type:3&e[(i=3*n)+2],pts:t},4&e[i+2]&&(o.ccData=e[i+3]<<8|e[i+4],a.push(o));return a},Lt=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},At=4,It=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Ht(0,0),new Ht(0,1),new Ht(1,0),new Ht(1,1)],this.cc708Stream_=new Nt,this.reset(),this.ccStreams_.forEach((function(t){t.on("data",this.trigger.bind(this,"data")),t.on("partialdone",this.trigger.bind(this,"partialdone")),t.on("done",this.trigger.bind(this,"done"))}),this),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"))};(It.prototype=new H).push=function(t){var e,n,r;if("sei_rbsp"===t.nalUnitType&&(e=Ct(t.escapedRBSP)).payload&&e.payloadType===At&&(n=Pt(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=xt(t.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},It.prototype.flushCCStreams=function(t){this.ccStreams_.forEach((function(e){return"flush"===t?e.flush():e.partialFlush()}),this)},It.prototype.flushStream=function(t){this.captionPackets_.length?(this.captionPackets_.forEach((function(t,e){t.presortIndex=e})),this.captionPackets_.sort((function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts})),this.captionPackets_.forEach((function(t){t.type<2?this.dispatchCea608Packet(t):this.dispatchCea708Packet(t)}),this),this.captionPackets_.length=0,this.flushCCStreams(t)):this.flushCCStreams(t)},It.prototype.flush=function(){return this.flushStream("flush")},It.prototype.partialFlush=function(){return this.flushStream("partialFlush")},It.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},It.prototype.dispatchCea608Packet=function(t){this.setsTextOrXDSActive(t)?this.activeCea608Channel_[t.type]=null:this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},It.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},It.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)},It.prototype.setsTextOrXDSActive=function(t){return 256==(28928&t.ccData)||4138==(30974&t.ccData)||6186==(30974&t.ccData)},It.prototype.dispatchCea708Packet=function(t){this.cc708Stream_.push(t)};var jt={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},Rt=function(t){return 32<=t&&t<=127||160<=t&&t<=255},Dt=function(t){this.windowNum=t,this.reset()};Dt.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},Dt.prototype.getText=function(){return this.rows.join("\n")},Dt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dt.prototype.newLine=function(t){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(t),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dt.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Dt.prototype.addText=function(t){this.rows[this.rowIdx]+=t},Dt.prototype.backspace=function(){if(!this.isEmpty()){var t=this.rows[this.rowIdx];this.rows[this.rowIdx]=t.substr(0,t.length-1)}};var Mt=function(t){this.serviceNum=t,this.text="",this.currentWindow=new Dt(-1),this.windows=[]};Mt.prototype.init=function(t,e){this.startPts=t;for(var n=0;n<8;n++)this.windows[n]=new Dt(n),"function"==typeof e&&(this.windows[n].beforeRowOverflow=e)},Mt.prototype.setCurrentWindow=function(t){this.currentWindow=this.windows[t]};var Nt=function t(){t.prototype.init.call(this);var e=this;this.current708Packet=null,this.services={},this.push=function(t){3===t.type?(e.new708Packet(),e.add708Bytes(t)):(null===e.current708Packet&&e.new708Packet(),e.add708Bytes(t))}};Nt.prototype=new H,Nt.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Nt.prototype.add708Bytes=function(t){var e=t.ccData,n=e>>>8,r=255&e;this.current708Packet.ptsVals.push(t.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},Nt.prototype.push708Packet=function(){var t=this.current708Packet,e=t.data,n=null,r=null,i=0,o=e[i++];for(t.seq=o>>6,t.sizeCode=63&o;i<e.length;i++)r=31&(o=e[i++]),7===(n=o>>5)&&r>0&&(n=o=e[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Nt.prototype.pushServiceBlock=function(t,e,n){var r,i=e,o=this.current708Packet.data,a=this.services[t];for(a||(a=this.initService(t,i));i<e+n&&i<o.length;i++)r=o[i],Rt(r)?i=this.handleText(i,a):16===r?i=this.extendedCommands(i,a):128<=r&&r<=135?i=this.setCurrentWindow(i,a):152<=r&&r<=159?i=this.defineWindow(i,a):136===r?i=this.clearWindows(i,a):140===r?i=this.deleteWindows(i,a):137===r?i=this.displayWindows(i,a):138===r?i=this.hideWindows(i,a):139===r?i=this.toggleWindows(i,a):151===r?i=this.setWindowAttributes(i,a):144===r?i=this.setPenAttributes(i,a):145===r?i=this.setPenColor(i,a):146===r?i=this.setPenLocation(i,a):143===r?a=this.reset(i,a):8===r?a.currentWindow.backspace():12===r?a.currentWindow.clearText():13===r?a.currentWindow.pendingNewLine=!0:14===r?a.currentWindow.clearText():141===r&&i++},Nt.prototype.extendedCommands=function(t,e){var n=this.current708Packet.data[++t];return Rt(n)&&(t=this.handleText(t,e,!0)),t},Nt.prototype.getPts=function(t){return this.current708Packet.ptsVals[Math.floor(t/2)]},Nt.prototype.initService=function(t,e){var n=this;return this.services[t]=new Mt(t),this.services[t].init(this.getPts(e),(function(e){n.flushDisplayed(e,n.services[t])})),this.services[t]},Nt.prototype.handleText=function(t,e,n){var r,i,o=this.current708Packet.data[t],a=(i=jt[r=(n?4096:0)|o]||r,4096&r&&r===i?"":String.fromCharCode(i)),s=e.currentWindow;return s.pendingNewLine&&!s.isEmpty()&&s.newLine(this.getPts(t)),s.pendingNewLine=!1,s.addText(a),t},Nt.prototype.setCurrentWindow=function(t,e){var n=7&this.current708Packet.data[t];return e.setCurrentWindow(n),t},Nt.prototype.defineWindow=function(t,e){var n=this.current708Packet.data,r=n[t],i=7&r;e.setCurrentWindow(i);var o=e.currentWindow;return r=n[++t],o.visible=(32&r)>>5,o.rowLock=(16&r)>>4,o.columnLock=(8&r)>>3,o.priority=7&r,r=n[++t],o.relativePositioning=(128&r)>>7,o.anchorVertical=127&r,r=n[++t],o.anchorHorizontal=r,r=n[++t],o.anchorPoint=(240&r)>>4,o.rowCount=15&r,r=n[++t],o.columnCount=63&r,r=n[++t],o.windowStyle=(56&r)>>3,o.penStyle=7&r,o.virtualRowCount=o.rowCount+1,t},Nt.prototype.setWindowAttributes=function(t,e){var n=this.current708Packet.data,r=n[t],i=e.currentWindow.winAttr;return r=n[++t],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++t],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++t],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++t],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,t},Nt.prototype.flushDisplayed=function(t,e){for(var n=[],r=0;r<8;r++)e.windows[r].visible&&!e.windows[r].isEmpty()&&n.push(e.windows[r].getText());e.endPts=t,e.text=n.join("\n\n"),this.pushCaption(e),e.startPts=t},Nt.prototype.pushCaption=function(t){""!==t.text&&(this.trigger("data",{startPts:t.startPts,endPts:t.endPts,text:t.text,stream:"cc708_"+t.serviceNum}),t.text="",t.startPts=t.endPts)},Nt.prototype.displayWindows=function(t,e){var n=this.current708Packet.data[++t],r=this.getPts(t);this.flushDisplayed(r,e);for(var i=0;i<8;i++)n&1<<i&&(e.windows[i].visible=1);return t},Nt.prototype.hideWindows=function(t,e){var n=this.current708Packet.data[++t],r=this.getPts(t);this.flushDisplayed(r,e);for(var i=0;i<8;i++)n&1<<i&&(e.windows[i].visible=0);return t},Nt.prototype.toggleWindows=function(t,e){var n=this.current708Packet.data[++t],r=this.getPts(t);this.flushDisplayed(r,e);for(var i=0;i<8;i++)n&1<<i&&(e.windows[i].visible^=1);return t},Nt.prototype.clearWindows=function(t,e){var n=this.current708Packet.data[++t],r=this.getPts(t);this.flushDisplayed(r,e);for(var i=0;i<8;i++)n&1<<i&&e.windows[i].clearText();return t},Nt.prototype.deleteWindows=function(t,e){var n=this.current708Packet.data[++t],r=this.getPts(t);this.flushDisplayed(r,e);for(var i=0;i<8;i++)n&1<<i&&e.windows[i].reset();return t},Nt.prototype.setPenAttributes=function(t,e){var n=this.current708Packet.data,r=n[t],i=e.currentWindow.penAttr;return r=n[++t],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++t],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,t},Nt.prototype.setPenColor=function(t,e){var n=this.current708Packet.data,r=n[t],i=e.currentWindow.penColor;return r=n[++t],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++t],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++t],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,t},Nt.prototype.setPenLocation=function(t,e){var n=this.current708Packet.data,r=n[t],i=e.currentWindow.penLoc;return e.currentWindow.pendingNewLine=!0,r=n[++t],i.row=15&r,r=n[++t],i.column=63&r,t},Nt.prototype.reset=function(t,e){var n=this.getPts(t);return this.flushDisplayed(n,e),this.initService(e.serviceNum,t)};var Bt={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},Ut=function(t){return null===t?"":(t=Bt[t]||t,String.fromCharCode(t))},Ft=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Vt=function(){for(var t=[],e=15;e--;)t.push("");return t},Ht=function t(e,n){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,n,r,i,o;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),r=e>>>8,i=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===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(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Vt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Vt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=Vt()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(r,i))o=Ut((r=(3&r)<<8)|i),this[this.mode_](t.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"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),o=Ut((r=(3&r)<<8)|i),this[this.mode_](t.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&i)&&this.addFormatting(t.pts,["i"]),1==(1&i)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Ft.indexOf(7968&e);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(t.pts,a)),a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=Ut(r),o+=Ut(i),this[this.mode_](t.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};Ht.prototype=new H,Ht.prototype.flushDisplayed=function(t){var e=this.displayed_.map((function(t){try{return t.trim()}catch(t){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},Ht.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Vt(),this.nonDisplayed_=Vt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ht.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_},Ht.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},Ht.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},Ht.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},Ht.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=33&&e<=35},Ht.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},Ht.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},Ht.prototype.isNormalChar=function(t){return t>=32&&t<=127},Ht.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=Vt(),this.displayed_=Vt()),void 0!==e&&e!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[e-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},Ht.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var n=e.reduce((function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,n)},Ht.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"</"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},Ht.prototype.popOn=function(t,e){var n=this.nonDisplayed_[this.row_];n+=e,this.nonDisplayed_[this.row_]=n},Ht.prototype.rollUp=function(t,e){var n=this.displayed_[this.row_];n+=e,this.displayed_[this.row_]=n},Ht.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},Ht.prototype.paintOn=function(t,e){var n=this.displayed_[this.row_];n+=e,this.displayed_[this.row_]=n};var qt={CaptionStream:It,Cea608Stream:Ht,Cea708Stream:Nt},Wt={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},zt=function(t,e){var n=1;for(t>e&&(n=-1);Math.abs(e-t)>4294967296;)t+=8589934592*n;return t},Gt=function t(e){var n,r;t.prototype.init.call(this),this.type_=e||"shared",this.push=function(t){"shared"!==this.type_&&t.type!==this.type_||(void 0===r&&(r=t.dts),t.dts=zt(t.dts,r),t.pts=zt(t.pts,r),n=t.dts,this.trigger("data",t))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Gt.prototype=new H;var Yt,Xt=Gt,Kt=function(t,e,n){var r,i="";for(r=e;r<n;r++)i+="%"+("00"+t[r].toString(16)).slice(-2);return i},Qt=function(t,e,n){return decodeURIComponent(Kt(t,e,n))},$t=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Jt={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Qt(t.data,1,e),t.value=Qt(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Qt(t.data,1,e),t.url=Qt(t.data,e+1,t.data.length);break}},PRIV:function(t){var e,n;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=(n=t.data,unescape(Kt(n,0,e)));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(Yt=function(t){var e,n={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},r=0,i=[],o=0;if(Yt.prototype.init.call(this),this.dispatchType=Wt.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(e=0;e<n.descriptor.length;e++)this.dispatchType+=("00"+n.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,a,s,u,c;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(i.push(t),o+=t.data.byteLength,1===i.length&&(r=$t(t.data.subarray(6,10)),r+=10),!(o<r)){for(e={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},c=0;c<r;)e.data.set(i[0].data.subarray(0,r-c),c),c+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&e.data[5]&&(a+=4,a+=$t(e.data.subarray(10,14)),r-=$t(e.data.subarray(16,20)));do{if((s=$t(e.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(e.data[a],e.data[a+1],e.data[a+2],e.data[a+3]),data:e.data.subarray(a+10,a+s+10)}).key=u.id,Jt[u.id]&&(Jt[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var l=u.data,f=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;f*=4,f+=3&l[7],u.timeStamp=f,void 0===e.pts&&void 0===e.dts&&(e.pts=u.timeStamp,e.dts=u.timeStamp),this.trigger("timestamp",u)}e.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",e)}}}).prototype=new H;var Zt,te,ee,ne=Yt,re=Xt;(Zt=function(){var t=new Uint8Array(188),e=0;Zt.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(e?((r=new Uint8Array(n.byteLength+e)).set(t.subarray(0,e)),r.set(n,e),e=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(t.set(r.subarray(i),0),e=r.byteLength-i)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){e=0,this.trigger("reset")}}).prototype=new H,(te=function(){var t,e,n,r;te.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,r){var i=0;r.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===r.type?e(t.subarray(i),r):n(t.subarray(i),r)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],r.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=r.pmtPid},n=function(t,e){var n,i;if(1&t[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&t[1])<<8|t[2])-4,i=12+((15&t[10])<<8|t[11]);i<n;){var o=t[i],a=(31&t[i+1])<<8|t[i+2];o===Wt.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===Wt.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===Wt.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),i+=5+((15&t[i+3])<<8|t[i+4])}e.programMapTable=r.programMapTable}},this.push=function(e){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&e[1]),n.pid=31&e[1],n.pid<<=8,n.pid|=e[2],(48&e[3])>>>4>1&&(r+=e[r]+1),0===n.pid)n.type="pat",t(e.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",t(e.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,r,n]):this.processPes_(e,r,n)},this.processPes_=function(t,e,n){n.pid===this.programMapTable.video?n.streamType=Wt.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Wt.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=t.subarray(e),this.trigger("data",n)}}).prototype=new H,te.STREAM_TYPES={h264:27,adts:15},(ee=function(){var t,e=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},o=function(t,n,r){var i,o,a=new Uint8Array(t.size),s={type:n},u=0,c=0;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,u=0;u<t.data.length;u++)o=t.data[u],a.set(o.data,c),c+=o.data.byteLength;var l,f,h;l=a,(f=s).packetLength=6+(l[4]<<8|l[5]),f.dataAlignmentIndicator=0!=(4&l[6]),192&(h=l[7])&&(f.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,f.pts*=4,f.pts+=(6&l[13])>>>1,f.dts=f.pts,64&h&&(f.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,f.dts*=4,f.dts+=(6&l[18])>>>1)),f.data=l.subarray(9+l[8]),i="video"===n||s.packetLength<=t.size,(r||i)&&(t.size=0,t.data.length=0),i&&e.trigger("data",s)}};ee.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var t,e;switch(a.streamType){case Wt.H264_STREAM_TYPE:t=n,e="video";break;case Wt.ADTS_STREAM_TYPE:t=r,e="audio";break;case Wt.METADATA_STREAM_TYPE:t=i,e="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(t,e,!0),t.data.push(a),t.size+=a.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(t=a.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),e.trigger("data",n)}})[a.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(n,"video"),o(r,"audio"),o(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new H;var ie={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Zt,TransportParseStream:te,ElementaryStream:ee,TimestampRolloverStream:re,CaptionStream:qt.CaptionStream,Cea608Stream:qt.Cea608Stream,Cea708Stream:qt.Cea708Stream,MetadataStream:ne};for(var oe in Wt)Wt.hasOwnProperty(oe)&&(ie[oe]=Wt[oe]);var ae,se=ie,ue=pt,ce=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(ae=function(t){var e,n=0;ae.prototype.init.call(this),this.push=function(r){var i,o,a,s,u,c,l=0;if(t||(n=0),"audio"===r.type)for(e?(s=e,(e=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),e.set(r.data,s.byteLength)):e=r.data;l+5<e.length;)if(255===e[l]&&240==(246&e[l+1])){if(o=2*(1&~e[l+1]),i=(3&e[l+3])<<11|e[l+4]<<3|(224&e[l+5])>>5,c=(u=1024*(1+(3&e[l+6])))*ue/ce[(60&e[l+2])>>>2],a=l+i,e.byteLength<a)return;if(this.trigger("data",{pts:r.pts+n*c,dts:r.dts+n*c,sampleCount:u,audioobjecttype:1+(e[l+2]>>>6&3),channelcount:(1&e[l+2])<<2|(192&e[l+3])>>>6,samplerate:ce[(60&e[l+2])>>>2],samplingfrequencyindex:(60&e[l+2])>>>2,samplesize:16,data:e.subarray(l+7+o,a)}),n++,e.byteLength===a)return void(e=void 0);e=e.subarray(a)}else l++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){e=void 0,this.trigger("reset")},this.endTimeline=function(){e=void 0,this.trigger("endedtimeline")}}).prototype=new H;var le,fe,he,pe=ae,de=function(t){var e=t.byteLength,n=0,r=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+r},this.loadWord=function(){var i=t.byteLength-e,o=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");o.set(t.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,e-=a},this.skipBits=function(t){var i;r>t?(n<<=t,r-=t):(t-=r,t-=8*(i=Math.floor(t/8)),e-=i,this.loadWord(),n<<=t,r-=t)},this.readBits=function(t){var i=Math.min(r,t),o=n>>>32-i;return(r-=i)>0?n<<=i:e>0&&this.loadWord(),(i=t-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var t;for(t=0;t<r;++t)if(0!=(n&2147483648>>>t))return n<<=t,r-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(fe=function(){var t,e,n=0;fe.prototype.init.call(this),this.push=function(r){var i;e?((i=new Uint8Array(e.byteLength+r.data.byteLength)).set(e),i.set(r.data,e.byteLength),e=i):e=r.data;for(var o=e.byteLength;n<o-3;n++)if(1===e[n+2]){t=n+5;break}for(;t<o;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}n+3!==t-2&&this.trigger("data",e.subarray(n+3,t-2));do{t++}while(1!==e[t]&&t<o);n=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(n+3,t-2)),n=t-2,t+=3;break;default:t+=3}e=e.subarray(n),t-=n,n=0},this.reset=function(){e=null,n=0,this.trigger("reset")},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(n+3)),e=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,he={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(le=function(){var t,e,n,r,i,o,a,s=new fe;le.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,n=t.pts,r=t.dts,s.push(t))},s.on("data",(function(a){var s={trackId:e,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",s)})),s.on("done",(function(){t.trigger("done")})),s.on("partialdone",(function(){t.trigger("partialdone")})),s.on("reset",(function(){t.trigger("reset")})),s.on("endedtimeline",(function(){t.trigger("endedtimeline")})),this.flush=function(){s.flush()},this.partialFlush=function(){s.partialFlush()},this.reset=function(){s.reset()},this.endTimeline=function(){s.endTimeline()},a=function(t,e){var n,r=8,i=8;for(n=0;n<t;n++)0!==i&&(i=(r+e.readExpGolomb()+256)%256),r=0===i?r:i},i=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},o=function(t){var e,n,r,i,o,s,u,c,l,f,h,p,d,y=0,m=0,v=0,g=0,b=1;if(n=(e=new de(t)).readUnsignedByte(),i=e.readUnsignedByte(),r=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),he[n]&&(3===(o=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==o?8:12,d=0;d<h;d++)e.readBoolean()&&a(d<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),u=e.readUnsignedExpGolomb(),d=0;d<u;d++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),c=e.readUnsignedExpGolomb(),l=e.readUnsignedExpGolomb(),0===(f=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(y=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),v=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:p=[1,1];break;case 2:p=[12,11];break;case 3:p=[10,11];break;case 4:p=[16,11];break;case 5:p=[40,33];break;case 6:p=[24,11];break;case 7:p=[20,11];break;case 8:p=[32,11];break;case 9:p=[80,33];break;case 10:p=[18,11];break;case 11:p=[15,11];break;case 12:p=[64,33];break;case 13:p=[160,99];break;case 14:p=[4,3];break;case 15:p=[3,2];break;case 16:p=[2,1];break;case 255:p=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}p&&(b=p[0]/p[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(c+1)-2*y-2*m)*b),height:(2-f)*(l+1)*16-2*v-2*g,sarRatio:p}}}).prototype=new H;var ye,me={H264Stream:le,NalByteStream:fe},ve=function(t,e){var n=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return n=n>=0?n:0,(16&t[e+5])>>4?n+20:n+10},ge=function(t){var e=function t(e,n){return e.length-n<10||e[n]!=="I".charCodeAt(0)||e[n+1]!=="D".charCodeAt(0)||e[n+2]!=="3".charCodeAt(0)?n:t(e,n+=ve(e,n))}(t,0);return t.length>=e+2&&255==(255&t[e])&&240==(240&t[e+1])&&16==(22&t[e+1])},be=ve,_e=function(t,e){var n=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|n};(ye=function(){var t=new Uint8Array,e=0;ye.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(n){var r,i,o,a,s=0,u=0;for(t.length?(a=t.length,(t=new Uint8Array(n.byteLength+a)).set(t.subarray(0,a)),t.set(n,a)):t=n;t.length-u>=3;)if(t[u]!=="I".charCodeAt(0)||t[u+1]!=="D".charCodeAt(0)||t[u+2]!=="3".charCodeAt(0))if(255!=(255&t[u])||240!=(240&t[u+1]))u++;else{if(t.length-u<7)break;if(u+(s=_e(t,u))>t.length)break;o={type:"audio",data:t.subarray(u,u+s),pts:e,dts:e},this.trigger("data",o),u+=s}else{if(t.length-u<10)break;if(u+(s=be(t,u))>t.length)break;i={type:"timed-metadata",data:t.subarray(u,u+s)},this.trigger("data",i),u+=s}r=t.length-u,t=r>0?t.subarray(u):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var we,Te,Se,Ee,ke=ye,Oe=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Ce=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Pe=me.H264Stream,xe=ge,Le=pt,Ae=function(t,e){var n;if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Ie=function(t,e,n,r,i,o){return{start:{dts:t,pts:t+(n-e)},end:{dts:t+(r-e),pts:t+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:t}};(Te=function(t,e){var n=[],r=0,i=0,o=0,a=1/0;e=e||{},Te.prototype.init.call(this),this.push=function(e){Ot(t,e),t&&Oe.forEach((function(n){t[n]=e[n]})),n.push(e)},this.setEarliestDts=function(t){i=t},this.setVideoBaseMediaDecodeTime=function(t){a=t},this.setAudioAppendStart=function(t){o=t},this.flush=function(){var s,u,c,l,f,h,p;0!==n.length?(s=_t(n,t,i),t.baseMediaDecodeTime=kt(t,e.keepOriginalTimestamps),p=bt(t,s,o,a),t.samples=wt(s),c=J(Tt(s)),n=[],u=Z(r,[t]),l=new Uint8Array(u.byteLength+c.byteLength),r++,l.set(u),l.set(c,u.byteLength),Et(t),f=Math.ceil(1024*Le/t.samplerate),s.length&&(h=s.length*f,this.trigger("segmentTimingInfo",Ie(mt(t.baseMediaDecodeTime,t.samplerate),s[0].dts,s[0].pts,s[0].dts+h,s[0].pts+h,p||0)),this.trigger("timingInfo",{start:s[0].pts,end:s[0].pts+h})),this.trigger("data",{track:t,boxes:l}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Et(t),n=[],this.trigger("reset")}}).prototype=new H,(we=function(t,e){var n,r,i=0,o=[],a=[];e=e||{},we.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){Ot(t,e),"seq_parameter_set_rbsp"!==e.nalUnitType||n||(n=e.config,t.sps=[e.data],Ce.forEach((function(e){t[e]=n[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.pps=[e.data]),o.push(e)},this.flush=function(){for(var n,r,s,u,c,l,f,h,p=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=nt(o),(s=rt(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],t))?(p=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=it(s)),a.length){var d;if(!(d=e.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Et(t),s=d}Ot(t,s),t.samples=ot(s),c=J(at(s)),t.baseMediaDecodeTime=kt(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}}))),f=s[0],h=s[s.length-1],this.trigger("segmentTimingInfo",Ie(t.baseMediaDecodeTime,f.dts,f.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:s[0].pts,end:s[s.length-1].pts+s[s.length-1].duration}),this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),u=Z(i,[t]),l=new Uint8Array(u.byteLength+c.byteLength),i++,l.set(u),l.set(c,u.byteLength),this.trigger("data",{track:t,boxes:l}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),o=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){Et(t),n=void 0,r=void 0},this.getGopForFusion_=function(e){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,t.pps&&Ae(t.pps[0],o.pps[0])&&t.sps&&Ae(t.sps[0],o.sps[0])&&(i.dts<t.timelineStartInfo.dts||(n=e.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(t){var e,n,r,i,o,s,u,c;for(o=t.byteLength,s=t.nalCount,u=t.duration,e=n=0;e<a.length&&n<t.length&&(r=a[e],i=t[n],r.pts!==i.pts);)i.pts>r.pts?e++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?t:n===t.length?null:((c=t.slice(n)).byteLength=o,c.duration=u,c.nalCount=s,c.pts=c[0].pts,c.dts=c[0].dts,c)},this.alignGopsAtEnd_=function(t){var e,n,r,i,o,s,u;for(e=a.length-1,n=t.length-1,o=null,s=!1;e>=0&&n>=0;){if(r=a[e],i=t[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?e--:(e===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return t;var c=t.slice(u),l=c.reduce((function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t}),{byteLength:0,duration:0,nalCount:0});return c.byteLength=l.byteLength,c.duration=l.duration,c.nalCount=l.nalCount,c.pts=c[0].pts,c.dts=c[0].dts,c},this.alignGopsWith=function(t){a=t}}).prototype=new H,(Ee=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps?this.keepOriginalTimestamps=t.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Ee.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track,this.pendingBoxes.push(t.boxes)),void("audio"===t.track.type&&(this.audioTrack=t.track,this.pendingBoxes.unshift(t.boxes))))}}).prototype=new H,Ee.prototype.flush=function(t){var e,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)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?(s=this.videoTrack.timelineStartInfo.pts,Ce.forEach((function(t){a.info[t]=this.videoTrack[t]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,Oe.forEach((function(t){a.info[t]=this.audioTrack[t]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=tt(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(e=this.pendingCaptions[i]).startTime=gt(e.startPts,s,this.keepOriginalTimestamps),e.endTime=gt(e.endPts,s,this.keepOriginalTimestamps),a.captionStreams[e.stream]=!0,a.captions.push(e);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=gt(n.pts,s,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),i=0;i<a.captions.length;i++)e=a.captions[i],this.trigger("caption",e);for(i=0;i<a.metadata.length;i++)n=a.metadata[i],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Ee.prototype.setRemux=function(t){this.remuxTracks=t},(Se=function(t){var e,n,r=this,i=!0;Se.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new se.MetadataStream,i.aacStream=new ke,i.audioTimestampRolloverStream=new se.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new se.TimestampRolloverStream("timed-metadata"),i.adtsStream=new pe,i.coalesceStream=new Ee(t,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(t){i.aacStream.setTimestamp(t.timeStamp)})),i.aacStream.on("data",(function(o){"timed-metadata"!==o.type&&"audio"!==o.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Te(n,t),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!e}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new se.MetadataStream,i.packetStream=new se.TransportPacketStream,i.parseStream=new se.TransportParseStream,i.elementaryStream=new se.ElementaryStream,i.timestampRolloverStream=new se.TimestampRolloverStream,i.adtsStream=new pe,i.h264Stream=new Pe,i.captionStream=new se.CaptionStream,i.coalesceStream=new Ee(t,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)e||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(e=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;e&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new we(e,t),i.videoSegmentStream.on("timelineStartInfo",(function(e){n&&!t.keepOriginalTimestamps&&(n.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(t){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Te(n,t),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!e})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(t){t.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",t)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;t.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Et(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),e&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,Et(e),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.setRemux=function(e){var n=this.transmuxPipeline_;t.remux=e,n&&n.coalesceStream&&n.coalesceStream.setRemux(e)},this.alignGopsWith=function(t){e&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=xe(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!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()}}).prototype=new H;var je={Transmuxer:Se,VideoSegmentStream:we,AudioSegmentStream:Te,AUDIO_PROPERTIES:Oe,VIDEO_PROPERTIES:Ce,generateSegmentTimingInfo:Ie},Re={Adts:pe,h264:me},De=pt,Me=function t(e,n){var r=[],i=0,o=0,a=0,s=1/0,u=null,c=null;n=n||{},t.prototype.init.call(this),this.push=function(t){Ot(e,t),e&&Oe.forEach((function(n){e[n]=t[n]})),r.push(t)},this.setEarliestDts=function(t){o=t},this.setVideoBaseMediaDecodeTime=function(t){s=t},this.setAudioAppendStart=function(t){a=t},this.processFrames_=function(){var t,l,f,h,p;0!==r.length&&0!==(t=_t(r,e,o)).length&&(e.baseMediaDecodeTime=kt(e,n.keepOriginalTimestamps),bt(e,t,a,s),e.samples=wt(t),f=J(Tt(t)),r=[],l=Z(i,[e]),i++,e.initSegment=tt([e]),(h=new Uint8Array(l.byteLength+f.byteLength)).set(l),h.set(f,l.byteLength),Et(e),null===u&&(c=u=t[0].pts),c+=t.length*(1024*De/e.samplerate),p={start:u},this.trigger("timingInfo",p),this.trigger("data",{track:e,boxes:h}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:u,end:c}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){Et(e),u=null,c=null},this.reset=function(){this.resetTiming_(),r=[],this.trigger("reset")}};Me.prototype=new H;var Ne=Me,Be=function t(e,n){var r,i,o,a=0,s=[],u=[],c=null,l=null,f=!0;n=n||{},t.prototype.init.call(this),this.push=function(t){Ot(e,t),void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],Ce.forEach((function(t){e[t]=r[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),s.push(t)},this.processNals_=function(t){var r;for(s=u.concat(s);s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0!==s.length){var i=nt(s);if(i.length)if(u=i[i.length-1],t&&(i.pop(),i.duration-=u.duration,i.nalCount-=u.length,i.byteLength-=u.byteLength),i.length){if(this.trigger("timelineStartInfo",e.timelineStartInfo),f){if(!(o=rt(i))[0][0].keyFrame){if(!(o=it(o))[0][0].keyFrame)return s=[].concat.apply([],i).concat(u),void(u=[]);(i=[].concat.apply([],o)).duration=o.duration}f=!1}for(null===c&&(c=i[0].pts,l=c),l+=i.duration,this.trigger("timingInfo",{start:c,end:l}),r=0;r<i.length;r++){var h=i[r];e.samples=st(h);var p=J(ut(h));Et(e),Ot(e,h),e.baseMediaDecodeTime=kt(e,n.keepOriginalTimestamps);var d=Z(a,[e]);a++,e.initSegment=tt([e]);var y=new Uint8Array(d.byteLength+p.byteLength);y.set(d),y.set(p,d.byteLength),this.trigger("data",{track:e,boxes:y,sequence:a,videoFrameDts:h.dts,videoFramePts:h.pts})}s=[]}else s=[]}},this.resetTimingAndConfig_=function(){r=void 0,i=void 0,c=null,l=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),u=[],s=[],f=!0,this.trigger("reset")}};Be.prototype=new H;var Ue=Be,Fe=ge,Ve=function(t){return t.prototype=new H,t.prototype.init.call(t),t},He=function(t,e){t.on("data",e.trigger.bind(e,"data")),t.on("done",e.trigger.bind(e,"done")),t.on("partialdone",e.trigger.bind(e,"partialdone")),t.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),t.on("audioTimingInfo",e.trigger.bind(e,"audioTimingInfo")),t.on("videoTimingInfo",e.trigger.bind(e,"videoTimingInfo")),t.on("trackinfo",e.trigger.bind(e,"trackinfo")),t.on("id3Frame",(function(n){n.dispatchType=t.metadataStream.dispatchType,n.cueTime=yt(n.pts),e.trigger("id3Frame",n)})),t.on("caption",(function(t){e.trigger("caption",t)}))},qe=function t(e){var n=null,r=!0;e=e||{},t.prototype.init.call(this),e.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.push=function(t){if(r){var i=Fe(t);!i||n&&"aac"===n.type?i||n&&"ts"===n.type||(n=function(t){var e={type:"ts",tracks:{audio:null,video:null},packet:new se.TransportPacketStream,parse:new se.TransportParseStream,elementary:new se.ElementaryStream,timestampRollover:new se.TimestampRolloverStream,adts:new Re.Adts,h264:new Re.h264.H264Stream,captionStream:new se.CaptionStream,metadataStream:new se.MetadataStream};return e.headOfPipeline=e.packet,e.packet.pipe(e.parse).pipe(e.elementary).pipe(e.timestampRollover),e.timestampRollover.pipe(e.h264),e.h264.pipe(e.captionStream),e.timestampRollover.pipe(e.metadataStream),e.timestampRollover.pipe(e.adts),e.elementary.on("data",(function(n){if("metadata"===n.type){for(var r=0;r<n.tracks.length;r++)e.tracks[n.tracks[r].type]||(e.tracks[n.tracks[r].type]=n.tracks[r],e.tracks[n.tracks[r].type].timelineStartInfo.baseMediaDecodeTime=t.baseMediaDecodeTime);e.tracks.video&&!e.videoSegmentStream&&(e.videoSegmentStream=new Ue(e.tracks.video,t),e.videoSegmentStream.on("timelineStartInfo",(function(n){e.tracks.audio&&!t.keepOriginalTimestamps&&e.audioSegmentStream.setEarliestDts(n.dts-t.baseMediaDecodeTime)})),e.videoSegmentStream.on("timingInfo",e.trigger.bind(e,"videoTimingInfo")),e.videoSegmentStream.on("data",(function(t){e.trigger("data",{type:"video",data:t})})),e.videoSegmentStream.on("done",e.trigger.bind(e,"done")),e.videoSegmentStream.on("partialdone",e.trigger.bind(e,"partialdone")),e.videoSegmentStream.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),e.h264.pipe(e.videoSegmentStream)),e.tracks.audio&&!e.audioSegmentStream&&(e.audioSegmentStream=new Ne(e.tracks.audio,t),e.audioSegmentStream.on("data",(function(t){e.trigger("data",{type:"audio",data:t})})),e.audioSegmentStream.on("done",e.trigger.bind(e,"done")),e.audioSegmentStream.on("partialdone",e.trigger.bind(e,"partialdone")),e.audioSegmentStream.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),e.audioSegmentStream.on("timingInfo",e.trigger.bind(e,"audioTimingInfo")),e.adts.pipe(e.audioSegmentStream)),e.trigger("trackinfo",{hasAudio:!!e.tracks.audio,hasVideo:!!e.tracks.video})}})),e.captionStream.on("data",(function(n){var r;r=e.tracks.video&&e.tracks.video.timelineStartInfo.pts||0,n.startTime=gt(n.startPts,r,t.keepOriginalTimestamps),n.endTime=gt(n.endPts,r,t.keepOriginalTimestamps),e.trigger("caption",n)})),(e=Ve(e)).metadataStream.on("data",e.trigger.bind(e,"id3Frame")),e}(e),He(n,this)):(n=function(t){var e={type:"aac",tracks:{audio:null},metadataStream:new se.MetadataStream,aacStream:new ke,audioRollover:new se.TimestampRolloverStream("audio"),timedMetadataRollover:new se.TimestampRolloverStream("timed-metadata"),adtsStream:new pe(!0)};return e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioRollover).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataRollover).pipe(e.metadataStream),e.metadataStream.on("timestamp",(function(t){e.aacStream.setTimestamp(t.timeStamp)})),e.aacStream.on("data",(function(n){"timed-metadata"!==n.type&&"audio"!==n.type||e.audioSegmentStream||(e.tracks.audio=e.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:t.baseMediaDecodeTime},codec:"adts",type:"audio"},e.audioSegmentStream=new Ne(e.tracks.audio,t),e.audioSegmentStream.on("data",(function(t){e.trigger("data",{type:"audio",data:t})})),e.audioSegmentStream.on("partialdone",e.trigger.bind(e,"partialdone")),e.audioSegmentStream.on("done",e.trigger.bind(e,"done")),e.audioSegmentStream.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),e.audioSegmentStream.on("timingInfo",e.trigger.bind(e,"audioTimingInfo")),e.adtsStream.pipe(e.audioSegmentStream),e.trigger("trackinfo",{hasAudio:!!e.tracks.audio,hasVideo:!!e.tracks.video}))})),(e=Ve(e)).metadataStream.on("data",e.trigger.bind(e,"id3Frame")),e}(e),He(n,this)),r=!1}n.headOfPipeline.push(t)},this.flush=function(){n&&(r=!0,n.headOfPipeline.flush())},this.partialFlush=function(){n&&n.headOfPipeline.partialFlush()},this.endTimeline=function(){n&&n.headOfPipeline.endTimeline()},this.reset=function(){n&&n.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(t){e.keepOriginalTimestamps||(e.baseMediaDecodeTime=t),n&&(n.tracks.audio&&(n.tracks.audio.timelineStartInfo.dts=void 0,n.tracks.audio.timelineStartInfo.pts=void 0,Et(n.tracks.audio),n.audioRollover&&n.audioRollover.discontinuity()),n.tracks.video&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),n.tracks.video.timelineStartInfo.dts=void 0,n.tracks.video.timelineStartInfo.pts=void 0,Et(n.tracks.video)),n.timestampRollover&&n.timestampRollover.discontinuity())},this.setRemux=function(t){e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.setAudioAppendStart=function(t){n&&n.tracks.audio&&n.audioSegmentStream&&n.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){}};qe.prototype=new H;var We=qe,ze=function(t){return t>>>0},Ge=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},Ye=ze,Xe=function t(e,n){var r,i,o,a,s,u=[];if(!n.length)return null;for(r=0;r<e.byteLength;)i=Ye(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),o=Ge(e.subarray(r+4,r+8)),a=i>1?r+i:e.byteLength,o===n[0]&&(1===n.length?u.push(e.subarray(r+8,a)):(s=t(e.subarray(r+8,a),n.slice(1))).length&&(u=u.concat(s))),r=a;return u},Ke=ze,Qe=function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:Ke(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=Ke(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),e},$e=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},Je=function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],c=8&n.flags[1],l=r.getUint32(4),f=8;for(i&&(n.dataOffset=r.getInt32(f),f+=4),o&&l&&(e={flags:$e(t.subarray(f,f+4))},f+=4,a&&(e.duration=r.getUint32(f),f+=4),s&&(e.size=r.getUint32(f),f+=4),c&&(1===n.version?e.compositionTimeOffset=r.getInt32(f):e.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(e),l--);l--;)e={},a&&(e.duration=r.getUint32(f),f+=4),s&&(e.size=r.getUint32(f),f+=4),u&&(e.flags=$e(t.subarray(f,f+4)),f+=4),c&&(1===n.version?e.compositionTimeOffset=r.getInt32(f):e.compositionTimeOffset=r.getUint32(f),f+=4),n.samples.push(e);return n},Ze=function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],c=65536&r.flags[0],l=131072&r.flags[0];return e=8,i&&(e+=4,r.baseDataOffset=n.getUint32(12),e+=4),o&&(r.sampleDescriptionIndex=n.getUint32(e),e+=4),a&&(r.defaultSampleDuration=n.getUint32(e),e+=4),s&&(r.defaultSampleSize=n.getUint32(e),e+=4),u&&(r.defaultSampleFlags=n.getUint32(e)),c&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r},tn=Lt,en=qt.CaptionStream,nn=function(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(n<i.size)return i;n-=i.size}return null},rn=function(t,e){var n=Xe(t,["moof","traf"]),r=Xe(t,["mdat"]),i={},o=[];return r.forEach((function(t,e){var r=n[e];o.push({mdat:t,traf:r})})),o.forEach((function(t){var n,r=t.mdat,o=t.traf,a=Xe(o,["tfhd"]),s=Ze(a[0]),u=s.trackId,c=Xe(o,["tfdt"]),l=c.length>0?Qe(c[0]).baseMediaDecodeTime:0,f=Xe(o,["trun"]);e===u&&f.length>0&&(n=function(t,e,n){var r,i,o,a,s=new DataView(t.buffer,t.byteOffset,t.byteLength),u=[];for(i=0;i+4<t.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&t[i]){case 6:var c=t.subarray(i+1,i+1+o),l=nn(i,e);if(r={nalUnitType:"sei_rbsp",size:o,data:c,escapedRBSP:tn(c),trackId:n},l)r.pts=l.pts,r.dts=l.dts,a=l;else{if(!a){console.log("We've encountered a nal unit without data. See mux.js#233.");break}r.pts=a.pts,r.dts=a.dts}u.push(r)}return u}(r,function(t,e,n){var r=e,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return t.forEach((function(t){var e=Je(t).samples;e.forEach((function(t){void 0===t.duration&&(t.duration=i),void 0===t.size&&(t.size=o),t.trackId=a,t.dts=r,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=r+t.compositionTimeOffset,r+=t.duration})),s=s.concat(e)})),s}(f,l,s),u),i[u]||(i[u]=[]),i[u]=i[u].concat(n))})),i},on=function(){var t,e,n,r,i,o,a=!1;this.isInitialized=function(){return a},this.init=function(e){t=new en,a=!0,o=!!e&&e.isPartial,t.on("data",(function(t){t.startTime=t.startPts/r,t.endTime=t.endPts/r,i.captions.push(t),i.captionStreams[t.stream]=!0}))},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length)&&(n!==t[0]||r!==e[n])},this.parse=function(t,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(null===n||!r)return e.push(t),null;for(;e.length>0;){var u=e.shift();this.parse(u,o,a)}return null!==(s=function(t,e,n){return null===e?null:{seiNals:rn(t,e)[e],timescale:n}}(t,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach((function(e){t.push(e)}))},this.flushStream=function(){if(!this.isInitialized())return null;o?t.partialFlush():t.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){e=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},an=function(t){return"AudioSegmentStream"===t?"audio":"VideoSegmentStream"===t?"video":""},sn=function(){function t(t,e){this.options=e||{},this.self=t,this.init()}var e=t.prototype;return e.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new We(this.options):new je.Transmuxer(this.options),this.options.handlePartialData?function(t,e){e.on("data",(function(e){var n={data:e.data.track.initSegment.buffer,byteOffset:e.data.track.initSegment.byteOffset,byteLength:e.data.track.initSegment.byteLength},r={boxes:{data:e.data.boxes.buffer,byteOffset:e.data.boxes.byteOffset,byteLength:e.data.boxes.byteLength},initSegment:n,type:e.type,sequence:e.data.sequence};void 0!==e.data.videoFrameDts&&(r.videoFrameDtsTime=yt(e.data.videoFrameDts)),void 0!==e.data.videoFramePts&&(r.videoFramePtsTime=yt(e.data.videoFramePts)),t.postMessage({action:"data",segment:r},[r.boxes.data,r.initSegment.data])})),e.on("id3Frame",(function(e){t.postMessage({action:"id3Frame",id3Frame:e})})),e.on("caption",(function(e){t.postMessage({action:"caption",caption:e})})),e.on("done",(function(e){t.postMessage({action:"done",type:an(e)})})),e.on("partialdone",(function(e){t.postMessage({action:"partialdone",type:an(e)})})),e.on("endedsegment",(function(e){t.postMessage({action:"endedSegment",type:an(e)})})),e.on("trackinfo",(function(e){t.postMessage({action:"trackinfo",trackInfo:e})})),e.on("audioTimingInfo",(function(e){if(null!==e.start){var n={start:yt(e.start)};e.end&&(n.end=yt(e.end)),t.postMessage({action:"audioTimingInfo",audioTimingInfo:n})}else t.postMessage({action:"audioTimingInfo",audioTimingInfo:e})})),e.on("videoTimingInfo",(function(e){var n={start:yt(e.start)};e.end&&(n.end=yt(e.end)),t.postMessage({action:"videoTimingInfo",videoTimingInfo:n})}))}(this.self,this.transmuxer):function(t,e){e.on("data",(function(e){var n=e.initSegment;e.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=e.data;e.data=r.buffer,t.postMessage({action:"data",segment:e,byteOffset:r.byteOffset,byteLength:r.byteLength},[e.data])})),e.on("done",(function(e){t.postMessage({action:"done"})})),e.on("gopInfo",(function(e){t.postMessage({action:"gopInfo",gopInfo:e})})),e.on("videoSegmentTimingInfo",(function(e){var n={start:{decode:yt(e.start.dts),presentation:yt(e.start.pts)},end:{decode:yt(e.end.dts),presentation:yt(e.end.pts)},baseMediaDecodeTime:yt(e.baseMediaDecodeTime)};e.prependedContentDuration&&(n.prependedContentDuration=yt(e.prependedContentDuration)),t.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),e.on("audioSegmentTimingInfo",(function(e){var n={start:{decode:yt(e.start.dts),presentation:yt(e.start.pts)},end:{decode:yt(e.end.dts),presentation:yt(e.end.pts)},baseMediaDecodeTime:yt(e.baseMediaDecodeTime)};e.prependedContentDuration&&(n.prependedContentDuration=yt(e.prependedContentDuration)),t.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),e.on("id3Frame",(function(e){t.postMessage({action:"id3Frame",id3Frame:e})})),e.on("caption",(function(e){t.postMessage({action:"caption",caption:e})})),e.on("trackinfo",(function(e){t.postMessage({action:"trackinfo",trackInfo:e})})),e.on("audioTimingInfo",(function(e){t.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:yt(e.start),end:yt(e.end)}})})),e.on("videoTimingInfo",(function(e){t.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:yt(e.start),end:yt(e.end)}})}))}(this.self,this.transmuxer)},e.pushMp4Captions=function(t){this.captionParser||(this.captionParser=new on,this.captionParser.init());var e=new Uint8Array(t.data,t.byteOffset,t.byteLength),n=this.captionParser.parse(e,t.trackIds,t.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:e.buffer},[e.buffer])},e.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},e.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},e.push=function(t){var e=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(e)},e.reset=function(){this.transmuxer.reset()},e.setTimestampOffset=function(t){var e=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(dt(e)))},e.setAudioAppendStart=function(t){this.transmuxer.setAudioAppendStart(Math.ceil(dt(t.appendStart)))},e.setRemux=function(t){this.transmuxer.setRemux(t.remux)},e.flush=function(t){this.transmuxer.flush(),n.postMessage({action:"done",type:"transmuxed"})},e.partialFlush=function(t){this.transmuxer.partialFlush(),n.postMessage({action:"partialdone",type:"transmuxed"})},e.endTimeline=function(){this.transmuxer.endTimeline(),n.postMessage({action:"endedtimeline",type:"transmuxed"})},e.alignGopsWith=function(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())},t}();new function(t){t.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new sn(t,e.data.options):(this.messageHandlers||(this.messageHandlers=new sn(t)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}(n)}()})),_s=function(t,e){var n=e.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&n.AUDIO&&t.mediaGroups.AUDIO[n.AUDIO]},ws=function(t,e){var n=e.attributes||{},r=function(t){var e=t.attributes||{};if(e.CODECS)return Object(Mt.parseCodecs)(e.CODECS)}(e)||{};if(_s(t,e)&&!r.audio&&!function(t,e){if(!_s(t,e))return!0;var n=e.attributes||{},r=t.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(t,e)){var i=Object(Mt.codecsFromDefault)(t,n.AUDIO);i&&(r.audio=i.audio)}var o={};return r.video&&(o.video=Object(Mt.translateLegacyCodec)(""+r.video.type+r.video.details)),r.audio&&(o.audio=Object(Mt.translateLegacyCodec)(""+r.audio.type+r.audio.details)),r.text&&(o.text=r.text.type),r.unknown&&(o.unknown=r.unknown),o},Ts=function(t){return Fo.log.debug?Fo.log.debug.bind(Fo,"VHS:",t+" >"):function(){}},Ss=Ts("PlaylistSelector"),Es=function(t){if(t&&t.playlist){var e=t.playlist;return JSON.stringify({id:e.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:e.attributes&&e.attributes.CODECS||""})}},ks=function(t,e){if(!t)return"";var n=i.a.getComputedStyle(t);return n?n[e]:""},Os=function(t,e){var n=t.slice();t.sort((function(t,r){var i=e(t,r);return 0===i?n.indexOf(t)-n.indexOf(r):i}))},Cs=function(t,e){var n,r;return t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||i.a.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),n-(r=r||i.a.Number.MAX_VALUE)},Ps=function(t,e,n,r,o){if(t){var a={bandwidth:e,width:n,height:r,limitRenditionByPlayerDimensions:o},s=t.playlists.map((function(t){var e=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,n=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height;return{bandwidth:t.attributes.BANDWIDTH||i.a.Number.MAX_VALUE,width:e,height:n,playlist:t}}));Os(s,(function(t,e){return t.bandwidth-e.bandwidth}));var u=(s=s.filter((function(t){return!_a.isIncompatible(t.playlist)}))).filter((function(t){return _a.isEnabled(t.playlist)}));u.length||(u=s.filter((function(t){return!_a.isDisabled(t.playlist)})));var c=u.filter((function(t){return t.bandwidth*Ha.BANDWIDTH_VARIANCE<e})),l=c[c.length-1],f=c.filter((function(t){return t.bandwidth===l.bandwidth}))[0];if(!1===o){var h=f||u[0]||s[0];if(h&&h.playlist){var p="sortedPlaylistReps";return f&&(p="bandwidthBestRep"),u[0]&&(p="enabledPlaylistReps"),Ss("choosing "+Es(h)+" using "+p+" with options",a),h.playlist}return Ss("could not choose a playlist with options",a),null}var d=c.filter((function(t){return t.width&&t.height}));Os(d,(function(t,e){return t.width-e.width}));var y=d.filter((function(t){return t.width===n&&t.height===r}));l=y[y.length-1];var m,v,g,b=y.filter((function(t){return t.bandwidth===l.bandwidth}))[0];b||(v=(m=d.filter((function(t){return t.width>n||t.height>r}))).filter((function(t){return t.width===m[0].width&&t.height===m[0].height})),l=v[v.length-1],g=v.filter((function(t){return t.bandwidth===l.bandwidth}))[0]);var _=g||b||f||u[0]||s[0];if(_&&_.playlist){var w="sortedPlaylistReps";return g?w="resolutionPlusOneRep":b?w="resolutionBestRep":f?w="bandwidthBestRep":u[0]&&(w="enabledPlaylistReps"),Ss("choosing "+Es(_)+" using "+w+" with options",a),_.playlist}return Ss("could not choose a playlist with options",a),null}},xs=function(){var t=this.useDevicePixelRatio&&i.a.devicePixelRatio||1;return Ps(this.playlists.master,this.systemBandwidth,parseInt(ks(this.tech_.el(),"width"),10)*t,parseInt(ks(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions)},Ls=function(t){var e=t.inbandTextTracks,n=t.metadataArray,r=t.timestampOffset,o=t.videoDuration;if(n){var a=i.a.WebKitDataCue||i.a.VTTCue,s=e.metadataTrack_;if(s&&(n.forEach((function(t){var e=t.cueTime+r;!("number"!=typeof e||i.a.isNaN(e)||e<0)&&e<1/0&&t.frames.forEach((function(t){var n=new a(e,e,t.value||t.url||t.data||"");n.frame=t,n.value=t,function(t){Object.defineProperties(t.frame,{id:{get:function(){return Fo.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return Fo.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return Fo.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})}(n),s.addCue(n)}))})),s.cues&&s.cues.length)){for(var u=s.cues,c=[],l=0;l<u.length;l++)u[l]&&c.push(u[l]);var f=c.reduce((function(t,e){var n=t[e.startTime]||[];return n.push(e),t[e.startTime]=n,t}),{}),h=Object.keys(f).sort((function(t,e){return Number(t)-Number(e)}));h.forEach((function(t,e){var n=f[t],r=Number(h[e+1])||o;n.forEach((function(t){t.endTime=r}))}))}}},As=function(t,e,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=t&&i.endTime<=e&&n.removeCue(i)},Is=function(t){return"number"==typeof t&&isFinite(t)},js=function(t){return t+"TimingInfo"},Rs=function(t){var e=t.segmentTimeline,n=t.currentTimeline,r=t.startOfSegment,i=t.buffered;return t.overrideCheck||e!==n?e<n?r:i.length?i.end(i.length-1):r:null},Ds=function(t){var e=t.timelineChangeController,n=t.currentTimeline,r=t.segmentTimeline,i=t.loaderType,o=t.audioDisabled;if(n===r)return!1;if("audio"===i){var a=e.lastTimelineChange({type:"main"});return!a||a.to!==r}if("main"===i&&o){var s=e.pendingTimelineChange({type:"audio"});return!s||s.to!==r}return!1},Ms=function(t){var e=t.segmentDuration,n=t.maxDuration;return!!e&&Math.round(e)>n+1/30},Ns=function(t,e){if("hls"!==e)return null;var n,r,i,o,a=(n=t.audioTimingInfo,r=t.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,o=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,o));if(!a)return null;var s=t.playlist.targetDuration,u=Ms({segmentDuration:a,maxDuration:2*s}),c=Ms({segmentDuration:a,maxDuration:s}),l="Segment with index "+t.mediaIndex+" from playlist "+t.playlist.id+" has a duration of "+a+" when the reported duration is "+t.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 u||c?{severity:u?"warn":"info",message:l}:null},Bs=function(t){function e(e,n){var r;if(r=t.call(this)||this,!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=e.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.hasPlayed_=e.hasPlayed,r.currentTime_=e.currentTime,r.seekable_=e.seekable,r.seeking_=e.seeking,r.duration_=e.duration,r.mediaSource_=e.mediaSource,r.vhs_=e.vhs,r.loaderType_=e.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=e.segmentMetadataTrack,r.goalBufferLength_=e.goalBufferLength,r.sourceType_=e.sourceType,r.sourceUpdater_=e.sourceUpdater,r.inbandTextTracks_=e.inbandTextTracks,r.state_="INIT",r.handlePartialData_=e.handlePartialData,r.timelineChangeController_=e.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Fo.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=e.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=e.decrypter,r.syncController_=e.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=Ts("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(l()(r),"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}h()(e,t);var n=e.prototype;return n.createTransmuxer_=function(){var t=new bs;return t.postMessage({action:"init",options:{remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_}}),t},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&(this.transmuxer_.terminate(),$a()),this.resetStats_(),this.checkBufferTimeout_&&i.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(t){this.audioDisabled_=!t,t?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_)},n.checkForAbort_=function(t){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==t:(this.state="READY",!0)},n.error=function(t){return void 0!==t&&(this.logger_("error occurred:",t),this.error_=t),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Qa(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Fo.createTimeRanges();if("main"===this.loaderType_){var t=this.startingMediaInfo_,e=t.hasAudio,n=t.hasVideo,r=t.isMuxed;if(n&&e&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(t,e){if(void 0===e&&(e=!1),!t)return null;var n=La(t),r=this.initSegments_[n];return e&&!r&&t.bytes&&(this.initSegments_[n]=r={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}),r||t},n.segmentKey=function(t,e){if(void 0===e&&(e=!1),!t)return null;var n=Aa(t),r=this.keyCache_[n];this.cacheEncryptionKeys_&&e&&!r&&t.bytes&&(this.keyCache_[n]=r={resolvedUri:t.resolvedUri,bytes:t.bytes});var i={resolvedUri:(r||t).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!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(t,e){if(void 0===e&&(e={}),t){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=e,"INIT"===this.state&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0});var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(t.id||t.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==t.uri)return(null!==this.mediaIndex||this.handlePartialData_)&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var o=t.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),r&&(r.mediaIndex-=o,r.mediaIndex>=0&&(r.segment=t.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,t)}},n.pause=function(){this.checkBufferTimeout_&&(i.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(t){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,t),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Qa(this.transmuxer_),this.mediaIndex=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(t,e,n){if(void 0===n&&(n=function(){}),e===1/0&&(e=this.duration_()),this.sourceUpdater_&&this.currentMediaInfo_){var r=1,i=function(){0===--r&&n()};for(var o in this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(t,e,i)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(t,e,n,r){for(var i=Math.ceil((e-r)*jt.ONE_SECOND_IN_TS),o=Math.ceil((n-r)*jt.ONE_SECOND_IN_TS),a=t.slice(),s=t.length;s--&&!(t[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(t[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a}(this.gopBuffer_,t,e,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(t,e,i)),this.inbandTextTracks_)As(t,e,this.inbandTextTracks_[o]);As(t,e,this.segmentMetadataTrack_),i()}},n.monitorBuffer_=function(){this.checkBufferTimeout_&&i.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&i.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.buffered_(),e=this.checkBuffer_(t,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);e&&(e.timestampOffset=Rs({segmentTimeline:e.timeline,currentTimeline:this.currentTimeline_,startOfSegment:e.startOfSegment,buffered:t,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof e.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loadSegment_(e))}},n.isEndOfStream_=function(t,e){if(void 0===t&&(t=this.mediaIndex),void 0===e&&(e=this.playlist_),!e||!this.mediaSource_)return!1;var n=t+1===e.segments.length;return e.endList&&"open"===this.mediaSource_.readyState&&n},n.checkBuffer_=function(t,e,n,r,i,o){var a=0;t.length&&(a=t.end(t.length-1));var s=Math.max(0,a-i);if(!e.segments.length)return null;if(s>=this.goalBufferLength_())return null;if(!r&&s>=1)return null;var u,c=null,l=!1;if(null===o)c=this.getSyncSegmentCandidate_(e),l=!0;else if(null!==n){var f=e.segments[n];u=f&&f.end?f.end:a,c=n+1}else if(this.fetchAtBuffer_){var h=_a.getMediaInfoForTime(e,a,o.segmentIndex,o.time);c=h.mediaIndex,u=h.startTime}else{var p=_a.getMediaInfoForTime(e,i,o.segmentIndex,o.time);c=p.mediaIndex,u=p.startTime}var d=this.generateSegmentInfo_(e,c,u,l);return!d||this.mediaSource_&&this.playlist_&&d.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+d.uri,{segmentInfo:d,playlist:e,currentMediaIndex:n,nextMediaIndex:c,startOfSegment:u,isSyncRequest:l}),d)},n.getSyncSegmentCandidate_=function(t){var e=this;if(-1===this.currentTimeline_)return 0;var n=t.segments.map((function(t,e){return{timeline:t.timeline,segmentIndex:e}})).filter((function(t){return t.timeline===e.currentTimeline_}));return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)},n.generateSegmentInfo_=function(t,e,n,r){if(e<0||e>=t.segments.length)return null;var i,o,a=t.segments[e],s=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();return s.length&&(i=s.end(s.length-1)-this.sourceUpdater_.audioTimestampOffset()),u.length&&(o=function(t,e,n){if(null==e||!t.length)return[];var r,i=Math.ceil((e-n+3)*jt.ONE_SECOND_IN_TS);for(r=0;r<t.length&&!(t[r].pts>i);r++);return t.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:e,isSyncRequest:r,startOfSegment:n,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:a.timeline,duration:a.duration,segment:a,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:i,gopsToAlignWith:o}},n.earlyAbortWhenNeeded_=function(t){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)){var e=this.currentTime_(),n=t.bandwidth,r=this.pendingSegment_.duration,i=_a.estimateSegmentRequestTime(r,n,this.playlist_,t.bytesReceived),o=function(t,e,n){return void 0===n&&(n=1),((t.length?t.end(t.length-1):0)-e)/n}(this.buffered_(),e,this.vhs_.tech_.playbackRate())-1;if(!(i<=o)){var a=function(t){var e=t.master,n=t.currentTime,r=t.bandwidth,i=t.duration,o=t.segmentDuration,a=t.timeUntilRebuffer,s=t.currentTimeline,u=t.syncController,c=e.playlists.filter((function(t){return!_a.isIncompatible(t)})),l=c.filter(_a.isEnabled);l.length||(l=c.filter((function(t){return!_a.isDisabled(t)})));var f=l.filter(_a.hasAttribute.bind(null,"BANDWIDTH")).map((function(t){var e=u.getSyncPoint(t,i,s,n)?1:2;return{playlist:t,rebufferingImpact:_a.estimateSegmentRequestTime(o,r,t)*e-a}})),h=f.filter((function(t){return t.rebufferingImpact<=0}));return Os(h,(function(t,e){return Cs(e.playlist,t.playlist)})),h.length?h[0]:(Os(f,(function(t,e){return t.rebufferingImpact-e.rebufferingImpact})),f[0]||null)}({master:this.vhs_.playlists.master,currentTime:e,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o-a.rebufferingImpact,u=.5;o<=1/30&&(u=1),!a.playlist||a.playlist.uri===this.playlist_.uri||s<u||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Ha.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(){this.mediaRequestsAborted+=1},n.handleProgress_=function(t,e){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(t,e){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.checkForIllegalMediaSwitch(e)||(e=e||{},function(t,e){if(!t&&!e||!t&&e||t&&!e)return!1;if(t===e)return!0;var n=Object.keys(t).sort(),r=Object.keys(e).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(o!==r[i])return!1;if(t[o]!==e[o])return!1}return!0}(this.currentMediaInfo_,e)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=e,this.currentMediaInfo_=e,this.logger_("trackinfo update",e),this.trigger("trackinfo")),this.checkForAbort_(t.requestId)||(this.pendingSegment_.trackInfo=e,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(t,e,n,r){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){var i=this.pendingSegment_,o=js(e);i[o]=i[o]||{},i[o][n]=r,this.logger_("timinginfo: "+e+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(t,e){var n=this;if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(0!==e.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),o={};e.forEach((function(t){o[t.stream]=o[t.stream]||{startTime:1/0,captions:[],endTime:0};var e=o[t.stream];e.startTime=Math.min(e.startTime,t.startTime+r),e.endTime=Math.max(e.endTime,t.endTime+r),e.captions.push(t)})),Object.keys(o).forEach((function(t){var e=o[t],a=e.startTime,s=e.endTime,u=e.captions,c=n.inbandTextTracks_;n.logger_("adding cues from "+a+" -> "+s+" for "+t),function(t,e,n){if(!t[n]){e.trigger({type:"usage",name:"vhs-608"}),e.trigger({type:"usage",name:"hls-608"});var r=e.textTracks().getTrackById(n);t[n]=r||e.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(c,n.vhs_.tech_,t),As(a,s,c[t]),function(t){var e=t.inbandTextTracks,n=t.captionArray,r=t.timestampOffset;if(n){var o=i.a.WebKitDataCue||i.a.VTTCue;n.forEach((function(t){var n=t.stream;e[n].addCue(new o(t.startTime+r,t.endTime+r,t.text))}))}}({captionArray:u,inbandTextTracks:c,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,t,e));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(t,e,n){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(t,e,n){t.metadataTrack_||(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=e)}(this.inbandTextTracks_,n,this.vhs_.tech_),Ls({inbandTextTracks:this.inbandTextTracks_,metadataArray:e,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,e,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(t){return t()})),this.metadataQueue_.caption.forEach((function(t){return t()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var t=this.callQueue_;this.callQueue_=[],t.forEach((function(t){return t()}))},n.processLoadQueue_=function(){var t=this.loadQueue_;this.loadQueue_=[],t.forEach((function(t){return t()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var t=this.pendingSegment_;return!!t&&(!this.currentMediaInfo_||!Ds({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;var t=this.pendingSegment_;if(!t||!t.trackInfo)return!1;if(!this.handlePartialData_){var e=this.currentMediaInfo_,n=e.hasAudio,r=e.hasVideo,i=e.isMuxed;if(r&&!t.videoTimingInfo)return!1;if(n&&!this.audioDisabled_&&!i&&!t.audioTimingInfo)return!1}return!Ds({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},n.handleData_=function(t,e){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),n.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),n.isFmp4=t.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[js(e.type)].start;else{var r,i="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;i&&(r=this.handlePartialData_?e.videoFramePtsTime:n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}this.updateAppendInitSegmentStatus(n,e.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,e)}}else this.callQueue_.push(this.handleData_.bind(this,t,e))},n.updateAppendInitSegmentStatus=function(t,e){"main"!==this.loaderType_||"number"!=typeof t.timestampOffset||t.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[e]!==t.playlist&&(this.appendInitSegment_[e]=!0)},n.getInitSegmentAndUpdateState_=function(t){var e=t.type,n=t.initSegment,r=t.map,i=t.playlist;if(r){var o=La(r);if(this.activeInitSegmentId_===o)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=o}return n&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=i,this.appendInitSegment_[e]=!!r,this.activeInitSegmentId_=null,n):null},n.appendToSourceBuffer_=function(t){var e=this,n=t.segmentInfo,r=t.type,i=t.initSegment,o=t.data,a=[o],s=o.byteLength;i&&(a.unshift(i),s+=i.byteLength);var u,c,l,f=(l=0,(u={bytes:s,segments:a}).bytes&&(c=new Uint8Array(u.bytes),u.segments.forEach((function(t){c.set(t,l),l+=t.byteLength}))),c);this.sourceUpdater_.appendBuffer({segmentInfo:n,type:r,bytes:f},(function(t){t&&(e.error(r+" append of "+f.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),e.trigger("appenderror"))}))},n.handleSegmentTimingInfo_=function(t,e,n){if(this.pendingSegment_&&e===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=t+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(t,e){var n=e.type,r=e.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:e.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:n,initSegment:i,data:r})}},n.loadSegment_=function(t){var e=this;this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),"number"==typeof t.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):this.loadQueue_.push((function(){var n=e.buffered_();"number"==typeof t.timestampOffset&&(t.timestampOffset=Rs({segmentTimeline:t.timeline,currentTimeline:e.currentTimeline_,startOfSegment:t.startOfSegment,buffered:n,overrideCheck:!0})),delete t.audioAppendStart;var r=e.sourceUpdater_.audioBuffered();r.length&&(t.audioAppendStart=r.end(r.length-1)-e.sourceUpdater_.audioTimestampOffset()),e.updateTransmuxerAndRequestSegment_(t)}))},n.updateTransmuxerAndRequestSegment_=function(t){this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)&&(this.gopBuffer_.length=0,t.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset}));var e=this.createSimplifiedSegmentObj_(t);t.abortRequests=us({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:e,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(t){var e=function(t,e,n){var r=e-Ha.BACK_BUFFER_LENGTH;t.length&&(r=Math.max(r,t.start(0)));var i=e-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);e>0&&this.remove(0,e)},n.createSimplifiedSegmentObj_=function(t){var e=t.segment,n={resolvedUri:e.resolvedUri,byterange:e.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith},r=t.playlist.segments[t.mediaIndex-1];if(r&&r.timeline===e.timeline&&(r.videoTimingInfo?n.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(n.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),e.key){var i=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);n.key=this.segmentKey(e.key),n.key.iv=i}return e.map&&(n.map=this.initSegmentForMap(e.map)),n},n.saveTransferStats_=function(t){this.mediaRequests+=1,t&&(this.mediaBytesTransferred+=t.bytesReceived,this.mediaTransferDuration+=t.roundTripTime)},n.saveBandwidthRelatedStats_=function(t,e){this.pendingSegment_.byteLength=e.bytesReceived,t<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+t+" is less than the min to record "+1/60):(this.bandwidth=e.bandwidth,this.roundTrip=e.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(t,e,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,t,e,n));else if(this.saveTransferStats_(e.stats),this.pendingSegment_&&e.requestId===this.pendingSegment_.requestId){if(t){if(this.pendingSegment_=null,this.state="READY",t.code===es)return;return this.pause(),t.code===ts?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,e.stats),r.endOfAllRequests=e.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(t,e,n){if(!e.length)return t;if(n)return e.slice();for(var r=e[0].pts,i=0;i<t.length&&!(t[i].pts>=r);i++);return t.slice(0,i).concat(e)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING";var i=this.isEndOfStream_(r.mediaIndex,r.playlist),o=null!==this.mediaIndex,a=r.timeline!==this.currentTimeline_&&r.timeline>0;!r.isFmp4&&(i||o&&a)&&Ja(this.transmuxer_),this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(t){var e=this.syncController_.mappingForTimeline(t);null!==e&&(this.timeMapping_=e)},n.updateMediaSecondsLoaded_=function(t){"number"==typeof t.start&&"number"==typeof t.end?this.mediaSecondsLoaded+=t.end-t.start:this.mediaSecondsLoaded+=t.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(t){return null!==t&&("main"===this.loaderType_&&t!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&t!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(t){var e=t.currentStart,n=t.playlist,r=t.mediaIndex,i=t.firstVideoFrameTimeForData,o=t.currentVideoTimestampOffset,a=t.useVideoTimingInfo,s=t.videoTimingInfo,u=t.audioTimingInfo;if(void 0!==e)return e;if(!a)return u.start;var c=n.segments[r-1];return 0!==r&&c&&void 0!==c.start&&c.end===i+o?s.start:i},n.waitForAppendsToComplete_=function(t){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var e=this.currentMediaInfo_,n=e.hasAudio,r=e.hasVideo,i=e.isMuxed,o="main"===this.loaderType_&&r,a=!this.audioDisabled_&&n&&!i;if(t.waitingOnAppends=0,!t.hasAppendedData_)return t.timingInfo||"number"!=typeof t.timestampOffset||(this.isPendingTimestampOffset_=!0),t.timingInfo={start:0},t.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(t),this.processMetadataQueue_()),void this.checkAppendsDone_(t);o&&t.waitingOnAppends++,a&&t.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,t)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,t))},n.checkAppendsDone_=function(t){this.checkForAbort_(t.requestId)||(t.waitingOnAppends--,0===t.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(t){var e=function(t,e,n){return"main"===t&&e&&n?n.hasAudio||n.hasVideo?e.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.":!e.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.currentMediaInfo_,t);return!!e&&(this.error({message:e,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(t){if(null!==t.timestampOffset&&"number"==typeof t.timingInfo.start&&!t.changedTimestampOffset&&"main"===this.loaderType_){var e=!1;t.timestampOffset-=t.timingInfo.start,t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),e=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),e=!0),e&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(t){t.timingInfo=t.timingInfo||{};var e="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&t.videoTimingInfo?t.videoTimingInfo:t.audioTimingInfo;e&&(t.timingInfo.end="number"==typeof e.end?e.end:e.start+t.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_;this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_(function(t){var e=t.segment,n=e.start,r=e.end,i=t.playlist,o=i.mediaSequence,a=i.id,s=i.segments,u=void 0===s?[]:s,c=t.mediaIndex,l=t.timeline;return["appending ["+c+"] of ["+o+", "+(o+u.length)+"] from playlist ["+a+"]","["+n+" => "+r+"] in timeline ["+l+"]"].join(" ")}(t));var e=Ns(t,this.sourceType_);if(e&&("warn"===e.severity?Fo.log.warn(e.message):this.logger_(e.message)),this.recordThroughput_(t),this.pendingSegment_=null,this.state="READY",t.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(t),this.fetchAtBuffer_=!0,this.currentTimeline_!==t.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})),this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate");var n=t.segment;if(n.end&&this.currentTime_()-n.end>3*t.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.isEndOfStream_(t.mediaIndex,t.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()}},n.recordThroughput_=function(t){if(t.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+t.duration+" is less than the min to record "+1/60);else{var e=this.throughput.rate,n=Date.now()-t.endOfAllRequests+1,r=Math.floor(t.byteLength/n*8*1e3);this.throughput.rate+=(r-e)/++this.throughput.count}},n.addSegmentMetadataCue_=function(t){if(this.segmentMetadataTrack_){var e=t.segment,n=e.start,r=e.end;if(Is(n)&&Is(r)){As(n,r,this.segmentMetadataTrack_);var o=i.a.WebKitDataCue||i.a.VTTCue,a={custom:e.custom,dateTimeObject:e.dateTimeObject,dateTimeString:e.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.id,start:n,end:r},s=new o(n,r,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}},e}(Fo.EventTarget);function Us(){}var Fs,Vs=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))},Hs=["video","audio"],qs=function(t,e){var n=e[t+"Buffer"];return n&&n.updating||e.queuePending[t]},Ws=function t(e,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==e&&n.ready()&&"closed"!==n.mediaSource.readyState&&!qs(e,n)){if(i.type!==e){if(null===(r=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];if("mediaSource"===r.type)return null;if(r.type===t)return n}return null}(e,n.queue)))return;i=n.queue[r]}n.queue.splice(r,1),i.action(e,n),i.doneFn?n.queuePending[e]=i:t(e,n)}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),t("audio",n),t("video",n))}},zs=function(t,e){var n=e[t+"Buffer"],r=Vs(t);n&&(n.removeEventListener("updateend",e["on"+r+"UpdateEnd_"]),n.removeEventListener("error",e["on"+r+"Error_"]),e.codecs[t]=null,e[t+"Buffer"]=null)},Gs=function(t,e){return t&&e&&-1!==Array.prototype.indexOf.call(t.sourceBuffers,e)},Ys=function(t,e){return function(n,r){var i=r[n+"Buffer"];Gs(r.mediaSource,i)&&(r.logger_("Appending segment "+e.mediaIndex+"'s "+t.length+" bytes to "+n+"Buffer"),i.appendBuffer(t))}},Xs=function(t,e){return function(n,r){var i=r[n+"Buffer"];Gs(r.mediaSource,i)&&(r.logger_("Removing "+t+" to "+e+" from "+n+"Buffer"),i.remove(t,e))}},Ks=function(t){return function(e,n){var r=n[e+"Buffer"];Gs(n.mediaSource,r)&&(n.logger_("Setting "+e+"timestampOffset to "+t),r.timestampOffset=t)}},Qs=function(t){return function(e,n){t()}},$s=function(t){return function(e){if("open"===e.mediaSource.readyState){e.logger_("Calling mediaSource endOfStream("+(t||"")+")");try{e.mediaSource.endOfStream(t)}catch(t){Fo.log.warn("Failed to call media source endOfStream",t)}}}},Js=function(t){return function(e){e.logger_("Setting mediaSource duration to "+t);try{e.mediaSource.duration=t}catch(t){Fo.log.warn("Failed to set media source duration",t)}}},Zs=function(){return function(t,e){if("open"===e.mediaSource.readyState){var n=e[t+"Buffer"];if(Gs(e.mediaSource,n)){e.logger_("calling abort on "+t+"Buffer");try{n.abort()}catch(e){Fo.log.warn("Failed to abort on "+t+"Buffer",e)}}}}},tu=function(t,e){return function(n){var r=Vs(t),i=Object(Mt.getMimeForCodec)(e);n.logger_("Adding "+t+"Buffer with codec "+e+" to mediaSource");var o=n.mediaSource.addSourceBuffer(i);o.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),o.addEventListener("error",n["on"+r+"Error_"]),n.codecs[t]=e,n[t+"Buffer"]=o}},eu=function(t){return function(e){var n=e[t+"Buffer"];if(zs(t,e),Gs(e.mediaSource,n)){e.logger_("Removing "+t+"Buffer with codec "+e.codecs[t]+" from mediaSource");try{e.mediaSource.removeSourceBuffer(n)}catch(e){Fo.log.warn("Failed to removeSourceBuffer "+t+"Buffer",e)}}}},nu=function(t){return function(e,n){var r=n[e+"Buffer"],i=Object(Mt.getMimeForCodec)(t);Gs(n.mediaSource,r)&&n.codecs[e]!==t&&(n.logger_("changing "+e+"Buffer codec from "+n.codecs[e]+" to "+t),r.changeType(i),n.codecs[e]=t)}},ru=function(t){var e=t.type,n=t.sourceUpdater,r=t.action,i=t.doneFn,o=t.name;n.queue.push({type:e,action:r,doneFn:i,name:o}),Ws(e,n)},iu=function(t,e){return function(n){if(e.queuePending[t]){var r=e.queuePending[t].doneFn;e.queuePending[t]=null,r&&r(e[t+"Error_"])}Ws(t,e)}},ou=function(t){function e(e){var n;return(n=t.call(this)||this).mediaSource=e,n.sourceopenListener_=function(){return Ws("mediaSource",l()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=Ts("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=iu("video",l()(n)),n.onAudioUpdateEnd_=iu("audio",l()(n)),n.onVideoError_=function(t){n.videoError_=t},n.onAudioError_=function(t){n.audioError_=t},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}h()(e,t);var n=e.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(t){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(t),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(t,e){ru({type:"mediaSource",sourceUpdater:this,action:tu(t,e),name:"addSourceBuffer"})},n.abort=function(t){ru({type:t,sourceUpdater:this,action:Zs(t),name:"abort"})},n.removeSourceBuffer=function(t){this.canRemoveSourceBuffer()?ru({type:"mediaSource",sourceUpdater:this,action:eu(t),name:"removeSourceBuffer"}):Fo.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Fo.browser.IE_VERSION&&!Fo.browser.IS_FIREFOX&&i.a.MediaSource&&i.a.MediaSource.prototype&&"function"==typeof i.a.MediaSource.prototype.removeSourceBuffer},e.canChangeType=function(){return i.a.SourceBuffer&&i.a.SourceBuffer.prototype&&"function"==typeof i.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(t,e){this.canChangeType()?ru({type:t,sourceUpdater:this,action:nu(e),name:"changeType"}):Fo.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(t){var e=this;if(!t||"object"!=typeof t||0===Object.keys(t).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(t).forEach((function(n){var r=t[n];if(!e.hasCreatedSourceBuffers())return e.addSourceBuffer(n,r);e.canChangeType()&&e.changeType(n,r)}))},n.appendBuffer=function(t,e){var n=this,r=t.segmentInfo,i=t.type,o=t.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([t,e]),void this.logger_("delayed audio append of "+o.length+" until video append");if(ru({type:i,sourceUpdater:this,action:Ys(o,r||{mediaIndex:-1}),doneFn:e,name:"appendBuffer"}),"video"===i){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(t){n.appendBuffer.apply(n,t)}))}},n.audioBuffered=function(){return Gs(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Fo.createTimeRange()},n.videoBuffered=function(){return Gs(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Fo.createTimeRange()},n.buffered=function(){var t=Gs(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,e=Gs(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return e&&!t?this.audioBuffered():t&&!e?this.videoBuffered():function(t,e){var n=null,r=null,i=0,o=[],a=[];if(!(t&&t.length&&e&&e.length))return Fo.createTimeRange();for(var s=t.length;s--;)o.push({time:t.start(s),type:"start"}),o.push({time:t.end(s),type:"end"});for(s=e.length;s--;)o.push({time:e.start(s),type:"start"}),o.push({time:e.end(s),type:"end"});for(o.sort((function(t,e){return t.time-e.time})),s=0;s<o.length;s++)"start"===o[s].type?2===++i&&(n=o[s].time):"end"===o[s].type&&1===--i&&(r=o[s].time),null!==n&&null!==r&&(a.push([n,r]),n=null,r=null);return Fo.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(t,e){void 0===e&&(e=Us),ru({type:"mediaSource",sourceUpdater:this,action:Js(t),name:"duration",doneFn:e})},n.endOfStream=function(t,e){void 0===t&&(t=null),void 0===e&&(e=Us),"string"!=typeof t&&(t=void 0),ru({type:"mediaSource",sourceUpdater:this,action:$s(t),name:"endOfStream",doneFn:e})},n.removeAudio=function(t,e,n){void 0===n&&(n=Us),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?ru({type:"audio",sourceUpdater:this,action:Xs(t,e),doneFn:n,name:"remove"}):n()},n.removeVideo=function(t,e,n){void 0===n&&(n=Us),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?ru({type:"video",sourceUpdater:this,action:Xs(t,e),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!qs("audio",this)&&!qs("video",this))},n.audioTimestampOffset=function(t){return void 0!==t&&this.audioBuffer&&this.audioTimestampOffset_!==t&&(ru({type:"audio",sourceUpdater:this,action:Ks(t),name:"timestampOffset"}),this.audioTimestampOffset_=t),this.audioTimestampOffset_},n.videoTimestampOffset=function(t){return void 0!==t&&this.videoBuffer&&this.videoTimestampOffset!==t&&(ru({type:"video",sourceUpdater:this,action:Ks(t),name:"timestampOffset"}),this.videoTimestampOffset_=t),this.videoTimestampOffset_},n.audioQueueCallback=function(t){this.audioBuffer&&ru({type:"audio",sourceUpdater:this,action:Qs(t),name:"callback"})},n.videoQueueCallback=function(t){this.videoBuffer&&ru({type:"video",sourceUpdater:this,action:Qs(t),name:"callback"})},n.dispose=function(){var t=this;this.trigger("dispose"),Hs.forEach((function(e){t.abort(e),t.canRemoveSourceBuffer()?t.removeSourceBuffer(e):t[e+"QueueCallback"]((function(){return zs(e,t)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},e}(Fo.EventTarget),au=function(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))},su=new Uint8Array("\n\n".split("").map((function(t){return t.charCodeAt(0)}))),uu=function(t){function e(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,e,n)||this).handlePartialData_=!1,r.mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=e.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}h()(e,t);var n=e.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return Fo.createTimeRanges();var t=this.subtitlesTrack_.cues,e=t[0].startTime,n=t[t.length-1].startTime;return Fo.createTimeRanges([[e,n]])},n.initSegmentForMap=function(t,e){if(void 0===e&&(e=!1),!t)return null;var n=La(t),r=this.initSegments_[n];if(e&&!r&&t.bytes){var i=su.byteLength+t.bytes.byteLength,o=new Uint8Array(i);o.set(t.bytes),o.set(su,t.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:o}}return r||t},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(t){return void 0===t||(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(t,e){As(t,e,this.subtitlesTrack_)},n.fillBuffer_=function(){var t=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){return this.syncController_.one("timestampoffset",(function(){t.state="READY",t.paused()||t.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}},n.skipEmptySegments_=function(t){for(;t&&t.segment.empty;)t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest);return t},n.stopForError=function(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(t,e,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(e.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(t)return t.code===ts&&this.handleTimeout_(),t.code===es?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(t);var o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,e.stats),this.state="APPENDING",this.trigger("appending");var a=o.segment;if(a.map&&(a.map.bytes=e.map.bytes),o.bytes=e.bytes,"function"!=typeof i.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var s,u=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",s),r.stopForError({message:"Error loading vtt.js"})};return s=function(){r.subtitlesTrack_.tech_.off("vttjserror",u),r.segmentRequestFinished_(t,e,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",s),void this.subtitlesTrack_.tech_.one("vttjserror",u)}a.requested=!0;try{this.parseVTTCues_(o)}catch(t){return void this.stopForError({message:t.message})}if(this.updateTimeMapping_(o,this.syncController_.timelines[o.timeline],this.playlist_),o.cues.length?o.timingInfo={start:o.cues[0].startTime,end:o.cues[o.cues.length-1].endTime}:o.timingInfo={start:o.startOfSegment,end:o.startOfSegment+o.duration},o.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");o.byteLength=o.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,o.cues.forEach((function(t){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new i.a.VTTCue(t.startTime,t.endTime,t.text):t)})),function(t){var e=t.cues;if(e)for(var n=0;n<e.length;n++){for(var r=[],i=0,o=0;o<e.length;o++)e[n].startTime===e[o].startTime&&e[n].endTime===e[o].endTime&&e[n].text===e[o].text&&++i>1&&r.push(e[o]);r.length&&r.forEach((function(e){return t.removeCue(e)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(t){var e,n=!1;"function"==typeof i.a.TextDecoder?e=new i.a.TextDecoder("utf8"):(e=i.a.WebVTT.StringDecoder(),n=!0);var r=new i.a.WebVTT.Parser(i.a,i.a.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=t.cues.push.bind(t.cues),r.ontimestampmap=function(e){t.timestampmap=e},r.onparsingerror=function(t){Fo.log.warn("Error encountered when parsing cues: "+t.message)},t.segment.map){var o=t.segment.map.bytes;n&&(o=au(o)),r.parse(o)}var a=t.bytes;n&&(a=au(a)),r.parse(a),r.flush()},n.updateTimeMapping_=function(t,e,n){var r=t.segment;if(e)if(t.cues.length){var i=t.timestampmap,o=i.MPEGTS/jt.ONE_SECOND_IN_TS-i.LOCAL+e.mapping;if(t.cues.forEach((function(t){t.startTime+=o,t.endTime+=o})),!n.syncInfo){var a=t.cues[0].startTime,s=t.cues[t.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+t.mediaIndex,time:Math.min(a,s-r.duration)}}}else r.empty=!0},e}(Bs),cu=function(t,e){for(var n=t.cues,r=0;r<n.length;r++){var i=n[r];if(e>=i.adStartTime&&e<=i.adEndTime)return i}return null},lu=[{name:"VOD",run:function(t,e,n,r,i){if(n!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(t,e,n,r,i){if(!t.datetimeToDisplayTime)return null;var o=e.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var c=o[u];if(c.dateTimeObject){var l=c.dateTimeObject.getTime()/1e3+t.datetimeToDisplayTime,f=Math.abs(i-l);if(null!==s&&(0===f||s<f))break;s=f,a={time:l,segmentIndex:u}}}return a}},{name:"Segment",run:function(t,e,n,r,i){var o=e.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var c=o[u];if(c.timeline===r&&void 0!==c.start){var l=Math.abs(i-c.start);if(null!==s&&s<l)break;(!a||null===s||s>=l)&&(s=l,a={time:c.start,segmentIndex:u})}}return a}},{name:"Discontinuity",run:function(t,e,n,r,i){var o=null;if(i=i||0,e.discontinuityStarts&&e.discontinuityStarts.length)for(var a=null,s=0;s<e.discontinuityStarts.length;s++){var u=e.discontinuityStarts[s],c=e.discontinuitySequence+s+1,l=t.discontinuities[c];if(l){var f=Math.abs(i-l.time);if(null!==a&&a<f)break;(!o||null===a||a>=f)&&(a=f,o={time:l.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(t,e,n,r,i){return e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence}:null}}],fu=function(t){function e(e){var n;return(n=t.call(this)||this).timelines=[],n.discontinuities=[],n.datetimeToDisplayTime=null,n.logger_=Ts("SyncController"),n}h()(e,t);var n=e.prototype;return n.getSyncPoint=function(t,e,n,r){var i=this.runStrategies_(t,e,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(t,e){if(!t||!t.segments)return null;var n=this.runStrategies_(t,e,t.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+ha(t,r.segmentIndex,0))},n.runStrategies_=function(t,e,n,r){for(var i=[],o=0;o<lu.length;o++){var a=lu[o],s=a.run(this,t,e,n,r);s&&(s.strategy=a.name,i.push({strategy:a.name,syncPoint:s}))}return i},n.selectSyncPoint_=function(t,e){for(var n=t[0].syncPoint,r=Math.abs(t[0].syncPoint[e.key]-e.value),i=t[0].strategy,o=1;o<t.length;o++){var a=Math.abs(t[o].syncPoint[e.key]-e.value);a<r&&(r=a,n=t[o].syncPoint,i=t[o].strategy)}return this.logger_("syncPoint for ["+e.key+": "+e.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n},n.saveExpiredSegmentInfo=function(t,e){for(var n=e.mediaSequence-t.mediaSequence-1;n>=0;n--){var r=t.segments[n];if(r&&void 0!==r.start){e.syncInfo={mediaSequence:t.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+e.syncInfo.time+", mediaSequence: "+e.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMapping=function(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var e=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-e}},n.saveSegmentTimingInfo=function(t){var e=t.segmentInfo,n=t.shouldSaveTimelineMapping;this.calculateSegmentTimeMapping_(e,e.timingInfo,n)&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:e.segment.start}))},n.timestampOffsetForTimeline=function(t){return void 0===this.timelines[t]?null:this.timelines[t].time},n.mappingForTimeline=function(t){return void 0===this.timelines[t]?null:this.timelines[t].mapping},n.calculateSegmentTimeMapping_=function(t,e,n){var r=t.segment,i=this.timelines[t.timeline];if(null!==t.timestampOffset)i={time:t.startOfSegment,mapping:t.startOfSegment-e.start},n&&(this.timelines[t.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=t.startOfSegment,r.end=e.end+i.mapping;else{if(!i)return!1;r.start=e.start+i.mapping,r.end=e.end+i.mapping}return!0},n.saveDiscontinuitySyncInfo_=function(t){var e=t.playlist,n=t.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(e.discontinuityStarts&&e.discontinuityStarts.length)for(var r=0;r<e.discontinuityStarts.length;r++){var i=e.discontinuityStarts[r],o=e.discontinuitySequence+r+1,a=i-t.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u=void 0;u=a<0?n.start-ha(e,t.mediaIndex,i):n.end+ha(e,t.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}},n.dispose=function(){this.trigger("dispose"),this.off()},e}(Fo.EventTarget),hu=function(t){function e(){var e;return(e=t.call(this)||this).pendingTimelineChanges_={},e.lastTimelineChanges_={},e}h()(e,t);var n=e.prototype;return n.clearPendingTimelineChange=function(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(t){var e=t.type,n=t.from,r=t.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[e]={type:e,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]},n.lastTimelineChange=function(t){var e=t.type,n=t.from,r=t.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[e]={type:e,from:n,to:r},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},e}(Fo.EventTarget),pu=new ds("./decrypter-worker.worker.js",(function(t,e){var n=this;
@@ -17,9 +17,9 @@ for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=
17
17
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var i=r(n(243)),o=r(n(46));t.exports=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=i.buildAbsoluteURL(o.location&&o.location.href||"",t)),i.buildAbsoluteURL(t,e))}},,,function(t,e){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=n},function(t,e,n){var r,i,o,a=n(133),s=n(21),u=n(32),c=n(37),l=n(36),f=n(99),h=n(79),p=s.WeakMap;if(a){var d=new p,y=d.get,m=d.has,v=d.set;r=function(t,e){return v.call(d,t,e),e},i=function(t){return y.call(d,t)||{}},o=function(t){return m.call(d,t)}}else{var g=f("state");h[g]=!0,r=function(t,e){return c(t,g,e),e},i=function(t){return l(t,g)?t[g]:{}},o=function(t){return l(t,g)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(57);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports={}},,,,function(t,e,n){(function(e){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,h=Math.min,p=function(){return c.Date.now()};function d(t,e,n){var r,i,o,a,s,u,c=0,l=!1,d=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function b(t){return c=t,s=setTimeout(w,e),l?g(t):a}function _(t){var n=t-u;return void 0===u||n>=e||n<0||d&&t-c>=o}function w(){var t=p();if(_(t))return T(t);s=setTimeout(w,function(t){var n=e-(t-u);return d?h(n,o-(t-c)):n}(t))}function T(t){return s=void 0,v&&r?g(t):(r=i=void 0,a)}function S(){var t=p(),n=_(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return b(u);if(d)return s=setTimeout(w,e),g(u)}return void 0===s&&(s=setTimeout(w,e)),a}return e=m(e)||0,y(n)&&(l=!!n.leading,o=(d="maxWait"in n)?f(m(n.maxWait)||0,e):o,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:T(p())},S}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==l.call(t)}(t))return NaN;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var s=i.test(t);return s||o.test(t)?a(t.slice(2),s?2:8):r.test(t)?NaN:+t}t.exports=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return y(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),d(t,e,{leading:r,maxWait:e,trailing:i})}}).call(this,n(25))},function(t,e,n){(function(e){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof e&&e&&e.Object===Object&&e,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||u||Function("return this")(),l=Object.prototype.toString,f=Math.max,h=Math.min,p=function(){return c.Date.now()};function d(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==l.call(t)}(t))return NaN;if(d(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=d(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var s=i.test(t);return s||o.test(t)?a(t.slice(2),s?2:8):r.test(t)?NaN:+t}t.exports=function(t,e,n){var r,i,o,a,s,u,c=0,l=!1,m=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function b(t){return c=t,s=setTimeout(w,e),l?g(t):a}function _(t){var n=t-u;return void 0===u||n>=e||n<0||m&&t-c>=o}function w(){var t=p();if(_(t))return T(t);s=setTimeout(w,function(t){var n=e-(t-u);return m?h(n,o-(t-c)):n}(t))}function T(t){return s=void 0,v&&r?g(t):(r=i=void 0,a)}function S(){var t=p(),n=_(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return b(u);if(m)return s=setTimeout(w,e),g(u)}return void 0===s&&(s=setTimeout(w,e)),a}return e=y(e)||0,d(n)&&(l=!!n.leading,o=(m="maxWait"in n)?f(y(n.maxWait)||0,e):o,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:T(p())},S}}).call(this,n(25))},,function(t,e){t.exports={toUnsigned:function(t){return t>>>0},toHexString:function(t){return("00"+t.toString(16)).slice(-2)}}},function(t,e,n){var r=n(76),i=n(57);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(30),i=n(77),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(97),i=n(264);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports={}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},,function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.Staff="staff",t.Learner="learner",t.Unknown="unknown"}(r||(r={}))},function(t,e,n){(function(e){var r,i=void 0!==e?e:"undefined"!=typeof window?window:{},o=n(239);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),t.exports=r}).call(this,n(25))},function(t,e,n){"use strict";(function(e){var r,i=(r=n(46))&&"object"==typeof r&&"default"in r?r.default:r;t.exports=function(t){for(var n,r=(n=t,i.atob?i.atob(n):e.from(n,"base64").toString("binary")),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return o}}).call(this,n(195).Buffer)},,,function(t,e,n){"use strict";
18
18
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */var r=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var n=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(n,1),n>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var n=e.length,r=0;r<n;++r)e[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=e.length,a=0;a<o;++a)e[a].apply(this,i)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}();t.exports=r},function(t,e,n){"use strict";
19
19
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t instanceof Uint8Array?t:new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0)};e.bytesToString=function(t){if(!t)return"";t=Array.prototype.slice.call(t);var e=String.fromCharCode.apply(null,r(t));try{return decodeURIComponent(escape(e))}catch(t){}return e},e.concatTypedArrays=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e.reduce((function(t,e){return t+=e&&(e.byteLength||e.length)||0}),0),o=new Uint8Array(i),a=0;return e.forEach((function(t){t=r(t),o.set(t,a),a+=t.byteLength})),o},e.isTypedArray=function(t){return ArrayBuffer.isView(t)},e.stringToBytes=function(t,e){void 0===e&&(e=!1);return"string"!=typeof t&&t&&"function"==typeof t.toString&&(t=t.toString()),"string"!=typeof t?[]:(e||(t=unescape(encodeURIComponent(t))),t.split("").map((function(t){return 255&t.charCodeAt(0)})))},e.toUint8=r},,,,,,,function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(21),i=n(37);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(78),i=n(100),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(267),i=n(21),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var r=n(138),i=n(76),o=n(66),a=n(60),s=n(271),u=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,l=4==t,f=6==t,h=5==t||f;return function(p,d,y,m){for(var v,g,b=o(p),_=i(b),w=r(d,y,3),T=a(_.length),S=0,E=m||s,k=e?E(p,T):n?E(p,0):void 0;T>S;S++)if((h||S in _)&&(g=w(v=_[S],S,b),t))if(e)k[S]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return S;case 2:u.call(k,v)}else if(l)return!1;return f?-1:c||l?l:k}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(t,e,n){var r=n(58).f,i=n(36),o=n(28)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(79),i=n(32),o=n(36),a=n(58).f,s=n(100),u=n(288),c=s("meta"),l=0,f=Object.isExtensible||function(){return!0},h=function(t){a(t,c,{value:{objectID:"O"+ ++l,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,c)){if(!f(t))return"F";if(!e)return"E";h(t)}return t[c].objectID},getWeakData:function(t,e){if(!o(t,c)){if(!f(t))return!0;if(!e)return!1;h(t)}return t[c].weakData},onFreeze:function(t){return u&&p.REQUIRED&&f(t)&&!o(t,c)&&h(t),t}};r[c]=!0},function(t,e,n){"use strict";var r,i,o=n(297),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(u=function(t){var e,n,r,i,u=this;return l&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),c&&(e=u.lastIndex),r=a.call(u,t),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=u},,,,,function(t,e,n){(function(e){var n=/^\[object .+?Constructor\]$/,r="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,c=Object.prototype,l=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,p=c.hasOwnProperty,d=c.toString,y=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,v=k(o,"Map"),g=k(Object,"create");function b(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function _(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function w(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function T(t,e){for(var n,r,i=t.length;i--;)if((n=t[i][0])===(r=e)||n!=n&&r!=r)return i;return-1}function S(t){return!(!C(t)||(e=t,f&&f in e))&&(function(t){var e=C(t)?d.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?y:n).test(function(t){if(null!=t){try{return h.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function E(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function k(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return S(n)?n:void 0}function O(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(O.Cache||w),n}function C(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}b.prototype.clear=function(){this.__data__=g?g(null):{}},b.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},b.prototype.get=function(t){var e=this.__data__;if(g){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return p.call(e,t)?e[t]:void 0},b.prototype.has=function(t){var e=this.__data__;return g?void 0!==e[t]:p.call(e,t)},b.prototype.set=function(t,e){return this.__data__[t]=g&&void 0===e?"__lodash_hash_undefined__":e,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(t){var e=this.__data__,n=T(e,t);return!(n<0)&&(n==e.length-1?e.pop():m.call(e,n,1),!0)},_.prototype.get=function(t){var e=this.__data__,n=T(e,t);return n<0?void 0:e[n][1]},_.prototype.has=function(t){return T(this.__data__,t)>-1},_.prototype.set=function(t,e){var n=this.__data__,r=T(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},w.prototype.clear=function(){this.__data__={hash:new b,map:new(v||_),string:new b}},w.prototype.delete=function(t){return E(this,t).delete(t)},w.prototype.get=function(t){return E(this,t).get(t)},w.prototype.has=function(t){return E(this,t).has(t)},w.prototype.set=function(t,e){return E(this,t).set(t,e),this},O.Cache=w,t.exports=O}).call(this,n(25))},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function a(){n&&(n=!1,t()),r&&u()}function s(){o(a)}function u(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(t){return parseFloat(t)||0}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+h(t["border-"+n+"-width"])}),0)}function d(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var r=l(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=h(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=p(r,"left","right")+o),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(t){return t===l(t).document.documentElement}(t)){var c=Math.round(s+o)-e,d=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(d)&&(u-=d)}return v(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function m(t){return r?y(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):d(t):f}function v(t,e,n,r){return{x:t,y:e,width:n,height:r}}var g=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=m(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),b=function(t,e){var n,r,i,o,a,s,u,l=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),c(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);c(this,{target:t,contentRect:l})},_=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new g(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new b(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,T=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(e,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){T.prototype[t]=function(){var e;return(e=w.get(this))[t].apply(e,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:T;e.a=S}).call(this,n(25))},function(t,e,n){"use strict";function r(t){for(var e=t.buffered(),n=t.currentTime(),r=0,i=0;i<e.length;i++){var o=e.start(i),a=e.end(i);if(o<=n&&a>=n){r=a;break}}return r}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(46),i=n(47),o=n(237);function a(t,e,n){var r=t;return o(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=i({},e,{uri:t}),r.callback=n,r}function s(t,e,n){return u(e=a(t,e,n))}function u(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,n=function(n,r,i){e||(e=!0,t.callback(n,r,i))};function r(){var t=void 0;if(t=c.response?c.response:c.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(c),m)try{t=JSON.parse(t)}catch(t){}return t}function i(t){return clearTimeout(l),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,n(t,v)}function o(){if(!u){var e;clearTimeout(l),e=t.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=v,o=null;return 0!==e?(i={body:r(),statusCode:e,method:h,headers:{},url:f,rawRequest:c},c.getAllResponseHeaders&&(i.headers=function(t){var e={};return t?(t.trim().split("\n").forEach((function(t){var n=t.indexOf(":"),r=t.slice(0,n).trim().toLowerCase(),i=t.slice(n+1).trim();void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]})),e):e}(c.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,c=t.xhr||null;c||(c=t.cors||t.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var l,f=c.url=t.uri||t.url,h=c.method=t.method||"GET",p=t.body||t.data,d=c.headers=t.headers||{},y=!!t.sync,m=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:c};if("json"in t&&!1!==t.json&&(m=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),p=JSON.stringify(!0===t.json?p:t.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(o,0)},c.onload=o,c.onerror=i,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=i,c.open(h,f,!y,t.username,t.password),y||(c.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(l=setTimeout((function(){if(!u){u=!0,c.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",i(t)}}),t.timeout)),c.setRequestHeader)for(a in d)d.hasOwnProperty(a)&&c.setRequestHeader(a,d[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(p||null),c}t.exports=s,t.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],(function(t){s["delete"===t?"del":t]=function(e,n,r){return(n=a(e,n,r)).method=t.toUpperCase(),u(n)}}))},function(t,e,n){var r=n(46),i=t.exports={WebVTT:n(238),VTTCue:n(240),VTTRegion:n(241)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(t,e,n){"use strict";
20
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i;e.simpleTypeFromSourceType=function(t){return r.test(t)?"hls":i.test(t)?"dash":"application/vnd.videojs.vhs+json"===t?"vhs-json":null}},function(t,e,n){"use strict";var r,i,o,a,s,u,c=n(74).toUnsigned,l=n(74).toHexString,f=n(252),h=n(126),p=n(253),d=n(254),y=n(256);r=function(t){return f(t,["moov","trak"]).reduce((function(t,e){var n,r,i,o,a;return(n=f(e,["tkhd"])[0])?(r=n[0],o=c(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=f(e,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,t[o]=c(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),t):null):null}),{})},i=function(t,e){var n,r,i;return n=f(e,["moof","traf"]),r=[].concat.apply([],n.map((function(e){return f(e,["tfhd"]).map((function(n){var r,i,o;return r=c(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=t[r]||9e4,(o="number"!=typeof(o=f(e,["tfdt"]).map((function(t){var e,n;return e=t[0],n=c(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(n*=Math.pow(2,32),n+=c(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),n}))[0])||isNaN(o)?1/0:o)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},o=function(t,e){var n,r=f(e,["moof","traf"]),i=0,o=0;if(r&&r.length){var a=f(r[0],["tfhd"])[0],s=f(r[0],["trun"])[0],u=f(r[0],["tfdt"])[0];if(a)n=p(a).trackId;if(u)i=y(u).baseMediaDecodeTime;if(s){var c=d(s);c.samples&&c.samples.length&&(o=c.samples[0].compositionTimeOffset||0)}}return(i+o)/(t[n]||9e4)},a=function(t){var e=f(t,["moov","trak"]),n=[];return e.forEach((function(t){var e=f(t,["mdia","hdlr"]),r=f(t,["tkhd"]);e.forEach((function(t,e){var i,o,a=h(t.subarray(8,12)),s=r[e];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n},u=function(t){var e=0===t[0]?12:20;return c(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])},s=function(t){var e=f(t,["moov","trak"]),n=[];return e.forEach((function(t){var e,r,i={},o=f(t,["tkhd"])[0];o&&(r=(e=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?e.getUint32(12):e.getUint32(20));var a=f(t,["mdia","hdlr"])[0];if(a){var s=h(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var c=f(t,["mdia","minf","stbl","stsd"])[0];if(c){var p=c.subarray(8);i.codec=h(p.subarray(4,8));var d,y=f(p,[i.codec])[0];y&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(d=y.subarray(78),"avcC"===h(d.subarray(4,8))&&d.length>11?(i.codec+=".",i.codec+=l(d[9]),i.codec+=l(d[10]),i.codec+=l(d[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(d=y.subarray(28),"esds"===h(d.subarray(4,8))&&d.length>20&&0!==d[19]?(i.codec+="."+l(d[19]),i.codec+="."+l(d[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var m=f(t,["mdia","mdhd"])[0];m&&(i.timescale=u(m)),n.push(i)})),n},t.exports={findBox:f,parseType:h,timescale:r,startTime:i,compositionStartTime:o,videoTrackIds:a,tracks:s,getTimescaleFromMediaHeader:u}},,function(t,e,n){"use strict";var r=n(75),i=n(278),o=n(67),a=n(65),s=n(144),u=a.set,c=a.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},,,,,function(t,e){function n(t,e){for(var n in t)e[n]=t[n]}function r(t,e){var r=t.prototype;if(Object.create){var i=Object.create(e.prototype);r.__proto__=i}if(!(r instanceof e)){function o(){}o.prototype=e.prototype,n(r,o=new o),t.prototype=r=o}r.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),r.constructor=t)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,c=i.ENTITY_REFERENCE_NODE=5,l=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,p=i.DOCUMENT_NODE=9,d=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,v={},g={},b=(v.INDEX_SIZE_ERR=(g[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),v.NOT_FOUND_ERR=(g[8]="Not found",8)),w=(v.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10));v.INVALID_STATE_ERR=(g[11]="Invalid state",11),v.SYNTAX_ERR=(g[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),v.NAMESPACE_ERR=(g[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(g[15]="Invalid access",15);function T(t,e){if(e instanceof Error)var n=e;else n=this,Error.call(this,g[t]),this.message=g[t],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=t,e&&(this.message=this.message+": "+e),n}function S(){}function E(t,e){this._node=t,this._refresh=e,k(this)}function k(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);et(t,"length",r.length),n(r,t),t._inc=e}}function O(){}function C(t,e){for(var n=t.length;n--;)if(t[n]===e)return n}function P(t,e,n,r){if(r?e[C(e,r)]=n:e[e.length++]=n,t){n.ownerElement=t;var i=t.ownerDocument;i&&(r&&D(i,t,r),function(t,e,n){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(e._nsMap[n.prefix?n.localName:""]=n.value)}(i,t,n))}}function x(t,e,n){var r=C(e,n);if(!(r>=0))throw T(_,new Error(t.tagName+"@"+n));for(var i=e.length-1;r<i;)e[r]=e[++r];if(e.length=i,t){var o=t.ownerDocument;o&&(D(o,t,n),n.ownerElement=null)}}function L(t){if(this._features={},t)for(var e in t)this._features=t[e]}function A(){}function I(t){return("<"==t?"&lt;":">"==t&&"&gt;")||"&"==t&&"&amp;"||'"'==t&&"&quot;"||"&#"+t.charCodeAt()+";"}function j(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(j(t,e))return!0}while(t=t.nextSibling)}function R(){}function D(t,e,n,r){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete e._nsMap[n.prefix?n.localName:""]}function M(t,e,n){if(t&&t._inc){t._inc++;var r=e.childNodes;if(n)r[r.length++]=n;else{for(var i=e.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(t,e){var n=e.previousSibling,r=e.nextSibling;return n?n.nextSibling=r:t.firstChild=r,r?r.previousSibling=n:t.lastChild=n,M(t.ownerDocument,t),e}function B(t,e,n){var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===y){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var a=n?n.previousSibling:t.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:t.firstChild=i,null==n?t.lastChild=o:n.previousSibling=o;do{i.parentNode=t}while(i!==o&&(i=i.nextSibling));return M(t.ownerDocument||t,t),e.nodeType==y&&(e.firstChild=e.lastChild=null),e}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function q(){}function W(){}function z(){}function G(){}function Y(){}function X(){}function K(){}function Q(){}function $(){}function J(t,e){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return tt(this,n,t,e,a),n.join("")}function Z(t,e,n){var r=t.prefix||"",i=t.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function tt(t,e,n,r,i){if(r){if(!(t=r(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case o:i||(i=[]);i.length;var l=t.attributes,m=l.length,v=t.firstChild,g=t.tagName;n="http://www.w3.org/1999/xhtml"===t.namespaceURI||n,e.push("<",g);for(var b=0;b<m;b++){"xmlns"==(_=l.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=l.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";e.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}tt(_,e,n,r,i)}if(Z(t,0,i)){w=t.prefix||"",T=t.namespaceURI,S=w?" xmlns:"+w:" xmlns";e.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(e.push(">"),n&&/^script$/i.test(g))for(;v;)v.data?e.push(v.data):tt(v,e,n,r,i),v=v.nextSibling;else for(;v;)tt(v,e,n,r,i),v=v.nextSibling;e.push("</",g,">")}else e.push("/>");return;case p:case y:for(v=t.firstChild;v;)tt(v,e,n,r,i),v=v.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,I),'"');case s:return e.push(t.data.replace(/[<&]/g,I));case u:return e.push("<![CDATA[",t.data,"]]>");case h:return e.push("\x3c!--",t.data,"--\x3e");case d:var E=t.publicId,k=t.systemId;if(e.push("<!DOCTYPE ",t.name),E)e.push(' PUBLIC "',E),k&&"."!=k&&e.push('" "',k),e.push('">');else if(k&&"."!=k)e.push(' SYSTEM "',k,'">');else{var O=t.internalSubset;O&&e.push(" [",O,"]"),e.push(">")}return;case f:return e.push("<?",t.target," ",t.data,"?>");case c:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function et(t,e,n){t[e]=n}T.prototype=Error.prototype,n(v,T),S.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var n=[],r=0;r<this.length;r++)tt(this[r],n,t,e);return n.join("")}},E.prototype.item=function(t){return k(this),this[t]},r(E,S),O.prototype={length:0,item:S.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var n=this[e];if(n.nodeName==t)return n}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new T(w);var n=this.getNamedItem(t.nodeName);return P(this._ownerElement,this,t,n),n},setNamedItemNS:function(t){var e,n=t.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return e=this.getNamedItemNS(t.namespaceURI,t.localName),P(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return x(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var n=this.getNamedItemNS(t,e);return x(this._ownerElement,this,n),n},getNamedItemNS:function(t,e){for(var n=this.length;n--;){var r=this[n];if(r.localName==e&&r.namespaceURI==t)return r}return null}},L.prototype={hasFeature:function(t,e){var n=this._features[t.toLowerCase()];return!(!n||e&&!(e in n))},createDocument:function(t,e,n){var r=new R;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),e){var i=r.createElementNS(t,e);r.appendChild(i)}return r},createDocumentType:function(t,e,n){var r=new z;return r.name=t,r.nodeName=t,r.publicId=e,r.systemId=n,r}},A.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(t,e){return B(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return N(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=e,i.nodeType){case o:var c=n.attributes,l=i.attributes=new O,f=c.length;l._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(t(e,c.item(h),!0));break;case a:r=!0}if(r)for(var p=n.firstChild;p;)i.appendChild(t(e,p,r)),p=p.nextSibling;return i}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==s&&t.nodeType==s?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n)for(var r in n)if(n[r]==t)return r;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&t in n)return n[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},n(i,A),n(i,A.prototype),R.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==y){for(var n=t.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,e),n=r}return t}return null==this.documentElement&&t.nodeType==o&&(this.documentElement=t),B(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),N(this,t)},importNode:function(t,e){return function t(e,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=e;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=e,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(t(e,s,r)),s=s.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return j(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==t)return e=n,!0})),e},createElement:function(t){var e=new U;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new S,(e.attributes=new O)._ownerElement=e,e},createDocumentFragment:function(){var t=new K;return t.ownerDocument=this,t.childNodes=new S,t},createTextNode:function(t){var e=new H;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new q;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new W;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new Q;return n.ownerDocument=this,n.tagName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new F;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new X;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new U,r=e.split(":"),i=n.attributes=new O;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,i._ownerElement=n,n},createAttributeNS:function(t,e){var n=new F,r=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,n}},r(R,A),U.prototype={nodeType:o,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===y?this.insertBefore(t,null):function(t,e){var n=e.parentNode;if(n){var r=t.lastChild;n.removeChild(e);r=t.lastChild}return r=t.lastChild,e.parentNode=t,e.previousSibling=r,e.nextSibling=null,r?r.nextSibling=e:t.firstChild=e,t.lastChild=e,M(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new E(this,(function(e){var n=[];return j(e,(function(r){r===e||r.nodeType!=o||"*"!==t&&r.tagName!=t||n.push(r)})),n}))},getElementsByTagNameNS:function(t,e){return new E(this,(function(n){var r=[];return j(n,(function(i){i===n||i.nodeType!==o||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||r.push(i)})),r}))}},R.prototype.getElementsByTagName=U.prototype.getElementsByTagName,R.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(g[b])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){n=this.data.substring(0,t)+n+this.data.substring(t+e),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),q.prototype={nodeName:"#comment",nodeType:h},r(q,V),W.prototype={nodeName:"#cdata-section",nodeType:u},r(W,V),z.prototype.nodeType=d,r(z,A),G.prototype.nodeType=m,r(G,A),Y.prototype.nodeType=l,r(Y,A),X.prototype.nodeType=c,r(X,A),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=y,r(K,A),Q.prototype.nodeType=f,r(Q,A),$.prototype.serializeToString=function(t,e,n){return J.call(t,e,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case o:case y:var n=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&n.push(t(e)),e=e.nextSibling;return n.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),et=function(t,e,n){t["$$"+e]=n}}}catch(t){}e.DOMImplementation=L,e.XMLSerializer=$},function(t,e,n){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(t,e){t.exports=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])}},function(t,e,n){var r=n(45),i=n(128),o=n(96),a=n(75),s=n(129),u=n(36),c=n(130),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),c)try{return l(t,e)}catch(t){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(32);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(45),i=n(30),o=n(131);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(21),i=n(32),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e,n){var r=n(78);t.exports=r("native-function-to-string",Function.toString)},function(t,e,n){var r=n(21),i=n(132),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i.call(o))},function(t,e,n){var r=n(36),i=n(75),o=n(269).indexOf,a=n(79);t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(30),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==c||n!=u&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,n){"use strict";var r=n(103).forEach,i=n(140);t.exports=i("forEach")?function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(t,e,n){var r=n(139);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){"use strict";var r=n(30);t.exports=function(t,e){var n=[][t];return!n||!r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(33),i=n(279),o=n(102),a=n(79),s=n(280),u=n(131),c=n(99)("IE_PROTO"),l=function(){},f=function(){var t,e=u("iframe"),n=o.length;for(e.style.display="none",s.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;n--;)delete f.prototype[o[n]];return f()};t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=r(t),n=new l,l.prototype=null,n[c]=t):n=f(),void 0===e?n:i(n,e)},a[c]=!0},function(t,e,n){var r=n(134),i=n(102);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(42),i=n(281),o=n(146),a=n(147),s=n(104),u=n(37),c=n(59),l=n(28),f=n(97),h=n(67),p=n(145),d=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,m=l("iterator"),v=function(){return this};t.exports=function(t,e,n,l,p,g,b){i(n,e,l);var _,w,T,S=function(t){if(t===p&&P)return P;if(!y&&t in O)return O[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",k=!1,O=t.prototype,C=O[m]||O["@@iterator"]||p&&O[p],P=!y&&C||S(p),x="Array"==e&&O.entries||C;if(x&&(_=o(x.call(new t)),d!==Object.prototype&&_.next&&(f||o(_)===d||(a?a(_,d):"function"!=typeof _[m]&&u(_,m,v)),s(_,E,!0,!0),f&&(h[E]=v))),"values"==p&&C&&"values"!==C.name&&(k=!0,P=function(){return C.call(this)}),f&&!b||O[m]===P||u(O,m,P),h[e]=P,p)if(w={values:S("values"),keys:g?P:S("keys"),entries:S("entries")},b)for(T in w)(y||k||!(T in O))&&c(O,T,w[T]);else r({target:e,proto:!0,forced:y||k},w);return w}},function(t,e,n){"use strict";var r,i,o,a=n(146),s=n(37),u=n(36),c=n(28),l=n(97),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(t,e,n){var r=n(36),i=n(66),o=n(99),a=n(282),s=o("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(33),i=n(283);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var r=n(77),i=n(28)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){var r=n(80),i=n(57),o=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,n){var r=n(59);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(33),i=n(290),o=n(60),a=n(138),s=n(291),u=n(292),c=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,f){var h,p,d,y,m,v,g,b=a(e,n,l?2:1);if(f)h=t;else{if("function"!=typeof(p=s(t)))throw TypeError("Target is not iterable");if(i(p)){for(d=0,y=o(t.length);y>d;d++)if((m=l?b(r(g=t[d])[0],g[1]):b(t[d]))&&m instanceof c)return m;return new c(!1)}h=p.call(t)}for(v=h.next;!(g=v.call(h)).done;)if("object"==typeof(m=u(h,b,g.value,l))&&m&&m instanceof c)return m;return new c(!1)}).stop=function(t){return new c(!0,t)}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){"use strict";var r=n(37),i=n(59),o=n(30),a=n(28),s=n(106),u=a("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var h=a(t),p=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),d=p&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!p||!d||"replace"===t&&!c||"split"===t&&!l){var y=/./[h],m=n(h,""[t],(function(t,e,n,r,i){return e.exec===s?p&&!i?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),v=m[0],g=m[1];i(String.prototype,t,v),i(RegExp.prototype,h,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},function(t,e,n){"use strict";var r=n(150).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(77),i=n(106);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){},function(t,e,n){"use strict";var r,i,o,a,s,u,c,l,f,h,p,d,y,m,v,g,b,_,w,T,S,E,k,O,C,P,x,L;n.d(e,"k",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"h",(function(){return o})),n.d(e,"l",(function(){return a})),n.d(e,"i",(function(){return y})),n.d(e,"a",(function(){return m})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return E})),n.d(e,"c",(function(){return C})),n.d(e,"e",(function(){return P})),n.d(e,"j",(function(){return x})),n.d(e,"d",(function(){return L})),function(t){t.Stream="cv_product_stream",t.WebPlayerStream="cv_product_webplayer_stream",t.StreamProgress="cv_product_stream_progress",t.Login="cv_product_login",t.LoginSsoRedirect="cv_product_login_sso_redirect",t.LoginFailed="cv_product_login_failed",t.Search="cv_product_search",t.InstantSearch="cv_product_instant_search",t.SearchEmptyResult="cv_product_search_empty_result",t.Filter="cv_product_search_filter",t.SearchLanding="cv_product_search_landing",t.Share="cv_product_share",t.Unshare="cv_product_unshare",t.WorkspaceAdd="cv_product_tv_add",t.Rename="cv_product_rename",t.Move="cv_product_move",t.Sort="cv_product_sort",t.Create="cv_product_create",t.Delete="cv_product_delete",t.Associate="cv_product_associate",t.Dissociate="cv_product_dissociate",t.Edit="cv_product_edit",t.Approve="cv_product_approve",t.Reject="cv_product_reject",t.Disable="cv_product_disable",t.Upload="cv_product_upload",t.Download="cv_product_download",t.Navigate="cv_product_navigate",t.Click="cv_product_click",t.Suggest="cv_product_suggest",t.EditAssoc="cv_product_edit_assoc",t.Play="cv_product_play",t.Favourite="cv_product_favourite",t.Follow="cv_product_follow",t.Prefer="cv_product_prefer",t.Print="cv_product_print",t.Copy="cv_product_copy",t.Activate="cv_product_activate",t.VerifyEmail="cv_product_verify_email",t.ChangePassword="cv_product_change_password",t.ManageGroup="cv_product_manage_group",t.Export="cv_product_export",t.SendEmail="cv_product_send_email",t.Publish="cv_product_publish",t.Answer="cv_product_submit",t.Complete="cv_product_complete",t.Archive="cv_product_archive",t.Promote="cv_product_promote",t.Demote="cv_product_demote",t.SetAccess="cv_product_set_access",t.AddToLocalCache="cv_product_add_to_lc",t.ResolveWarning="cv_product_resolve_warning",t.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(t){t.Folder="folder",t.Video="video",t.Rating="rating",t.Series="series",t.Library="library",t.Resource="resource",t.Tag="tag",t.Subtitle="subtitle",t.Chapter="chapter",t.Restriction="restriction",t.Interactive="interactive",t.Interaction="interaction",t.PDF="pdf",t.CustomerSetting="customer_setting",t.UserSetting="user_setting",t.StaffRequest="staff_request",t.Logo="logo",t.Pagination="pagination",t.Thumbnail="thumbnail",t.Banner="banner",t.Link="link",t.Playlist="playlist",t.Playlists="playlists",t.Person="person",t.Company="company",t.Classroom="classroom",t.ClassroomGroup="classroom_group",t.Classification="classification",t.ShareLink="share_link",t.DirectShare="direct_share",t.Upload="upload",t.SearchResults="search_results",t.Audience="audience",t.User="user",t.Clip="clip",t.UserChannel="user_channel",t.Widget="widget",t.Url="url",t.SocialShare="social_share",t.Presentation="presentation"}(i||(i={})),function(t){t.TopNav="top_nav",t.LeftNav="left_nav",t.Popup="popup",t.Banner="banner",t.VideoList="video_list",t.VideoListItem="video_list_item",t.VideoListHeader="video_header",t.VideoThumbnail="video_thumbnail",t.ExpandableVideoThumbnail="expandable_video_thumbnail",t.VideoItemPreview="video_item_preview",t.VideoDetails="video_details",t.VideoDetailsHeader="video_details_header",t.EditVideoDetails="edit_video_details",t.EditVideoChapters="edit_video_chapters",t.EditVideoResources="edit_video_resources",t.VideoUpload="video_upload",t.VideoRequest="video_request",t.Pagination="pagination",t.LibraryHeader="library_header",t.LibraryTiles="library_tiles",t.StaffRequestDetails="staff_request_details",t.SubFolderList="sub_folder_list",t.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",t.AwaitingReviewVideoItem="awaiting_review_video_item",t.PastReleasesHeader="past_releases_header",t.MigrationWarnings="migration_warnings",t.PlaylistListHeader="playlist_list_header",t.PlaylistListItem="playlist_list_item",t.SeriesListItem="series_list_item",t.SearchBar="search_bar",t.InstantSearch="instant_search",t.SearchFilters="search_filters",t.FeaturedSeriesSearchResult="featured_series_search_result",t.StaffManager="staff_manager",t.StaffManagerListItem="staff_manager_list_item",t.StudentManager="student_manager",t.StudentManagerListItem="student_manager_list_item",t.EditUser="edit_user",t.Classroom="classroom",t.ClassroomsList="classrooms_list",t.ClassroomsListItem="classrooms_list_item",t.ManageClassroomStudents="manage_classroom_students",t.ManageClassroomStudentListItem="manage_classroom_student_list_item",t.ManageClassroomGroups="manage_classroom_groups",t.ManageClassroomGroupListItem="manage_classroom_group_list_item",t.ManageClassroomTeachers="manage_classroom_teachers",t.ManageClassroomTeacherListItem="manage_classroom_teachers_list_item",t.ArchivedClassrooms="archived_classrooms",t.PreviewInteractive="preview_interactive",t.PreviewSharedInteractive="preview_shared_interactive",t.PreviewInteractiveQuestions="preview_interactive_questions",t.EditInteractive="edit_interactive",t.EditInteractiveDetails="edit_interactive_details",t.PlaySharedInteractive="play_shared_interactive",t.PlayInteractive="play_interactive",t.InteractiveListItem="interactive_list_item",t.DeleteInteractive="delete_interactive",t.NewInteractive="new_interactive",t.CopyInteractive="copy_interactive",t.UnpublishInteractive="unpublish_interactive",t.ShareInteractive="share_interactive",t.PlayPage="play_page",t.Player="player",t.FloatingPlayer="floating_player",t.InteractivePlayer="interactive_player",t.EmbeddedPlayer="embedded_player",t.CreateClipPlayer="create_clip_player",t.PlayClip="play_clip",t.PlaySharedClip="play_shared_clip",t.ClipListItem="clip_list_item",t.ContentUpdatesClassificationBanner="content_updates_classification_banner",t.PreferencesSettings="preferences_settings",t.TopicsOnboarding="topics_onboarding",t.MyUploads="my_uploads",t.SlidingList="sliding_list",t.HeroBannerItem="hero_banner_item",t.SlidingListItem="sliding_list_item",t.ClassificationListItem="classification_list_item",t.ClassificationComingSoon="classification_coming_soon",t.ClassificationHero="classification_hero",t.Dashboard="dashboard",t.ProductBanner="product_banner",t.UserOptions="user_options",t.Settings="settings",t.StudentFeed="student_feed",t.SharedByMe="shared_by_me",t.SharedWithMe="shared_with_me",t.TopVideos="top_videos",t.VideoViewsList="video_views_list",t.LiteUpgradeFeedbackPopup="lite_upgrade_feedback_popup",t.LiteUpgradeBanner="lite_upgrade_banner",t.LiteUpgradeOnboarding="lite_upgrade_onboarding"}(o||(o={})),function(t){t.Start="start",t.Complete="complete",t.Save="save",t.Discard="discard"}(a||(a={})),function(t){t.PageLoad="page_load"}(s||(s={})),function(t){t.Single="single",t.Bulk="bulk",t.All="all"}(u||(u={})),function(t){t.Publish="publish",t.Unpublish="unpublish"}(c||(c={})),function(t){t.ActivateUser="activate_user",t.VerifyEmail="verify_email"}(l||(l={})),function(t){t.ProductionYear="production_year",t.Alphabetical="alphabetical"}(f||(f={})),function(t){t.Content="content",t.Quality="quality",t.Duration="duration",t.Reset="reset"}(h||(h={})),function(t){t.Submit="submit",t.ShowAll="show_all",t.Recent="recent",t.SearchIcon="search_icon"}(p||(p={})),function(t){t.Start="start",t.Finish="finish",t.Terminate="terminate",t.Play="play",t.Pause="pause",t.Playback="playback",t.NextChapter="next_chapter",t.PreviousChapter="previous_chapter",t.FullScreenEnter="full_screen_enter",t.FullScreenExit="full_screen_exit"}(d||(d={})),function(t){t.Embedded="embedded"}(y||(y={})),function(t){t.TogglePreview="toggle_preview",t.NavigateHome="navigate_home",t.OpenInStaffView="open_in_staff_view",t.Title="title",t.ToggleHideValidListings="toggle_hide_valid_listings",t.LaunchImmersiveReader="launch_immersive_reader",t.CopyEmbedHtml="copy_embed_html",t.Close="close",t.Open="open",t.Button="button",t.Link="link",t.Tile="tile",t.Thumbnail="thumbnail",t.Cover="cover",t.TallPoster="tall_poster",t.Slide="slide",t.ExternalLink="external_link",t.ViewStudentWorkspace="view_student_workspace"}(m||(m={})),function(t){t.FeatureUserChannelVideo="feature_user_channel_video",t.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",t.ShareClip="share_clip",t.ViewOriginalVideo="view_original_video",t.ShareInteractive="share_interactive",t.DeleteInteractiveVideo="delete_interactive_video",t.CopyInteractiveVideo="copy_interactive_video",t.EditInteractiveVideo="edit_interactive_video",t.PrintAsWorksheet="print_as_worksheet",t.PreviewInteractiveVideo="preview_interactive_video",t.ViewResults="view_results",t.ViewUsage="view_usage",t.MoveToAnotherFolder="move_to_another_folder",t.CreateInteractiveVideo="create_interactive_video",t.ShareVideo="share_video",t.EditVideo="edit_video",t.DownloadVideo="download_video",t.AddToExchange="add_to_exchange",t.AddToUserChannel="add_to_user_channel",t.CreateClip="create_clip",t.FlagVideo="flag_video",t.AddToLibrary="add_to_library",t.AddToWorkspace="add_to_workspace",t.AddToPlaylist="add_to_playlist",t.RemoveFromPlaylist="remove_from_playlist",t.AddCurriculumLink="add_curriculum_link",t.ViewCurriculumLinks="view_curriculum_links",t.OpenInCurator="open_in_curator",t.ManageVideoAccess="manage_video_access",t.Approve="approve",t.AddToLocalCache="add_to_local_cache",t.OpenInLibraryEditor="open_in_library_editor",t.PlayClip="play_clip",t.EditClip="edit_clip",t.DeleteClip="delete_clip",t.EditVideoDetails="edit_video_details",t.DeleteVideo="delete_video"}(v||(v={})),function(t){t.Remove="remove"}(g||(g={})),function(t){t.LibraryReview="library_review"}(b||(b={})),function(t){t.FileSelect="file_select",t.DragDrop="drag_drop"}(_||(_={})),function(t){t.Edit="edit"}(w||(w={})),function(t){t.Image="image",t.User="user",t.Playlist="playlist",t.Link="link",t.Avatar="avatar",t.Clip="clip",t.Interactive="interactive",t.Classroom="classroom"}(T||(T={})),function(t){t.On="on",t.Off="off"}(S||(S={})),function(t){t.ContinueSession="continue_session",t.NewSession="new_session"}(E||(E={})),function(t){t.DirectShare="direct_share",t.CopyLink="copy_link",t.CopyEmbedHtml="copy_embed_html",t.PluginEmbed="plugin_embed"}(k||(k={})),function(t){t.GoToOnline="go_to_online",t.Feedback="feedback"}(O||(O={})),function(t){t.EntityRemoved="cv_entity_removed",t.ValueUpdated="cv_value_updated"}(C||(C={})),function(t){t.FileSelect="file_select",t.DragDrop="drag_drop"}(P||(P={})),function(t){t.Video="videos",t.Folder="categories",t.Series="series",t.Tags="tags",t.Subjects="subjects"}(x||(x={})),function(t){t[t.V1=1]="V1",t[t.V2=2]="V2"}(L||(L={}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},,,,,,,,function(t,e){t.exports=function(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]}},function(t,e,n){var r=n(95),i=n(242);function o(e,n,a){return i()?(t.exports=o=Reflect.construct.bind(),t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=o=function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},t.exports.__esModule=!0,t.exports.default=t.exports),o.apply(null,arguments)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(95);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){function r(t){this.options=t||{locator:{}}}function i(){this.cdata=!1}function o(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function a(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function s(t,e,n){return"string"==typeof t?t.substr(e,n):t.length>=e+n||e?new java.lang.String(t,e,n)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}r.prototype.parseFromString=function(t,e){var n=this.options,r=new c,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,l=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(t,e,n){if(!t){if(e instanceof i)return e;t=e}var r={},o=t instanceof Function;function s(e){var i=t[e];!i&&o&&(i=2==t.length?function(n){t(e,n)}:t),r[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(e)&&(f.nbsp=" ",f.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",t?r.parse(t,l,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var i=this.doc,a=i.createElementNS(t,n||e),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var c=0;c<s;c++){t=r.getURI(c);var l=r.getValue(c),f=(n=r.getQName(c),i.createAttributeNS(t,n));this.locator&&o(r.getLocator(c),f),f.value=f.nodeValue=l,a.setAttributeNode(f)}},endElement:function(t,e,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var n=this.doc.createProcessingInstruction(t,e);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(t,e,n){},characters:function(t,e,n){if(t=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(t);else r=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(t)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,n){t=s.apply(this,arguments);var r=this.doc.createComment(t);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(t,e,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(t){console.warn("[xmldom warning]\t"+t,a(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,a(this.locator))},fatalError:function(t){throw console.error("[xmldom fatalError]\t"+t,a(this.locator)),t}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){i.prototype[t]=function(){return null}}));var c=n(247).XMLReader,l=e.DOMImplementation=n(124).DOMImplementation;e.XMLSerializer=n(124).XMLSerializer,e.DOMParser=r},function(t,e){var n=Math.pow(2,32);t.exports=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=e.getUint32(i),r.firstOffset=e.getUint32(i+4),i+=8):(r.earliestPresentationTime=e.getUint32(i)*n+e.getUint32(i+4),r.firstOffset=e.getUint32(i+8)*n+e.getUint32(i+12),i+=16),i+=2;var o=e.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&t[i])>>>7,referencedSize:2147483647&e.getUint32(i),subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(128&t[i+8]),sapType:(112&t[i+8])>>>4,sapDeltaTime:268435455&e.getUint32(i+8)});return r}},function(t,e,n){"use strict";var r=n(125),i=n(248).handleRollover,o={};o.ts=n(250),o.aac=n(251);var a=n(51).ONE_SECOND_IN_TS,s=function(t,e,n){for(var r,i,a,s,u=0,c=188,l=!1;c<=t.byteLength;)if(71!==t[u]||71!==t[c]&&c!==t.byteLength)u++,c++;else{switch(r=t.subarray(u,c),o.ts.parseType(r,e.pid)){case"pes":i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;u+=188,c+=188}for(u=(c=t.byteLength)-188,l=!1;u>=0;)if(71!==t[u]||71!==t[c]&&c!==t.byteLength)u--,c--;else{switch(r=t.subarray(u,c),o.ts.parseType(r,e.pid)){case"pes":i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;u-=188,c-=188}},u=function(t,e,n){for(var r,i,a,s,u,c,l,f=0,h=188,p=!1,d={data:[],size:0};h<t.byteLength;)if(71!==t[f]||71!==t[h])f++,h++;else{switch(r=t.subarray(f,h),o.ts.parseType(r,e.pid)){case"pes":if(i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!p&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),p=!0),!n.firstKeyFrame)){if(a&&0!==d.size){for(u=new Uint8Array(d.size),c=0;d.data.length;)l=d.data.shift(),u.set(l,c),c+=l.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}d.size=0}d.data.push(r),d.size+=r.byteLength}}if(p&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=t.byteLength)-188,p=!1;f>=0;)if(71!==t[f]||71!==t[h])f--,h--;else{switch(r=t.subarray(f,h),o.ts.parseType(r,e.pid)){case"pes":i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),p=!0)}if(p)break;f-=188,h-=188}},c=function(t){var e={pid:null,table:null},n={};for(var i in function(t,e){for(var n,r=0,i=188;i<t.byteLength;)if(71!==t[r]||71!==t[i])r++,i++;else{switch(n=t.subarray(r,i),o.ts.parseType(n,e.pid)){case"pat":e.pid||(e.pid=o.ts.parsePat(n));break;case"pmt":e.table||(e.table=o.ts.parsePmt(n))}if(e.pid&&e.table)return;r+=188,i+=188}}(t,e),e.table){if(e.table.hasOwnProperty(i))switch(e.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(t,e,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(t,e,n),0===n.audio.length&&delete n.audio}}return n};t.exports={inspect:function(t,e){var n;return(n=o.aac.isLikelyAacData(t)?function(t){for(var e,n=!1,r=0,i=null,s=null,u=0,c=0;t.length-c>=3;){switch(o.aac.parseType(t,c)){case"timed-metadata":if(t.length-c<10){n=!0;break}if((u=o.aac.parseId3TagSize(t,c))>t.length){n=!0;break}null===s&&(e=t.subarray(c,c+u),s=o.aac.parseAacTimestamp(e)),c+=u;break;case"audio":if(t.length-c<7){n=!0;break}if((u=o.aac.parseAdtsSize(t,c))>t.length){n=!0;break}null===i&&(e=t.subarray(c,c+u),i=o.aac.parseSampleRate(e)),r++,c+=u;break;default:c++}if(n)return null}if(null===i||null===s)return null;var l=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*l,pts:s+1024*r*l}]}}(t):c(t))&&(n.audio||n.video)?(function(t,e){if(t.audio&&t.audio.length){var n=e;void 0===n&&(n=t.audio[0].dts),t.audio.forEach((function(t){t.dts=i(t.dts,n),t.pts=i(t.pts,n),t.dtsTime=t.dts/a,t.ptsTime=t.pts/a}))}if(t.video&&t.video.length){var r=e;if(void 0===r&&(r=t.video[0].dts),t.video.forEach((function(t){t.dts=i(t.dts,r),t.pts=i(t.pts,r),t.dtsTime=t.dts/a,t.ptsTime=t.pts/a})),t.firstKeyFrame){var o=t.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,e),n):null},parseAudioPes_:s}},function(t){t.exports=JSON.parse('{"a":"1.1.3"}')},function(t,e,n){t.exports=function(){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)},e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(t,e,n,r){var i,o,a,s=e||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<t.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=t[i]<<8*(c+r*(a%4));return{value:s,binLen:8*t.length+n}}function r(t,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,e,n){return function(t,e,n,r){var i,o,a,s;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var u=e||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<t.length;i+=2){if(o=parseInt(t.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+c)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(l+r*(s%4))}return{value:u,binLen:4*t.length+n}}(t,e,n,i)};case"TEXT":return function(t,e,n){return function(t,e,n,r,i){var o,a,s,u,c,l,f,h,p=0,d=n||[0],y=(r=r||0)>>>3;if("UTF8"===e)for(f=-1===i?3:0,s=0;s<t.length;s+=1)for(a=[],128>(o=t.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(c=(l=p+y)>>>2;d.length<=c;)d.push(0);d[c]|=a[u]<<8*(f+i*(l%4)),p+=1}else for(f=-1===i?2:0,h="UTF16LE"===e&&1!==i||"UTF16LE"!==e&&1===i,s=0;s<t.length;s+=1){for(o=t.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),c=(l=p+y)>>>2;d.length<=c;)d.push(0);d[c]|=o<<8*(f+i*(l%4)),p+=2}return{value:d,binLen:8*p+r}}(t,r,e,n,i)};case"B64":return function(t,n,r){return function(t,n,r,i){var o,a,s,u,c,l,f=0,h=n||[0],p=(r=r||0)>>>3,d=-1===i?3:0,y=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==y&&y<t.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<t.length;o+=4){for(u=t.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=e.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(c=(l=f+p)>>>2;h.length<=c;)h.push(0);h[c]|=(s>>>16-8*a&255)<<8*(d+i*(l%4)),f+=1}}return{value:h,binLen:8*f+r}}(t,n,r,i)};case"BYTES":return function(t,e,n){return function(t,e,n,r){var i,o,a,s,u=e||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(o=0;o<t.length;o+=1)i=t.charCodeAt(o),a=(s=o+c)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(l+r*(s%4));return{value:u,binLen:8*t.length+n}}(t,e,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t,e,r){return function(t,e,r,i){return n(new Uint8Array(t),e,r,i)}(t,e,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t,e,r){return n(t,e,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(t,n,r,i){switch(t){case"HEX":return function(t){return function(t,e,n,r){var i,o,a="",s=e/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=t[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(t,n,r,i)};case"B64":return function(t){return function(t,n,r,i){var o,a,s,u,c,l="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?t[o+1>>>2]:0,c=o+2<f?t[o+2>>>2]:0,s=(t[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|c>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)l+=8*o+6*a<=n?e.charAt(s>>>6*(3-a)&63):i.b64Pad;return l}(t,n,r,i)};case"BYTES":return function(t){return function(t,e,n){var r,i,o="",a=e/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=t[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(t,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t){return function(t,e,n){var r,i=e/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=t[r>>>2]>>>8*(s+n*(r%4))&255;return o}(t,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t){return function(t,e,n){var r,i=e/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=t[r>>>2]>>>8*(o+n*(r%4))&255;return a}(t,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(t){var e={outputUpper:!1,b64Pad:"=",outputLen:-1},n=t||{},r="Output length must be a multiple of 8";if(e.outputUpper=n.outputUpper||!1,n.b64Pad&&(e.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);e.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);e.outputLen=n.shakeLen}if("boolean"!=typeof e.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof e.b64Pad)throw new Error("Invalid b64Pad formatting option");return e}function a(t,e){return t<<e|t>>>32-e}function s(t,e,n){return t^e^n}function u(t,e,n){return t&e^t&n^e&n}function c(t,e){var n=(65535&t)+(65535&e);return(65535&(t>>>16)+(e>>>16)+(n>>>16))<<16|65535&n}function l(t,e,n,r,i){var o=(65535&t)+(65535&e)+(65535&n)+(65535&r)+(65535&i);return(65535&(t>>>16)+(e>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(t){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(t,e){var n,r,i,o,f,h,p,d,y=[];for(n=e[0],r=e[1],i=e[2],o=e[3],f=e[4],p=0;p<80;p+=1)y[p]=p<16?t[p]:a(y[p-3]^y[p-8]^y[p-14]^y[p-16],1),h=p<20?l(a(n,5),(d=r)&i^~d&o,f,1518500249,y[p]):p<40?l(a(n,5),s(r,i,o),f,1859775393,y[p]):p<60?l(a(n,5),u(r,i,o),f,2400959708,y[p]):l(a(n,5),s(r,i,o),f,3395469782,y[p]),f=o,o=i,i=a(r,30),r=n,n=h;return e[0]=c(n,e[0]),e[1]=c(r,e[1]),e[2]=c(i,e[2]),e[3]=c(o,e[3]),e[4]=c(f,e[4]),e}function p(t,e,n,r){for(var i,o=15+(e+65>>>9<<4),a=e+n;t.length<=o;)t.push(0);for(t[e>>>5]|=128<<24-e%32,t[o]=4294967295&a,t[o-1]=a/4294967296|0,i=0;i<t.length;i+=16)r=h(t.slice(i,i+16),r);return r}return function(e){function n(t,n,i){var o=this;if("SHA-1"!==t)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=e.call(this,t,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(t){return t.slice()},o.l=f,o.R=p,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(t,e,n,i){var o="hmacKey must include a value and format";if(!e)throw new Error(o);if(void 0===e.value||!e.format)throw new Error(o);return r(e.format,e.encoding||"UTF8",n)(e.value)}(0,a.hmacKey,o.u)),o}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(function(){function t(t,e,n){var r=n||{};if(this.h=e,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=t,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return t.prototype.update=function(t){var e,n=0,r=this.T>>>5,i=this.s(t,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(e=0;e<s;e+=r)n+this.T<=o&&(this.U=this.A(a.slice(e,e+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},t.prototype.getHash=function(t,e){var n,r,a=this.m,s=o(e);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(t,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},t.prototype.setHMACKey=function(t,e,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(e,(n||{}).encoding||"UTF8",this.u);this.B(i(t))},t.prototype.B=function(t){var e,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<t.binLen/8&&(t.value=this.R(t.value,t.binLen,0,this.l(this.g),this.m));t.value.length<=r;)t.value.push(0);for(e=0;e<=r;e+=1)this.N[e]=909522486^t.value[e],this.S[e]=1549556828^t.value[e];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},t.prototype.getHMAC=function(t,e){var n=o(e);return i(t,this.m,this.u,n)(this.o())},t.prototype.o=function(){var t;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var e=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return t=this.A(this.S,this.l(this.g)),this.R(e,this.m,this.T,t,this.m)},t}())}()},function(t){t.exports=JSON.parse('{"a":"1.1.3"}')},function(t,e,n){"use strict";var r=n(1),i=n(83),o=n.n(i);function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function t(e){var n=this;if(r.a.browser.IS_IE8)for(var i in n=o.a.createElement("custom"),t.prototype)"constructor"!==i&&(n[i]=t.prototype[i]);return n.id=e.id,n.label=n.id,n.width=e.width,n.height=e.height,n.bitrate=e.bandwidth,n.enabled_=e.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(t){n.enabled_(t)}}),n},u=function(t){
20
+ /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i;e.simpleTypeFromSourceType=function(t){return r.test(t)?"hls":i.test(t)?"dash":"application/vnd.videojs.vhs+json"===t?"vhs-json":null}},function(t,e,n){"use strict";var r,i,o,a,s,u,c=n(74).toUnsigned,l=n(74).toHexString,f=n(252),h=n(126),p=n(253),d=n(254),y=n(256);r=function(t){return f(t,["moov","trak"]).reduce((function(t,e){var n,r,i,o,a;return(n=f(e,["tkhd"])[0])?(r=n[0],o=c(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=f(e,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,t[o]=c(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),t):null):null}),{})},i=function(t,e){var n,r,i;return n=f(e,["moof","traf"]),r=[].concat.apply([],n.map((function(e){return f(e,["tfhd"]).map((function(n){var r,i,o;return r=c(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=t[r]||9e4,(o="number"!=typeof(o=f(e,["tfdt"]).map((function(t){var e,n;return e=t[0],n=c(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(n*=Math.pow(2,32),n+=c(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),n}))[0])||isNaN(o)?1/0:o)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},o=function(t,e){var n,r=f(e,["moof","traf"]),i=0,o=0;if(r&&r.length){var a=f(r[0],["tfhd"])[0],s=f(r[0],["trun"])[0],u=f(r[0],["tfdt"])[0];if(a)n=p(a).trackId;if(u)i=y(u).baseMediaDecodeTime;if(s){var c=d(s);c.samples&&c.samples.length&&(o=c.samples[0].compositionTimeOffset||0)}}return(i+o)/(t[n]||9e4)},a=function(t){var e=f(t,["moov","trak"]),n=[];return e.forEach((function(t){var e=f(t,["mdia","hdlr"]),r=f(t,["tkhd"]);e.forEach((function(t,e){var i,o,a=h(t.subarray(8,12)),s=r[e];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n},u=function(t){var e=0===t[0]?12:20;return c(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])},s=function(t){var e=f(t,["moov","trak"]),n=[];return e.forEach((function(t){var e,r,i={},o=f(t,["tkhd"])[0];o&&(r=(e=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?e.getUint32(12):e.getUint32(20));var a=f(t,["mdia","hdlr"])[0];if(a){var s=h(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var c=f(t,["mdia","minf","stbl","stsd"])[0];if(c){var p=c.subarray(8);i.codec=h(p.subarray(4,8));var d,y=f(p,[i.codec])[0];y&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(d=y.subarray(78),"avcC"===h(d.subarray(4,8))&&d.length>11?(i.codec+=".",i.codec+=l(d[9]),i.codec+=l(d[10]),i.codec+=l(d[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(d=y.subarray(28),"esds"===h(d.subarray(4,8))&&d.length>20&&0!==d[19]?(i.codec+="."+l(d[19]),i.codec+="."+l(d[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var m=f(t,["mdia","mdhd"])[0];m&&(i.timescale=u(m)),n.push(i)})),n},t.exports={findBox:f,parseType:h,timescale:r,startTime:i,compositionStartTime:o,videoTrackIds:a,tracks:s,getTimescaleFromMediaHeader:u}},,function(t,e,n){"use strict";var r=n(75),i=n(278),o=n(67),a=n(65),s=n(144),u=a.set,c=a.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},,,,,function(t,e){function n(t,e){for(var n in t)e[n]=t[n]}function r(t,e){var r=t.prototype;if(Object.create){var i=Object.create(e.prototype);r.__proto__=i}if(!(r instanceof e)){function o(){}o.prototype=e.prototype,n(r,o=new o),t.prototype=r=o}r.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),r.constructor=t)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,c=i.ENTITY_REFERENCE_NODE=5,l=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,p=i.DOCUMENT_NODE=9,d=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,v={},g={},b=(v.INDEX_SIZE_ERR=(g[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(g[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(g[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(g[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(g[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(g[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(g[7]="No modification allowed",7),v.NOT_FOUND_ERR=(g[8]="Not found",8)),w=(v.NOT_SUPPORTED_ERR=(g[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(g[10]="Attribute in use",10));v.INVALID_STATE_ERR=(g[11]="Invalid state",11),v.SYNTAX_ERR=(g[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(g[13]="Invalid modification",13),v.NAMESPACE_ERR=(g[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(g[15]="Invalid access",15);function T(t,e){if(e instanceof Error)var n=e;else n=this,Error.call(this,g[t]),this.message=g[t],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=t,e&&(this.message=this.message+": "+e),n}function S(){}function E(t,e){this._node=t,this._refresh=e,k(this)}function k(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);et(t,"length",r.length),n(r,t),t._inc=e}}function O(){}function C(t,e){for(var n=t.length;n--;)if(t[n]===e)return n}function P(t,e,n,r){if(r?e[C(e,r)]=n:e[e.length++]=n,t){n.ownerElement=t;var i=t.ownerDocument;i&&(r&&D(i,t,r),function(t,e,n){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(e._nsMap[n.prefix?n.localName:""]=n.value)}(i,t,n))}}function x(t,e,n){var r=C(e,n);if(!(r>=0))throw T(_,new Error(t.tagName+"@"+n));for(var i=e.length-1;r<i;)e[r]=e[++r];if(e.length=i,t){var o=t.ownerDocument;o&&(D(o,t,n),n.ownerElement=null)}}function L(t){if(this._features={},t)for(var e in t)this._features=t[e]}function A(){}function I(t){return("<"==t?"&lt;":">"==t&&"&gt;")||"&"==t&&"&amp;"||'"'==t&&"&quot;"||"&#"+t.charCodeAt()+";"}function j(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(j(t,e))return!0}while(t=t.nextSibling)}function R(){}function D(t,e,n,r){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete e._nsMap[n.prefix?n.localName:""]}function M(t,e,n){if(t&&t._inc){t._inc++;var r=e.childNodes;if(n)r[r.length++]=n;else{for(var i=e.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function N(t,e){var n=e.previousSibling,r=e.nextSibling;return n?n.nextSibling=r:t.firstChild=r,r?r.previousSibling=n:t.lastChild=n,M(t.ownerDocument,t),e}function B(t,e,n){var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===y){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var a=n?n.previousSibling:t.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:t.firstChild=i,null==n?t.lastChild=o:n.previousSibling=o;do{i.parentNode=t}while(i!==o&&(i=i.nextSibling));return M(t.ownerDocument||t,t),e.nodeType==y&&(e.firstChild=e.lastChild=null),e}function U(){this._nsMap={}}function F(){}function V(){}function H(){}function q(){}function W(){}function z(){}function G(){}function Y(){}function X(){}function K(){}function Q(){}function $(){}function J(t,e){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return tt(this,n,t,e,a),n.join("")}function Z(t,e,n){var r=t.prefix||"",i=t.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function tt(t,e,n,r,i){if(r){if(!(t=r(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case o:i||(i=[]);i.length;var l=t.attributes,m=l.length,v=t.firstChild,g=t.tagName;n="http://www.w3.org/1999/xhtml"===t.namespaceURI||n,e.push("<",g);for(var b=0;b<m;b++){"xmlns"==(_=l.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=l.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";e.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}tt(_,e,n,r,i)}if(Z(t,0,i)){w=t.prefix||"",T=t.namespaceURI,S=w?" xmlns:"+w:" xmlns";e.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(g)){if(e.push(">"),n&&/^script$/i.test(g))for(;v;)v.data?e.push(v.data):tt(v,e,n,r,i),v=v.nextSibling;else for(;v;)tt(v,e,n,r,i),v=v.nextSibling;e.push("</",g,">")}else e.push("/>");return;case p:case y:for(v=t.firstChild;v;)tt(v,e,n,r,i),v=v.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,I),'"');case s:return e.push(t.data.replace(/[<&]/g,I));case u:return e.push("<![CDATA[",t.data,"]]>");case h:return e.push("\x3c!--",t.data,"--\x3e");case d:var E=t.publicId,k=t.systemId;if(e.push("<!DOCTYPE ",t.name),E)e.push(' PUBLIC "',E),k&&"."!=k&&e.push('" "',k),e.push('">');else if(k&&"."!=k)e.push(' SYSTEM "',k,'">');else{var O=t.internalSubset;O&&e.push(" [",O,"]"),e.push(">")}return;case f:return e.push("<?",t.target," ",t.data,"?>");case c:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function et(t,e,n){t[e]=n}T.prototype=Error.prototype,n(v,T),S.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var n=[],r=0;r<this.length;r++)tt(this[r],n,t,e);return n.join("")}},E.prototype.item=function(t){return k(this),this[t]},r(E,S),O.prototype={length:0,item:S.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var n=this[e];if(n.nodeName==t)return n}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new T(w);var n=this.getNamedItem(t.nodeName);return P(this._ownerElement,this,t,n),n},setNamedItemNS:function(t){var e,n=t.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return e=this.getNamedItemNS(t.namespaceURI,t.localName),P(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return x(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var n=this.getNamedItemNS(t,e);return x(this._ownerElement,this,n),n},getNamedItemNS:function(t,e){for(var n=this.length;n--;){var r=this[n];if(r.localName==e&&r.namespaceURI==t)return r}return null}},L.prototype={hasFeature:function(t,e){var n=this._features[t.toLowerCase()];return!(!n||e&&!(e in n))},createDocument:function(t,e,n){var r=new R;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),e){var i=r.createElementNS(t,e);r.appendChild(i)}return r},createDocumentType:function(t,e,n){var r=new z;return r.name=t,r.nodeName=t,r.publicId=e,r.systemId=n,r}},A.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(t,e){return B(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return N(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=e,i.nodeType){case o:var c=n.attributes,l=i.attributes=new O,f=c.length;l._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(t(e,c.item(h),!0));break;case a:r=!0}if(r)for(var p=n.firstChild;p;)i.appendChild(t(e,p,r)),p=p.nextSibling;return i}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==s&&t.nodeType==s?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n)for(var r in n)if(n[r]==t)return r;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&t in n)return n[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},n(i,A),n(i,A.prototype),R.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==y){for(var n=t.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,e),n=r}return t}return null==this.documentElement&&t.nodeType==o&&(this.documentElement=t),B(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),N(this,t)},importNode:function(t,e){return function t(e,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=e;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=e,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(t(e,s,r)),s=s.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return j(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==t)return e=n,!0})),e},createElement:function(t){var e=new U;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new S,(e.attributes=new O)._ownerElement=e,e},createDocumentFragment:function(){var t=new K;return t.ownerDocument=this,t.childNodes=new S,t},createTextNode:function(t){var e=new H;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new q;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new W;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new Q;return n.ownerDocument=this,n.tagName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new F;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new X;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new U,r=e.split(":"),i=n.attributes=new O;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,i._ownerElement=n,n},createAttributeNS:function(t,e){var n=new F,r=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,n}},r(R,A),U.prototype={nodeType:o,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===y?this.insertBefore(t,null):function(t,e){var n=e.parentNode;if(n){var r=t.lastChild;n.removeChild(e);r=t.lastChild}return r=t.lastChild,e.parentNode=t,e.previousSibling=r,e.nextSibling=null,r?r.nextSibling=e:t.firstChild=e,t.lastChild=e,M(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new E(this,(function(e){var n=[];return j(e,(function(r){r===e||r.nodeType!=o||"*"!==t&&r.tagName!=t||n.push(r)})),n}))},getElementsByTagNameNS:function(t,e){return new E(this,(function(n){var r=[];return j(n,(function(i){i===n||i.nodeType!==o||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||r.push(i)})),r}))}},R.prototype.getElementsByTagName=U.prototype.getElementsByTagName,R.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,r(U,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(g[b])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){n=this.data.substring(0,t)+n+this.data.substring(t+e),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),q.prototype={nodeName:"#comment",nodeType:h},r(q,V),W.prototype={nodeName:"#cdata-section",nodeType:u},r(W,V),z.prototype.nodeType=d,r(z,A),G.prototype.nodeType=m,r(G,A),Y.prototype.nodeType=l,r(Y,A),X.prototype.nodeType=c,r(X,A),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=y,r(K,A),Q.prototype.nodeType=f,r(Q,A),$.prototype.serializeToString=function(t,e,n){return J.call(t,e,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case o:case y:var n=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&n.push(t(e)),e=e.nextSibling;return n.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),et=function(t,e,n){t["$$"+e]=n}}}catch(t){}e.DOMImplementation=L,e.XMLSerializer=$},function(t,e,n){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(t,e){t.exports=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])}},function(t,e,n){var r=n(45),i=n(128),o=n(96),a=n(75),s=n(129),u=n(36),c=n(130),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),c)try{return l(t,e)}catch(t){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(32);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(45),i=n(30),o=n(131);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(21),i=n(32),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e,n){var r=n(78);t.exports=r("native-function-to-string",Function.toString)},function(t,e,n){var r=n(21),i=n(132),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i.call(o))},function(t,e,n){var r=n(36),i=n(75),o=n(269).indexOf,a=n(79);t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(30),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==c||n!=u&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,n){"use strict";var r=n(103).forEach,i=n(140);t.exports=i("forEach")?function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(t,e,n){var r=n(139);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){"use strict";var r=n(30);t.exports=function(t,e){var n=[][t];return!n||!r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(33),i=n(279),o=n(102),a=n(79),s=n(280),u=n(131),c=n(99)("IE_PROTO"),l=function(){},f=function(){var t,e=u("iframe"),n=o.length;for(e.style.display="none",s.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;n--;)delete f.prototype[o[n]];return f()};t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=r(t),n=new l,l.prototype=null,n[c]=t):n=f(),void 0===e?n:i(n,e)},a[c]=!0},function(t,e,n){var r=n(134),i=n(102);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(42),i=n(281),o=n(146),a=n(147),s=n(104),u=n(37),c=n(59),l=n(28),f=n(97),h=n(67),p=n(145),d=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,m=l("iterator"),v=function(){return this};t.exports=function(t,e,n,l,p,g,b){i(n,e,l);var _,w,T,S=function(t){if(t===p&&P)return P;if(!y&&t in O)return O[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",k=!1,O=t.prototype,C=O[m]||O["@@iterator"]||p&&O[p],P=!y&&C||S(p),x="Array"==e&&O.entries||C;if(x&&(_=o(x.call(new t)),d!==Object.prototype&&_.next&&(f||o(_)===d||(a?a(_,d):"function"!=typeof _[m]&&u(_,m,v)),s(_,E,!0,!0),f&&(h[E]=v))),"values"==p&&C&&"values"!==C.name&&(k=!0,P=function(){return C.call(this)}),f&&!b||O[m]===P||u(O,m,P),h[e]=P,p)if(w={values:S("values"),keys:g?P:S("keys"),entries:S("entries")},b)for(T in w)(y||k||!(T in O))&&c(O,T,w[T]);else r({target:e,proto:!0,forced:y||k},w);return w}},function(t,e,n){"use strict";var r,i,o,a=n(146),s=n(37),u=n(36),c=n(28),l=n(97),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(t,e,n){var r=n(36),i=n(66),o=n(99),a=n(282),s=o("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(33),i=n(283);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var r=n(77),i=n(28)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){var r=n(80),i=n(57),o=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,n){var r=n(59);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(33),i=n(290),o=n(60),a=n(138),s=n(291),u=n(292),c=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,f){var h,p,d,y,m,v,g,b=a(e,n,l?2:1);if(f)h=t;else{if("function"!=typeof(p=s(t)))throw TypeError("Target is not iterable");if(i(p)){for(d=0,y=o(t.length);y>d;d++)if((m=l?b(r(g=t[d])[0],g[1]):b(t[d]))&&m instanceof c)return m;return new c(!1)}h=p.call(t)}for(v=h.next;!(g=v.call(h)).done;)if("object"==typeof(m=u(h,b,g.value,l))&&m&&m instanceof c)return m;return new c(!1)}).stop=function(t){return new c(!0,t)}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){"use strict";var r=n(37),i=n(59),o=n(30),a=n(28),s=n(106),u=a("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var h=a(t),p=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),d=p&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return e=!0,null},n[h](""),!e}));if(!p||!d||"replace"===t&&!c||"split"===t&&!l){var y=/./[h],m=n(h,""[t],(function(t,e,n,r,i){return e.exec===s?p&&!i?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),v=m[0],g=m[1];i(String.prototype,t,v),i(RegExp.prototype,h,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},function(t,e,n){"use strict";var r=n(150).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(77),i=n(106);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){},function(t,e,n){"use strict";var r,i,o,a,s,u,c,l,f,h,p,d,y,m,v,g,b,_,w,T,S,E,k,O,C,P,x,L;n.d(e,"k",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"h",(function(){return o})),n.d(e,"l",(function(){return a})),n.d(e,"i",(function(){return y})),n.d(e,"a",(function(){return m})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return E})),n.d(e,"c",(function(){return C})),n.d(e,"e",(function(){return P})),n.d(e,"j",(function(){return x})),n.d(e,"d",(function(){return L})),function(t){t.Stream="cv_product_stream",t.WebPlayerStream="cv_product_webplayer_stream",t.StreamProgress="cv_product_stream_progress",t.Login="cv_product_login",t.LoginSsoRedirect="cv_product_login_sso_redirect",t.LoginFailed="cv_product_login_failed",t.Search="cv_product_search",t.InstantSearch="cv_product_instant_search",t.SearchEmptyResult="cv_product_search_empty_result",t.Filter="cv_product_search_filter",t.SearchLanding="cv_product_search_landing",t.Share="cv_product_share",t.Unshare="cv_product_unshare",t.WorkspaceAdd="cv_product_tv_add",t.Rename="cv_product_rename",t.Move="cv_product_move",t.Sort="cv_product_sort",t.Create="cv_product_create",t.Delete="cv_product_delete",t.Associate="cv_product_associate",t.Dissociate="cv_product_dissociate",t.Edit="cv_product_edit",t.Approve="cv_product_approve",t.Reject="cv_product_reject",t.Disable="cv_product_disable",t.Upload="cv_product_upload",t.Download="cv_product_download",t.Navigate="cv_product_navigate",t.Click="cv_product_click",t.Suggest="cv_product_suggest",t.EditAssoc="cv_product_edit_assoc",t.Play="cv_product_play",t.Favourite="cv_product_favourite",t.Follow="cv_product_follow",t.Prefer="cv_product_prefer",t.Print="cv_product_print",t.Copy="cv_product_copy",t.Activate="cv_product_activate",t.VerifyEmail="cv_product_verify_email",t.ChangePassword="cv_product_change_password",t.ManageGroup="cv_product_manage_group",t.Export="cv_product_export",t.SendEmail="cv_product_send_email",t.Publish="cv_product_publish",t.Answer="cv_product_submit",t.Complete="cv_product_complete",t.Archive="cv_product_archive",t.Promote="cv_product_promote",t.Demote="cv_product_demote",t.SetAccess="cv_product_set_access",t.AddToLocalCache="cv_product_add_to_lc",t.ResolveWarning="cv_product_resolve_warning",t.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(t){t.Folder="folder",t.Video="video",t.Rating="rating",t.Series="series",t.Library="library",t.Resource="resource",t.Tag="tag",t.Subtitle="subtitle",t.Chapter="chapter",t.Restriction="restriction",t.Interactive="interactive",t.Interaction="interaction",t.PDF="pdf",t.CustomerSetting="customer_setting",t.UserSetting="user_setting",t.StaffRequest="staff_request",t.Logo="logo",t.Pagination="pagination",t.Thumbnail="thumbnail",t.Banner="banner",t.Link="link",t.Playlist="playlist",t.Playlists="playlists",t.Person="person",t.Company="company",t.Classroom="classroom",t.ClassroomGroup="classroom_group",t.Classification="classification",t.ShareLink="share_link",t.DirectShare="direct_share",t.Upload="upload",t.SearchResults="search_results",t.Audience="audience",t.User="user",t.Clip="clip",t.UserChannel="user_channel",t.Widget="widget",t.Url="url",t.SocialShare="social_share",t.Presentation="presentation"}(i||(i={})),function(t){t.TopNav="top_nav",t.LeftNav="left_nav",t.Popup="popup",t.Banner="banner",t.VideoList="video_list",t.VideoListItem="video_list_item",t.VideoListHeader="video_header",t.VideoThumbnail="video_thumbnail",t.ExpandableVideoThumbnail="expandable_video_thumbnail",t.VideoItemPreview="video_item_preview",t.VideoDetails="video_details",t.VideoDetailsHeader="video_details_header",t.EditVideoDetails="edit_video_details",t.EditVideoChapters="edit_video_chapters",t.EditVideoResources="edit_video_resources",t.VideoUpload="video_upload",t.VideoRequest="video_request",t.Pagination="pagination",t.LibraryHeader="library_header",t.LibraryTiles="library_tiles",t.StaffRequestDetails="staff_request_details",t.SubFolderList="sub_folder_list",t.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",t.AwaitingReviewVideoItem="awaiting_review_video_item",t.PastReleasesHeader="past_releases_header",t.MigrationWarnings="migration_warnings",t.PlaylistListHeader="playlist_list_header",t.PlaylistListItem="playlist_list_item",t.SeriesListItem="series_list_item",t.SearchBar="search_bar",t.InstantSearch="instant_search",t.SearchFilters="search_filters",t.FeaturedSeriesSearchResult="featured_series_search_result",t.StaffManager="staff_manager",t.StaffManagerListItem="staff_manager_list_item",t.StudentManager="student_manager",t.StudentManagerListItem="student_manager_list_item",t.EditUser="edit_user",t.Classroom="classroom",t.ClassroomsList="classrooms_list",t.ClassroomsListItem="classrooms_list_item",t.ManageClassroomStudents="manage_classroom_students",t.ManageClassroomStudentListItem="manage_classroom_student_list_item",t.ManageClassroomGroups="manage_classroom_groups",t.ManageClassroomGroupListItem="manage_classroom_group_list_item",t.ManageClassroomTeachers="manage_classroom_teachers",t.ManageClassroomTeacherListItem="manage_classroom_teachers_list_item",t.ArchivedClassrooms="archived_classrooms",t.PreviewInteractive="preview_interactive",t.PreviewSharedInteractive="preview_shared_interactive",t.PreviewInteractiveQuestions="preview_interactive_questions",t.EditInteractive="edit_interactive",t.EditInteractiveDetails="edit_interactive_details",t.PlaySharedInteractive="play_shared_interactive",t.PlayInteractive="play_interactive",t.InteractiveListItem="interactive_list_item",t.DeleteInteractive="delete_interactive",t.NewInteractive="new_interactive",t.CopyInteractive="copy_interactive",t.UnpublishInteractive="unpublish_interactive",t.ShareInteractive="share_interactive",t.PlayPage="play_page",t.Player="player",t.FloatingPlayer="floating_player",t.InteractivePlayer="interactive_player",t.EmbeddedPlayer="embedded_player",t.CreateClipPlayer="create_clip_player",t.PlayClip="play_clip",t.PlaySharedClip="play_shared_clip",t.ClipListItem="clip_list_item",t.ContentUpdatesClassificationBanner="content_updates_classification_banner",t.PreferencesSettings="preferences_settings",t.TopicsOnboarding="topics_onboarding",t.MyUploads="my_uploads",t.SlidingList="sliding_list",t.HeroBannerItem="hero_banner_item",t.SlidingListItem="sliding_list_item",t.ClassificationListItem="classification_list_item",t.ClassificationComingSoon="classification_coming_soon",t.ClassificationHero="classification_hero",t.Dashboard="dashboard",t.ProductBanner="product_banner",t.UserOptions="user_options",t.Settings="settings",t.StudentFeed="student_feed",t.SharedByMe="shared_by_me",t.SharedWithMe="shared_with_me",t.TopVideos="top_videos",t.VideoViewsList="video_views_list",t.LiteUpgradeFeedbackPopup="lite_upgrade_feedback_popup",t.LiteUpgradeBanner="lite_upgrade_banner",t.LiteUpgradeOnboarding="lite_upgrade_onboarding"}(o||(o={})),function(t){t.Start="start",t.Complete="complete",t.Save="save",t.Discard="discard"}(a||(a={})),function(t){t.PageLoad="page_load"}(s||(s={})),function(t){t.Single="single",t.Bulk="bulk",t.All="all"}(u||(u={})),function(t){t.Publish="publish",t.Unpublish="unpublish"}(c||(c={})),function(t){t.ActivateUser="activate_user",t.VerifyEmail="verify_email",t.ResetPasswordEmail="reset_password"}(l||(l={})),function(t){t.ProductionYear="production_year",t.Alphabetical="alphabetical"}(f||(f={})),function(t){t.Content="content",t.Quality="quality",t.Duration="duration",t.Reset="reset"}(h||(h={})),function(t){t.Submit="submit",t.ShowAll="show_all",t.Recent="recent",t.SearchIcon="search_icon"}(p||(p={})),function(t){t.Start="start",t.Finish="finish",t.Terminate="terminate",t.Play="play",t.Pause="pause",t.Playback="playback",t.NextChapter="next_chapter",t.PreviousChapter="previous_chapter",t.FullScreenEnter="full_screen_enter",t.FullScreenExit="full_screen_exit"}(d||(d={})),function(t){t.Embedded="embedded"}(y||(y={})),function(t){t.TogglePreview="toggle_preview",t.NavigateHome="navigate_home",t.OpenInStaffView="open_in_staff_view",t.Title="title",t.ToggleHideValidListings="toggle_hide_valid_listings",t.LaunchImmersiveReader="launch_immersive_reader",t.CopyEmbedHtml="copy_embed_html",t.Close="close",t.Open="open",t.Button="button",t.Link="link",t.Tile="tile",t.Thumbnail="thumbnail",t.Cover="cover",t.TallPoster="tall_poster",t.Slide="slide",t.ExternalLink="external_link",t.ViewStudentWorkspace="view_student_workspace"}(m||(m={})),function(t){t.FeatureUserChannelVideo="feature_user_channel_video",t.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",t.ShareClip="share_clip",t.ViewOriginalVideo="view_original_video",t.ShareInteractive="share_interactive",t.DeleteInteractiveVideo="delete_interactive_video",t.CopyInteractiveVideo="copy_interactive_video",t.EditInteractiveVideo="edit_interactive_video",t.PrintAsWorksheet="print_as_worksheet",t.PreviewInteractiveVideo="preview_interactive_video",t.ViewResults="view_results",t.ViewUsage="view_usage",t.MoveToAnotherFolder="move_to_another_folder",t.CreateInteractiveVideo="create_interactive_video",t.ShareVideo="share_video",t.EditVideo="edit_video",t.DownloadVideo="download_video",t.AddToExchange="add_to_exchange",t.AddToUserChannel="add_to_user_channel",t.CreateClip="create_clip",t.FlagVideo="flag_video",t.AddToLibrary="add_to_library",t.AddToWorkspace="add_to_workspace",t.AddToPlaylist="add_to_playlist",t.RemoveFromPlaylist="remove_from_playlist",t.AddCurriculumLink="add_curriculum_link",t.ViewCurriculumLinks="view_curriculum_links",t.OpenInCurator="open_in_curator",t.ManageVideoAccess="manage_video_access",t.Approve="approve",t.AddToLocalCache="add_to_local_cache",t.OpenInLibraryEditor="open_in_library_editor",t.PlayClip="play_clip",t.EditClip="edit_clip",t.DeleteClip="delete_clip",t.EditVideoDetails="edit_video_details",t.DeleteVideo="delete_video"}(v||(v={})),function(t){t.Remove="remove"}(g||(g={})),function(t){t.LibraryReview="library_review"}(b||(b={})),function(t){t.FileSelect="file_select",t.DragDrop="drag_drop"}(_||(_={})),function(t){t.Edit="edit"}(w||(w={})),function(t){t.Image="image",t.User="user",t.Playlist="playlist",t.Link="link",t.Avatar="avatar",t.Clip="clip",t.Interactive="interactive",t.Classroom="classroom"}(T||(T={})),function(t){t.On="on",t.Off="off"}(S||(S={})),function(t){t.ContinueSession="continue_session",t.NewSession="new_session"}(E||(E={})),function(t){t.DirectShare="direct_share",t.CopyLink="copy_link",t.CopyEmbedHtml="copy_embed_html",t.PluginEmbed="plugin_embed"}(k||(k={})),function(t){t.GoToOnline="go_to_online",t.Feedback="feedback"}(O||(O={})),function(t){t.EntityRemoved="cv_entity_removed",t.ValueUpdated="cv_value_updated"}(C||(C={})),function(t){t.FileSelect="file_select",t.DragDrop="drag_drop"}(P||(P={})),function(t){t.Video="videos",t.Folder="categories",t.Series="series",t.Tags="tags",t.Subjects="subjects"}(x||(x={})),function(t){t[t.V1=1]="V1",t[t.V2=2]="V2"}(L||(L={}))},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},,,,,,,,function(t,e){t.exports=function(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]}},function(t,e,n){var r=n(95),i=n(242);function o(e,n,a){return i()?(t.exports=o=Reflect.construct.bind(),t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=o=function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},t.exports.__esModule=!0,t.exports.default=t.exports),o.apply(null,arguments)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(95);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){function r(t){this.options=t||{locator:{}}}function i(){this.cdata=!1}function o(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function a(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function s(t,e,n){return"string"==typeof t?t.substr(e,n):t.length>=e+n||e?new java.lang.String(t,e,n)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}r.prototype.parseFromString=function(t,e){var n=this.options,r=new c,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,l=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(t,e,n){if(!t){if(e instanceof i)return e;t=e}var r={},o=t instanceof Function;function s(e){var i=t[e];!i&&o&&(i=2==t.length?function(n){t(e,n)}:t),r[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(e)&&(f.nbsp=" ",f.copy="©",l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",t?r.parse(t,l,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var i=this.doc,a=i.createElementNS(t,n||e),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var c=0;c<s;c++){t=r.getURI(c);var l=r.getValue(c),f=(n=r.getQName(c),i.createAttributeNS(t,n));this.locator&&o(r.getLocator(c),f),f.value=f.nodeValue=l,a.setAttributeNode(f)}},endElement:function(t,e,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var n=this.doc.createProcessingInstruction(t,e);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(t,e,n){},characters:function(t,e,n){if(t=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(t);else r=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(t)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,n){t=s.apply(this,arguments);var r=this.doc.createComment(t);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(t,e,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(t){console.warn("[xmldom warning]\t"+t,a(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,a(this.locator))},fatalError:function(t){throw console.error("[xmldom fatalError]\t"+t,a(this.locator)),t}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){i.prototype[t]=function(){return null}}));var c=n(247).XMLReader,l=e.DOMImplementation=n(124).DOMImplementation;e.XMLSerializer=n(124).XMLSerializer,e.DOMParser=r},function(t,e){var n=Math.pow(2,32);t.exports=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=e.getUint32(i),r.firstOffset=e.getUint32(i+4),i+=8):(r.earliestPresentationTime=e.getUint32(i)*n+e.getUint32(i+4),r.firstOffset=e.getUint32(i+8)*n+e.getUint32(i+12),i+=16),i+=2;var o=e.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&t[i])>>>7,referencedSize:2147483647&e.getUint32(i),subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(128&t[i+8]),sapType:(112&t[i+8])>>>4,sapDeltaTime:268435455&e.getUint32(i+8)});return r}},function(t,e,n){"use strict";var r=n(125),i=n(248).handleRollover,o={};o.ts=n(250),o.aac=n(251);var a=n(51).ONE_SECOND_IN_TS,s=function(t,e,n){for(var r,i,a,s,u=0,c=188,l=!1;c<=t.byteLength;)if(71!==t[u]||71!==t[c]&&c!==t.byteLength)u++,c++;else{switch(r=t.subarray(u,c),o.ts.parseType(r,e.pid)){case"pes":i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;u+=188,c+=188}for(u=(c=t.byteLength)-188,l=!1;u>=0;)if(71!==t[u]||71!==t[c]&&c!==t.byteLength)u--,c--;else{switch(r=t.subarray(u,c),o.ts.parseType(r,e.pid)){case"pes":i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)}if(l)break;u-=188,c-=188}},u=function(t,e,n){for(var r,i,a,s,u,c,l,f=0,h=188,p=!1,d={data:[],size:0};h<t.byteLength;)if(71!==t[f]||71!==t[h])f++,h++;else{switch(r=t.subarray(f,h),o.ts.parseType(r,e.pid)){case"pes":if(i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!p&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),p=!0),!n.firstKeyFrame)){if(a&&0!==d.size){for(u=new Uint8Array(d.size),c=0;d.data.length;)l=d.data.shift(),u.set(l,c),c+=l.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}d.size=0}d.data.push(r),d.size+=r.byteLength}}if(p&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=t.byteLength)-188,p=!1;f>=0;)if(71!==t[f]||71!==t[h])f--,h--;else{switch(r=t.subarray(f,h),o.ts.parseType(r,e.pid)){case"pes":i=o.ts.parsePesType(r,e.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),p=!0)}if(p)break;f-=188,h-=188}},c=function(t){var e={pid:null,table:null},n={};for(var i in function(t,e){for(var n,r=0,i=188;i<t.byteLength;)if(71!==t[r]||71!==t[i])r++,i++;else{switch(n=t.subarray(r,i),o.ts.parseType(n,e.pid)){case"pat":e.pid||(e.pid=o.ts.parsePat(n));break;case"pmt":e.table||(e.table=o.ts.parsePmt(n))}if(e.pid&&e.table)return;r+=188,i+=188}}(t,e),e.table){if(e.table.hasOwnProperty(i))switch(e.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(t,e,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(t,e,n),0===n.audio.length&&delete n.audio}}return n};t.exports={inspect:function(t,e){var n;return(n=o.aac.isLikelyAacData(t)?function(t){for(var e,n=!1,r=0,i=null,s=null,u=0,c=0;t.length-c>=3;){switch(o.aac.parseType(t,c)){case"timed-metadata":if(t.length-c<10){n=!0;break}if((u=o.aac.parseId3TagSize(t,c))>t.length){n=!0;break}null===s&&(e=t.subarray(c,c+u),s=o.aac.parseAacTimestamp(e)),c+=u;break;case"audio":if(t.length-c<7){n=!0;break}if((u=o.aac.parseAdtsSize(t,c))>t.length){n=!0;break}null===i&&(e=t.subarray(c,c+u),i=o.aac.parseSampleRate(e)),r++,c+=u;break;default:c++}if(n)return null}if(null===i||null===s)return null;var l=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*l,pts:s+1024*r*l}]}}(t):c(t))&&(n.audio||n.video)?(function(t,e){if(t.audio&&t.audio.length){var n=e;void 0===n&&(n=t.audio[0].dts),t.audio.forEach((function(t){t.dts=i(t.dts,n),t.pts=i(t.pts,n),t.dtsTime=t.dts/a,t.ptsTime=t.pts/a}))}if(t.video&&t.video.length){var r=e;if(void 0===r&&(r=t.video[0].dts),t.video.forEach((function(t){t.dts=i(t.dts,r),t.pts=i(t.pts,r),t.dtsTime=t.dts/a,t.ptsTime=t.pts/a})),t.firstKeyFrame){var o=t.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,e),n):null},parseAudioPes_:s}},function(t){t.exports=JSON.parse('{"a":"1.1.4-dev.0"}')},function(t,e,n){t.exports=function(){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)},e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(t,e,n,r){var i,o,a,s=e||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<t.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=t[i]<<8*(c+r*(a%4));return{value:s,binLen:8*t.length+n}}function r(t,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,e,n){return function(t,e,n,r){var i,o,a,s;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var u=e||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<t.length;i+=2){if(o=parseInt(t.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+c)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(l+r*(s%4))}return{value:u,binLen:4*t.length+n}}(t,e,n,i)};case"TEXT":return function(t,e,n){return function(t,e,n,r,i){var o,a,s,u,c,l,f,h,p=0,d=n||[0],y=(r=r||0)>>>3;if("UTF8"===e)for(f=-1===i?3:0,s=0;s<t.length;s+=1)for(a=[],128>(o=t.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(c=(l=p+y)>>>2;d.length<=c;)d.push(0);d[c]|=a[u]<<8*(f+i*(l%4)),p+=1}else for(f=-1===i?2:0,h="UTF16LE"===e&&1!==i||"UTF16LE"!==e&&1===i,s=0;s<t.length;s+=1){for(o=t.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),c=(l=p+y)>>>2;d.length<=c;)d.push(0);d[c]|=o<<8*(f+i*(l%4)),p+=2}return{value:d,binLen:8*p+r}}(t,r,e,n,i)};case"B64":return function(t,n,r){return function(t,n,r,i){var o,a,s,u,c,l,f=0,h=n||[0],p=(r=r||0)>>>3,d=-1===i?3:0,y=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==y&&y<t.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<t.length;o+=4){for(u=t.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=e.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(c=(l=f+p)>>>2;h.length<=c;)h.push(0);h[c]|=(s>>>16-8*a&255)<<8*(d+i*(l%4)),f+=1}}return{value:h,binLen:8*f+r}}(t,n,r,i)};case"BYTES":return function(t,e,n){return function(t,e,n,r){var i,o,a,s,u=e||[0],c=(n=n||0)>>>3,l=-1===r?3:0;for(o=0;o<t.length;o+=1)i=t.charCodeAt(o),a=(s=o+c)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(l+r*(s%4));return{value:u,binLen:8*t.length+n}}(t,e,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t,e,r){return function(t,e,r,i){return n(new Uint8Array(t),e,r,i)}(t,e,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t,e,r){return n(t,e,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(t,n,r,i){switch(t){case"HEX":return function(t){return function(t,e,n,r){var i,o,a="",s=e/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=t[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(t,n,r,i)};case"B64":return function(t){return function(t,n,r,i){var o,a,s,u,c,l="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?t[o+1>>>2]:0,c=o+2<f?t[o+2>>>2]:0,s=(t[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|c>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)l+=8*o+6*a<=n?e.charAt(s>>>6*(3-a)&63):i.b64Pad;return l}(t,n,r,i)};case"BYTES":return function(t){return function(t,e,n){var r,i,o="",a=e/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=t[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(t,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t){return function(t,e,n){var r,i=e/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=t[r>>>2]>>>8*(s+n*(r%4))&255;return o}(t,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t){return function(t,e,n){var r,i=e/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=t[r>>>2]>>>8*(o+n*(r%4))&255;return a}(t,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(t){var e={outputUpper:!1,b64Pad:"=",outputLen:-1},n=t||{},r="Output length must be a multiple of 8";if(e.outputUpper=n.outputUpper||!1,n.b64Pad&&(e.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);e.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);e.outputLen=n.shakeLen}if("boolean"!=typeof e.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof e.b64Pad)throw new Error("Invalid b64Pad formatting option");return e}function a(t,e){return t<<e|t>>>32-e}function s(t,e,n){return t^e^n}function u(t,e,n){return t&e^t&n^e&n}function c(t,e){var n=(65535&t)+(65535&e);return(65535&(t>>>16)+(e>>>16)+(n>>>16))<<16|65535&n}function l(t,e,n,r,i){var o=(65535&t)+(65535&e)+(65535&n)+(65535&r)+(65535&i);return(65535&(t>>>16)+(e>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(t){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(t,e){var n,r,i,o,f,h,p,d,y=[];for(n=e[0],r=e[1],i=e[2],o=e[3],f=e[4],p=0;p<80;p+=1)y[p]=p<16?t[p]:a(y[p-3]^y[p-8]^y[p-14]^y[p-16],1),h=p<20?l(a(n,5),(d=r)&i^~d&o,f,1518500249,y[p]):p<40?l(a(n,5),s(r,i,o),f,1859775393,y[p]):p<60?l(a(n,5),u(r,i,o),f,2400959708,y[p]):l(a(n,5),s(r,i,o),f,3395469782,y[p]),f=o,o=i,i=a(r,30),r=n,n=h;return e[0]=c(n,e[0]),e[1]=c(r,e[1]),e[2]=c(i,e[2]),e[3]=c(o,e[3]),e[4]=c(f,e[4]),e}function p(t,e,n,r){for(var i,o=15+(e+65>>>9<<4),a=e+n;t.length<=o;)t.push(0);for(t[e>>>5]|=128<<24-e%32,t[o]=4294967295&a,t[o-1]=a/4294967296|0,i=0;i<t.length;i+=16)r=h(t.slice(i,i+16),r);return r}return function(e){function n(t,n,i){var o=this;if("SHA-1"!==t)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=e.call(this,t,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(t){return t.slice()},o.l=f,o.R=p,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(t,e,n,i){var o="hmacKey must include a value and format";if(!e)throw new Error(o);if(void 0===e.value||!e.format)throw new Error(o);return r(e.format,e.encoding||"UTF8",n)(e.value)}(0,a.hmacKey,o.u)),o}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n}(function(){function t(t,e,n){var r=n||{};if(this.h=e,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=t,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return t.prototype.update=function(t){var e,n=0,r=this.T>>>5,i=this.s(t,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(e=0;e<s;e+=r)n+this.T<=o&&(this.U=this.A(a.slice(e,e+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},t.prototype.getHash=function(t,e){var n,r,a=this.m,s=o(e);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(t,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},t.prototype.setHMACKey=function(t,e,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(e,(n||{}).encoding||"UTF8",this.u);this.B(i(t))},t.prototype.B=function(t){var e,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<t.binLen/8&&(t.value=this.R(t.value,t.binLen,0,this.l(this.g),this.m));t.value.length<=r;)t.value.push(0);for(e=0;e<=r;e+=1)this.N[e]=909522486^t.value[e],this.S[e]=1549556828^t.value[e];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},t.prototype.getHMAC=function(t,e){var n=o(e);return i(t,this.m,this.u,n)(this.o())},t.prototype.o=function(){var t;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var e=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return t=this.A(this.S,this.l(this.g)),this.R(e,this.m,this.T,t,this.m)},t}())}()},function(t){t.exports=JSON.parse('{"a":"1.2.1-dev.0"}')},function(t,e,n){"use strict";var r=n(1),i=n(83),o=n.n(i);function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var s=function t(e){var n=this;if(r.a.browser.IS_IE8)for(var i in n=o.a.createElement("custom"),t.prototype)"constructor"!==i&&(n[i]=t.prototype[i]);return n.id=e.id,n.label=n.id,n.width=e.width,n.height=e.height,n.bitrate=e.bandwidth,n.enabled_=e.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(t){n.enabled_(t)}}),n},u=function(t){
21
21
  /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
22
- var e,n;function i(){var e,n=a(a(e=t.call(this)||this));if(r.a.browser.IS_IE8)for(var s in n=o.a.createElement("custom"),i.prototype)"constructor"!==s&&(n[s]=i.prototype[s]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||a(e)}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var u=i.prototype;return u.addQualityLevel=function(t){var e=this.getQualityLevelById(t.id);if(e)return e;var n=this.levels_.length;return e=new s(t),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(e),this.trigger({qualityLevel:e,type:"addqualitylevel"}),e},u.removeQualityLevel=function(t){for(var e=null,n=0,r=this.length;n<r;n++)if(this[n]===t){e=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return e&&this.trigger({qualityLevel:t,type:"removequalitylevel"}),e},u.getQualityLevelById=function(t){for(var e=0,n=this.length;e<n;e++){var r=this[e];if(r.id===t)return r}return null},u.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},i}(r.a.EventTarget);for(var c in u.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},u.prototype.allowedEvents_)u.prototype["on"+c]=null;var l=r.a.registerPlugin||r.a.plugin,f=function(t){return e=this,r.a.mergeOptions({},t),n=e.qualityLevels,i=new u,e.on("dispose",(function t(){i.dispose(),e.qualityLevels=n,e.off("dispose",t)})),e.qualityLevels=function(){return i},e.qualityLevels.VERSION="2.0.9",i;var e,n,i};l("qualityLevels",f),f.VERSION="2.0.9";var h=n(185),p=n(15);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _=r.a.getPlugin("plugin"),w="cvplayer-mute",T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(o,t);var e,n,r,i=v(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).player.ready((function(){return e.initialize()})),e}return e=o,(n=[{key:"initialize",value:function(){var t=this;if(this.player.options_.mobile)this.removeVolumeControl();else if(p.a.hasLocalStorage()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){t.player.off("volumechange",t.saveVolumeState)}));var e=p.a.get("cvplayer-volume"),n=p.a.get(w);e&&this.player.volume(+e),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){p.a.set("cvplayer-volume",this.player.volume().toString()),p.a.set(w,this.player.muted().toString())}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}}])&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(_);function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t,e){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=x(t);if(e){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return P(t)}function P(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("persistVolumePlugin",T);var L=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(o,t);var e,n,r,i=O(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).hasScreenOrientation()&&e.player.supportsFullScreen()?(e.onRotate=e.onRotate.bind(P(e)),e.onFullscreenChange=e.onFullscreenChange.bind(P(e)),e.player.ready((function(){return e.initialize()})),e):C(e)}return e=o,(n=[{key:"initialize",value:function(){var t=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",t.onRotate),t.hasScreenLock()&&t.player.off("fullscreenchange",t.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"hasScreenLock",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&E(e.prototype,n),r&&E(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("fullscreenOnRotatePlugin",L);var A="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";n(257);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(t,e){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B(t);if(e){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return M(this,n)}}function M(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return N(t)}function N(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var U=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&R(t,e)}(a,t);var e,n,i,o=D(a);function a(t,e){var n,r,i,s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).update=(r=n.update.bind(N(n)),i=1e3,s=window.performance.now(),function(){var t=window.performance.now();t-s>=i&&(r.apply(void 0,arguments),s=t)}),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return e=a,(n=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:A,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=r.a.dom.createEl("a",t,e);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&j(e.prototype,n),i&&j(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Button"));function F(t){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function V(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function H(t,e){return(H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function q(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=z(t);if(e){var i=z(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return W(this,n)}}function W(t,e){if(e&&("object"===F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function z(t){return(z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}U.prototype.controlText_="Open in ClickView",r.a.registerComponent("OpenExternallyButton",U);var G=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&H(t,e)}(o,t);var e,n,r,i=q(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=o,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),n=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&V(e.prototype,n),r&&V(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("openExternallyPlugin",G);n(258);function Y(t){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(){return(K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Q(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Q(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tt(t)););return t}function $(t,e){return($=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tt(t);if(e){var i=tt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(t,e){if(e&&("object"===Y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tt(t){return(tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var et=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(o,t);var e,n,r,i=J(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(K(tt(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return K(tt(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(t,e){var n=this,r=t>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&X(e.prototype,n),r&&X(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("component"));function nt(t){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function it(){return(it="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ot(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ot(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ct(t)););return t}function at(t,e){return(at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function st(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ct(t);if(e){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ut(this,n)}}function ut(t,e){if(e&&("object"===nt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ct(t){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("TouchControls",et);var lt=r.a.getPlugin("plugin"),ft=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&at(t,e)}(o,t);var e,n,r,i=st(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).doubleTouchCount=0,e.seekStartTime=0,e.directionModifier=0,e.bindFunctions(),e.player.ready((function(){return e.initialize()})),e}return e=o,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"dispose",value:function(){it(ct(o.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),n=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&rt(e.prototype,n),r&&rt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(lt);function ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}r.a.registerPlugin("touchControls",ft);var pt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n.id,this.plugin=e,this.source=n,this.enabled=this.enabled.bind(this)}var e,n,r;return e=t,(n=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&ht(e.prototype,n),r&&ht(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dt(t){return(dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mt(t,e){return(mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=bt(t);if(e){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gt(this,n)}}function gt(t,e){if(e&&("object"===dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function bt(t){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _t=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)}(o,t);var e,n,r,i=vt(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).options_=e,n.player.ready((function(){return n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,n=this.getSourceById(t);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.playbackRate();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(o),e.player.currentTime()!==r&&e.player.currentTime(r),i&&e.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new pt(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),t.default&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,n=-1,r=0;r<e.length;r++)if(e[r].id===t.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}}])&&yt(e.prototype,n),r&&yt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));function wt(t){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Tt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==wt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}r.a.registerPlugin("progressiveFiles",_t);var Et=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},kt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)}var e,n,r;return e=t,(n=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return Et(this,void 0,void 0,Tt().mark((function t(){var e,n,r,i;return Tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,n=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return r=t.sent,t.next=9,r.text();case 9:return i=t.sent,clearTimeout(n),t.abrupt("return","PONG"===i);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})))}}])&&St(e.prototype,n),r&&St(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ct=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var n=t.getQualityLevelById(e);if(n||(n=this.getNextBestQuality(t,e)),!n)return null;for(var r=0;r<t.length;r++){var i=t[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(t,e){var n=this.getKnownProfiles(),r=n.indexOf(e);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=t.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],c=t.getQualityLevelById(u);if(c)return c}}return null}}],(n=null)&&Ot(e.prototype,n),r&&Ot(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pt(t){return(Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Pt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Lt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var At=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},It=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=r.a.log.createLogger("localcache")}var e,n,i;return e=t,(n=[{key:"setSource",value:function(t,e){return At(this,void 0,void 0,xt().mark((function n(){var r;return xt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),t.src=r.getUrl(t.src));case 5:e(null,t);case 6:case"end":return n.stop()}}),n,this)})))}}])&&Lt(e.prototype,n),i&&Lt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.a.use("*",(function(t){return new It(t)}));n(259);function jt(t){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Rt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==jt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mt(){return(Mt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Nt(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Nt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ht(t)););return t}function Bt(t,e){return(Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ht(t);if(e){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ft(this,n)}}function Ft(t,e){if(e&&("object"===jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vt(t)}function Vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ht(t){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Wt='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',zt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bt(t,e)}(o,t);var e,n,r,i=Ut(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Vt(n)),t.ready((function(){n.initialize()})),n}return e=o,(n=[{key:"createEl",value:function(){return Mt(Ht(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Wt,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return qt(this,void 0,void 0,Rt().mark((function t(){return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})))}}])&&Dt(e.prototype,n),r&&Dt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function Gt(t){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Yt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Gt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Xt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kt(){return(Kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Qt(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Qt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ee(t)););return t}function $t(t,e){return($t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ee(t);if(e){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zt(this,n)}}function Zt(t,e){if(e&&("object"===Gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return te(t)}function te(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ee(t){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("localCacheIndicator",zt);var ne=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$t(t,e)}(a,t);var e,n,i,o=Jt(a);function a(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t)).logger_=r.a.log.createLogger("localcache"),void 0===e)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(te(n)),n.localCaches_=e.localCacheAddresses.map((function(t){return new kt(t)})),n.player.ready((function(){n.initialize(),e.enabled&&n.enable()})),n}return e=a,(n=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"dispose",value:function(){this.player.off("error",this.onPlayerError),Kt(ee(a.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var t;(null===(t=this.player.error())||void 0===t?void 0:t.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return ne(this,void 0,void 0,Yt().mark((function t(){var e,n,r,i=this;return Yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],n=function(t){return ne(i,void 0,void 0,Yt().mark((function n(){return Yt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.ping();case 2:if(!n.sent){n.next=4;break}e.push(t);case 4:case"end":return n.stop()}}),n)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return n(t)})));case 4:if(!(e.length>0)){t.next=8;break}return r=e[0],this.onLocalCacheChange(r),t.abrupt("return",r);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),Ct.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}])&&Xt(e.prototype,n),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getPlugin("plugin"));function ie(t){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ae(t,e){return(ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ce(t);if(e){var i=ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ue(this,n)}}function ue(t,e){if(e&&("object"===ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ce(t){return(ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("localCache",re);var le=r.a.getPlugin("plugin"),fe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ae(t,e)}(o,t);var e,n,r,i=se(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).options=e,n.initialize(),n}return e=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var t=!!this.options.showSubtitles,e=this.safeGet("cvplayer-show-subtitles");if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(t){if(p.a.hasLocalStorage())return p.a.get(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++){var n=t[e];if("showing"===n.mode)return p.a.set("cvplayer-show-subtitles","true"),void p.a.set("cvplayer-selected-language",n.language)}p.a.set("cvplayer-show-subtitles","false"),p.a.remove("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var t=this;p.a.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();p.a.set("cvplayer-subtitle-size",t)}},{key:"guessWhichTrack",value:function(){for(var t,e,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],c=this.getLanguageParts(u.language),l=c.language,f=c.country;if(l===i&&(t=u,f||(e=u),f===o))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}}])&&oe(e.prototype,n),r&&oe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(le);function he(t){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */pe=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==he(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function de(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ye(t,e){return(ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function me(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ge(t);if(e){var i=ge(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(t,e){if(e&&("object"===he(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ge(t){return(ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("persistSubtitleSettingsPlugin",fe);var be=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},_e=r.a.getPlugin("plugin"),we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(o,t);var e,n,r,i=me(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).options=e,n.player.ready((function(){return n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){return be(this,void 0,void 0,pe().mark((function t(){var e,n,r,i,o=this;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(n=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),p.a.hasLocalStorage()&&(r=p.a.get(this.getStorageKey(!!e)))&&(n=r),i=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||Ct.enableProfileOrNextBest(i,n),p.a.hasLocalStorage()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){return be(this,void 0,void 0,pe().mark((function t(){var e,n,r;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:e=t.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],p.a.set(this.getStorageKey(e),r.id);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"isLocalCacheActive",value:function(){return be(this,void 0,void 0,pe().mark((function t(){return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&de(e.prototype,n),r&&de(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(_e);r.a.registerPlugin("persistQualitySettingsPlugin",we);n(260);function Te(t){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Se(t){return function(t){if(Array.isArray(t))return Ee(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ee(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ke(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ce(t,e,n){return e&&Oe(t.prototype,e),n&&Oe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xe(t,e)}function xe(t,e){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Le(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ie(t);if(e){var i=Ie(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ae(this,n)}}function Ae(t,e){if(e&&("object"===Te(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ie(t){return(Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var je=r.a.getComponent("Component"),Re=function(t){Pe(n,t);var e=Le(n);function n(t,r){return ke(this,n),e.call(this,t,r)}return Ce(n,[{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),n=(t.end.time-t.start.time)/e;this.el_.style.width=100*n+"%";var r=t.start.time/e;this.el_.style.left=100*r+"%"}}]),n}(je),De=function(t){Pe(n,t);var e=Le(n);function n(){var t;return ke(this,n),(t=e.apply(this,arguments)).events_=[],t}return Ce(n,[{key:"update",value:function(){for(var t=this,e=this.children(),n=e.length;n>0;n--)this.removeChild(e[n]);this.events_.forEach((function(e){var n=new Re(t.player(),{event:e});t.addChild(n),n.update()}))}},{key:"addEvents",value:function(t){var e;(e=this.events_).push.apply(e,Se(t)),this.update()}},{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(je);function Me(t){return(Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Be(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ue(t,e){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=He(t);if(e){var i=He(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ve(this,n)}}function Ve(t,e){if(e&&("object"===Me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function He(t){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qe=r.a.getPlugin("plugin"),We="play",ze="playing",Ge="pause",Ye="seeking",Xe="seekstart",Ke="seekend",Qe="ended",$e="pausedseek",Je="timeupdate",Ze=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)}(o,t);var e,n,r,i=Fe(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=e,n.player.ready((function(){return n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t,e=this,n=(Ne(t={},We,(function(){return e.onPlay()})),Ne(t,Ge,(function(){return e.onPause()})),Ne(t,Je,(function(){return e.onTimeUpdate()})),Ne(t,Ye,(function(){return e.onSeeking()})),Ne(t,Qe,(function(){return e.onEnded()})),Ne(t,ze,(function(){return e.onPlaying()})),t),r=Object.keys(n);r.forEach((function(t){return e.player.on(t,n[t])})),this.one("dispose",(function(){r.forEach((function(t){return e.player.off(t,n[t])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,n=this,r="",i=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=e.key)&&n.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,e=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function s(){o=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",i);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",s),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=n.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",i),u.off("touchstart",a),u.off("touchend",s)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new De(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Ke),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(We)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(Ge),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(We)),this.isPlaying&&!this.isSeeking&&this.logEvent(ze)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent($e),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Xe))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Qe)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===Xe&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===ze||t===We)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===ze||t===Ge}},{key:"shouldClearCarriedOverTime",value:function(t){return t===Qe||t===$e}},{key:"flushBuffer",value:function(){for(var t,e,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===ze&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(n))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),e<n}}])&&Be(e.prototype,n),r&&Be(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(qe);r.a.registerPlugin("progressReporterPlugin",Ze);n(261);function tn(t){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function en(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rn(t,e){return(rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function on(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sn(t);if(e){var i=sn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return an(this,n)}}function an(t,e){if(e&&("object"===tn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sn(t){return(sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var un=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rn(t,e)}(a,t);var e,n,i,o=on(a);function a(){return en(this,a),o.apply(this,arguments)}return e=a,(n=[{key:"createEl",value:function(){return r.a.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&nn(e.prototype,n),i&&nn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component")),cn=["top","left","right","bottom"],ln={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(262);function fn(t){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dn(t,e,n){return e&&pn(t.prototype,e),n&&pn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function yn(){return(yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=mn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function mn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wn(t)););return t}function vn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gn(t,e)}function gn(t,e){return(gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wn(t);if(e){var i=wn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _n(this,n)}}function _n(t,e){if(e&&("object"===fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wn(t){return(wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tn=r.a.getComponent("Component"),Sn=function(t){vn(n,t);var e=bn(n);function n(t,r){var i;return hn(this,n),(i=e.call(this,t,r)).bindEventListeners(),i}return dn(n,[{key:"createEl",value:function(){return yn(wn(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},r=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},i=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",n),e.addEventListener("drop",r),e.addEventListener("dragleave",i),this.on("dispose",(function(){e.removeEventListener("dragover",n),e.removeEventListener("drop",r),e.removeEventListener("dragleave",i)}))}}]),n}(Tn),En=function(t){vn(n,t);var e=bn(n);function n(t,r){var i;return hn(this,n),(i=e.call(this,t,r)).addChildren(),i}return dn(n,[{key:"addChildren",value:function(){var t=this;cn.forEach((function(e){t.addChild(new Sn(t.player_,{side:e}))}))}}]),n}(Tn);function kn(t){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function On(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cn(){return(Cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Pn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Pn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=In(t)););return t}function xn(t,e){return(xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ln(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=In(t);if(e){var i=In(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return An(this,n)}}function An(t,e){if(e&&("object"===kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function In(t){return(In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xn(t,e)}(a,t);var e,n,i,o=Ln(a);function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"createEl",value:function(){return r.a.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var e=this;Cn(In(a.prototype),"handleClick",this).call(this,t),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&On(e.prototype,n),i&&On(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("MenuItem"));function Rn(t){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mn(t,e){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Nn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Un(t);if(e){var i=Un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bn(this,n)}}function Bn(t,e){if(e&&("object"===Rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Un(t){return(Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mn(t,e)}(o,t);var e,n,r,i=Nn(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Dn(e.prototype,n),r&&Dn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));function Vn(t){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wn(){return(Wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function zn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}function Gn(t,e){return(Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kn(t);if(e){var i=Kn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xn(this,n)}}function Xn(t,e){if(e&&("object"===Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kn(t){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qn=r.a.getComponent("MenuButton"),$n=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gn(t,e)}(o,t);var e,n,r,i=Yn(o);function o(){var t;return Hn(this,o),(t=i.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=o,(n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,n=[new jn(this.player_,{label:"Video Controls"})];return cn.forEach((function(r){n.push(new Fn(t.player_,{side:r,label:ln[r],selectable:!0,multiSelectable:!1,selected:r===e}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Wn(Kn(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ln[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Qn.prototype.handleClick.apply(this)}}])&&qn(e.prototype,n),r&&qn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Qn);n(263);function Jn(t){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tr(t,e){return(tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function er(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rr(t);if(e){var i=rr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nr(this,n)}}function nr(t,e){if(e&&("object"===Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rr(t){return(rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ir="cv-whiteboard-side",or=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tr(t,e)}(a,t);var e,n,i,o=er(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this,t)).side="bottom",e.player.ready((function(){e.initialize()})),e}return e=a,(n=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(p.a.hasLocalStorage()){var t=p.a.get(ir);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),n=new un(this.player);this.button=new $n(this.player),e.addChild(n),e.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){e.el().setAttribute("draggable","true")},i=function(){e.el().setAttribute("draggable","false")},o=function(e){t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle")},a=function(){t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),e.el().addEventListener("dragstart",o),e.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),e.el().removeEventListener("dragstart",o),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new En(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),p.a.hasLocalStorage()&&p.a.set(ir,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),r.a.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),r.a.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Zn(e.prototype,n),i&&Zn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getPlugin("plugin"));function ar(t){return(ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ur(t,e){return(ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function cr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fr(t);if(e){var i=fr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lr(this,n)}}function lr(t,e){if(e&&("object"===ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fr(t){return(fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("whiteboardModePlugin",or);var hr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ur(t,e)}(o,t);var e,n,r,i=cr(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r],o="showing"===i.mode;t.unshift({id:i.label,name:i.label,selected:o}),o&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];t.push({id:r.id,name:r.id+"p",selected:r.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&sr(e.prototype,n),r&&sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("deferMenusPlugin",hr);n(196),n(274);var pr=n(64),dr=n.n(pr),yr=(n(197),n(119),n(198),n(199),n(200),n(201),n(202),n(203),n(71)),mr=n.n(yr),vr=n(72),gr=n.n(vr),br=n(111),_r=n.n(br),wr=n(112),Tr=(n(204),n(205),n(206),n(207),n(208),null),Sr=null;function Er(){if(null===Tr){if("undefined"==typeof document)return Tr=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),Tr=n}return Tr}dr.a&&window.addEventListener("resize",(function(){Sr!==window.devicePixelRatio&&(Sr=window.devicePixelRatio,Tr=null)}));var kr=function(t){return Array.prototype.reduce.call(t,(function(t,e){var n=e.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t}),{})};function Or(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function Cr(t){return t&&t.ownerDocument?t.ownerDocument:document}var Pr=function(){function t(e,n){var r=this;this.onScroll=function(){var t=Or(r.el);r.scrollXTicking||(t.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(t.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(t){r.mouseX=t.clientX,r.mouseY=t.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(e=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(e||n)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(t,"x"):r.onTrackClick(t,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(t,"y"):r.onTrackClick(t,"y"))))},this.drag=function(e){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var u=(("y"===r.draggedAxis?e.pageY:e.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(t){var e=Cr(r.el),n=Or(r.el);t.preventDefault(),t.stopPropagation(),r.el.classList.remove(r.classNames.dragging),e.removeEventListener("mousemove",r.drag,!0),e.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){e.removeEventListener("click",r.preventClick,!0),e.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},n),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=mr()(this.recalculate.bind(this),64),this.onMouseMove=mr()(this.onMouseMove.bind(this),64),this.hideScrollbars=gr()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=gr()(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=_r()(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=e.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=t.getOffset(n),o=t.getOffset(r);n.scrollLeft=999;var a=t.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),n=Cr(t),r=Or(t);return{top:e.top+(r.pageYOffset||n.documentElement.scrollTop),left:e.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),dr.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),n=document.createElement("div");e.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),e.appendChild(n),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this,e=Or(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var n=!1,r=e.ResizeObserver||wr.a;this.resizeObserver=new r((function(){n&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=Or(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-l,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,n=this.contentEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=r/n;return e=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var n=this.contentWrapperEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,a=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],s=(a="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===e?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,n=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var n=Cr(this.el),r=Or(this.el),i=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-i.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var n=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var r=Or(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var i=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),a=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],s=("y"===e?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function t(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[e].offsetAttr]=a,i)),r.requestAnimationFrame(t)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[e].offsetAttr]=a,o)),r.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Er()}catch(t){return Er()}},e.removeListeners=function(){var t=this,e=Or(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return n.call(t,e)}))[0]},t}();Pr.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Pr.instances=new WeakMap,Pr.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Pr.instances.has(t)||new Pr(t,kr(t.attributes))}))},Pr.removeObserver=function(){this.globalObserver.disconnect()},Pr.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Pr.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},Pr.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Pr.instances.has(t)&&new Pr(t,kr(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Pr.instances.has(t)||new Pr(t,kr(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute('[data-simplebar="init"]')?Pr.instances.has(t)&&Pr.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Pr.instances.has(t)&&Pr.instances.get(t).unMount()})))}))}))},Pr.getOptions=kr,dr.a&&Pr.initHtmlApi();var xr=Pr;function Lr(t){return(Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ar(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ir(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function jr(){return(jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Rr(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Rr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Br(t)););return t}function Dr(t,e){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Br(t);if(e){var i=Br(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Nr(this,n)}}function Nr(t,e){if(e&&("object"===Lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Br(t){return(Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ur=r.a.getComponent("Menu"),Fr=Ur.prototype,Vr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dr(t,e)}(o,t);var e,n,r,i=Mr(o);function o(){return Ar(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"createEl",value:function(){var t=jr(Br(o.prototype),"createEl",this).call(this);return this.simpleBar=new xr(this.contentEl(),{autoHide:!1}),t}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():jr(Br(o.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),jr(Br(o.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(t){jr(Br(o.prototype),"addItem",this).call(this,t),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){jr(Br(o.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||Fr.handleBlur.call(this,t)}}])&&Ir(e.prototype,n),r&&Ir(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Ur);function Hr(t){return(Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zr(t,e){return(zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xr(t);if(e){var i=Xr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yr(this,n)}}function Yr(t,e){if(e&&("object"===Hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xr(t){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Ur.prototype=Vr.prototype,r.a.registerComponent("Menu",Vr);var Kr=r.a.getComponent("Component"),Qr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zr(t,e)}(a,t);var e,n,i,o=Gr(a);function a(){return qr(this,a),o.apply(this,arguments)}return e=a,(n=[{key:"createMenu",value:function(){var t,e=new Vr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=r.a.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var i=new Kr(this.player_,{el:n});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e}}])&&Wr(e.prototype,n),i&&Wr(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("MenuButton"));r.a.registerComponent("MenuButton",Qr);n(298);function $r(t){return($r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ti(){return(ti="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ei(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ei(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oi(t)););return t}function ni(t,e){return(ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ri(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=oi(t);if(e){var i=oi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ii(this,n)}}function ii(t,e){if(e&&("object"===$r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function oi(t){return(oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ai=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ni(t,e)}(o,t);var e,n,r,i=ri(o);function o(){return Jr(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(ti(oi(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return ti(oi(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&Zr(e.prototype,n),r&&Zr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));ai.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},r.a.registerComponent("TimeWrapper",ai);n(299);function si(t){return(si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ui(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ci(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function li(t,e,n){return e&&ci(t.prototype,e),n&&ci(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function fi(){return(fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=hi(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function hi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vi(t)););return t}function pi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&di(t,e)}function di(t,e){return(di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=vi(t);if(e){var i=vi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mi(this,n)}}function mi(t,e){if(e&&("object"===si(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vi(t){return(vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gi=function(t){pi(n,t);var e=yi(n);function n(t,r){return ui(this,n),e.call(this,t,r)}return li(n,[{key:"handleClick",value:function(t){var e=this;fi(vi(n.prototype),"handleClick",this).call(this,t),this.requestAnimationFrame((function(){e.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,e,i){if(!this.options_.item)return fi(vi(n.prototype),"createEl",this).call(this,t,e,i);var o=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),s='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=r.a.dom.createEl("span",{innerHTML:a});var u=fi(vi(n.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""),innerHTML:s},i);return u.appendChild(this.valueHolder_),u}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(r.a.getComponent("MenuItem")),bi=function(t){pi(n,t);var e=yi(n);function n(t,r){return ui(this,n),e.call(this,t,r)}return li(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(fi(vi(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(fi(vi(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),fi(vi(n.prototype),"pressButton",this).call(this))}},{key:"createItems",value:function(){for(var t,e=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&(i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new gi(this.player_,{item:i})))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var r,i=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(r=t.options)&&void 0!==r?r:{}));n.splice(t.index,0,i)})),n}},{key:"update",value:function(){fi(vi(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}]),n}(r.a.getComponent("MenuButton"));function _i(t){return(_i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wi(){return(wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ti(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ti(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Li(t)););return t}function Si(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ei(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ki(t,e,n){return e&&Ei(t.prototype,e),n&&Ei(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Oi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ci(t,e)}function Ci(t,e){return(Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Li(t);if(e){var i=Li(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xi(this,n)}}function xi(t,e){if(e&&("object"===_i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Li(t){return(Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("cogButton",bi);var Ai=r.a.getComponent("MenuItem"),Ii=r.a.getComponent("MenuButton"),ji=["large","medium","small"],Ri=function(t){Oi(n,t);var e=Pi(n);function n(t,r){return Si(this,n),e.call(this,t,r)}return ki(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(Ai),Di=function(t){Oi(n,t);var e=Pi(n);function n(t,r){var i;return Si(this,n),(i=e.call(this,t,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return ki(n,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var n=e.getSizeSetting(),r=[new jn(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return ji.map((function(e){r.push(new Ri(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===n,value:e}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(wi(Li(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ii.prototype.handleClick.apply(this)}}]),n}(Ii);r.a.registerComponent("SubtitleSizeButton",Di);var Mi=n(24);function Ni(t){return(Ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ui(t,e){return(Ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hi(t);if(e){var i=Hi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vi(this,n)}}function Vi(t,e){if(e&&("object"===Ni(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Hi(t){return(Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)}(o,t);var e,n,r,i=Fi(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"update",value:function(t,e){var n=this;if(null==t?void 0:t.length){var r=[],i=0;t.forEach((function(t){var o=n.options_.label.substr(i,t);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(t,e)),r.push("</span>"),i=t+e})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&Bi(e.prototype,n),r&&Bi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));function Wi(t){return(Wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gi(){return(Gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Yi(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Yi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ji(t)););return t}function Xi(t,e){return(Xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ki(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ji(t);if(e){var i=Ji(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qi(this,n)}}function Qi(t,e){if(e&&("object"===Wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $i(t)}function $i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ji(t){return(Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Zi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xi(t,e)}(o,t);var e,n,r,i=Ki(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).onChange=function(t,e,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=function(){r=null,c=null,n||t.apply(this,s)};!r&&n&&t.apply(i,s),o.clearTimeout(r),r=o.setTimeout(c,e)};return s.cancel=a,s}(n.onChange,100,!1,$i(n)),n.bindEventListeners(),n}return e=o,(n=[{key:"createEl",value:function(){return Gi(Ji(o.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.menuButton.search(e.value)}}])&&zi(e.prototype,n),r&&zi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));n(300);function to(t){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function no(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ro(t,e,n){return e&&no(t.prototype,e),n&&no(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function io(){return(io="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=oo(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function oo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fo(t)););return t}function ao(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&so(t,e)}function so(t,e){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function uo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fo(t);if(e){var i=fo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return co(this,n)}}function co(t,e){if(e&&("object"===to(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lo(t)}function lo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ho=r.a.getComponent("MenuItem"),po=r.a.getComponent("MenuButton"),yo=function(t){ao(n,t);var e=uo(n);function n(){return eo(this,n),e.apply(this,arguments)}return ro(n,[{key:"createEl",value:function(t,e,r){return io(fo(n.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(ho),mo=function(t){ao(n,t);var e=uo(n);function n(t,r){var i;return eo(this,n),(i=e.call(this,t,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(lo(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return ro(n,[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=Mi.a.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var n=[new Zi(this.player_,{menuButton:this})],r=0;r<e.cues.length;r++){var i=e.cues[r];n.push(new qi(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new yo(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var n=Mi.a.getCurrentTextTrack(this.player_);if(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length){var r=this.findMatches(t,n);this.toggleItemVisibility(t,r),this.toggleNoResults(t,r)}}},{key:"findMatches",value:function(t,e){var n={};if(!t)return n;for(var r=new RegExp(t,"gi"),i=0;i<e.cues.length;i++){for(var o=e.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!t||e[r]?n.show():n.hide(),n.update(e[r],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var n=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(io(fo(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){io(fo(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){io(fo(n.prototype),"pressButton",this).call(this);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){po.prototype.handleClick.apply(this)}}]),n}(po);r.a.registerComponent("subtitleSearchButton",mo);n(301);function vo(t){return(vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function go(){return(go="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=bo(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function bo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Co(t)););return t}function _o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function To(t,e,n){return e&&wo(t.prototype,e),n&&wo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function So(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eo(t,e)}function Eo(t,e){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ko(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Co(t);if(e){var i=Co(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oo(this,n)}}function Oo(t,e){if(e&&("object"===vo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Co(t){return(Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Po=r.a.getComponent("MenuItem"),xo=r.a.getComponent("MenuButton"),Lo=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],Ao=function(t){So(n,t);var e=ko(n);function n(t,r){return _o(this,n),e.call(this,t,r)}return To(n,[{key:"createEl",value:function(){return r.a.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}]),n}(Po),Io=function(t){So(n,t);var e=ko(n);function n(){var t;return _o(this,n),(t=e.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return To(n,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new jn(this.player_,{label:"Keyboard Shortcuts"})),Lo.forEach((function(n){e.push(new Ao(t.player_,n))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(go(Co(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){xo.prototype.handleClick.apply(this)}}]),n}(xo);r.a.registerComponent("KeyboardShortcutsButton",Io);n(302),n(303);function jo(t){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ro(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Do(){return(Do="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Mo(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Mo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vo(t)););return t}function No(t,e){return(No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Vo(t);if(e){var i=Vo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uo(this,n)}}function Uo(t,e){if(e&&("object"===jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fo(t)}function Fo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vo(t){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ho=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&No(t,e)}(o,t);var e,n,r,i=Bo(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(Fo(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return e=o,(n=[{key:"togglehidden",value:function(t){for(var e=0;e<this.children_.length;e++){var n=this.children_[e];n.isCollabsible&&(n.alwaysCollapsed||t?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.el().getBoundingClientRect();if(0!==t.width){this.addClass("cv-collapsorator-ready");var e=t.width<600;this.player_.options_.deferMenus&&(e=!0),this.togglehidden(e)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Do(Vo(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Do(Vo(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&Ro(e.prototype,n),r&&Ro(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function qo(t){return(qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Go(t,e){return(Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ko(t);if(e){var i=Ko(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xo(this,n)}}function Xo(t,e){if(e&&("object"===qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ko(t){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Ho.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},r.a.registerComponent("collapserator",Ho);var Qo=r.a.getComponent("SeekBar"),$o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Go(t,e)}(o,t);var e,n,r,i=Yo(o);function o(){return Wo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleMouseDown",value:function(t){Qo.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseMove",value:function(t){Qo.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Qo.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&zo(e.prototype,n),r&&zo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Qo);r.a.registerComponent("SeekBar",$o);var Jo=n(113);n(304);function Zo(t){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ta(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ea(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function na(){return(na="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ra(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ra(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=sa(t)););return t}function ia(t,e){return(ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function oa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sa(t);if(e){var i=sa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return aa(this,n)}}function aa(t,e){if(e&&("object"===Zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sa(t){return(sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ua=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ia(t,e)}(o,t);var e,n,r,i=oa(o);function o(){return ta(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(na(sa(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return na(sa(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered(Object(Jo.a)(t.player_))}))}}])&&ea(e.prototype,n),r&&ea(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function ca(t){return(ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function la(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ha(){return(ha="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=pa(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function pa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=va(t)););return t}function da(t,e){return(da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ya(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=va(t);if(e){var i=va(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ma(this,n)}}function ma(t,e){if(e&&("object"===ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function va(t){return(va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ga=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&da(t,e)}(o,t);var e,n,r,i=ya(o);function o(){return la(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(ha(va(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return ha(va(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&fa(e.prototype,n),r&&fa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function ba(t){return(ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ta(){return(Ta="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Sa(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Sa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ca(t)););return t}function Ea(t,e){return(Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ka(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ca(t);if(e){var i=Ca(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oa(this,n)}}function Oa(t,e){if(e&&("object"===ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ca(t){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ea(t,e)}(o,t);var e,n,r,i=ka(o);function o(){return _a(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Ta(Ca(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Ta(Ca(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&wa(e.prototype,n),r&&wa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function xa(t){return(xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function La(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Aa(){return(Aa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ia(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ia(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ma(t)););return t}function ja(t,e){return(ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ra(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ma(t);if(e){var i=Ma(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Da(this,n)}}function Da(t,e){if(e&&("object"===xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ma(t){return(Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Na=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ja(t,e)}(o,t);var e,n,r,i=Ra(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).playProgress=new Pa(n.player_),n.addChild(n.playProgress),n.loadProgress=new ga(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Aa(Ma(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Aa(Ma(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var n=e/t;this.el_.style.width=100*n+"%";var r=this.options_.startTime/t;this.el_.style.left=100*r+"%",this.duration_=t}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&La(e.prototype,n),r&&La(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function Ba(t){return(Ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fa(){return(Fa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Va(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Va(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ga(t)););return t}function Ha(t,e){return(Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ga(t);if(e){var i=Ga(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wa(this,n)}}function Wa(t,e){if(e&&("object"===Ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return za(t)}function za(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ga(t){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ha(t,e)}(a,t);var e,n,i,o=qa(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).onDurationChange=n.onDurationChange.bind(za(n)),n.createChapterItems=n.createChapterItems.bind(za(n)),n.updateBuffered=n.updateBuffered.bind(za(n)),Mi.a.useTrack(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return e=a,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Fa(Ga(a.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=Fa(Ga(a.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(t){var e,n;t&&(this.track_=t);var r=new ua(this.player_);if((null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var c=new Na(this.player_,{startTime:a,endTime:s});if(r.addChild(c),u&&s===u)break}else r.addChild(new Na(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&Ua(e.prototype,n),i&&Ua(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("SeekBar"));Ya.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},r.a.browser.IS_IOS||r.a.browser.IS_ANDROID||Ya.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),r.a.registerComponent("ChapterSeekBar",Ya);n(305);function Xa(t){return(Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ka(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $a(){return($a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ja(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ja(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ns(t)););return t}function Za(t,e){return(Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ts(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ns(t);if(e){var i=ns(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return es(this,n)}}function es(t,e){if(e&&("object"===Xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ns(t){return(ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rs=r.a.getComponent("ProgressControl"),is=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Za(t,e)}(o,t);var e,n,r,i=ts(o);function o(){var t;return Ka(this,o),(t=i.apply(this,arguments)).seekBarName_="seekBar",t}return e=o,(n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())==="seekBar".toLowerCase()&&(t=this.seekBarName_),$a(ns(o.prototype),"getChild",this).call(this,t)}}])&&Qa(e.prototype,n),r&&Qa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(rs);is.prototype.options_={children:[]},r.a.registerComponent("ProgressControl",is);var os=n(40);n(306);function as(t){return(as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ss(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function us(){return(us="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=cs(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function cs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ps(t)););return t}function ls(t,e){return(ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ps(t);if(e){var i=ps(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hs(this,n)}}function hs(t,e){if(e&&("object"===as(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ps(t){return(ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ls(t,e)}(a,t);var e,n,i,o=fs(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).hasCustomChapterText=!1,Mi.a.useTrack(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return e=a,(n=[{key:"createEl",value:function(){var t=us(ps(a.prototype),"createEl",this).call(this);return this.chapter_=r.a.dom.createEl("div"),t.appendChild(this.chapter_),this.time_=r.a.dom.createEl("div"),t.appendChild(this.time_),t}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(r.a.dom.textContent(this.time_,Object(os.a)(t,e)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var i=this.track_.cues[n],o=i.endTime||e;if(i.startTime<=t&&o>=t)return void r.a.dom.textContent(this.chapter_,i.text)}r.a.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,r.a.dom.textContent(this.chapter_,null!=t?t:"")}}])&&ss(e.prototype,n),i&&ss(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("TimeTooltip"));r.a.registerComponent("TimeTooltip",ds);n(307);function ys(t){return(ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ms(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vs(){return(vs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=gs(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function gs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ts(t)););return t}function bs(t,e){return(bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ts(t);if(e){var i=Ts(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ws(this,n)}}function ws(t,e){if(e&&("object"===ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ts(t){return(Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ss=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bs(t,e)}(a,t);var e,n,i,o=_s(a);function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t=vs(Ts(a.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=r.a.dom.createEl("img"),t.appendChild(this.img_),t}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var n=t.substr(0,e),r=t.substr(e+1);if("xywh="!==r.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,n;if(null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length){for(var r,i=t,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,c=s.w,l=s.h,f=s.x,h=s.y,p=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(p,")"),this.el_.style.width=c+"px",this.el_.style.height=l+"px"}else this.disable()}}}])&&ms(e.prototype,n),i&&ms(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));Ss.prototype.options_={scaleFactor:1},r.a.registerComponent("ThumbnailDisplay",Ss);n(308);function Es(t){return(Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ks(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Os(t,e){return(Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Cs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ls(t);if(e){var i=Ls(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ps(this,n)}}function Ps(t,e){if(e&&("object"===Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xs(t)}function xs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ls(t){return(Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var As=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(o,t);var e,n,r,i=Cs(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,t,e),Mi.a.useTrack(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(xs(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return e=o,(n=[{key:"update",value:function(t,e){var n=this;this.requestAnimationFrame((function(){var r=e*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=t.width*e;o<i.width/2?n.el_.style.left=i.width/2+"px":o>t.width-i.width/2?n.el_.style.left=t.width-i.width/2+"px":n.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass("cv-mouse-time-display-force-show")}},{key:"removeForceShow",value:function(){this.removeClass("cv-mouse-time-display-force-show")}}])&&ks(e.prototype,n),r&&ks(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MouseTimeDisplay"));As.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},r.a.registerComponent("MouseTimeDisplay",As);n(309);function Is(t){return(Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function js(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rs(){return(Rs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ds(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ds(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Us(t)););return t}function Ms(t,e){return(Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ns(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Us(t);if(e){var i=Us(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bs(this,n)}}function Bs(t,e){if(e&&("object"===Is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Us(t){return(Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fs=r.a.getComponent("ChaptersTrackMenuItem"),Vs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ms(t,e)}(o,t);var e,n,r,i=Ns(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).nonIconControl=!1,n.thumbnailDisplay=new Ss(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Mi.a.useTrack(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return e=o,(n=[{key:"update",value:function(){this.player_&&Fs.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,e,n){return this.nonIconControl=!0,Rs(Us(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},e),n)}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Object(os.a)(this.options_.cue.startTime,t),")</p>")+"</span>"}}])&&js(e.prototype,n),r&&js(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Fs);n(310);function Hs(t){return(Hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ws(){return(Ws="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zs(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function zs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qs(t)););return t}function Gs(t,e){return(Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ys(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Qs(t);if(e){var i=Qs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xs(this,n)}}function Xs(t,e){if(e&&("object"===Hs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ks(t)}function Ks(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qs(t){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gs(t,e)}(o,t);var e,n,r,i=Ys(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t,e,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Ks(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Ws(Qs(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Ws(Qs(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new Vs(this.player_,{track:this.track_,cue:i});t.push(o)}return t}},{key:"setTrack",value:function(t){var e=this;Ws(Qs(o.prototype),"setTrack",this).call(this,t),this.track_&&"chapters"===this.track_.kind&&t.one("loadeddata",(function(){e.update()}))}},{key:"update",value:function(t){Ws(Qs(o.prototype),"update",this).call(this,t)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&qs(e.prototype,n),r&&qs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("ChaptersButton"));function Js(t){return(Js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function eu(){return(eu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=nu(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function nu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=au(t)););return t}function ru(t,e){return(ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=au(t);if(e){var i=au(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ou(this,n)}}function ou(t,e){if(e&&("object"===Js(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function au(t){return(au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("ChaptersButton",$s);var su=r.a.getComponent("OffTextTrackMenuItem"),uu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ru(t,e)}(o,t);var e,n,r,i=iu(o);function o(){return Zs(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleClick",value:function(t){su.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,e,n){return eu(au(o.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},e),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&tu(e.prototype,n),r&&tu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(su);function cu(t){return(cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hu(t,e){return(hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yu(t);if(e){var i=yu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return du(this,n)}}function du(t,e){if(e&&("object"===cu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yu(t){return(yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("OffTextTrackMenuItem",uu);var mu=r.a.getComponent("TextTrackButton"),vu=r.a.getComponent("TextTrackMenuItem"),gu=r.a.getComponent("OffTextTrackMenuItem"),bu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hu(t,e)}(o,t);var e,n,r,i=pu(o);function o(){return lu(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vu;this.label_&&(t="".concat(this.label_," off")),e.push(new gu(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),e.push(a)}}return e}}])&&fu(e.prototype,n),r&&fu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(mu);function _u(t){return(_u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Su(t,e){return(Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Eu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ou(t);if(e){var i=Ou(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ku(this,n)}}function ku(t,e){if(e&&("object"===_u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ou(t){return(Ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("TextTrackButton",bu);var Cu=r.a.getComponent("SubsCapsMenuItem"),Pu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Su(t,e)}(o,t);var e,n,r,i=Eu(o);function o(){return wu(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleClick",value:function(t){Cu.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&Tu(e.prototype,n),r&&Tu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Cu);function xu(t){return(xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Au(t,e){return(Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Iu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ru(t);if(e){var i=Ru(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ju(this,n)}}function ju(t,e){if(e&&("object"===xu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ru(t){return(Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Du=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Au(t,e)}(o,t);var e,n,r,i=Iu(o);function o(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(e=i.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-divider-after-menu-item"),e.addClass("cv-subtitle-size-menu-item"),e.controlText(", opens subtitle size settings"),e}return e=o,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&Lu(e.prototype,n),r&&Lu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("TextTrackMenuItem"));function Mu(t){return(Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bu(t,e){return(Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Uu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hu(t);if(e){var i=Hu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fu(this,n)}}function Fu(t,e){if(e&&("object"===Mu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vu(t)}function Vu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hu(t){return(Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bu(t,e)}(o,t);var e,n,r,i=Uu(o);function o(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(e=i.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-subtitle-search-menu-item"),e.controlText(", opens subtitle search"),e.toggleEnabled=e.toggleEnabled.bind(Vu(e));var r=e.player_.textTracks();return r.addEventListener("selectedlanguagechange",e.toggleEnabled),e.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",e.toggleEnabled)})),e.toggleEnabled(),e}return e=o,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=Mi.a.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,n=Mi.a.getCurrentTextTrack(this.player_);(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&Nu(e.prototype,n),r&&Nu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("TextTrackMenuItem"));n(311);function Wu(t){return(Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yu(){return(Yu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Xu(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Xu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ju(t)););return t}function Ku(t,e){return(Ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Qu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ju(t);if(e){var i=Ju(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $u(this,n)}}function $u(t,e){if(e&&("object"===Wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ju(t){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Zu=r.a.getComponent("TextTrackButton"),tc=r.a.getComponent("SubsCapsButton"),ec=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ku(t,e)}(o,t);var e,n,r,i=Qu(o);function o(){var t;return zu(this,o),(t=i.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Yu(Ju(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new qu(this.player_)),t.push(new Du(this.player_)),this.hideThreshold_=this.hideThreshold_+2),Zu.prototype.createItems.call(this,t,Pu)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){tc.prototype.handleClick.apply(this)}}])&&Gu(e.prototype,n),r&&Gu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(tc);function nc(t){return(nc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rc(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */rc=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==nc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function ic(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oc(t,e){return(oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ac(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=cc(t);if(e){var i=cc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sc(this,n)}}function sc(t,e){if(e&&("object"===nc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return uc(t)}function uc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cc(t){return(cc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("SubsCapsButton",ec);var lc=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},fc="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Wt,"</span>"),hc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oc(t,e)}(o,t);var e,n,r,i=ac(o);function o(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).qualityId=e.qualityId;var r=t.qualityLevels(),a=n.handleQualityChange.bind(uc(n));return r.on("change",a),t.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(uc(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return e=o,(n=[{key:"handleLocalCacheChange",value:function(){return lc(this,void 0,void 0,rc().mark((function t(){var e,n;return rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(n=t.sent)?void 0:n.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+fc);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var n=t[e];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],n=e&&e.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&ic(e.prototype,n),r&&ic(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));n(312);function pc(t){return(pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yc(){return(yc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=mc(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function mc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wc(t)););return t}function vc(t,e){return(vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wc(t);if(e){var i=wc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bc(this,n)}}function bc(t,e){if(e&&("object"===pc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _c(t)}function _c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wc(t){return(wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tc={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Sc=r.a.getComponent("MenuButton"),Ec=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vc(t,e)}(o,t);var e,n,r,i=gc(o);function o(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(_c(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),t.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(yc(wc(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(yc(wc(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new jn(this.player_,{label:"Quality"}));for(var n=0;n<e.length;n++){var r=e[n];if(r){var i=Tc[r.id];i&&t.push(new hc(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?Tc[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Sc.prototype.handleClick.apply(this)}}])&&dc(e.prototype,n),r&&dc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Sc);r.a.registerComponent("QualityButton",Ec);n(313);function kc(t){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pc(){return(Pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=xc(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function xc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jc(t)););return t}function Lc(t,e){return(Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ac(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jc(t);if(e){var i=jc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ic(this,n)}}function Ic(t,e){if(e&&("object"===kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jc(t){return(jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rc=r.a.getComponent("Menu"),Dc=r.a.getComponent("MenuButton"),Mc=r.a.getComponent("PlaybackRateMenuItem"),Nc=r.a.getComponent("PlaybackRateMenuButton"),Bc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lc(t,e)}(a,t);var e,n,i,o=Ac(a);function a(){var t;return Oc(this,a),(t=o.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=a,(n=[{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Dc.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Pc(jc(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var t=new Rc(this.player(),{menuButton:this});t.addItem(new jn(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var n=0;n<e.length;n++){var r=e[n]+"x";1===e[n]&&(r+=" (Normal)"),t.addItem(new Mc(this.player(),{rate:r}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Dc.prototype.handleClick).apply.apply(t,[this].concat(n))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Nc.prototype.updateLabel).apply.apply(t,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=r.a.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Cc(e.prototype,n),i&&Cc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(Nc);function Uc(t){return(Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hc(t,e){return(Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=zc(t);if(e){var i=zc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wc(this,n)}}function Wc(t,e){if(e&&("object"===Uc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zc(t){return(zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("PlaybackRateMenuButton",Bc);var Gc=r.a.getComponent("TextTrackSettings"),Yc={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Xc={small:Yc,medium:Object.assign(Object.assign({},Yc),{fontPercent:1.5}),large:Object.assign(Object.assign({},Yc),{fontPercent:2})},Kc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hc(t,e)}(o,t);var e,n,r,i=qc(o);function o(){return Fc(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){n.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Xc[this.size_]?Xc[this.size_]:Yc}}])&&Vc(e.prototype,n),r&&Vc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Gc);r.a.registerComponent("TextTrackSettings",Kc);n(314);function Qc(t){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jc(){return(Jc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Zc(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Zc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rl(t)););return t}function tl(t,e){return(tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function el(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rl(t);if(e){var i=rl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(t,e){if(e&&("object"===Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rl(t){return(rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var il=window.navigator&&window.navigator.userAgent||"",ol=(/iPod/i.test(il),/Android/i.test(il),r.a.getComponent("Player")),al=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}(o,t);var e,n,r,i=el(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,t,e),e.mobile&&n.addClass("cv-mobile-player"),n}return e=o,(n=[{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,e){var n=this;if("number"!=typeof t||!this.callback_||e)return Jc(rl(o.prototype),"currentTime",this).call(this,t);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return Jc(rl(o.prototype),"play",this).call(this);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(ol.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=e.split(":"),r=+n[1]/+n[0];t.style.maxWidth=85/r+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;ol.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&$c(e.prototype,n),r&&$c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(ol);al.prototype.options_=Object.assign(Object.assign({},ol.prototype.options_),{setMaxHeight:!0}),r.a.registerComponent("player",al);n(315);function sl(t){return(sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ul(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cl(t,e){return(cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ll(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pl(t);if(e){var i=pl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fl(this,n)}}function fl(t,e){if(e&&("object"===sl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return hl(t)}function hl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pl(t){return(pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var dl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cl(t,e)}(a,t);var e,n,i,o=ll(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(hl(n)),n.player_.one("firstplay",n.onFirstPlay),n}return e=a,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&ul(e.prototype,n),i&&ul(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));r.a.registerComponent("PlayPauseFeedback",dl);n(316);function yl(t){return(yl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ml(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gl(t,e){return(gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wl(t);if(e){var i=wl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _l(this,n)}}function _l(t,e){if(e&&("object"===yl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wl(t){return(wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tl=r.a.getComponent("PlayToggle"),Sl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)}(o,t);var e,n,r,i=bl(o);function o(){return ml(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleClick",value:function(t){var e=this;Tl.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&vl(e.prototype,n),r&&vl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Tl);r.a.registerComponent("PlayToggle",Sl);n(157);function El(t){return(El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ol(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cl(t,e){return(Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ll(t);if(e){var i=Ll(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xl(this,n)}}function xl(t,e){if(e&&("object"===El(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ll(t){return(Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Al=r.a.getComponent("TextTrackDisplay"),Il=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)}(o,t);var e,n,r,i=Pl(o);function o(){return kl(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"updateDisplayState",value:function(t){Al.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;o.style.fontSize=a*e.fontPercent+"px"}}}}}])&&Ol(e.prototype,n),r&&Ol(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Al);r.a.registerComponent("TextTrackDisplay",Il);n(317),n(318),n(319),n(320);var jl,Rl=n(11),Dl=n.n(Rl);function Ml(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nl(t){t.paused()?t.play():t.pause()}function Bl(t,e){t.currentTime(t.currentTime()+e)}function Ul(t,e){t.volume(t.volume()+e)}var Fl=(Ml(jl={},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),Ml(jl,"m",(function(t){var e=t.volume(),n=t.lastVolume_();if(0===e){var r=n<.1?.1:n;t.volume(r),t.muted(!1)}else t.muted(!t.muted())})),Ml(jl,"k",Nl),Ml(jl,"space",Nl),Ml(jl,"left",(function(t){return Bl(t,-5)})),Ml(jl,"right",(function(t){return Bl(t,5)})),Ml(jl,"j",(function(t){return Bl(t,-10)})),Ml(jl,"l",(function(t){return Bl(t,10)})),Ml(jl,"up",(function(t){return Ul(t,.05)})),Ml(jl,"down",(function(t){return Ul(t,-.05)})),jl);function Vl(t){var e=Dl()(t);Fl[e]&&(["space"].includes(e)&&(t.preventDefault(),t.stopPropagation()),Fl[e](this,t))}var Hl,ql=n(41);function Wl(t){return(Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zl(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gl(t,e)}function Gl(t,e){return(Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kl(t);if(e){var i=Kl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xl(this,n)}}function Xl(t,e){if(e&&("object"===Wl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kl(t){return(Kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ql(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jl(t,e,n){return e&&$l(t.prototype,e),n&&$l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}!function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage"}(Hl||(Hl={}));var Zl=function(){function t(e){if(Ql(this,t),this.cachePrefix="_cv:",this.expireTime=3600,this.hasSupport=this.hasBrowserSupport(),this.type=e.type,this.hasSupport)try{this.storage=window[this.type]}catch(t){}}return Jl(t,[{key:"get",value:function(t){if(this.hasSupport){var e=this.storage.getItem(t);try{return JSON.parse(e)}catch(t){return e}}}},{key:"set",value:function(t,e){if(this.hasSupport)try{return this.storage.removeItem(t),"string"!=typeof e?(this.storage.setItem(t,JSON.stringify(e)),!0):(this.storage.setItem(t,e),!0)}catch(t){return!1}}},{key:"remove",value:function(t){if(this.hasSupport)return this.storage.removeItem(t)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=e&&e};return this.set("".concat(this.cachePrefix).concat(t),r)}},{key:"cacheGet",value:function(t){var e="".concat(this.cachePrefix).concat(t),n=this.get(e);return n?this.isExpired(n)?(this.remove(e),null):n.data:null}},{key:"cacheExists",value:function(t){var e="".concat(this.cachePrefix).concat(t),n=this.get(e);return!!n&&(!this.isExpired(n)||(this.remove(e),!1))}},{key:"cacheRemove",value:function(t){return this.remove("".concat(this.cachePrefix).concat(t))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var t=0;t<this.storage.length;t++){var e=this.storage.key(t);if(0===e.indexOf(this.cachePrefix)){var n=this.get(e);n&&n.time&&this.isExpired(n)&&this.remove(e)}}}},{key:"isExpired",value:function(t){return t.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(t){return!1}}}]),t}(),tf=function(t){zl(n,t);var e=Yl(n);function n(){return Ql(this,n),e.apply(this,arguments)}return Jl(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:Hl.LocalStorage}))}}]),n}(Zl),ef=function(t){zl(n,t);var e=Yl(n);function n(){return Ql(this,n),e.apply(this,arguments)}return Jl(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:Hl.SessionStorage}))}}]),n}(Zl),nf=tf.Instance,rf=(ef.Instance,"URLSearchParams"in self),of="Symbol"in self&&"iterator"in Symbol,af="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),sf="FormData"in self,uf="ArrayBuffer"in self;if(uf)var cf=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lf=ArrayBuffer.isView||function(t){return t&&cf.indexOf(Object.prototype.toString.call(t))>-1};function ff(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function hf(t){return"string"!=typeof t&&(t=String(t)),t}function pf(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return of&&(e[Symbol.iterator]=function(){return e}),e}function df(t){this.map={},t instanceof df?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function yf(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function mf(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function vf(t){var e=new FileReader,n=mf(e);return e.readAsArrayBuffer(t),n}function gf(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function bf(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:af&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:sf&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:rf&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():uf&&af&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=gf(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):uf&&(ArrayBuffer.prototype.isPrototypeOf(t)||lf(t))?this._bodyArrayBuffer=gf(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):rf&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},af&&(this.blob=function(){var t=yf(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?yf(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(vf)}),this.text=function(){var t,e,n,r=yf(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=mf(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},sf&&(this.formData=function(){return this.text().then(Tf)}),this.json=function(){return this.text().then(JSON.parse)},this}df.prototype.append=function(t,e){t=ff(t),e=hf(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},df.prototype.delete=function(t){delete this.map[ff(t)]},df.prototype.get=function(t){return t=ff(t),this.has(t)?this.map[t]:null},df.prototype.has=function(t){return this.map.hasOwnProperty(ff(t))},df.prototype.set=function(t,e){this.map[ff(t)]=hf(e)},df.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},df.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),pf(t)},df.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),pf(t)},df.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),pf(t)},of&&(df.prototype[Symbol.iterator]=df.prototype.entries);var _f=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function wf(t,e){var n,r,i=(e=e||{}).body;if(t instanceof wf){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new df(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new df(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),_f.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Tf(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function Sf(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"",this.headers=new df(e.headers),this.url=e.url||"",this._initBody(t)}wf.prototype.clone=function(){return new wf(this,{body:this._bodyInit})},bf.call(wf.prototype),bf.call(Sf.prototype),Sf.prototype.clone=function(){return new Sf(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new df(this.headers),url:this.url})},Sf.error=function(){var t=new Sf(null,{status:0,statusText:""});return t.type="error",t};var Ef=[301,302,303,307,308];Sf.redirect=function(t,e){if(-1===Ef.indexOf(e))throw new RangeError("Invalid status code");return new Sf(null,{status:e,headers:{location:t}})};var kf=self.DOMException;try{new kf}catch(t){(kf=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),kf.prototype.constructor=kf}function Of(t,e){return new Promise((function(n,r){var i=new wf(t,e);if(i.signal&&i.signal.aborted)return r(new kf("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var t,e,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new df,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Sf(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new kf("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&self.location.href?self.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(af?o.responseType="blob":uf&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(t,e){o.setRequestHeader(e,t)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Of.polyfill=!0,self.fetch||(self.fetch=Of,self.Headers=df,self.Request=wf,self.Response=Sf);var Cf=n(186),Pf=n.n(Cf),xf=n(187);function Lf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Af(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Af(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Af(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var If={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function jf(t,e,n){var r=Lf(e.exec(n)||[],1)[0];return r||(r="Unknown"),{name:t,version:r}}function Rf(t,e,n){if(!e)return{name:t,version:"Unknown"};var r=e.exec(n);return{name:t,version:r&&r.length?r[0].trim():"Unknown"}}var Df=function(){var t=window.navigator.userAgent;return If.android.test(t)?Rf("Android",If.androidVersion,t):If.iphone.test(t)||If.ipad.test(t)?Rf("iOS",If.iosVersion,t):If.linux.test(t)?Rf("Linux",null,t):If.unix.test(t)?Rf("Unix",null,t):If.mac.test(t)?Rf("Macintosh",If.osxVersion,t):If.windows.test(t)?function(t,e){var n={name:t,version:null};return If.win2000.test(e)&&(n.version="2000"),If.winXP.test(e)&&(n.version="XP"),If.winVista.test(e)&&(n.version="Vista"),If.win7.test(e)&&(n.version="7"),If.win8.test(e)&&(n.version="8"),If.win81.test(e)&&(n.version="8.1"),If.win10.test(e)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",t):If.blackberry.test(t)?Rf("BlackBerry",If.blackberryVersion,t):If.windowsPhone.test(t)?Rf("Windows Phone",If.windowsPhoneVersion,t):{name:"Unknown",version:"Unknown"}},Mf=function(){var t=window.navigator.userAgent;return If.chrome.test(t)?jf("Chrome",If.generalVersion,t):If.firefox.test(t)?jf("Firefox",If.generalVersion,t):If.safari.test(t)?jf("Safari",If.generalVersion,t):If.ie.test(t)?jf("Internet Explorer",If.ieVersion,t):If.edge.test(t)?jf("Edge",If.edgeVersion,t):If.opera.test(t)?jf("Opera",If.operaVersion,t):{name:"Unknown",version:"Unknown"}};function Nf(t){return(Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Bf,Uf=function(t){var e=Nf(t);return"function"===e||"object"===e&&!!t},Ff=function(t){return"function"==typeof t},Vf=function(t,e){if(t){var n=t;return t.endsWith("/")||(n+="/"),e?n+=e.startsWith("/")?e.slice(1):e:n}},Hf=n(82);!function(t){t.CvApSoutheast1="cv-ap-southeast-1",t.CvApSoutheast2="cv-ap-southeast-2",t.CvEuWest1="cv-eu-west-1",t.CvNaWest1="cv-na-west-1"}(Bf||(Bf={}));var qf={CvApSoutheast1:{systemName:Bf.CvApSoutheast1},CvApSoutheast2:{systemName:Bf.CvApSoutheast2},CvEuWest1:{systemName:Bf.CvEuWest1},CvNaWest1:{systemName:Bf.CvNaWest1}};function Wf(t){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zf=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Wf(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Gf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Yf=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Xf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(t)){e.next=2;break}return e.abrupt("return",this.logBulk(t));case 2:if(this.shouldLog(t)){e.next=4;break}return e.abrupt("return");case 4:return this.validateEvent(t),e.t0=this,e.next=8,this.formatData(t);case 8:return e.t1=e.sent,e.next=11,e.t0.postData.call(e.t0,e.t1);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"logBulk",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n,r,i=this;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=t.filter((function(t){return i.shouldLog(t)}))).length){e.next=3;break}return e.abrupt("return");case 3:return n.forEach((function(t){return i.validateEvent(t)})),e.next=6,Promise.all(n.map((function(t){return i.formatData(t)})));case 6:return r=e.sent,e.next=9,this.postData(r);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"validateOptions",value:function(){if(!Ff(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(t){return!Ff(this.options.shouldLog)||this.options.shouldLog(t)}},{key:"postData",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n,r,i,o,a;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=e.sent,r=JSON.stringify(t),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=Vf(n,"/v1/ingest"),Array.isArray(t)&&(o=Vf(o,"/bulk")),e.prev=7,e.next=10,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 10:(a=e.sent).ok||this.logError(new Error("CollectionApiClient failed to log event. Status: ".concat(a.status," ").concat(a.statusText))),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),this.logError(e.t0);case 17:case"end":return e.stop()}}),e,this,[[7,14]])})))}},{key:"getSignatureHeader",value:function(t){var e=new Pf.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return e.update(t),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(e.getHash("B64"))}}},{key:"getRegionalUrl",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRegion();case 2:n=e.sent,e.t0=n.systemName,e.next=e.t0===Bf.CvEuWest1?6:e.t0===Bf.CvApSoutheast2?7:e.t0===Bf.CvNaWest1?8:(e.t0,Bf.CvApSoutheast1,9);break;case 6:return e.abrupt("return",t.cvEuWest1);case 7:return e.abrupt("return",t.cvApSoutheast2);case 8:return e.abrupt("return",t.cvNaWest1);case 9:return e.abrupt("return",t.cvApSoutheast1);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"validateEvent",value:function(t){"string"!=typeof t.type&&this.logError(new Error("Event type is required."),!0),Uf(t.actionContext)||this.logError(new Error("Event actionContext is required."),!0),t.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}},{key:"formatData",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.type,e.next=3,this.getEventData(t);case 3:return e.t1=e.sent,e.t2=this.getEventMetadata(t),e.abrupt("return",{type:e.t0,data:e.t1,metadata:e.t2});case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getEventData",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n,r,i,o,a,s,u=this;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.actionContext,e.next=3,this.getUserData();case 3:return r=e.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(t),a=Object.keys(i).map((function(t){return t.toLowerCase()})),s=Object.keys(o).map((function(t){return t.toLowerCase()})),a.forEach((function(t){s.includes(t)&&u.logError(new Error("".concat(t," is a reserved key.")),!0)})),e.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return e.stop()}}),e,this)})))}},{key:"extractData",value:function(t){return Ff(this.options.formatData)?this.options.formatData(t):(e={},n=t.actionContext.entity,r=t.data,n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e);var e,n,r}},{key:"getUserData",value:function(){var t,e;return Yf(this,void 0,void 0,zf().mark((function n(){var r;return zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(t=r.role)||void 0===t?void 0:t.toLowerCase())||"unknown",n.t2=(null===(e=r.userGroup)||void 0===e?void 0:e.toLowerCase())||Hf.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:!1},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t10});case 22:n.prev=22,n.t11=n.catch(0),this.logError(n.t11);case 25:case"end":return n.stop()}}),n,this,[[0,22]])})))}},{key:"getRegion",value:function(){return Yf(this,void 0,void 0,zf().mark((function t(){var e,n;return zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.options.regionName,t.prev=1,t.next=4,this.options.getUser();case 4:(null==(n=t.sent)?void 0:n.instanceRegion)&&(e=n.instanceRegion),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),this.logError(t.t0);case 11:return e||this.logError(new Error("RegionName is not set."),!0),t.abrupt("return",this.getRegionByName(e.toLowerCase()));case 13:case"end":return t.stop()}}),t,this,[[1,8]])})))}},{key:"getPlatformMetadata",value:function(){return{browser:Mf(),os:Df(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(t){return{client:{name:"".concat(this.name,".ts"),version:xf.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:t.eventVersion}}},{key:"getRegionByName",value:function(t){var e;return Object.values(qf).forEach((function(n){n.systemName===t&&(e=n)})),e}},{key:"normalizeYearGroup",value:function(t){return t?t.toLowerCase().split(" ").join("_"):"unknown"}},{key:"logError",value:function(t,e){if(this.options.logError&&this.options.logError(t),e)throw t}}])&&Gf(e.prototype,n),r&&Gf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Kf=n(3),Qf=function(){return!0},$f=function(){return!1};var Jf,Zf,th,eh,nh=function(t){return t},rh={getUploadData:function(t,e){var n=e.actionContext.entity;if(n===Kf.EntityType.Video)return rh.formatVideoUpload(t,e);if(n===Kf.EntityType.Resource||n===Kf.EntityType.Subtitle)return rh.formatResourceUpload(t);if(n===Kf.EntityType.Banner||n===Kf.EntityType.Thumbnail)return t;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(t,e){var n=e.actionContext.workflowPhase;return n===Kf.WorkflowPhase.Start?rh.getStartVideoUploadData(t):n===Kf.WorkflowPhase.Discard?rh.getDiscardVideoUploadData(t):n===Kf.WorkflowPhase.Complete?rh.getCompleteUploadData(t):void 0},getStartVideoUploadData:function(t){return t&&t.length?(t instanceof FileList&&(t=Array.from(t)),t.map((function(e){return{fileName:e.name,size:e.size,type:e.type,count:t.length}}))):[]},getDiscardVideoUploadData:function(t){var e=function(e){var n=e.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(t)?t.length:1,type:r,status:o};return e.progress&&(s.progress=e.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(t)?t.map((function(t){return e(t)})):[e(t)]},getCompleteUploadData:function(t){return t&&t.length?t.map((function(e){return{fileName:e.fileName,libraryId:e.libraryId,folderId:e.folderId,autoCaption:e.autoCaption,count:t.length}})):[]},formatResourceUpload:function(t){var e={id:t.id,name:t.name};return Uf(t.metadata)&&(e.type=t.metadata.type),e}},ih=function(t){var e,n,r,i,o={id:t.id};return(null===(e=t.video)||void 0===e?void 0:e.id)&&(o.video={id:t.video.id}),(null===(n=t.clip)||void 0===n?void 0:n.id)&&(o.clip={id:t.clip.id},(null===(r=t.clip.video)||void 0===r?void 0:r.id)&&(o.video={id:null===(i=t.clip.video)||void 0===i?void 0:i.id})),void 0!==t.shareCount&&(o.shareCount=t.shareCount),t.embedDetails&&(o.embedDetails=o.embedDetails),o};function oh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ah=(oh(Jf={},Kf.UserAction.Navigate,$f),oh(Jf,Kf.UserAction.Click,Qf),oh(Jf,Kf.UserAction.Search,Qf),oh(Jf,Kf.UserAction.InstantSearch,Qf),oh(Jf,Kf.UserAction.Play,Qf),oh(Jf,Kf.UserAction.Stream,Qf),oh(Jf,Kf.UserAction.WebPlayerStream,Qf),oh(Jf,Kf.UserAction.StreamProgress,Qf),oh(Jf,Kf.UserAction.Rename,Qf),oh(Jf,Kf.UserAction.Move,Qf),oh(Jf,Kf.UserAction.Create,Qf),oh(Jf,Kf.UserAction.Delete,Qf),oh(Jf,Kf.UserAction.Associate,Qf),oh(Jf,Kf.UserAction.Dissociate,Qf),oh(Jf,Kf.UserAction.Filter,Qf),oh(Jf,Kf.UserAction.Sort,Qf),oh(Jf,Kf.UserAction.Approve,Qf),oh(Jf,Kf.UserAction.Reject,Qf),oh(Jf,Kf.UserAction.Disable,Qf),oh(Jf,Kf.UserAction.Upload,Qf),oh(Jf,Kf.UserAction.Download,$f),oh(Jf,Kf.UserAction.SetAccess,Qf),oh(Jf,Kf.UserAction.AddToLocalCache,$f),oh(Jf,Kf.UserAction.Share,Qf),oh(Jf,Kf.UserAction.Unshare,Qf),oh(Jf,Kf.UserAction.Edit,Qf),oh(Jf,Kf.UserAction.Suggest,Qf),oh(Jf,Kf.UserAction.Favourite,Qf),oh(Jf,Kf.UserAction.ResolveWarning,Qf),oh(Jf,Kf.UserAction.DismissWarning,Qf),oh(Jf,Kf.UserAction.EditAssoc,Qf),oh(Jf,Kf.UserAction.Follow,Qf),oh(Jf,Kf.UserAction.Print,Qf),oh(Jf,Kf.UserAction.Copy,Qf),oh(Jf,Kf.UserAction.Activate,Qf),oh(Jf,Kf.UserAction.VerifyEmail,Qf),oh(Jf,Kf.UserAction.ChangePassword,Qf),oh(Jf,Kf.UserAction.Export,Qf),oh(Jf,Kf.UserAction.SendEmail,Qf),oh(Jf,Kf.UserAction.Publish,Qf),oh(Jf,Kf.UserAction.Answer,Qf),oh(Jf,Kf.UserAction.Complete,Qf),oh(Jf,Kf.UserAction.Archive,Qf),oh(Jf,Kf.UserAction.Promote,Qf),oh(Jf,Kf.UserAction.Demote,Qf),Jf),sh=(oh(Zf={},Kf.UserAction.Search,nh),oh(Zf,Kf.UserAction.InstantSearch,nh),oh(Zf,Kf.UserAction.Play,nh),oh(Zf,Kf.UserAction.Stream,nh),oh(Zf,Kf.UserAction.StreamProgress,nh),oh(Zf,Kf.UserAction.Click,nh),oh(Zf,Kf.UserAction.Filter,nh),oh(Zf,Kf.UserAction.Sort,nh),oh(Zf,Kf.UserAction.SetAccess,nh),oh(Zf,Kf.UserAction.Approve,nh),oh(Zf,Kf.UserAction.Reject,nh),oh(Zf,Kf.UserAction.Create,nh),oh(Zf,Kf.UserAction.Delete,nh),oh(Zf,Kf.UserAction.Rename,nh),oh(Zf,Kf.UserAction.Move,nh),oh(Zf,Kf.UserAction.Edit,nh),oh(Zf,Kf.UserAction.Share,ih),oh(Zf,Kf.UserAction.Disable,nh),oh(Zf,Kf.UserAction.Suggest,nh),oh(Zf,Kf.UserAction.Upload,rh.getUploadData),oh(Zf,Kf.UserAction.ResolveWarning,nh),oh(Zf,Kf.UserAction.DismissWarning,nh),oh(Zf,Kf.UserAction.Follow,nh),oh(Zf,Kf.UserAction.Print,nh),oh(Zf,Kf.UserAction.Copy,nh),Zf),uh=(oh(th={},Kf.UserAction.Search,(function(){return"search"})),oh(th,Kf.UserAction.InstantSearch,(function(){return"search"})),oh(th,Kf.UserAction.Filter,(function(){return"filter"})),oh(th,Kf.UserAction.Stream,(function(){return Kf.EntityType.Video})),th),ch={user:"target_user"},lh=(oh(eh={},Kf.UserAction.StreamProgress,!0),oh(eh,Kf.UserAction.WebPlayerStream,!0),eh),fh={shouldLog:function(t){return!!ah[t.type](t)},formatData:function(t){var e=sh[t.type],n=Ff(e)?e(t.data,t):t.data;if(lh[t.type])return n;var r=t.actionContext.entity;return Ff(uh[t.type])&&(r=uh[t.type](t)),ch[r]&&(r=ch[r]),oh({},r,n)}};function hh(t){return(hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ph(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ph=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==hh(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function dh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yh=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},mh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);nf.cacheExists(t)||(this.collectionApiClient.log({type:Kf.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Kf.EventVersion.V2}),nf&&nf.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,n=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:Kf.UserAction.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},n),{progress:t}),eventVersion:Kf.EventVersion.V1}})))}},{key:"logUserAction",value:function(t,e){var n=Object.assign(Object.assign({},this.getAnalyticsData()),t);this.collectionApiClient.log({type:e.actionType,data:n,actionContext:{productArea:e.productArea,location:this.getLocationContext(),entity:e.entity,descriptor:e.descriptor,workflowPhase:e.workflowPhase},eventVersion:Kf.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Kf.EntityType.Interactive?t.interactive={id:+this.options.mediaId}:e===Kf.EntityType.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new Xf({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:fh.shouldLog,formatData:fh.formatData})}},{key:"getCurrentUser",value:function(){return yh(this,void 0,void 0,ph().mark((function t(){return ph().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Kf.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Kf.EntityType.Video;case"MasterInteractive":return Kf.EntityType.Interactive;case"MasterClip":return Kf.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Kf.LocationContext.Player;case"interactive-player":return Kf.LocationContext.InteractivePlayer;case"create-clip-player":return Kf.LocationContext.CreateClipPlayer}}}])&&dh(e.prototype,n),r&&dh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return(vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bh(){return(bh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=_h(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function _h(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eh(t)););return t}function wh(t,e){return(wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Th(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Eh(t);if(e){var i=Eh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sh(this,n)}}function Sh(t,e){if(e&&("object"===vh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Eh(t){return(Eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var kh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wh(t,e)}(o,t);var e,n,r,i=Th(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).options_=e,n}return e=o,(n=[{key:"createEl",value:function(t,e,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return bh(Eh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,bh(Eh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,bh(Eh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var n=t.toString();if(n.length>=e)return n;for(e-=n.length;e>0;)n="0"+n,e--;return n}}])&&gh(e.prototype,n),r&&gh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function Oh(t){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ch(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ph(){return(Ph="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=xh(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function xh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jh(t)););return t}function Lh(t,e){return(Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ah(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jh(t);if(e){var i=jh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ih(this,n)}}function Ih(t,e){if(e&&("object"===Oh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jh(t){return(jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lh(t,e)}(a,t);var e,n,i,o=Ah(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).options_=e,n}return e=a,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Ph(jh(a.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){var i=Ph(jh(a.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return i;var o=this.mapCodeToColourClass(this.options_.ratingCode);return i.appendChild(r.a.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(o),innerHTML:this.options_.ratingCode})),this.options_.warning&&i.appendChild(r.a.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),i}},{key:"mapCodeToColourClass",value:function(t){switch(t){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Ch(e.prototype,n),i&&Ch(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));function Dh(t){return(Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Nh(t,e){return(Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fh(t);if(e){var i=Fh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uh(this,n)}}function Uh(t,e){if(e&&("object"===Dh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Fh(t){return(Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nh(t,e)}(a,t);var e,n,i,o=Bh(a);function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"createEl",value:function(){var t=r.a.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&t.appendChild(new kh(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),t.appendChild(new Rh(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),t}}])&&Mh(e.prototype,n),i&&Mh(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));n(321);function Hh(t){return(Hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wh(){return(Wh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zh(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function zh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kh(t)););return t}function Gh(t,e){return(Gh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kh(t);if(e){var i=Kh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xh(this,n)}}function Xh(t,e){if(e&&("object"===Hh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kh(t){return(Kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gh(t,e)}(o,t);var e,n,r,i=Yh(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).addChild(new Vh(n.player_,n.options_)),n}return e=o,(n=[{key:"createEl",value:function(t,e,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(A,"</div>")),Wh(Kh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&qh(e.prototype,n),r&&qh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function $h(t){return($h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jh(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Jh=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==$h(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Zh(t){return function(t){if(Array.isArray(t))return tp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return tp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ep(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"a",(function(){return ap}));var np,rp=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},ip=r.a.getComponent("Player"),op=450,ap=function(){function t(e,n){var i=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=r.a.mergeOptions({},t.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){i._configurePlugins(),i.options.setup&&i.options.setup(i.options,i.player),i.fetch().catch((function(t){i.player.error(t.message),i.options.onError&&i.options.onError(t)}))}))}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.options.mobile||this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=Object(r.a)(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var t=ip.prototype.options_.children;return t=t.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.options.mobile?3e3:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(Zh(t),["collapserator","playPauseFeedback"]),userActions:{hotkeys:Vl},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus}}},{key:"getPlaybackObject",value:function(){return rp(this,void 0,void 0,Jh().mark((function t(){var e,n,r=this;return Jh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return ql.a.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(n=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"fetch",value:function(){var t,e,n,r,i,o,a,s;return rp(this,void 0,void 0,Jh().mark((function u(){var c,l,f=this;return Jh().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.getPlaybackObject();case 2:c=u.sent,(null===(e=null===(t=c.chapters)||void 0===t?void 0:t.list)||void 0===e?void 0:e.length)>0&&(l=this.player.addTextTrack("chapters"),c.chapters.list.forEach((function(t){l.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),l.trigger({type:"loadeddata",target:l})),this.player.localCache({localCacheAddresses:null!==(n=c.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(r=this.options.enableLocalCache)||void 0===r||r}),this.player.progressiveFiles({sources:c.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),(null===(o=null===(i=c.subtitles)||void 0===i?void 0:i.list)||void 0===o?void 0:o.length)>0&&(c.subtitles.list.forEach((function(t){"text/vtt"===t.mimeType&&f.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(a=c.settings)||void 0===a?void 0:a.showSubtitles,subtitleSize:null===(s=c.settings)||void 0===s?void 0:s.playbackSubtitleSizeDefault})),c.posterUrl&&this.player.poster(c.posterUrl),this.setupSplash(c),this.additionalSetup(c),this.options.autoplay&&this.player.ready((function(){f.player.play().catch((function(){f.showSplash()}))})),this.options.startTime&&this.player.currentTime(this.options.startTime),this.player.trigger("cv-playback-data-loaded",c);case 13:case"end":return u.stop()}}),u,this)})))}},{key:"fetchConfig",value:function(){var t=this;if(!(np||this.options.fetch||this.options.offlinePlaybackObject)){var e="".concat(this.options.playerApi.origin,"/api/config");ql.a.get(e).then((function(e){np=e,t.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(t){var e,n,r,i=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(e=t.settings)||void 0===e?void 0:e.playbackProfile,playbackProfileLocalCache:null===(n=t.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var o=this.options.enableLocalCache&&!!(null===(r=t.localCacheAddresses)||void 0===r?void 0:r.length);np?this.setupAnalyticsService(t,o):this.one("config:loaded",(function(){return i.setupAnalyticsService(t,o)}))}},{key:"setupAnalyticsService",value:function(t,e){this.analyticsService=new mh({collectionApiUrls:np.collectionApi.urls,collectionApiClientId:np.collectionApi.clientId,productVersion:h.a,videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||Bf.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"logStream",value:function(){this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=r.a.dom.$("#"+t)):e=t;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=r.a.dom.createEl("video",{},{class:n}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];if(t)r.enabled=r.id===t.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),n=0;n<e.length;n++){var r=e[n];if(void 0===t){if("showing"===r.mode)return r.label}else r.label===t?r.mode="showing":r.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(){return t.configureMenuDimensions()};if(this.player.ready(e),this.on("resize",e),this.on("fullscreenchange",e),this.one("play",e),this.on("resizemenus",e),this.showSplash=this.showSplash.bind(this),this.player.on("ended",this.showSplash),this.player.one("dispose",(function(){t.off("resize",e),t.off("fullscreenchange",e),t.off("resizemenus",e),t.off("ended",t.showSplash)})),this.options.hotkeyElQuerySelector){var n=r.a.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(n,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){var e=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new Qh(this.player,{embed:this.options.embed,posterUrl:t.posterUrl,title:t.title,ratingCode:t.ratingCode,seriesName:t.seriesName,seasonNumber:t.seasonNumber,episodeNumber:t.episodeNumber});e.addChild(n),this.options.autoplay||this.showSplash()}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var t=this;if(this.player.isFullscreen()&&!this.options.mobile){var e=this.player.whiteboardModePlugin().side;if("top"===e){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i),this.player.trigger("volumechange")}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s),this.player.trigger("volumechange")}if("left"===e||"right"===e||"top"===e){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(u,"px - 4em)")}))}}var c=this.player.currentWidth(),l=this.player.currentHeight()/c*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),p=f&&f.offsetHeight;p?("CreateClipSeekBar"===this.getSeekBarName()&&(p+=22),h&&h.length&&h.forEach((function(e){e.style.paddingTop="calc(".concat(l,"% - ").concat(p,"px)"),e.style.marginBottom="".concat(p,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(c<=op?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return t.configureMenuDimensions()}))}}])&&ep(e.prototype,n),i&&ep(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();ap.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0}},,,,,,,function(t,e,n){"use strict";(function(t){
22
+ var e,n;function i(){var e,n=a(a(e=t.call(this)||this));if(r.a.browser.IS_IE8)for(var s in n=o.a.createElement("custom"),i.prototype)"constructor"!==s&&(n[s]=i.prototype[s]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||a(e)}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var u=i.prototype;return u.addQualityLevel=function(t){var e=this.getQualityLevelById(t.id);if(e)return e;var n=this.levels_.length;return e=new s(t),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(e),this.trigger({qualityLevel:e,type:"addqualitylevel"}),e},u.removeQualityLevel=function(t){for(var e=null,n=0,r=this.length;n<r;n++)if(this[n]===t){e=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return e&&this.trigger({qualityLevel:t,type:"removequalitylevel"}),e},u.getQualityLevelById=function(t){for(var e=0,n=this.length;e<n;e++){var r=this[e];if(r.id===t)return r}return null},u.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},i}(r.a.EventTarget);for(var c in u.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},u.prototype.allowedEvents_)u.prototype["on"+c]=null;var l=r.a.registerPlugin||r.a.plugin,f=function(t){return e=this,r.a.mergeOptions({},t),n=e.qualityLevels,i=new u,e.on("dispose",(function t(){i.dispose(),e.qualityLevels=n,e.off("dispose",t)})),e.qualityLevels=function(){return i},e.qualityLevels.VERSION="2.0.9",i;var e,n,i};l("qualityLevels",f),f.VERSION="2.0.9";var h=n(185),p=n(15);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _=r.a.getPlugin("plugin"),w="cvplayer-mute",T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(o,t);var e,n,r,i=v(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).player.ready((function(){return e.initialize()})),e}return e=o,(n=[{key:"initialize",value:function(){var t=this;if(this.player.options_.mobile)this.removeVolumeControl();else if(p.a.hasLocalStorage()){this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.one("dispose",(function(){t.player.off("volumechange",t.saveVolumeState)}));var e=p.a.get("cvplayer-volume"),n=p.a.get(w);e&&this.player.volume(+e),n&&this.player.muted("true"===n)}}},{key:"saveVolumeState",value:function(){p.a.set("cvplayer-volume",this.player.volume().toString()),p.a.set(w,this.player.muted().toString())}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}}])&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(_);function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t,e){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=x(t);if(e){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return P(t)}function P(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("persistVolumePlugin",T);var L=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(o,t);var e,n,r,i=O(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).hasScreenOrientation()&&e.player.supportsFullScreen()?(e.onRotate=e.onRotate.bind(P(e)),e.onFullscreenChange=e.onFullscreenChange.bind(P(e)),e.player.ready((function(){return e.initialize()})),e):C(e)}return e=o,(n=[{key:"initialize",value:function(){var t=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.one("dispose",(function(){window.removeEventListener("orientationchange",t.onRotate),t.hasScreenLock()&&t.player.off("fullscreenchange",t.onFullscreenChange)}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"hasScreenLock",value:function(){var t,e;return"function"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.lock)}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&E(e.prototype,n),r&&E(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("fullscreenOnRotatePlugin",L);var A="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";n(257);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(t,e){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B(t);if(e){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return M(this,n)}}function M(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return N(t)}function N(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var U=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&R(t,e)}(a,t);var e,n,i,o=D(a);function a(t,e){var n,r,i,s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).update=(r=n.update.bind(N(n)),i=1e3,s=window.performance.now(),function(){var t=window.performance.now();t-s>=i&&(r.apply(void 0,arguments),s=t)}),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return e=a,(n=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:A,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=r.a.dom.createEl("a",t,e);return this.createControlTextEl(n),n.addEventListener("click",this.pause.bind(this)),n}},{key:"pause",value:function(){this.player_.pause()}}])&&j(e.prototype,n),i&&j(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Button"));function F(t){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function V(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function H(t,e){return(H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function q(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=z(t);if(e){var i=z(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return W(this,n)}}function W(t,e){if(e&&("object"===F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function z(t){return(z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}U.prototype.controlText_="Open in ClickView",r.a.registerComponent("OpenExternallyButton",U);var G=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&H(t,e)}(o,t);var e,n,r,i=q(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=o,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),n=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&V(e.prototype,n),r&&V(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("openExternallyPlugin",G);n(258);function Y(t){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(){return(K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Q(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Q(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tt(t)););return t}function $(t,e){return($=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tt(t);if(e){var i=tt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(t,e){if(e&&("object"===Y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tt(t){return(tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var et=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(o,t);var e,n,r,i=J(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(K(tt(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return K(tt(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(t,e){var n=this,r=t>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&X(e.prototype,n),r&&X(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("component"));function nt(t){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function it(){return(it="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ot(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ot(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ct(t)););return t}function at(t,e){return(at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function st(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ct(t);if(e){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ut(this,n)}}function ut(t,e){if(e&&("object"===nt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ct(t){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("TouchControls",et);var lt=r.a.getPlugin("plugin"),ft=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&at(t,e)}(o,t);var e,n,r,i=st(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).doubleTouchCount=0,e.seekStartTime=0,e.directionModifier=0,e.bindFunctions(),e.player.ready((function(){return e.initialize()})),e}return e=o,(n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"dispose",value:function(){it(ct(o.prototype),"dispose",this).call(this),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),n=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<n?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&rt(e.prototype,n),r&&rt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(lt);function ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}r.a.registerPlugin("touchControls",ft);var pt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=n.id,this.plugin=e,this.source=n,this.enabled=this.enabled.bind(this)}var e,n,r;return e=t,(n=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&ht(e.prototype,n),r&&ht(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dt(t){return(dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mt(t,e){return(mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=bt(t);if(e){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gt(this,n)}}function gt(t,e){if(e&&("object"===dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function bt(t){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _t=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)}(o,t);var e,n,r,i=vt(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).options_=e,n.player.ready((function(){return n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,n=this.getSourceById(t);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();this._currentSource=n;var o=this.player.playbackRate();return this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(o),e.player.currentTime()!==r&&e.player.currentTime(r),i&&e.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new pt(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),t.default&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,n=-1,r=0;r<e.length;r++)if(e[r].id===t.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}}])&&yt(e.prototype,n),r&&yt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));function wt(t){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Tt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==wt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}r.a.registerPlugin("progressiveFiles",_t);var Et=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},kt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)}var e,n,r;return e=t,(n=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return Et(this,void 0,void 0,Tt().mark((function t(){var e,n,r,i;return Tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,n=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return r=t.sent,t.next=9,r.text();case 9:return i=t.sent,clearTimeout(n),t.abrupt("return","PONG"===i);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})))}}])&&St(e.prototype,n),r&&St(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ct=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var n=t.getQualityLevelById(e);if(n||(n=this.getNextBestQuality(t,e)),!n)return null;for(var r=0;r<t.length;r++){var i=t[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(t,e){var n=this.getKnownProfiles(),r=n.indexOf(e);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=t.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],c=t.getQualityLevelById(u);if(c)return c}}return null}}],(n=null)&&Ot(e.prototype,n),r&&Ot(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pt(t){return(Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Pt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Lt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var At=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},It=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=r.a.log.createLogger("localcache")}var e,n,i;return e=t,(n=[{key:"setSource",value:function(t,e){return At(this,void 0,void 0,xt().mark((function n(){var r;return xt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){n.next=5;break}return n.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),t.src=r.getUrl(t.src));case 5:e(null,t);case 6:case"end":return n.stop()}}),n,this)})))}}])&&Lt(e.prototype,n),i&&Lt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.a.use("*",(function(t){return new It(t)}));n(259);function jt(t){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Rt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==jt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mt(){return(Mt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Nt(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Nt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ht(t)););return t}function Bt(t,e){return(Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ht(t);if(e){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ft(this,n)}}function Ft(t,e){if(e&&("object"===jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vt(t)}function Vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ht(t){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Wt='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',zt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bt(t,e)}(o,t);var e,n,r,i=Ut(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(Vt(n)),t.ready((function(){n.initialize()})),n}return e=o,(n=[{key:"createEl",value:function(){return Mt(Ht(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Wt,"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return qt(this,void 0,void 0,Rt().mark((function t(){return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})))}}])&&Dt(e.prototype,n),r&&Dt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function Gt(t){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Yt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Gt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Xt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kt(){return(Kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Qt(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Qt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ee(t)););return t}function $t(t,e){return($t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ee(t);if(e){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zt(this,n)}}function Zt(t,e){if(e&&("object"===Gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return te(t)}function te(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ee(t){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("localCacheIndicator",zt);var ne=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$t(t,e)}(a,t);var e,n,i,o=Jt(a);function a(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t)).logger_=r.a.log.createLogger("localcache"),void 0===e)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(te(n)),n.localCaches_=e.localCacheAddresses.map((function(t){return new kt(t)})),n.player.ready((function(){n.initialize(),e.enabled&&n.enable()})),n}return e=a,(n=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"dispose",value:function(){this.player.off("error",this.onPlayerError),Kt(ee(a.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var t;(null===(t=this.player.error())||void 0===t?void 0:t.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return ne(this,void 0,void 0,Yt().mark((function t(){var e,n,r,i=this;return Yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],n=function(t){return ne(i,void 0,void 0,Yt().mark((function n(){return Yt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.ping();case 2:if(!n.sent){n.next=4;break}e.push(t);case 4:case"end":return n.stop()}}),n)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return n(t)})));case 4:if(!(e.length>0)){t.next=8;break}return r=e[0],this.onLocalCacheChange(r),t.abrupt("return",r);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),Ct.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}])&&Xt(e.prototype,n),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getPlugin("plugin"));function ie(t){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ae(t,e){return(ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function se(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ce(t);if(e){var i=ce(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ue(this,n)}}function ue(t,e){if(e&&("object"===ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ce(t){return(ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("localCache",re);var le=r.a.getPlugin("plugin"),fe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ae(t,e)}(o,t);var e,n,r,i=se(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).options=e,n.initialize(),n}return e=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var t=!!this.options.showSubtitles,e=this.safeGet("cvplayer-show-subtitles");if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),this.player.options_.mobile&&(r="medium"),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(t){if(p.a.hasLocalStorage())return p.a.get(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++){var n=t[e];if("showing"===n.mode)return p.a.set("cvplayer-show-subtitles","true"),void p.a.set("cvplayer-selected-language",n.language)}p.a.set("cvplayer-show-subtitles","false"),p.a.remove("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var t=this;p.a.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();p.a.set("cvplayer-subtitle-size",t)}},{key:"guessWhichTrack",value:function(){for(var t,e,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],c=this.getLanguageParts(u.language),l=c.language,f=c.country;if(l===i&&(t=u,f||(e=u),f===o))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}}])&&oe(e.prototype,n),r&&oe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(le);function he(t){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */pe=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==he(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function de(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ye(t,e){return(ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function me(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ge(t);if(e){var i=ge(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(t,e){if(e&&("object"===he(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ge(t){return(ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("persistSubtitleSettingsPlugin",fe);var be=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},_e=r.a.getPlugin("plugin"),we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(o,t);var e,n,r,i=me(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).options=e,n.player.ready((function(){return n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){return be(this,void 0,void 0,pe().mark((function t(){var e,n,r,i,o=this;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(n=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(n="1080"),p.a.hasLocalStorage()&&(r=p.a.get(this.getStorageKey(!!e)))&&(n=r),i=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||Ct.enableProfileOrNextBest(i,n),p.a.hasLocalStorage()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){return be(this,void 0,void 0,pe().mark((function t(){var e,n,r;return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isLocalCacheActive();case 2:e=t.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],p.a.set(this.getStorageKey(e),r.id);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"isLocalCacheActive",value:function(){return be(this,void 0,void 0,pe().mark((function t(){return pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&de(e.prototype,n),r&&de(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(_e);r.a.registerPlugin("persistQualitySettingsPlugin",we);n(260);function Te(t){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Se(t){return function(t){if(Array.isArray(t))return Ee(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ee(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ke(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Oe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ce(t,e,n){return e&&Oe(t.prototype,e),n&&Oe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pe(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xe(t,e)}function xe(t,e){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Le(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ie(t);if(e){var i=Ie(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ae(this,n)}}function Ae(t,e){if(e&&("object"===Te(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ie(t){return(Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var je=r.a.getComponent("Component"),Re=function(t){Pe(n,t);var e=Le(n);function n(t,r){return ke(this,n),e.call(this,t,r)}return Ce(n,[{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),n=(t.end.time-t.start.time)/e;this.el_.style.width=100*n+"%";var r=t.start.time/e;this.el_.style.left=100*r+"%"}}]),n}(je),De=function(t){Pe(n,t);var e=Le(n);function n(){var t;return ke(this,n),(t=e.apply(this,arguments)).events_=[],t}return Ce(n,[{key:"update",value:function(){for(var t=this,e=this.children(),n=e.length;n>0;n--)this.removeChild(e[n]);this.events_.forEach((function(e){var n=new Re(t.player(),{event:e});t.addChild(n),n.update()}))}},{key:"addEvents",value:function(t){var e;(e=this.events_).push.apply(e,Se(t)),this.update()}},{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"cv-progress-reporter-display"})}}]),n}(je);function Me(t){return(Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Be(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ue(t,e){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=He(t);if(e){var i=He(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ve(this,n)}}function Ve(t,e){if(e&&("object"===Me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function He(t){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qe=r.a.getPlugin("plugin"),We="play",ze="playing",Ge="pause",Ye="seeking",Xe="seekstart",Ke="seekend",Qe="ended",$e="pausedseek",Je="timeupdate",Ze=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)}(o,t);var e,n,r,i=Fe(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=e,n.player.ready((function(){return n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t,e=this,n=(Ne(t={},We,(function(){return e.onPlay()})),Ne(t,Ge,(function(){return e.onPause()})),Ne(t,Je,(function(){return e.onTimeUpdate()})),Ne(t,Ye,(function(){return e.onSeeking()})),Ne(t,Qe,(function(){return e.onEnded()})),Ne(t,ze,(function(){return e.onPlaying()})),t),r=Object.keys(n);r.forEach((function(t){return e.player.on(t,n[t])})),this.one("dispose",(function(){r.forEach((function(t){return e.player.off(t,n[t])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,n=this,r="",i=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(r+=e.key)&&n.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){r=""}),500)},o=!1,a=function(){o=!0,e=window.setTimeout((function(){o&&n.addDisplay()}),1e4)};function s(){o=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",i);var u=this.player.getChild("Collapserator").getChild("PlayToggle");u.on("touchstart",a),u.on("touchend",s),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=n.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",i),u.off("touchstart",a),u.off("touchend",s)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new De(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(Ke),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(We)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(Ge),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(We)),this.isPlaying&&!this.isSeeking&&this.logEvent(ze)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent($e),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Xe))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Qe)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===Xe&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===ze||t===We)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===ze||t===Ge}},{key:"shouldClearCarriedOverTime",value:function(t){return t===Qe||t===$e}},{key:"flushBuffer",value:function(){for(var t,e,n=[],r={};this.eventBuffer.length;){var i=this.eventBuffer.shift();this.shouldClearCarriedOverTime(i.type)?delete this.lastPlayingTime:r.start?i.type===ze&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(i.type)&&(this.lastPlayingTime=i.time),r.end=i,n.push(r),r={}):(this.shouldUseCarriedOverTime(i.type)&&(i.time=this.lastPlayingTime,delete this.lastPlayingTime),r.start=i)}this.eventBuffer=[],n.length&&this.validateEvents(n)&&(this.options.onFlush(n),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(n))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var n=this.options.interval||5e3;return n/=1e3,n+=.5,n*=this.player.playbackRate(),e<n}}])&&Be(e.prototype,n),r&&Be(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(qe);r.a.registerPlugin("progressReporterPlugin",Ze);n(261);function tn(t){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function en(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rn(t,e){return(rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function on(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sn(t);if(e){var i=sn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return an(this,n)}}function an(t,e){if(e&&("object"===tn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sn(t){return(sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var un=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rn(t,e)}(a,t);var e,n,i,o=on(a);function a(){return en(this,a),o.apply(this,arguments)}return e=a,(n=[{key:"createEl",value:function(){return r.a.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&nn(e.prototype,n),i&&nn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component")),cn=["top","left","right","bottom"],ln={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(262);function fn(t){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dn(t,e,n){return e&&pn(t.prototype,e),n&&pn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function yn(){return(yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=mn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function mn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wn(t)););return t}function vn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gn(t,e)}function gn(t,e){return(gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wn(t);if(e){var i=wn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _n(this,n)}}function _n(t,e){if(e&&("object"===fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wn(t){return(wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tn=r.a.getComponent("Component"),Sn=function(t){vn(n,t);var e=bn(n);function n(t,r){var i;return hn(this,n),(i=e.call(this,t,r)).bindEventListeners(),i}return dn(n,[{key:"createEl",value:function(){return yn(wn(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),n=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},r=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},i=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",n),e.addEventListener("drop",r),e.addEventListener("dragleave",i),this.on("dispose",(function(){e.removeEventListener("dragover",n),e.removeEventListener("drop",r),e.removeEventListener("dragleave",i)}))}}]),n}(Tn),En=function(t){vn(n,t);var e=bn(n);function n(t,r){var i;return hn(this,n),(i=e.call(this,t,r)).addChildren(),i}return dn(n,[{key:"addChildren",value:function(){var t=this;cn.forEach((function(e){t.addChild(new Sn(t.player_,{side:e}))}))}}]),n}(Tn);function kn(t){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function On(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cn(){return(Cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Pn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Pn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=In(t)););return t}function xn(t,e){return(xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ln(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=In(t);if(e){var i=In(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return An(this,n)}}function An(t,e){if(e&&("object"===kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function In(t){return(In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xn(t,e)}(a,t);var e,n,i,o=Ln(a);function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"createEl",value:function(){return r.a.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var e=this;Cn(In(a.prototype),"handleClick",this).call(this,t),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}])&&On(e.prototype,n),i&&On(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("MenuItem"));function Rn(t){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mn(t,e){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Nn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Un(t);if(e){var i=Un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bn(this,n)}}function Bn(t,e){if(e&&("object"===Rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Un(t){return(Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mn(t,e)}(o,t);var e,n,r,i=Nn(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Dn(e.prototype,n),r&&Dn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));function Vn(t){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wn(){return(Wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function zn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}function Gn(t,e){return(Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kn(t);if(e){var i=Kn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xn(this,n)}}function Xn(t,e){if(e&&("object"===Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kn(t){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qn=r.a.getComponent("MenuButton"),$n=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gn(t,e)}(o,t);var e,n,r,i=Yn(o);function o(){var t;return Hn(this,o),(t=i.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=o,(n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,n=[new jn(this.player_,{label:"Video Controls"})];return cn.forEach((function(r){n.push(new Fn(t.player_,{side:r,label:ln[r],selectable:!0,multiSelectable:!1,selected:r===e}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Wn(Kn(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ln[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Qn.prototype.handleClick.apply(this)}}])&&qn(e.prototype,n),r&&qn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Qn);n(263);function Jn(t){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tr(t,e){return(tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function er(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rr(t);if(e){var i=rr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nr(this,n)}}function nr(t,e){if(e&&("object"===Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rr(t){return(rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ir="cv-whiteboard-side",or=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tr(t,e)}(a,t);var e,n,i,o=er(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=o.call(this,t)).side="bottom",e.player.ready((function(){e.initialize()})),e}return e=a,(n=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(p.a.hasLocalStorage()){var t=p.a.get(ir);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),n=new un(this.player);this.button=new $n(this.player),e.addChild(n),e.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){e.el().setAttribute("draggable","true")},i=function(){e.el().setAttribute("draggable","false")},o=function(e){t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle")},a=function(){t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),e.el().addEventListener("dragstart",o),e.el().addEventListener("dragend",a),this.on("dispose",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),e.el().removeEventListener("dragstart",o),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new En(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),p.a.hasLocalStorage()&&p.a.set(ir,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),r.a.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),r.a.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}])&&Zn(e.prototype,n),i&&Zn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getPlugin("plugin"));function ar(t){return(ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ur(t,e){return(ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function cr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fr(t);if(e){var i=fr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lr(this,n)}}function lr(t,e){if(e&&("object"===ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fr(t){return(fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerPlugin("whiteboardModePlugin",or);var hr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ur(t,e)}(o,t);var e,n,r,i=cr(o);function o(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t)}return e=o,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,n=this.player.textTracks(),r=0;r<n.length;r++){var i=n[r],o="showing"===i.mode;t.unshift({id:i.label,name:i.label,selected:o}),o&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];t.push({id:r.id,name:r.id+"p",selected:r.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&sr(e.prototype,n),r&&sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("deferMenusPlugin",hr);n(196),n(274);var pr=n(64),dr=n.n(pr),yr=(n(197),n(119),n(198),n(199),n(200),n(201),n(202),n(203),n(71)),mr=n.n(yr),vr=n(72),gr=n.n(vr),br=n(111),_r=n.n(br),wr=n(112),Tr=(n(204),n(205),n(206),n(207),n(208),null),Sr=null;function Er(){if(null===Tr){if("undefined"==typeof document)return Tr=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),Tr=n}return Tr}dr.a&&window.addEventListener("resize",(function(){Sr!==window.devicePixelRatio&&(Sr=window.devicePixelRatio,Tr=null)}));var kr=function(t){return Array.prototype.reduce.call(t,(function(t,e){var n=e.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t}),{})};function Or(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function Cr(t){return t&&t.ownerDocument?t.ownerDocument:document}var Pr=function(){function t(e,n){var r=this;this.onScroll=function(){var t=Or(r.el);r.scrollXTicking||(t.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(t.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(t){r.mouseX=t.clientX,r.mouseY=t.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(e=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(e||n)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(t,"x"):r.onTrackClick(t,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(t,"y"):r.onTrackClick(t,"y"))))},this.drag=function(e){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var u=(("y"===r.draggedAxis?e.pageY:e.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(t){var e=Cr(r.el),n=Or(r.el);t.preventDefault(),t.stopPropagation(),r.el.classList.remove(r.classNames.dragging),e.removeEventListener("mousemove",r.drag,!0),e.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){e.removeEventListener("click",r.preventClick,!0),e.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},n),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=mr()(this.recalculate.bind(this),64),this.onMouseMove=mr()(this.onMouseMove.bind(this),64),this.hideScrollbars=gr()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=gr()(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=_r()(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=e.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=t.getOffset(n),o=t.getOffset(r);n.scrollLeft=999;var a=t.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),n=Cr(t),r=Or(t);return{top:e.top+(r.pageYOffset||n.documentElement.scrollTop),left:e.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),dr.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),n=document.createElement("div");e.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),e.appendChild(n),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this,e=Or(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var n=!1,r=e.ResizeObserver||wr.a;this.resizeObserver=new r((function(){n&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=Or(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-l,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,n=this.contentEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=r/n;return e=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var n=this.contentWrapperEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,a=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],s=(a="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===e?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,n=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var n=Cr(this.el),r=Or(this.el),i=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-i.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var n=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var r=Or(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var i=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),a=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],s=("y"===e?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function t(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[e].offsetAttr]=a,i)),r.requestAnimationFrame(t)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[e].offsetAttr]=a,o)),r.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Er()}catch(t){return Er()}},e.removeListeners=function(){var t=this,e=Or(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return n.call(t,e)}))[0]},t}();Pr.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Pr.instances=new WeakMap,Pr.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Pr.instances.has(t)||new Pr(t,kr(t.attributes))}))},Pr.removeObserver=function(){this.globalObserver.disconnect()},Pr.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Pr.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},Pr.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Pr.instances.has(t)&&new Pr(t,kr(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Pr.instances.has(t)||new Pr(t,kr(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute('[data-simplebar="init"]')?Pr.instances.has(t)&&Pr.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Pr.instances.has(t)&&Pr.instances.get(t).unMount()})))}))}))},Pr.getOptions=kr,dr.a&&Pr.initHtmlApi();var xr=Pr;function Lr(t){return(Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ar(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ir(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function jr(){return(jr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Rr(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Rr(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Br(t)););return t}function Dr(t,e){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Br(t);if(e){var i=Br(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Nr(this,n)}}function Nr(t,e){if(e&&("object"===Lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Br(t){return(Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ur=r.a.getComponent("Menu"),Fr=Ur.prototype,Vr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dr(t,e)}(o,t);var e,n,r,i=Mr(o);function o(){return Ar(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"createEl",value:function(){var t=jr(Br(o.prototype),"createEl",this).call(this);return this.simpleBar=new xr(this.contentEl(),{autoHide:!1}),t}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():jr(Br(o.prototype),"contentEl",this).call(this)}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),jr(Br(o.prototype),"dispose",this).call(this)}},{key:"addItem",value:function(t){jr(Br(o.prototype),"addItem",this).call(this,t),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){jr(Br(o.prototype),"lockShowing",this).call(this),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||Fr.handleBlur.call(this,t)}}])&&Ir(e.prototype,n),r&&Ir(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Ur);function Hr(t){return(Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zr(t,e){return(zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xr(t);if(e){var i=Xr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yr(this,n)}}function Yr(t,e){if(e&&("object"===Hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Xr(t){return(Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Ur.prototype=Vr.prototype,r.a.registerComponent("Menu",Vr);var Kr=r.a.getComponent("Component"),Qr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zr(t,e)}(a,t);var e,n,i,o=Gr(a);function a(){return qr(this,a),o.apply(this,arguments)}return e=a,(n=[{key:"createMenu",value:function(){var t,e=new Vr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=r.a.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var i=new Kr(this.player_,{el:n});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e}}])&&Wr(e.prototype,n),i&&Wr(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("MenuButton"));r.a.registerComponent("MenuButton",Qr);n(298);function $r(t){return($r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ti(){return(ti="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ei(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ei(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oi(t)););return t}function ni(t,e){return(ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ri(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=oi(t);if(e){var i=oi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ii(this,n)}}function ii(t,e){if(e&&("object"===$r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function oi(t){return(oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ai=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ni(t,e)}(o,t);var e,n,r,i=ri(o);function o(){return Jr(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(ti(oi(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return ti(oi(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&Zr(e.prototype,n),r&&Zr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));ai.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},r.a.registerComponent("TimeWrapper",ai);n(299);function si(t){return(si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ui(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ci(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function li(t,e,n){return e&&ci(t.prototype,e),n&&ci(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function fi(){return(fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=hi(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function hi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vi(t)););return t}function pi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&di(t,e)}function di(t,e){return(di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=vi(t);if(e){var i=vi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mi(this,n)}}function mi(t,e){if(e&&("object"===si(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vi(t){return(vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gi=function(t){pi(n,t);var e=yi(n);function n(t,r){return ui(this,n),e.call(this,t,r)}return li(n,[{key:"handleClick",value:function(t){var e=this;fi(vi(n.prototype),"handleClick",this).call(this,t),this.requestAnimationFrame((function(){e.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,e,i){if(!this.options_.item)return fi(vi(n.prototype),"createEl",this).call(this,t,e,i);var o=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),s='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=r.a.dom.createEl("span",{innerHTML:a});var u=fi(vi(n.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""),innerHTML:s},i);return u.appendChild(this.valueHolder_),u}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}]),n}(r.a.getComponent("MenuItem")),bi=function(t){pi(n,t);var e=yi(n);function n(t,r){return ui(this,n),e.call(this,t,r)}return li(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(fi(vi(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(fi(vi(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),fi(vi(n.prototype),"pressButton",this).call(this))}},{key:"createItems",value:function(){for(var t,e=this,n=[],r=0;r<this.options_.items.length;r++){var i=this.options_.items[r];i.isCollabsible&&(i.showInCollabsibleMenu()&&i.isCollapsed&&n.push(new gi(this.player_,{item:i})))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var r,i=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(r=t.options)&&void 0!==r?r:{}));n.splice(t.index,0,i)})),n}},{key:"update",value:function(){fi(vi(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}]),n}(r.a.getComponent("MenuButton"));function _i(t){return(_i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wi(){return(wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ti(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ti(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Li(t)););return t}function Si(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ei(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ki(t,e,n){return e&&Ei(t.prototype,e),n&&Ei(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Oi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ci(t,e)}function Ci(t,e){return(Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Li(t);if(e){var i=Li(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xi(this,n)}}function xi(t,e){if(e&&("object"===_i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Li(t){return(Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("cogButton",bi);var Ai=r.a.getComponent("MenuItem"),Ii=r.a.getComponent("MenuButton"),ji=["large","medium","small"],Ri=function(t){Oi(n,t);var e=Pi(n);function n(t,r){return Si(this,n),e.call(this,t,r)}return ki(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(Ai),Di=function(t){Oi(n,t);var e=Pi(n);function n(t,r){var i;return Si(this,n),(i=e.call(this,t,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return ki(n,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var n=e.getSizeSetting(),r=[new jn(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return ji.map((function(e){r.push(new Ri(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===n,value:e}))})),r}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(wi(Li(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ii.prototype.handleClick.apply(this)}}]),n}(Ii);r.a.registerComponent("SubtitleSizeButton",Di);var Mi=n(24);function Ni(t){return(Ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ui(t,e){return(Ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hi(t);if(e){var i=Hi(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vi(this,n)}}function Vi(t,e){if(e&&("object"===Ni(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Hi(t){return(Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)}(o,t);var e,n,r,i=Fi(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"update",value:function(t,e){var n=this;if(null==t?void 0:t.length){var r=[],i=0;t.forEach((function(t){var o=n.options_.label.substr(i,t);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(t,e)),r.push("</span>"),i=t+e})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&Bi(e.prototype,n),r&&Bi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));function Wi(t){return(Wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gi(){return(Gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Yi(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Yi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ji(t)););return t}function Xi(t,e){return(Xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ki(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ji(t);if(e){var i=Ji(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qi(this,n)}}function Qi(t,e){if(e&&("object"===Wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return $i(t)}function $i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ji(t){return(Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Zi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xi(t,e)}(o,t);var e,n,r,i=Ki(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).onChange=function(t,e,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=function(){r=null,c=null,n||t.apply(this,s)};!r&&n&&t.apply(i,s),o.clearTimeout(r),r=o.setTimeout(c,e)};return s.cancel=a,s}(n.onChange,100,!1,$i(n)),n.bindEventListeners(),n}return e=o,(n=[{key:"createEl",value:function(){return Gi(Ji(o.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.menuButton.search(e.value)}}])&&zi(e.prototype,n),r&&zi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));n(300);function to(t){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function no(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ro(t,e,n){return e&&no(t.prototype,e),n&&no(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function io(){return(io="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=oo(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function oo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fo(t)););return t}function ao(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&so(t,e)}function so(t,e){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function uo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fo(t);if(e){var i=fo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return co(this,n)}}function co(t,e){if(e&&("object"===to(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lo(t)}function lo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ho=r.a.getComponent("MenuItem"),po=r.a.getComponent("MenuButton"),yo=function(t){ao(n,t);var e=uo(n);function n(){return eo(this,n),e.apply(this,arguments)}return ro(n,[{key:"createEl",value:function(t,e,r){return io(fo(n.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(ho),mo=function(t){ao(n,t);var e=uo(n);function n(t,r){var i;return eo(this,n),(i=e.call(this,t,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(lo(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return ro(n,[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=Mi.a.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var n=[new Zi(this.player_,{menuButton:this})],r=0;r<e.cues.length;r++){var i=e.cues[r];n.push(new qi(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new yo(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var n=Mi.a.getCurrentTextTrack(this.player_);if(null===(e=null==n?void 0:n.cues)||void 0===e?void 0:e.length){var r=this.findMatches(t,n);this.toggleItemVisibility(t,r),this.toggleNoResults(t,r)}}},{key:"findMatches",value:function(t,e){var n={};if(!t)return n;for(var r=new RegExp(t,"gi"),i=0;i<e.cues.length;i++){for(var o=e.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!t||e[r]?n.show():n.hide(),n.update(e[r],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var n=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(io(fo(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){io(fo(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){io(fo(n.prototype),"pressButton",this).call(this);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){po.prototype.handleClick.apply(this)}}]),n}(po);r.a.registerComponent("subtitleSearchButton",mo);n(301);function vo(t){return(vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function go(){return(go="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=bo(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function bo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Co(t)););return t}function _o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function To(t,e,n){return e&&wo(t.prototype,e),n&&wo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function So(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eo(t,e)}function Eo(t,e){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ko(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Co(t);if(e){var i=Co(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oo(this,n)}}function Oo(t,e){if(e&&("object"===vo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Co(t){return(Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Po=r.a.getComponent("MenuItem"),xo=r.a.getComponent("MenuButton"),Lo=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],Ao=function(t){So(n,t);var e=ko(n);function n(t,r){return _o(this,n),e.call(this,t,r)}return To(n,[{key:"createEl",value:function(){return r.a.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">&uArr;</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">&dArr;</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}]),n}(Po),Io=function(t){So(n,t);var e=ko(n);function n(){var t;return _o(this,n),(t=e.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return To(n,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new jn(this.player_,{label:"Keyboard Shortcuts"})),Lo.forEach((function(n){e.push(new Ao(t.player_,n))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat(go(Co(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){xo.prototype.handleClick.apply(this)}}]),n}(xo);r.a.registerComponent("KeyboardShortcutsButton",Io);n(302),n(303);function jo(t){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ro(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Do(){return(Do="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Mo(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Mo(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vo(t)););return t}function No(t,e){return(No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Vo(t);if(e){var i=Vo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uo(this,n)}}function Uo(t,e){if(e&&("object"===jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fo(t)}function Fo(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vo(t){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ho=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&No(t,e)}(o,t);var e,n,r,i=Bo(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(Fo(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return e=o,(n=[{key:"togglehidden",value:function(t){for(var e=0;e<this.children_.length;e++){var n=this.children_[e];n.isCollabsible&&(n.alwaysCollapsed||t?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.el().getBoundingClientRect();if(0!==t.width){this.addClass("cv-collapsorator-ready");var e=t.width<600;this.player_.options_.deferMenus&&(e=!0),this.togglehidden(e)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Do(Vo(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Do(Vo(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}}])&&Ro(e.prototype,n),r&&Ro(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function qo(t){return(qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Go(t,e){return(Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ko(t);if(e){var i=Ko(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xo(this,n)}}function Xo(t,e){if(e&&("object"===qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ko(t){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Ho.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},r.a.registerComponent("collapserator",Ho);var Qo=r.a.getComponent("SeekBar"),$o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Go(t,e)}(o,t);var e,n,r,i=Yo(o);function o(){return Wo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleMouseDown",value:function(t){Qo.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback")}},{key:"handleMouseMove",value:function(t){Qo.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Qo.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&zo(e.prototype,n),r&&zo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Qo);r.a.registerComponent("SeekBar",$o);var Jo=n(113);n(304);function Zo(t){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ta(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ea(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function na(){return(na="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ra(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ra(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=sa(t)););return t}function ia(t,e){return(ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function oa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sa(t);if(e){var i=sa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return aa(this,n)}}function aa(t,e){if(e&&("object"===Zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sa(t){return(sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ua=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ia(t,e)}(o,t);var e,n,r,i=oa(o);function o(){return ta(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(na(sa(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return na(sa(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered(Object(Jo.a)(t.player_))}))}}])&&ea(e.prototype,n),r&&ea(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function ca(t){return(ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function la(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ha(){return(ha="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=pa(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function pa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=va(t)););return t}function da(t,e){return(da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ya(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=va(t);if(e){var i=va(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ma(this,n)}}function ma(t,e){if(e&&("object"===ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function va(t){return(va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ga=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&da(t,e)}(o,t);var e,n,r,i=ya(o);function o(){return la(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(ha(va(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return ha(va(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&fa(e.prototype,n),r&&fa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function ba(t){return(ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ta(){return(Ta="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Sa(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Sa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ca(t)););return t}function Ea(t,e){return(Ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ka(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ca(t);if(e){var i=Ca(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oa(this,n)}}function Oa(t,e){if(e&&("object"===ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ca(t){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ea(t,e)}(o,t);var e,n,r,i=ka(o);function o(){return _a(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Ta(Ca(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Ta(Ca(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&wa(e.prototype,n),r&&wa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function xa(t){return(xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function La(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Aa(){return(Aa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ia(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ia(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ma(t)););return t}function ja(t,e){return(ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ra(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ma(t);if(e){var i=Ma(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Da(this,n)}}function Da(t,e){if(e&&("object"===xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ma(t){return(Ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Na=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ja(t,e)}(o,t);var e,n,r,i=Ra(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).playProgress=new Pa(n.player_),n.addChild(n.playProgress),n.loadProgress=new ga(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Aa(Ma(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return Aa(Ma(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var n=e/t;this.el_.style.width=100*n+"%";var r=this.options_.startTime/t;this.el_.style.left=100*r+"%",this.duration_=t}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&La(e.prototype,n),r&&La(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function Ba(t){return(Ba="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fa(){return(Fa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Va(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Va(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ga(t)););return t}function Ha(t,e){return(Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ga(t);if(e){var i=Ga(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wa(this,n)}}function Wa(t,e){if(e&&("object"===Ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return za(t)}function za(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ga(t){return(Ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ha(t,e)}(a,t);var e,n,i,o=qa(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).onDurationChange=n.onDurationChange.bind(za(n)),n.createChapterItems=n.createChapterItems.bind(za(n)),n.updateBuffered=n.updateBuffered.bind(za(n)),Mi.a.useTrack(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return e=a,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Fa(Ga(a.prototype),"dispose",this).call(this)}},{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=Fa(Ga(a.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"createChapterItems",value:function(t){var e,n;t&&(this.track_=t);var r=new ua(this.player_);if((null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length)&&!this.options_.ignoreChapters)for(var i=0;i<this.track_.cues.length;i++){var o=this.track_.cues[i],a=o.startTime,s=o.endTime,u=this.player_.duration();u&&(i===this.track_.cues.length-1&&o.endTime<this.player_.duration()&&(s=this.player_.duration()),s>u&&(s=u));var c=new Na(this.player_,{startTime:a,endTime:s});if(r.addChild(c),u&&s===u)break}else r.addChild(new Na(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=r,this.addChild(this.chapterBarItems)}}])&&Ua(e.prototype,n),i&&Ua(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("SeekBar"));Ya.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},r.a.browser.IS_IOS||r.a.browser.IS_ANDROID||Ya.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),r.a.registerComponent("ChapterSeekBar",Ya);n(305);function Xa(t){return(Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ka(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $a(){return($a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ja(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ja(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ns(t)););return t}function Za(t,e){return(Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ts(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ns(t);if(e){var i=ns(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return es(this,n)}}function es(t,e){if(e&&("object"===Xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ns(t){return(ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var rs=r.a.getComponent("ProgressControl"),is=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Za(t,e)}(o,t);var e,n,r,i=ts(o);function o(){var t;return Ka(this,o),(t=i.apply(this,arguments)).seekBarName_="seekBar",t}return e=o,(n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())==="seekBar".toLowerCase()&&(t=this.seekBarName_),$a(ns(o.prototype),"getChild",this).call(this,t)}}])&&Qa(e.prototype,n),r&&Qa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(rs);is.prototype.options_={children:[]},r.a.registerComponent("ProgressControl",is);var os=n(40);n(306);function as(t){return(as="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ss(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function us(){return(us="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=cs(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function cs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ps(t)););return t}function ls(t,e){return(ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ps(t);if(e){var i=ps(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hs(this,n)}}function hs(t,e){if(e&&("object"===as(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ps(t){return(ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ls(t,e)}(a,t);var e,n,i,o=fs(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).hasCustomChapterText=!1,Mi.a.useTrack(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return e=a,(n=[{key:"createEl",value:function(){var t=us(ps(a.prototype),"createEl",this).call(this);return this.chapter_=r.a.dom.createEl("div"),t.appendChild(this.chapter_),this.time_=r.a.dom.createEl("div"),t.appendChild(this.time_),t}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(r.a.dom.textContent(this.time_,Object(os.a)(t,e)),this.track_&&!this.hasCustomChapterText){for(var n=0;n<this.track_.cues.length;n++){var i=this.track_.cues[n],o=i.endTime||e;if(i.startTime<=t&&o>=t)return void r.a.dom.textContent(this.chapter_,i.text)}r.a.dom.textContent(this.chapter_,"")}}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,r.a.dom.textContent(this.chapter_,null!=t?t:"")}}])&&ss(e.prototype,n),i&&ss(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("TimeTooltip"));r.a.registerComponent("TimeTooltip",ds);n(307);function ys(t){return(ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ms(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vs(){return(vs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=gs(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function gs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ts(t)););return t}function bs(t,e){return(bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ts(t);if(e){var i=Ts(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ws(this,n)}}function ws(t,e){if(e&&("object"===ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ts(t){return(Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ss=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bs(t,e)}(a,t);var e,n,i,o=_s(a);function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t=vs(Ts(a.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=r.a.dom.createEl("img"),t.appendChild(this.img_),t}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var n=t.substr(0,e),r=t.substr(e+1);if("xywh="!==r.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,n;if(null===(n=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===n?void 0:n.length){for(var r,i=t,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,c=s.w,l=s.h,f=s.x,h=s.y,p=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(p,")"),this.el_.style.width=c+"px",this.el_.style.height=l+"px"}else this.disable()}}}])&&ms(e.prototype,n),i&&ms(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));Ss.prototype.options_={scaleFactor:1},r.a.registerComponent("ThumbnailDisplay",Ss);n(308);function Es(t){return(Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ks(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Os(t,e){return(Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Cs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ls(t);if(e){var i=Ls(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ps(this,n)}}function Ps(t,e){if(e&&("object"===Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xs(t)}function xs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ls(t){return(Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var As=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(o,t);var e,n,r,i=Cs(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,t,e),Mi.a.useTrack(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(xs(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return e=o,(n=[{key:"update",value:function(t,e){var n=this;this.requestAnimationFrame((function(){var r=e*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=t.width*e;o<i.width/2?n.el_.style.left=i.width/2+"px":o>t.width-i.width/2?n.el_.style.left=t.width-i.width/2+"px":n.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass("cv-mouse-time-display-force-show")}},{key:"removeForceShow",value:function(){this.removeClass("cv-mouse-time-display-force-show")}}])&&ks(e.prototype,n),r&&ks(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MouseTimeDisplay"));As.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},r.a.registerComponent("MouseTimeDisplay",As);n(309);function Is(t){return(Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function js(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rs(){return(Rs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Ds(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Ds(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Us(t)););return t}function Ms(t,e){return(Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ns(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Us(t);if(e){var i=Us(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Bs(this,n)}}function Bs(t,e){if(e&&("object"===Is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Us(t){return(Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fs=r.a.getComponent("ChaptersTrackMenuItem"),Vs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ms(t,e)}(o,t);var e,n,r,i=Ns(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).nonIconControl=!1,n.thumbnailDisplay=new Ss(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Mi.a.useTrack(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return e=o,(n=[{key:"update",value:function(){this.player_&&Fs.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,e,n){return this.nonIconControl=!0,Rs(Us(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},e),n)}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Object(os.a)(this.options_.cue.startTime,t),")</p>")+"</span>"}}])&&js(e.prototype,n),r&&js(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Fs);n(310);function Hs(t){return(Hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ws(){return(Ws="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zs(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function zs(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qs(t)););return t}function Gs(t,e){return(Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ys(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Qs(t);if(e){var i=Qs(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xs(this,n)}}function Xs(t,e){if(e&&("object"===Hs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ks(t)}function Ks(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qs(t){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gs(t,e)}(o,t);var e,n,r,i=Ys(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t,e,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(Ks(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Ws(Qs(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Ws(Qs(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new Vs(this.player_,{track:this.track_,cue:i});t.push(o)}return t}},{key:"setTrack",value:function(t){var e=this;Ws(Qs(o.prototype),"setTrack",this).call(this,t),this.track_&&"chapters"===this.track_.kind&&t.one("loadeddata",(function(){e.update()}))}},{key:"update",value:function(t){Ws(Qs(o.prototype),"update",this).call(this,t)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&qs(e.prototype,n),r&&qs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("ChaptersButton"));function Js(t){return(Js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function eu(){return(eu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=nu(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function nu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=au(t)););return t}function ru(t,e){return(ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=au(t);if(e){var i=au(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ou(this,n)}}function ou(t,e){if(e&&("object"===Js(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function au(t){return(au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("ChaptersButton",$s);var su=r.a.getComponent("OffTextTrackMenuItem"),uu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ru(t,e)}(o,t);var e,n,r,i=iu(o);function o(){return Zs(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleClick",value:function(t){su.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,e,n){return eu(au(o.prototype),"createEl",this).call(this,"li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},e),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n)}}])&&tu(e.prototype,n),r&&tu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(su);function cu(t){return(cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hu(t,e){return(hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yu(t);if(e){var i=yu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return du(this,n)}}function du(t,e){if(e&&("object"===cu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yu(t){return(yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("OffTextTrackMenuItem",uu);var mu=r.a.getComponent("TextTrackButton"),vu=r.a.getComponent("TextTrackMenuItem"),gu=r.a.getComponent("OffTextTrackMenuItem"),bu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hu(t,e)}(o,t);var e,n,r,i=pu(o);function o(){return lu(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vu;this.label_&&(t="".concat(this.label_," off")),e.push(new gu(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(o.kind,"-menu-item")),e.push(a)}}return e}}])&&fu(e.prototype,n),r&&fu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(mu);function _u(t){return(_u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Su(t,e){return(Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Eu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ou(t);if(e){var i=Ou(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ku(this,n)}}function ku(t,e){if(e&&("object"===_u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ou(t){return(Ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("TextTrackButton",bu);var Cu=r.a.getComponent("SubsCapsMenuItem"),Pu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Su(t,e)}(o,t);var e,n,r,i=Eu(o);function o(){return wu(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleClick",value:function(t){Cu.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&Tu(e.prototype,n),r&&Tu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Cu);function xu(t){return(xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Au(t,e){return(Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Iu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ru(t);if(e){var i=Ru(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ju(this,n)}}function ju(t,e){if(e&&("object"===xu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ru(t){return(Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Du=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Au(t,e)}(o,t);var e,n,r,i=Iu(o);function o(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(e=i.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-divider-after-menu-item"),e.addClass("cv-subtitle-size-menu-item"),e.controlText(", opens subtitle size settings"),e}return e=o,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&Lu(e.prototype,n),r&&Lu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("TextTrackMenuItem"));function Mu(t){return(Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bu(t,e){return(Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Uu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hu(t);if(e){var i=Hu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fu(this,n)}}function Fu(t,e){if(e&&("object"===Mu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vu(t)}function Vu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hu(t){return(Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bu(t,e)}(o,t);var e,n,r,i=Uu(o);function o(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(e=i.call(this,t,n)).addClass("vjs-texttrack-settings"),e.addClass("cv-subtitle-search-menu-item"),e.controlText(", opens subtitle search"),e.toggleEnabled=e.toggleEnabled.bind(Vu(e));var r=e.player_.textTracks();return r.addEventListener("selectedlanguagechange",e.toggleEnabled),e.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",e.toggleEnabled)})),e.toggleEnabled(),e}return e=o,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=Mi.a.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,n=Mi.a.getCurrentTextTrack(this.player_);(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&Nu(e.prototype,n),r&&Nu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("TextTrackMenuItem"));n(311);function Wu(t){return(Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yu(){return(Yu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Xu(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Xu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ju(t)););return t}function Ku(t,e){return(Ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Qu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ju(t);if(e){var i=Ju(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $u(this,n)}}function $u(t,e){if(e&&("object"===Wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ju(t){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Zu=r.a.getComponent("TextTrackButton"),tc=r.a.getComponent("SubsCapsButton"),ec=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ku(t,e)}(o,t);var e,n,r,i=Qu(o);function o(){var t;return zu(this,o),(t=i.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Yu(Ju(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new qu(this.player_)),t.push(new Du(this.player_)),this.hideThreshold_=this.hideThreshold_+2),Zu.prototype.createItems.call(this,t,Pu)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var n=t[e];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){tc.prototype.handleClick.apply(this)}}])&&Gu(e.prototype,n),r&&Gu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(tc);function nc(t){return(nc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rc(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */rc=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==nc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function ic(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oc(t,e){return(oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ac(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=cc(t);if(e){var i=cc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sc(this,n)}}function sc(t,e){if(e&&("object"===nc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return uc(t)}function uc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cc(t){return(cc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("SubsCapsButton",ec);var lc=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},fc="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Wt,"</span>"),hc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oc(t,e)}(o,t);var e,n,r,i=ac(o);function o(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).qualityId=e.qualityId;var r=t.qualityLevels(),a=n.handleQualityChange.bind(uc(n));return r.on("change",a),t.one("dispose",(function(){r.off("change",a)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(uc(n)),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return e=o,(n=[{key:"handleLocalCacheChange",value:function(){return lc(this,void 0,void 0,rc().mark((function t(){var e,n;return rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(n=t.sent)?void 0:n.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:n.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+fc);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var n=t[e];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],n=e&&e.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&ic(e.prototype,n),r&&ic(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("MenuItem"));n(312);function pc(t){return(pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yc(){return(yc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=mc(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function mc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wc(t)););return t}function vc(t,e){return(vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wc(t);if(e){var i=wc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return bc(this,n)}}function bc(t,e){if(e&&("object"===pc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _c(t)}function _c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wc(t){return(wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tc={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},Sc=r.a.getComponent("MenuButton"),Ec=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vc(t,e)}(o,t);var e,n,r,i=gc(o);function o(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(_c(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),t.one("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(yc(wc(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(yc(wc(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new jn(this.player_,{label:"Quality"}));for(var n=0;n<e.length;n++){var r=e[n];if(r){var i=Tc[r.id];i&&t.push(new hc(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?Tc[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){Sc.prototype.handleClick.apply(this)}}])&&dc(e.prototype,n),r&&dc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Sc);r.a.registerComponent("QualityButton",Ec);n(313);function kc(t){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pc(){return(Pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=xc(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function xc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jc(t)););return t}function Lc(t,e){return(Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ac(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jc(t);if(e){var i=jc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ic(this,n)}}function Ic(t,e){if(e&&("object"===kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jc(t){return(jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rc=r.a.getComponent("Menu"),Dc=r.a.getComponent("MenuButton"),Mc=r.a.getComponent("PlaybackRateMenuItem"),Nc=r.a.getComponent("PlaybackRateMenuButton"),Bc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lc(t,e)}(a,t);var e,n,i,o=Ac(a);function a(){var t;return Oc(this,a),(t=o.apply(this,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=a,(n=[{key:"createEl",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Dc.prototype.createEl).apply.apply(t,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat(Pc(jc(a.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var t=new Rc(this.player(),{menuButton:this});t.addItem(new jn(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var n=0;n<e.length;n++){var r=e[n]+"x";1===e[n]&&(r+=" (Normal)"),t.addItem(new Mc(this.player(),{rate:r}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Dc.prototype.handleClick).apply.apply(t,[this].concat(n))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=Nc.prototype.updateLabel).apply.apply(t,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=r.a.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Cc(e.prototype,n),i&&Cc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(Nc);function Uc(t){return(Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hc(t,e){return(Hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=zc(t);if(e){var i=zc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wc(this,n)}}function Wc(t,e){if(e&&("object"===Uc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function zc(t){return(zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.a.registerComponent("PlaybackRateMenuButton",Bc);var Gc=r.a.getComponent("TextTrackSettings"),Yc={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Xc={small:Yc,medium:Object.assign(Object.assign({},Yc),{fontPercent:1.5}),large:Object.assign(Object.assign({},Yc),{fontPercent:2})},Kc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hc(t,e)}(o,t);var e,n,r,i=qc(o);function o(){return Fc(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var n=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){n.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Xc[this.size_]?Xc[this.size_]:Yc}}])&&Vc(e.prototype,n),r&&Vc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Gc);r.a.registerComponent("TextTrackSettings",Kc);n(314);function Qc(t){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jc(){return(Jc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Zc(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Zc(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rl(t)););return t}function tl(t,e){return(tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function el(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rl(t);if(e){var i=rl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(t,e){if(e&&("object"===Qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rl(t){return(rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var il=window.navigator&&window.navigator.userAgent||"",ol=(/iPod/i.test(il),/Android/i.test(il),r.a.getComponent("Player")),al=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}(o,t);var e,n,r,i=el(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,t,e),e.mobile&&n.addClass("cv-mobile-player"),n}return e=o,(n=[{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,e){var n=this;if("number"!=typeof t||!this.callback_||e)return Jc(rl(o.prototype),"currentTime",this).call(this,t);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return Jc(rl(o.prototype),"play",this).call(this);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(ol.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=e.split(":"),r=+n[1]/+n[0];t.style.maxWidth=85/r+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;ol.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&$c(e.prototype,n),r&&$c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(ol);al.prototype.options_=Object.assign(Object.assign({},ol.prototype.options_),{setMaxHeight:!0}),r.a.registerComponent("player",al);n(315);function sl(t){return(sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ul(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cl(t,e){return(cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ll(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pl(t);if(e){var i=pl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fl(this,n)}}function fl(t,e){if(e&&("object"===sl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return hl(t)}function hl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pl(t){return(pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var dl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cl(t,e)}(a,t);var e,n,i,o=ll(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(hl(n)),n.player_.one("firstplay",n.onFirstPlay),n}return e=a,(n=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return r.a.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&ul(e.prototype,n),i&&ul(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));r.a.registerComponent("PlayPauseFeedback",dl);n(316);function yl(t){return(yl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ml(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gl(t,e){return(gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wl(t);if(e){var i=wl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _l(this,n)}}function _l(t,e){if(e&&("object"===yl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wl(t){return(wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Tl=r.a.getComponent("PlayToggle"),Sl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)}(o,t);var e,n,r,i=bl(o);function o(){return ml(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"handleClick",value:function(t){var e=this;Tl.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&vl(e.prototype,n),r&&vl(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Tl);r.a.registerComponent("PlayToggle",Sl);n(157);function El(t){return(El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ol(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cl(t,e){return(Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ll(t);if(e){var i=Ll(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xl(this,n)}}function xl(t,e){if(e&&("object"===El(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ll(t){return(Ll=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Al=r.a.getComponent("TextTrackDisplay"),Il=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)}(o,t);var e,n,r,i=Pl(o);function o(){return kl(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"updateDisplayState",value:function(t){Al.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),n=t.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;o.style.fontSize=a*e.fontPercent+"px"}}}}}])&&Ol(e.prototype,n),r&&Ol(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(Al);r.a.registerComponent("TextTrackDisplay",Il);n(317),n(318),n(319),n(320);var jl,Rl=n(11),Dl=n.n(Rl);function Ml(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nl(t){t.paused()?t.play():t.pause()}function Bl(t,e){t.currentTime(t.currentTime()+e)}function Ul(t,e){t.volume(t.volume()+e)}var Fl=(Ml(jl={},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),Ml(jl,"m",(function(t){var e=t.volume(),n=t.lastVolume_();if(0===e){var r=n<.1?.1:n;t.volume(r),t.muted(!1)}else t.muted(!t.muted())})),Ml(jl,"k",Nl),Ml(jl,"space",Nl),Ml(jl,"left",(function(t){return Bl(t,-5)})),Ml(jl,"right",(function(t){return Bl(t,5)})),Ml(jl,"j",(function(t){return Bl(t,-10)})),Ml(jl,"l",(function(t){return Bl(t,10)})),Ml(jl,"up",(function(t){return Ul(t,.05)})),Ml(jl,"down",(function(t){return Ul(t,-.05)})),jl);function Vl(t){var e=Dl()(t);Fl[e]&&(["space"].includes(e)&&(t.preventDefault(),t.stopPropagation()),Fl[e](this,t))}var Hl,ql=n(41);function Wl(t){return(Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zl(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gl(t,e)}function Gl(t,e){return(Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kl(t);if(e){var i=Kl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xl(this,n)}}function Xl(t,e){if(e&&("object"===Wl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kl(t){return(Kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ql(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jl(t,e,n){return e&&$l(t.prototype,e),n&&$l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}!function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage"}(Hl||(Hl={}));var Zl=function(){function t(e){if(Ql(this,t),this.cachePrefix="_cv:",this.expireTime=3600,this.type=e.type,this.hasSupport=this.hasBrowserSupport(),this.hasSupport)try{this.storage=window[this.type]}catch(t){}}return Jl(t,[{key:"get",value:function(t){if(this.hasSupport){var e=this.storage.getItem(t);try{return JSON.parse(e)}catch(t){return e}}}},{key:"set",value:function(t,e){if(this.hasSupport)try{return this.storage.removeItem(t),"string"!=typeof e?(this.storage.setItem(t,JSON.stringify(e)),!0):(this.storage.setItem(t,e),!0)}catch(t){return!1}}},{key:"remove",value:function(t){if(this.hasSupport)return this.storage.removeItem(t)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=e&&e};return this.set("".concat(this.cachePrefix).concat(t),r)}},{key:"cacheGet",value:function(t){var e="".concat(this.cachePrefix).concat(t),n=this.get(e);return n?this.isExpired(n)?(this.remove(e),null):n.data:null}},{key:"cacheExists",value:function(t){var e="".concat(this.cachePrefix).concat(t),n=this.get(e);return!!n&&(!this.isExpired(n)||(this.remove(e),!1))}},{key:"cacheRemove",value:function(t){return this.remove("".concat(this.cachePrefix).concat(t))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var t=0;t<this.storage.length;t++){var e=this.storage.key(t);if(0===e.indexOf(this.cachePrefix)){var n=this.get(e);n&&n.time&&this.isExpired(n)&&this.remove(e)}}}},{key:"isExpired",value:function(t){return t.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(t){return!1}}}]),t}(),tf=function(t){zl(n,t);var e=Yl(n);function n(){return Ql(this,n),e.apply(this,arguments)}return Jl(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:Hl.LocalStorage}))}}]),n}(Zl),ef=function(t){zl(n,t);var e=Yl(n);function n(){return Ql(this,n),e.apply(this,arguments)}return Jl(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:Hl.SessionStorage}))}}]),n}(Zl),nf=tf.Instance,rf=(ef.Instance,"URLSearchParams"in self),of="Symbol"in self&&"iterator"in Symbol,af="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),sf="FormData"in self,uf="ArrayBuffer"in self;if(uf)var cf=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lf=ArrayBuffer.isView||function(t){return t&&cf.indexOf(Object.prototype.toString.call(t))>-1};function ff(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function hf(t){return"string"!=typeof t&&(t=String(t)),t}function pf(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return of&&(e[Symbol.iterator]=function(){return e}),e}function df(t){this.map={},t instanceof df?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function yf(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function mf(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function vf(t){var e=new FileReader,n=mf(e);return e.readAsArrayBuffer(t),n}function gf(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function bf(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:af&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:sf&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:rf&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():uf&&af&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=gf(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):uf&&(ArrayBuffer.prototype.isPrototypeOf(t)||lf(t))?this._bodyArrayBuffer=gf(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):rf&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},af&&(this.blob=function(){var t=yf(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?yf(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(vf)}),this.text=function(){var t,e,n,r=yf(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=mf(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},sf&&(this.formData=function(){return this.text().then(Tf)}),this.json=function(){return this.text().then(JSON.parse)},this}df.prototype.append=function(t,e){t=ff(t),e=hf(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},df.prototype.delete=function(t){delete this.map[ff(t)]},df.prototype.get=function(t){return t=ff(t),this.has(t)?this.map[t]:null},df.prototype.has=function(t){return this.map.hasOwnProperty(ff(t))},df.prototype.set=function(t,e){this.map[ff(t)]=hf(e)},df.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},df.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),pf(t)},df.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),pf(t)},df.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),pf(t)},of&&(df.prototype[Symbol.iterator]=df.prototype.entries);var _f=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function wf(t,e){var n,r,i=(e=e||{}).body;if(t instanceof wf){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new df(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new df(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),_f.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Tf(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function Sf(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"",this.headers=new df(e.headers),this.url=e.url||"",this._initBody(t)}wf.prototype.clone=function(){return new wf(this,{body:this._bodyInit})},bf.call(wf.prototype),bf.call(Sf.prototype),Sf.prototype.clone=function(){return new Sf(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new df(this.headers),url:this.url})},Sf.error=function(){var t=new Sf(null,{status:0,statusText:""});return t.type="error",t};var Ef=[301,302,303,307,308];Sf.redirect=function(t,e){if(-1===Ef.indexOf(e))throw new RangeError("Invalid status code");return new Sf(null,{status:e,headers:{location:t}})};var kf=self.DOMException;try{new kf}catch(t){(kf=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),kf.prototype.constructor=kf}function Of(t,e){return new Promise((function(n,r){var i=new wf(t,e);if(i.signal&&i.signal.aborted)return r(new kf("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var t,e,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new df,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Sf(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new kf("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&self.location.href?self.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(af?o.responseType="blob":uf&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(t,e){o.setRequestHeader(e,t)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Of.polyfill=!0,self.fetch||(self.fetch=Of,self.Headers=df,self.Request=wf,self.Response=Sf);var Cf=n(186),Pf=n.n(Cf),xf=n(187);function Lf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Af(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Af(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Af(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var If={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function jf(t,e,n){var r=Lf(e.exec(n)||[],1)[0];return r||(r="Unknown"),{name:t,version:r}}function Rf(t,e,n){if(!e)return{name:t,version:"Unknown"};var r=e.exec(n);return{name:t,version:r&&r.length?r[0].trim():"Unknown"}}var Df=function(){var t=window.navigator.userAgent;return If.android.test(t)?Rf("Android",If.androidVersion,t):If.iphone.test(t)||If.ipad.test(t)?Rf("iOS",If.iosVersion,t):If.linux.test(t)?Rf("Linux",null,t):If.unix.test(t)?Rf("Unix",null,t):If.mac.test(t)?Rf("Macintosh",If.osxVersion,t):If.windows.test(t)?function(t,e){var n={name:t,version:null};return If.win2000.test(e)&&(n.version="2000"),If.winXP.test(e)&&(n.version="XP"),If.winVista.test(e)&&(n.version="Vista"),If.win7.test(e)&&(n.version="7"),If.win8.test(e)&&(n.version="8"),If.win81.test(e)&&(n.version="8.1"),If.win10.test(e)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",t):If.blackberry.test(t)?Rf("BlackBerry",If.blackberryVersion,t):If.windowsPhone.test(t)?Rf("Windows Phone",If.windowsPhoneVersion,t):{name:"Unknown",version:"Unknown"}},Mf=function(){var t=window.navigator.userAgent;return If.chrome.test(t)?jf("Chrome",If.generalVersion,t):If.firefox.test(t)?jf("Firefox",If.generalVersion,t):If.safari.test(t)?jf("Safari",If.generalVersion,t):If.ie.test(t)?jf("Internet Explorer",If.ieVersion,t):If.edge.test(t)?jf("Edge",If.edgeVersion,t):If.opera.test(t)?jf("Opera",If.operaVersion,t):{name:"Unknown",version:"Unknown"}};function Nf(t){return(Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Bf,Uf=function(t){var e=Nf(t);return"function"===e||"object"===e&&!!t},Ff=function(t){return"function"==typeof t},Vf=function(t,e){if(t){var n=t;return t.endsWith("/")||(n+="/"),e?n+=e.startsWith("/")?e.slice(1):e:n}},Hf=n(82);!function(t){t.CvApSoutheast1="cv-ap-southeast-1",t.CvApSoutheast2="cv-ap-southeast-2",t.CvEuWest1="cv-eu-west-1",t.CvNaWest1="cv-na-west-1"}(Bf||(Bf={}));var qf={CvApSoutheast1:{systemName:Bf.CvApSoutheast1},CvApSoutheast2:{systemName:Bf.CvApSoutheast2},CvEuWest1:{systemName:Bf.CvEuWest1},CvNaWest1:{systemName:Bf.CvNaWest1}};function Wf(t){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zf=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Wf(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Gf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Yf=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Xf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(t)){e.next=2;break}return e.abrupt("return",this.logBulk(t));case 2:if(this.shouldLog(t)){e.next=4;break}return e.abrupt("return");case 4:return this.validateEvent(t),e.t0=this,e.next=8,this.formatData(t);case 8:return e.t1=e.sent,e.next=11,e.t0.postData.call(e.t0,e.t1);case 11:case"end":return e.stop()}}),e,this)})))}},{key:"logBulk",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n,r,i=this;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=t.filter((function(t){return i.shouldLog(t)}))).length){e.next=3;break}return e.abrupt("return");case 3:return n.forEach((function(t){return i.validateEvent(t)})),e.next=6,Promise.all(n.map((function(t){return i.formatData(t)})));case 6:return r=e.sent,e.next=9,this.postData(r);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"validateOptions",value:function(){if(!Ff(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(t){return!Ff(this.options.shouldLog)||this.options.shouldLog(t)}},{key:"postData",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n,r,i,o,a;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=e.sent,r=JSON.stringify(t),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=Vf(n,"/v1/ingest"),Array.isArray(t)&&(o=Vf(o,"/bulk")),e.prev=7,e.next=10,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 10:(a=e.sent).ok||this.logError(new Error("CollectionApiClient failed to log event. Status: ".concat(a.status," ").concat(a.statusText))),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),this.logError(e.t0);case 17:case"end":return e.stop()}}),e,this,[[7,14]])})))}},{key:"getSignatureHeader",value:function(t){var e=new Pf.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return e.update(t),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(e.getHash("B64"))}}},{key:"getRegionalUrl",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRegion();case 2:n=e.sent,e.t0=n.systemName,e.next=e.t0===Bf.CvEuWest1?6:e.t0===Bf.CvApSoutheast2?7:e.t0===Bf.CvNaWest1?8:(e.t0,Bf.CvApSoutheast1,9);break;case 6:return e.abrupt("return",t.cvEuWest1);case 7:return e.abrupt("return",t.cvApSoutheast2);case 8:return e.abrupt("return",t.cvNaWest1);case 9:return e.abrupt("return",t.cvApSoutheast1);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"validateEvent",value:function(t){"string"!=typeof t.type&&this.logError(new Error("Event type is required."),!0),Uf(t.actionContext)||this.logError(new Error("Event actionContext is required."),!0),t.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}},{key:"formatData",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.type,e.next=3,this.getEventData(t);case 3:return e.t1=e.sent,e.t2=this.getEventMetadata(t),e.abrupt("return",{type:e.t0,data:e.t1,metadata:e.t2});case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getEventData",value:function(t){return Yf(this,void 0,void 0,zf().mark((function e(){var n,r,i,o,a,s,u=this;return zf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.actionContext,e.next=3,this.getUserData();case 3:return r=e.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(t),a=Object.keys(i).map((function(t){return t.toLowerCase()})),s=Object.keys(o).map((function(t){return t.toLowerCase()})),a.forEach((function(t){s.includes(t)&&u.logError(new Error("".concat(t," is a reserved key.")),!0)})),e.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return e.stop()}}),e,this)})))}},{key:"extractData",value:function(t){return Ff(this.options.formatData)?this.options.formatData(t):(e={},n=t.actionContext.entity,r=t.data,n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e);var e,n,r}},{key:"getUserData",value:function(){var t,e;return Yf(this,void 0,void 0,zf().mark((function n(){var r;return zf().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.options.getUser();case 3:if(null==(r=n.sent)?void 0:r.id){n.next=6;break}return n.abrupt("return");case 6:return n.t0=r.id,n.t1=(null===(t=r.role)||void 0===t?void 0:t.toLowerCase())||"unknown",n.t2=(null===(e=r.userGroup)||void 0===e?void 0:e.toLowerCase())||Hf.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=17,this.getRegion();case 17:return n.t9=n.sent,n.t10={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:!1},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t10});case 22:n.prev=22,n.t11=n.catch(0),this.logError(n.t11);case 25:case"end":return n.stop()}}),n,this,[[0,22]])})))}},{key:"getRegion",value:function(){return Yf(this,void 0,void 0,zf().mark((function t(){var e,n;return zf().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.options.regionName,t.prev=1,t.next=4,this.options.getUser();case 4:(null==(n=t.sent)?void 0:n.instanceRegion)&&(e=n.instanceRegion),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),this.logError(t.t0);case 11:return e||this.logError(new Error("RegionName is not set."),!0),t.abrupt("return",this.getRegionByName(e.toLowerCase()));case 13:case"end":return t.stop()}}),t,this,[[1,8]])})))}},{key:"getPlatformMetadata",value:function(){return{browser:Mf(),os:Df(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(t){return{client:{name:"".concat(this.name,".ts"),version:xf.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:t.eventVersion}}},{key:"getRegionByName",value:function(t){var e;return Object.values(qf).forEach((function(n){n.systemName===t&&(e=n)})),e}},{key:"normalizeYearGroup",value:function(t){return t?t.toLowerCase().split(" ").join("_"):"unknown"}},{key:"logError",value:function(t,e){if(this.options.logError&&this.options.logError(t),e)throw t}}])&&Gf(e.prototype,n),r&&Gf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Kf=n(3),Qf=function(){return!0},$f=function(){return!1};var Jf,Zf,th,eh,nh=function(t){return t},rh={getUploadData:function(t,e){var n=e.actionContext.entity;if(n===Kf.EntityType.Video)return rh.formatVideoUpload(t,e);if(n===Kf.EntityType.Resource||n===Kf.EntityType.Subtitle)return rh.formatResourceUpload(t);if(n===Kf.EntityType.Banner||n===Kf.EntityType.Thumbnail)return t;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(t,e){var n=e.actionContext.workflowPhase;return n===Kf.WorkflowPhase.Start?rh.getStartVideoUploadData(t):n===Kf.WorkflowPhase.Discard?rh.getDiscardVideoUploadData(t):n===Kf.WorkflowPhase.Complete?rh.getCompleteUploadData(t):void 0},getStartVideoUploadData:function(t){return t&&t.length?(t instanceof FileList&&(t=Array.from(t)),t.map((function(e){return{fileName:e.name,size:e.size,type:e.type,count:t.length}}))):[]},getDiscardVideoUploadData:function(t){var e=function(e){var n=e.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(t)?t.length:1,type:r,status:o};return e.progress&&(s.progress=e.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(t)?t.map((function(t){return e(t)})):[e(t)]},getCompleteUploadData:function(t){return t&&t.length?t.map((function(e){return{fileName:e.fileName,libraryId:e.libraryId,folderId:e.folderId,autoCaption:e.autoCaption,count:t.length}})):[]},formatResourceUpload:function(t){var e={id:t.id,name:t.name};return Uf(t.metadata)&&(e.type=t.metadata.type),e}},ih=function(t){var e,n,r,i,o={id:t.id};return(null===(e=t.video)||void 0===e?void 0:e.id)&&(o.video={id:t.video.id}),(null===(n=t.clip)||void 0===n?void 0:n.id)&&(o.clip={id:t.clip.id},(null===(r=t.clip.video)||void 0===r?void 0:r.id)&&(o.video={id:null===(i=t.clip.video)||void 0===i?void 0:i.id})),void 0!==t.shareCount&&(o.shareCount=t.shareCount),t.embedDetails&&(o.embedDetails=o.embedDetails),o};function oh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ah=(oh(Jf={},Kf.UserAction.Navigate,$f),oh(Jf,Kf.UserAction.Click,Qf),oh(Jf,Kf.UserAction.Search,Qf),oh(Jf,Kf.UserAction.InstantSearch,Qf),oh(Jf,Kf.UserAction.Play,Qf),oh(Jf,Kf.UserAction.Stream,Qf),oh(Jf,Kf.UserAction.WebPlayerStream,Qf),oh(Jf,Kf.UserAction.StreamProgress,Qf),oh(Jf,Kf.UserAction.Rename,Qf),oh(Jf,Kf.UserAction.Move,Qf),oh(Jf,Kf.UserAction.Create,Qf),oh(Jf,Kf.UserAction.Delete,Qf),oh(Jf,Kf.UserAction.Associate,Qf),oh(Jf,Kf.UserAction.Dissociate,Qf),oh(Jf,Kf.UserAction.Filter,Qf),oh(Jf,Kf.UserAction.Sort,Qf),oh(Jf,Kf.UserAction.Approve,Qf),oh(Jf,Kf.UserAction.Reject,Qf),oh(Jf,Kf.UserAction.Disable,Qf),oh(Jf,Kf.UserAction.Upload,Qf),oh(Jf,Kf.UserAction.Download,$f),oh(Jf,Kf.UserAction.SetAccess,Qf),oh(Jf,Kf.UserAction.AddToLocalCache,$f),oh(Jf,Kf.UserAction.Share,Qf),oh(Jf,Kf.UserAction.Unshare,Qf),oh(Jf,Kf.UserAction.Edit,Qf),oh(Jf,Kf.UserAction.Suggest,Qf),oh(Jf,Kf.UserAction.Favourite,Qf),oh(Jf,Kf.UserAction.ResolveWarning,Qf),oh(Jf,Kf.UserAction.DismissWarning,Qf),oh(Jf,Kf.UserAction.EditAssoc,Qf),oh(Jf,Kf.UserAction.Follow,Qf),oh(Jf,Kf.UserAction.Print,Qf),oh(Jf,Kf.UserAction.Copy,Qf),oh(Jf,Kf.UserAction.Activate,Qf),oh(Jf,Kf.UserAction.VerifyEmail,Qf),oh(Jf,Kf.UserAction.ChangePassword,Qf),oh(Jf,Kf.UserAction.Export,Qf),oh(Jf,Kf.UserAction.SendEmail,Qf),oh(Jf,Kf.UserAction.Publish,Qf),oh(Jf,Kf.UserAction.Answer,Qf),oh(Jf,Kf.UserAction.Complete,Qf),oh(Jf,Kf.UserAction.Archive,Qf),oh(Jf,Kf.UserAction.Promote,Qf),oh(Jf,Kf.UserAction.Demote,Qf),Jf),sh=(oh(Zf={},Kf.UserAction.Search,nh),oh(Zf,Kf.UserAction.InstantSearch,nh),oh(Zf,Kf.UserAction.Play,nh),oh(Zf,Kf.UserAction.Stream,nh),oh(Zf,Kf.UserAction.StreamProgress,nh),oh(Zf,Kf.UserAction.Click,nh),oh(Zf,Kf.UserAction.Filter,nh),oh(Zf,Kf.UserAction.Sort,nh),oh(Zf,Kf.UserAction.SetAccess,nh),oh(Zf,Kf.UserAction.Approve,nh),oh(Zf,Kf.UserAction.Reject,nh),oh(Zf,Kf.UserAction.Create,nh),oh(Zf,Kf.UserAction.Delete,nh),oh(Zf,Kf.UserAction.Rename,nh),oh(Zf,Kf.UserAction.Move,nh),oh(Zf,Kf.UserAction.Edit,nh),oh(Zf,Kf.UserAction.Share,ih),oh(Zf,Kf.UserAction.Disable,nh),oh(Zf,Kf.UserAction.Suggest,nh),oh(Zf,Kf.UserAction.Upload,rh.getUploadData),oh(Zf,Kf.UserAction.ResolveWarning,nh),oh(Zf,Kf.UserAction.DismissWarning,nh),oh(Zf,Kf.UserAction.Follow,nh),oh(Zf,Kf.UserAction.Print,nh),oh(Zf,Kf.UserAction.Copy,nh),Zf),uh=(oh(th={},Kf.UserAction.Search,(function(){return"search"})),oh(th,Kf.UserAction.InstantSearch,(function(){return"search"})),oh(th,Kf.UserAction.Filter,(function(){return"filter"})),oh(th,Kf.UserAction.Stream,(function(){return Kf.EntityType.Video})),th),ch={user:"target_user"},lh=(oh(eh={},Kf.UserAction.StreamProgress,!0),oh(eh,Kf.UserAction.WebPlayerStream,!0),eh),fh={shouldLog:function(t){return!!ah[t.type](t)},formatData:function(t){var e=sh[t.type],n=Ff(e)?e(t.data,t):t.data;if(lh[t.type])return n;var r=t.actionContext.entity;return Ff(uh[t.type])&&(r=uh[t.type](t)),ch[r]&&(r=ch[r]),oh({},r,n)}};function hh(t){return(hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ph(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ph=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==hh(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function dh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yh=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},mh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()}var e,n,r;return e=t,(n=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);nf.cacheExists(t)||(this.collectionApiClient.log({type:Kf.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Kf.EventVersion.V2}),nf&&nf.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,n=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:Kf.UserAction.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},n),{progress:t}),eventVersion:Kf.EventVersion.V1}})))}},{key:"logUserAction",value:function(t,e){var n=Object.assign(Object.assign({},this.getAnalyticsData()),t);this.collectionApiClient.log({type:e.actionType,data:n,actionContext:{productArea:e.productArea,location:this.getLocationContext(),entity:e.entity,descriptor:e.descriptor,workflowPhase:e.workflowPhase},eventVersion:Kf.EventVersion.V1})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Kf.EntityType.Interactive?t.interactive={id:+this.options.mediaId}:e===Kf.EntityType.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new Xf({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:fh.shouldLog,formatData:fh.formatData})}},{key:"getCurrentUser",value:function(){return yh(this,void 0,void 0,ph().mark((function t(){return ph().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Kf.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Kf.EntityType.Video;case"MasterInteractive":return Kf.EntityType.Interactive;case"MasterClip":return Kf.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Kf.LocationContext.Player;case"interactive-player":return Kf.LocationContext.InteractivePlayer;case"create-clip-player":return Kf.LocationContext.CreateClipPlayer}}}])&&dh(e.prototype,n),r&&dh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return(vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bh(){return(bh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=_h(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function _h(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eh(t)););return t}function wh(t,e){return(wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Th(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Eh(t);if(e){var i=Eh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sh(this,n)}}function Sh(t,e){if(e&&("object"===vh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Eh(t){return(Eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var kh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wh(t,e)}(o,t);var e,n,r,i=Th(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).options_=e,n}return e=o,(n=[{key:"createEl",value:function(t,e,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return bh(Eh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,bh(Eh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,bh(Eh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var n=t.toString();if(n.length>=e)return n;for(e-=n.length;e>0;)n="0"+n,e--;return n}}])&&gh(e.prototype,n),r&&gh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function Oh(t){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ch(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ph(){return(Ph="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=xh(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function xh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jh(t)););return t}function Lh(t,e){return(Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ah(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jh(t);if(e){var i=jh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ih(this,n)}}function Ih(t,e){if(e&&("object"===Oh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jh(t){return(jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lh(t,e)}(a,t);var e,n,i,o=Ah(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).options_=e,n}return e=a,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(Ph(jh(a.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){var i=Ph(jh(a.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return i;var o=this.mapCodeToColourClass(this.options_.ratingCode);return i.appendChild(r.a.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(o),innerHTML:this.options_.ratingCode})),this.options_.warning&&i.appendChild(r.a.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),i}},{key:"mapCodeToColourClass",value:function(t){switch(t){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Ch(e.prototype,n),i&&Ch(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));function Dh(t){return(Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Nh(t,e){return(Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fh(t);if(e){var i=Fh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uh(this,n)}}function Uh(t,e){if(e&&("object"===Dh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Fh(t){return(Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Vh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nh(t,e)}(a,t);var e,n,i,o=Bh(a);function a(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t,e)}return e=a,(n=[{key:"createEl",value:function(){var t=r.a.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&t.appendChild(new kh(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),t.appendChild(new Rh(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),t}}])&&Mh(e.prototype,n),i&&Mh(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.a.getComponent("Component"));n(321);function Hh(t){return(Hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wh(){return(Wh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=zh(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function zh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kh(t)););return t}function Gh(t,e){return(Gh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kh(t);if(e){var i=Kh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xh(this,n)}}function Xh(t,e){if(e&&("object"===Hh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kh(t){return(Kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gh(t,e)}(o,t);var e,n,r,i=Yh(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).addChild(new Vh(n.player_,n.options_)),n}return e=o,(n=[{key:"createEl",value:function(t,e,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(A,"</div>")),Wh(Kh(o.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&qh(e.prototype,n),r&&qh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getComponent("Component"));function $h(t){return($h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jh(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Jh=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==$h(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Zh(t){return function(t){if(Array.isArray(t))return tp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return tp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ep(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,"a",(function(){return ap}));var np,rp=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},ip=r.a.getComponent("Player"),op=450,ap=function(){function t(e,n){var i=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=r.a.mergeOptions({},t.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){i._configurePlugins(),i.options.setup&&i.options.setup(i.options,i.player),i.fetch().catch((function(t){i.player.error(t.message),i.options.onError&&i.options.onError(t)}))}))}var e,n,i;return e=t,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),this.options.mobile||this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=Object(r.a)(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){var t=ip.prototype.options_.children;return t=t.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.options.mobile?3e3:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(Zh(t),["collapserator","playPauseFeedback"]),userActions:{hotkeys:Vl},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus}}},{key:"getPlaybackObject",value:function(){return rp(this,void 0,void 0,Jh().mark((function t(){var e,n,r=this;return Jh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(r.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return ql.a.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(n=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"fetch",value:function(){var t,e,n,r,i,o,a,s;return rp(this,void 0,void 0,Jh().mark((function u(){var c,l,f=this;return Jh().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,this.getPlaybackObject();case 2:c=u.sent,(null===(e=null===(t=c.chapters)||void 0===t?void 0:t.list)||void 0===e?void 0:e.length)>0&&(l=this.player.addTextTrack("chapters"),c.chapters.list.forEach((function(t){l.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),l.trigger({type:"loadeddata",target:l})),this.player.localCache({localCacheAddresses:null!==(n=c.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(r=this.options.enableLocalCache)||void 0===r||r}),this.player.progressiveFiles({sources:c.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),(null===(o=null===(i=c.subtitles)||void 0===i?void 0:i.list)||void 0===o?void 0:o.length)>0&&(c.subtitles.list.forEach((function(t){"text/vtt"===t.mimeType&&f.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(a=c.settings)||void 0===a?void 0:a.showSubtitles,subtitleSize:null===(s=c.settings)||void 0===s?void 0:s.playbackSubtitleSizeDefault})),c.posterUrl&&this.player.poster(c.posterUrl),this.setupSplash(c),this.additionalSetup(c),this.options.autoplay&&this.player.ready((function(){f.player.play().catch((function(){f.showSplash()}))})),this.options.startTime&&this.player.currentTime(this.options.startTime),this.player.trigger("cv-playback-data-loaded",c);case 13:case"end":return u.stop()}}),u,this)})))}},{key:"fetchConfig",value:function(){var t=this;if(!(np||this.options.fetch||this.options.offlinePlaybackObject)){var e="".concat(this.options.playerApi.origin,"/api/config");ql.a.get(e).then((function(e){np=e,t.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(t){var e,n,r,i=this;this.player.persistQualitySettingsPlugin({playbackProfile:null===(e=t.settings)||void 0===e?void 0:e.playbackProfile,playbackProfileLocalCache:null===(n=t.settings)||void 0===n?void 0:n.playbackProfileLocalCache}),this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var o=this.options.enableLocalCache&&!!(null===(r=t.localCacheAddresses)||void 0===r?void 0:r.length);np?this.setupAnalyticsService(t,o):this.one("config:loaded",(function(){return i.setupAnalyticsService(t,o)}))}},{key:"setupAnalyticsService",value:function(t,e){this.analyticsService=new mh({collectionApiUrls:np.collectionApi.urls,collectionApiClientId:np.collectionApi.clientId,productVersion:h.a,videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||Bf.CvApSoutheast1}),this.on("timeupdate",this.logStream)}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"logStream",value:function(){this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=r.a.dom.$("#"+t)):e=t;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=r.a.dom.createEl("video",{},{class:n}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),n=0;n<e.length;n++){var r=e[n];if(t)r.enabled=r.id===t.toString();else if(r.enabled)return r.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),n=0;n<e.length;n++){var r=e[n];if(void 0===t){if("showing"===r.mode)return r.label}else r.label===t?r.mode="showing":r.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(){return t.configureMenuDimensions()};if(this.player.ready(e),this.on("resize",e),this.on("fullscreenchange",e),this.one("play",e),this.on("resizemenus",e),this.showSplash=this.showSplash.bind(this),this.player.on("ended",this.showSplash),this.player.one("dispose",(function(){t.off("resize",e),t.off("fullscreenchange",e),t.off("resizemenus",e),t.off("ended",t.showSplash)})),this.options.hotkeyElQuerySelector){var n=r.a.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(n,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){var e=this.player.addChild("posterImage");this.player.addChild("bigPlayButton");var n=new Qh(this.player,{embed:this.options.embed,posterUrl:t.posterUrl,title:t.title,ratingCode:t.ratingCode,seriesName:t.seriesName,seasonNumber:t.seasonNumber,episodeNumber:t.episodeNumber});e.addChild(n),this.options.autoplay||this.showSplash()}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var t=this;if(this.player.isFullscreen()&&!this.options.mobile){var e=this.player.whiteboardModePlugin().side;if("top"===e){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i),this.player.trigger("volumechange")}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s),this.player.trigger("volumechange")}if("left"===e||"right"===e||"top"===e){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(u,"px - 4em)")}))}}var c=this.player.currentWidth(),l=this.player.currentHeight()/c*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),p=f&&f.offsetHeight;p?("CreateClipSeekBar"===this.getSeekBarName()&&(p+=22),h&&h.length&&h.forEach((function(e){e.style.paddingTop="calc(".concat(l,"% - ").concat(p,"px)"),e.style.marginBottom="".concat(p,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(c<=op?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.one("play",(function(){return t.configureMenuDimensions()}))}}])&&ep(e.prototype,n),i&&ep(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();ap.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0}},,,,,,,function(t,e,n){"use strict";(function(t){
23
23
  /*!
24
24
  * The buffer module from node.js, for the browser.
25
25
  *
@@ -28,4 +28,4 @@ var e,n;function i(){var e,n=a(a(e=t.call(this)||this));if(r.a.browser.IS_IE8)fo
28
28
  */
29
29
  var r=n(244),i=n(245),o=n(246);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=s(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return O(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return P(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function _(t,e,n,r){return H(F(e,t.length-n),t,n,r)}function w(t,e,n,r){return H(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return w(t,e,n,r)}function S(t,e,n,r){return H(V(e),t,n,r)}function E(t,e,n,r){return H(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function O(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n),f=0;f<s;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function P(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function x(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=U(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function N(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return N(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return N(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=u.isBuffer(t)?t:F(new u(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(25))},function(t,e,n){"use strict";var r=n(42),i=n(137);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(t,e,n){"use strict";var r=n(42),i=n(103).filter;r({target:"Array",proto:!0,forced:!n(275)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(42),i=n(284);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(t,e,n){var r=n(59),i=n(285),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(t,e,n){var r=n(42),i=n(286);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){"use strict";var r=n(150).charAt,i=n(65),o=n(144),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r,i=n(21),o=n(151),a=n(105),s=n(289),u=n(295),c=n(32),l=n(65).enforce,f=n(133),h=!i.ActiveXObject&&"ActiveXObject"in i,p=Object.isExtensible,d=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},y=t.exports=s("WeakMap",d,u,!0,!0);if(f&&h){r=u.getConstructor(d,"WeakMap",!0),a.REQUIRED=!0;var m=y.prototype,v=m.delete,g=m.has,b=m.get,_=m.set;o(m,{delete:function(t){if(c(t)&&!p(t)){var e=l(this);return e.frozen||(e.frozen=new r),v.call(this,t)||e.frozen.delete(t)}return v.call(this,t)},has:function(t){if(c(t)&&!p(t)){var e=l(this);return e.frozen||(e.frozen=new r),g.call(this,t)||e.frozen.has(t)}return g.call(this,t)},get:function(t){if(c(t)&&!p(t)){var e=l(this);return e.frozen||(e.frozen=new r),g.call(this,t)?b.call(this,t):e.frozen.get(t)}return b.call(this,t)},set:function(t,e){if(c(t)&&!p(t)){var n=l(this);n.frozen||(n.frozen=new r),g.call(this,t)?_.call(this,t,e):n.frozen.set(t,e)}else _.call(this,t,e);return this}})}},function(t,e,n){var r=n(21),i=n(141),o=n(119),a=n(37),s=n(28),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var f in i){var h=r[f],p=h&&h.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(t){p[u]=l}if(p[c]||a(p,c,f),i[f])for(var d in o)if(p[d]!==o[d])try{a(p,d,o[d])}catch(t){p[d]=o[d]}}}},function(t,e,n){"use strict";var r=n(42),i=n(296).left;r({target:"Array",proto:!0,forced:n(140)("reduce")},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(45),i=n(58).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(42),i=n(106);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){"use strict";var r=n(154),i=n(33),o=n(60),a=n(57),s=n(155),u=n(156);r("match",1,(function(t,e,n){return[function(e){var n=a(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var f,h=[],p=0;null!==(f=u(a,c));){var d=String(f[0]);h[p]=d,""===d&&(a.lastIndex=s(c,o(a.lastIndex),l)),p++}return 0===p?null:h}]}))},function(t,e,n){"use strict";var r=n(154),i=n(33),o=n(66),a=n(60),s=n(80),u=n(57),c=n(155),l=n(156),f=Math.max,h=Math.min,p=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(t,e,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,o){var u=n(e,t,this,o);if(u.done)return u.value;var p=i(t),d=String(this),y="function"==typeof o;y||(o=String(o));var m=p.global;if(m){var v=p.unicode;p.lastIndex=0}for(var g=[];;){var b=l(p,d);if(null===b)break;if(g.push(b),!m)break;""===String(b[0])&&(p.lastIndex=c(d,a(p.lastIndex),v))}for(var _,w="",T=0,S=0;S<g.length;S++){b=g[S];for(var E=String(b[0]),k=f(h(s(b.index),d.length),0),O=[],C=1;C<b.length;C++)O.push(void 0===(_=b[C])?_:String(_));var P=b.groups;if(y){var x=[E].concat(O,k,d);void 0!==P&&x.push(P);var L=String(o.apply(void 0,x))}else L=r(E,d,k,O,P,o);k>=T&&(w+=d.slice(T,k)+L,T=k+E.length)}return w+d.slice(T)}];function r(t,n,r,i,a,s){var u=r+t.length,c=i.length,l=y;return void 0!==a&&(a=o(a),l=d),e.call(s,l,(function(e,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return e;if(l>c){var f=p(l/10);return 0===f?e:f<=c?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):e}s=i[l-1]}return void 0===s?"":s}))}}))},,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};d[i]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=v.constructor=p,p.constructor=h,h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),b.prototype[o]=function(){return this},t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){},function(t,e){},function(t,e,n){var r=n(235).default,i=n(9);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(!t)return!1;var e=n.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var n=Object.prototype.toString},function(t,e,n){var r=n(83),i=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function o(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function a(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function s(){this.values=i(null)}function u(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)e(a[0],a[1])}}function c(t,e,n){var r=t;function i(){var e=a(t);if(null===e)throw new o(o.Errors.BadTimeStamp,"Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function c(){t=t.replace(/^\s+/,"")}if(c(),e.startTime=i(),c(),"--\x3e"!==t.substr(0,3))throw new o(o.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),c(),e.endTime=i(),c(),function(t,e){var r=new s;u(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),a=o[0];r.integer(t,a),r.percent(t,a)&&r.set("snapToLines",!1),r.alt(t,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","center","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","center","end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");try{e.line=r.get("line","auto")}catch(t){}e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100);try{e.align=r.get("align","center")}catch(t){e.align=r.get("align","middle")}try{e.position=r.get("position","auto")}catch(t){e.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},e.align)}e.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},e.align)}(t,e)}o.prototype=i(Error.prototype),o.prototype.constructor=o,o.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var l=r.createElement&&r.createElement("textarea"),f={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"},d={rt:"ruby"};function y(t,e){function n(){if(!e)return null;var t,n=e.match(/^([^<]*)(<[^>]*>?)?/);return t=n[1]?n[1]:n[2],e=e.substr(t.length),t}function r(t,e){return!d[e.localName]||d[e.localName]===t.localName}function i(e,n){var r=f[e];if(!r)return null;var i=t.document.createElement(r),o=p[e];return o&&n&&(i[o]=n.trim()),i}for(var o,s,u=t.document.createElement("div"),c=u,y=[];null!==(o=n());)if("<"!==o[0])c.appendChild(t.document.createTextNode((s=o,l.innerHTML=s,s=l.textContent,l.textContent="",s)));else{if("/"===o[1]){y.length&&y[y.length-1]===o.substr(2).replace(">","")&&(y.pop(),c=c.parentNode);continue}var m,v=a(o.substr(1,o.length-2));if(v){m=t.document.createProcessingInstruction("timestamp",v),c.appendChild(m);continue}var g=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!g)continue;if(!(m=i(g[1],g[3])))continue;if(!r(c,m))continue;if(g[2]){var b=g[2].split(".");b.forEach((function(t){var e=/^bg_/.test(t),n=e?t.slice(3):t;if(h.hasOwnProperty(n)){var r=e?"background-color":"color",i=h[n];m.style[r]=i}})),m.className=b.join(" ")}y.push(g[1]),c.appendChild(m),c=m}return u}var m=[[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(t){for(var e=0;e<m.length;e++){var n=m[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function g(t){var e=[],n="";if(!t||!t.childNodes)return"ltr";function r(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function i(t){if(!t||!t.length)return null;var e=t.pop(),n=e.textContent||e.innerText;if(n){var o=n.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):n}return"ruby"===e.tagName?i(t):e.childNodes?(r(t,e),i(t)):void 0}for(r(e,t);n=i(e);)for(var o=0;o<n.length;o++)if(v(n.charCodeAt(o)))return"rtl";return"ltr"}function b(){}function _(t,e,n){b.call(this),this.cue=e,this.cueDiv=y(t,e.text);var r={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:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=t.document.createElement("div"),r={direction:g(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(e.positionAlign){case"start":i=e.position;break;case"center":i=e.position-e.size/2;break;case"end":i=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function w(t){var e,n,r,i;if(t.div){n=t.div.offsetHeight,r=t.div.offsetWidth,i=t.div.offsetTop;var o=(o=t.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();t=t.div.getBoundingClientRect(),e=o?Math.max(o[0]&&o[0].height||0,t.height/o.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||n,this.bottom=t.bottom||i+(t.height||n),this.width=t.width||r,this.lineHeight=void 0!==e?e:t.lineHeight}function T(t,e,n,r){var i=new w(e),o=e.cue,a=function(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;i<n.length&&n[i]!==e;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var c=i.lineHeight,l=c*Math.round(a),f=n[u]+c,h=s[0];Math.abs(l)>f&&(l=l<0?-1:1,l*=Math.ceil(f/c)*c),a<0&&(l+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,l)}else{var p=i.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new w(e)}var d=function(t,e){for(var i,o=new w(t),a=1,s=0;s<e.length;s++){for(;t.overlapsOppositeAxis(n,e[s])||t.within(n)&&t.overlapsAny(r);)t.move(e[s]);if(t.within(n))return t;var u=t.intersectPercentage(n);a>u&&(i=new w(t),a=u),t=new w(o)}return i||o}(i,s);e.move(d.toCSSCompatValues(n))}function S(){}b.prototype.applyStyles=function(t,e){for(var n in e=e||this.div,t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},b.prototype.formatStyle=function(t,e){return 0===t?0:t+e},_.prototype=i(b.prototype),_.prototype.constructor=_,w.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},w.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},w.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},w.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},w.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},w.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},w.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},w.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},S.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},S.convertCueToDOMTree=function(t,e){return t&&e?y(t,e):null};S.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var i=[],o=w.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<e.length;u++)s=e[u],n=new _(t,s,a),r.appendChild(n.div),T(0,n,o,i),s.displayState=n.div,i.push(w.getSimpleBoxPosition(n))}()}else for(var s=0;s<e.length;s++)r.appendChild(e[s].displayState)},S.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof o))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){var e=this;function n(){for(var t=e.buffer,n=0;n<t.length&&"\r"!==t[n]&&"\n"!==t[n];)++n;var r=t.substr(0,n);return"\r"===t[n]&&++n,"\n"===t[n]&&++n,e.buffer=t.substr(n),r}function r(t){t.match(/X-TIMESTAMP-MAP/)?u(t,(function(t,n){switch(t){case"X-TIMESTAMP-MAP":!function(t){var n=new s;u(t,(function(t,e){switch(t){case"MPEGT":n.integer(t+"S",e);break;case"LOCA":n.set(t+"L",a(e))}}),/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}}),/=/):u(t,(function(t,n){switch(t){case"Region":!function(t){var n=new s;if(u(t,(function(t,e){switch(t){case"id":n.set(t,e);break;case"width":n.percent(t,e);break;case"lines":n.integer(t,e);break;case"regionanchor":case"viewportanchor":var r=e.split(",");if(2!==r.length)break;var i=new s;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(t+"X",i.get("x")),n.set(t+"Y",i.get("y"));break;case"scroll":n.alt(t,e,["up"])}}),/=/,/\s/),n.has("id")){var r=new(e.vttjs.VTTRegion||e.window.VTTRegion);r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),e.onregion&&e.onregion(r),e.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var i;if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var l=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!l||!l[0])throw new o(o.Errors.BadSignature);e.state="HEADER"}for(var f=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(f?f=!1:i=n(),e.state){case"HEADER":/:/.test(i)?r(i):i||(e.state="ID");continue;case"NOTE":i||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){e.state="NOTE";break}if(!i)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch(t){e.cue.align="middle"}if(e.state="CUE",-1===i.indexOf("--\x3e")){e.cue.id=i;continue}case"CUE":try{c(i,e.cue,e.regionList)}catch(t){e.reportOrThrowError(t),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(f=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+="\n"),e.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(e.state="ID");continue}}}catch(t){e.reportOrThrowError(t),"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new o(o.Errors.BadSignature)}catch(t){this.reportOrThrowError(t)}return this.onflush&&this.onflush(),this}},t.exports=S},function(t,e){},function(t,e){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(t){return"string"==typeof t&&(!!r[t.toLowerCase()]&&t.toLowerCase())}function o(t,e,r){this.hasBeenReset=!1;var o="",a=!1,s=t,u=e,c=r,l=null,f="",h=!0,p="auto",d="start",y="auto",m="auto",v=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return o},set:function(t){o=""+t}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(t){a=!!t}},startTime:{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");s=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");u=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return c},set:function(t){c=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(t){l=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return f},set:function(t){var e=function(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}(t);if(!1===e)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");f=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(t){h=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(t){var e=i(t);e?(d=e,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return y},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");y=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(t){var e=i(t);e?(m=e,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(t){var e=i(t);if(!e)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=e,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=o},function(t,e){var n={"":!0,up:!0};function r(t){return"number"==typeof t&&t>=0&&t<=100}t.exports=function(){var t=100,e=3,i=0,o=100,a=0,s=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!r(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!r(t))throw new Error("RegionAnchorX must be between 0 and 100.");o=t}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!r(t))throw new Error("RegionAnchorY must be between 0 and 100.");i=t}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(t){if(!r(t))throw new Error("ViewportAnchorY must be between 0 and 100.");s=t}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(t){if(!r(t))throw new Error("ViewportAnchorX must be between 0 and 100.");a=t}},scroll:{enumerable:!0,get:function(){return u},set:function(t){var e=function(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}(t);!1===e?console.warn("Scroll: an invalid or illegal string was specified."):u=e}}})}},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r,i,o,a,s;r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(t,e,n){if(n=n||{},t=t.trim(),!(e=e.trim())){if(!n.alwaysNormalize)return t;var r=s.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):e;var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var u=i.exec(a.path);a.netLoc=u[1],a.path=u[2]}a.netLoc&&!a.path&&(a.path="/");var c={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(c.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var l=a.path,f=l.substring(0,l.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(f)}else c.path=a.path,o.params||(c.params=a.params,o.query||(c.query=a.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(c)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(o,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=s},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
30
30
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
31
- e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n=/[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]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function s(t,e,n,r,i,o){for(var a,s=++e,u=0;;){var c=t.charAt(s);switch(c){case"=":if(1===u)a=t.slice(e,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=t.slice(e,s)),e=s+1,!((s=t.indexOf(c,e))>0))throw new Error("attribute value no end '"+c+"' match");l=t.slice(e,s).replace(/&#?\w+;/g,i),n.add(a,l,e-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');l=t.slice(e,s).replace(/&#?\w+;/g,i),n.add(a,l,e),o.warning('attribute "'+a+'" missed start quot('+c+")!!"),e=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(t.slice(e,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(t.slice(e,s)),s;case">":switch(u){case 0:n.setTagName(t.slice(e,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=t.slice(e,s)).slice(-1)&&(n.closed=!0,l=l.slice(0,-1));case 2:2===u&&(l=a),4==u?(o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===r[""]&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),n.add(l,l,e));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":c=" ";default:if(c<=" ")switch(u){case 0:n.setTagName(t.slice(e,s)),u=6;break;case 1:a=t.slice(e,s),u=2;break;case 4:var l=t.slice(e,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l,e);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,e),e=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,e=s;break;case 3:u=4,e=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(t,e,n){for(var r=t.tagName,i=null,o=t.length;o--;){var a=t[o],s=a.qName,u=a.value;if((p=s.indexOf(":"))>0)var c=a.prefix=s.slice(0,p),l=s.slice(p+1),h="xmlns"===c&&l;else l=s,c=null,h="xmlns"===s&&"";a.localName=l,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(h,u))}for(o=t.length;o--;){(c=(a=t[o]).prefix)&&("xml"===c&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(a.uri=n[c||""]))}var p;(p=r.indexOf(":"))>0?(c=t.prefix=r.slice(0,p),l=t.localName=r.slice(p+1)):(c=null,l=t.localName=r);var d=t.uri=n[c||""];if(e.startElement(d,l,r,t),!t.closed)return t.currentNSMap=n,t.localNSMap=i,!0;if(e.endElement(d,l,r),i)for(c in i)e.endPrefixMapping(c)}function c(t,e,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=t.indexOf("</"+n+">",e),a=t.substring(e+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return e+1}function l(t,e,n,r){var i=r[n];return null==i&&((i=t.lastIndexOf("</"+n+">"))<e&&(i=t.lastIndexOf("</"+n)),r[n]=i),i<e}function f(t,e){for(var n in t)e[n]=t[n]}function h(t,e,n,r){switch(t.charAt(e+2)){case"-":return"-"===t.charAt(e+3)?(i=t.indexOf("--\x3e",e+4))>e?(n.comment(t,e+4,i-e-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,i-e-9),n.endCDATA(),i+3}var o=function(t,e){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=e,i.exec(t);for(;n=i.exec(t);)if(r.push(n),n[1])return r}(t,e),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],c=a>4&&o[4][0],l=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),c&&c.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),l.index+l[0].length}}return-1}function p(t,e,n){var r=t.indexOf("?>",e);if(r){var i=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function d(t){}function y(t,e){return t.__proto__=e,t}o.prototype={parse:function(t,e,n){var r=this.domBuilder;r.startDocument(),f(e,e={}),function(t,e,n,r,i){function o(t){var e=t.slice(1,-1);return e in n?n[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function f(e){if(e>T){var n=t.substring(T,e).replace(/&#?\w+;/g,o);b&&y(T),r.characters(n,0,e-T),T=e}}function y(e,n){for(;e>=v&&(n=g.exec(t));)m=n.index,v=m+n[0].length,b.lineNumber++;b.columnNumber=e-m+1}var m=0,v=0,g=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:e}],w={},T=0;for(;;){try{var S=t.indexOf("<",T);if(S<0){if(!t.substr(T).match(/^\s*$/)){var E=r.doc,k=E.createTextNode(t.substr(T));E.appendChild(k),r.currentElement=k}return}switch(S>T&&f(S),t.charAt(S+1)){case"/":var O=t.indexOf(">",S+3),C=t.substring(S+2,O),P=_.pop();O<0?(C=t.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+C+" is not complete:"+P.tagName),O=S+1+C.length):C.match(/\s</)&&(C=C.replace(/[\s<].*/,""),i.error("end tag name: "+C+" maybe not complete"),O=S+1+C.length);var x=P.localNSMap,L=P.tagName==C;if(L||P.tagName&&P.tagName.toLowerCase()==C.toLowerCase()){if(r.endElement(P.uri,P.localName,C),x)for(var A in x)r.endPrefixMapping(A);L||i.fatalError("end tag name: "+C+" is not match the current start tagName:"+P.tagName)}else _.push(P);O++;break;case"?":b&&y(S),O=p(t,S,r);break;case"!":b&&y(S),O=h(t,S,r,i);break;default:b&&y(S);var I=new d,j=_[_.length-1].currentNSMap,R=(O=s(t,S,I,j,o,i),I.length);if(!I.closed&&l(t,O,I.tagName,w)&&(I.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&R){for(var D=a(b,{}),M=0;M<R;M++){var N=I[M];y(N.offset),N.locator=a(b,{})}r.locator=D,u(I,r,j)&&_.push(I),r.locator=b}else u(I,r,j)&&_.push(I);"http://www.w3.org/1999/xhtml"!==I.uri||I.closed?O++:O=c(t,O,I.tagName,o,r)}}catch(t){i.error("element parse error: "+t),O=-1}O>T?T=O:f(Math.max(S,T)+1)}}(t,e,n,r,this.errorHandler),r.endDocument()}},d.prototype={setTagName:function(t){if(!i.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,n){if(!i.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},y({},y.prototype)instanceof y||(y=function(t,e){function n(){}for(e in n.prototype=e,n=new n,t)n[e]=t[e];return n}),e.XMLReader=o},function(t,e,n){"use strict";var r=n(249),i=function(t,e){var n=1;for(t>e&&(n=-1);Math.abs(e-t)>4294967296;)t+=8589934592*n;return t},o=function(t){var e,n;o.prototype.init.call(this),this.type_=t||"shared",this.push=function(t){"shared"!==this.type_&&t.type!==this.type_||(void 0===n&&(n=t.dts),t.dts=i(t.dts,n),t.pts=i(t.pts,n),e=t.dts,this.trigger("data",t))},this.flush=function(){n=e,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,e=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,t.exports={TimestampRolloverStream:o,handleRollover:i}},function(t,e,n){"use strict";var r=function(){this.init=function(){var t={};this.on=function(e,n){t[e]||(t[e]=[]),t[e]=t[e].concat(n)},this.off=function(e,n){var r;return!!t[e]&&(r=t[e].indexOf(n),t[e]=t[e].slice(),t[e].splice(r,1),r>-1)},this.trigger=function(e){var n,r,i,o;if(n=t[e])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){t={}}}};r.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},r.prototype.push=function(t){this.trigger("data",t)},r.prototype.flush=function(t){this.trigger("done",t)},r.prototype.partialFlush=function(t){this.trigger("partialdone",t)},r.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},r.prototype.reset=function(t){this.trigger("reset",t)},t.exports=r},function(t,e,n){"use strict";var r=n(125),i=function(t){var e=31&t[1];return e<<=8,e|=t[2]},o=function(t){return!!(64&t[1])},a=function(t){var e=0;return(48&t[3])>>>4>1&&(e+=t[4]+1),e},s=function(t){switch(t){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}};t.exports={parseType:function(t,e){var n=i(t);return 0===n?"pat":n===e?"pmt":e?"pes":null},parsePat:function(t){var e=o(t),n=4+a(t);return e&&(n+=t[n]+1),(31&t[n+10])<<8|t[n+11]},parsePmt:function(t){var e={},n=o(t),r=4+a(t);if(n&&(r+=t[r]+1),1&t[r+5]){var i;i=3+((15&t[r+1])<<8|t[r+2])-4;for(var s=12+((15&t[r+10])<<8|t[r+11]);s<i;){var u=r+s;e[(31&t[u+1])<<8|t[u+2]]=t[u],s+=5+((15&t[u+3])<<8|t[u+4])}return e}},parsePayloadUnitStartIndicator:o,parsePesType:function(t,e){switch(e[i(t)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(t){if(!o(t))return null;var e=4+a(t);if(e>=t.byteLength)return null;var n,r=null;return 192&(n=t[e+7])&&((r={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,r.pts*=4,r.pts+=(6&t[e+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,r.dts*=4,r.dts+=(6&t[e+18])>>>1)),r},videoPacketContainsKeyFrame:function(t){for(var e=4+a(t),n=t.subarray(e),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(t,e,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(t,e){var n=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return n=n>=0?n:0,(16&t[e+5])>>4?n+20:n+10},o=function(t,e){return t.length-e<10||t[e]!=="I".charCodeAt(0)||t[e+1]!=="D".charCodeAt(0)||t[e+2]!=="3".charCodeAt(0)?e:(e+=i(t,e),o(t,e))},a=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};t.exports={isLikelyAacData:function(t){var e=o(t,0);return t.length>=e+2&&255==(255&t[e])&&240==(240&t[e+1])&&16==(22&t[e+1])},parseId3TagSize:i,parseAdtsSize:function(t,e){var n=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|n},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return r[(60&t[e+2])>>>2];e++}return null},parseAacTimestamp:function(t){var e,n,r;e=10,64&t[5]&&(e+=4,e+=a(t.subarray(10,14)));do{if((n=a(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){r=t.subarray(e+10,e+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(t,e,n){var r,i="";for(r=e;r<n;r++)i+="%"+("00"+t[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}e+=10,e+=n}while(e<t.byteLength);return null}}},function(t,e,n){var r=n(74).toUnsigned,i=n(126),o=function(t,e){var n,a,s,u,c,l=[];if(!e.length)return null;for(n=0;n<t.byteLength;)a=r(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),s=i(t.subarray(n+4,n+8)),u=a>1?n+a:t.byteLength,s===e[0]&&(1===e.length?l.push(t.subarray(n+8,u)):(c=o(t.subarray(n+8,u),e.slice(1))).length&&(l=l.concat(c))),n=u;return l};t.exports=o},function(t,e){t.exports=function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],c=65536&r.flags[0],l=131072&r.flags[0];return e=8,i&&(e+=4,r.baseDataOffset=n.getUint32(12),e+=4),o&&(r.sampleDescriptionIndex=n.getUint32(e),e+=4),a&&(r.defaultSampleDuration=n.getUint32(e),e+=4),s&&(r.defaultSampleSize=n.getUint32(e),e+=4),u&&(r.defaultSampleFlags=n.getUint32(e)),c&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r}},function(t,e,n){var r=n(255);t.exports=function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i=new DataView(t.buffer,t.byteOffset,t.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],u=2&n.flags[1],c=4&n.flags[1],l=8&n.flags[1],f=i.getUint32(4),h=8;for(o&&(n.dataOffset=i.getInt32(h),h+=4),a&&f&&(e={flags:r(t.subarray(h,h+4))},h+=4,s&&(e.duration=i.getUint32(h),h+=4),u&&(e.size=i.getUint32(h),h+=4),l&&(1===n.version?e.compositionTimeOffset=i.getInt32(h):e.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(e),f--);f--;)e={},s&&(e.duration=i.getUint32(h),h+=4),u&&(e.size=i.getUint32(h),h+=4),c&&(e.flags=r(t.subarray(h,h+4)),h+=4),l&&(1===n.version?e.compositionTimeOffset=i.getInt32(h):e.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(e);return n}},function(t,e){t.exports=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}}},function(t,e,n){var r=n(74).toUnsigned;t.exports=function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:r(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=r(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),e}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r=n(21),i=n(98),o=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=o},function(t,e,n){var r=n(36),i=n(266),o=n(127),a=n(58);t.exports=function(t,e){for(var n=i(e),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(t,l)||s(t,l,u(e,l))}}},function(t,e,n){var r=n(101),i=n(268),o=n(135),a=n(33);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){t.exports=n(21)},function(t,e,n){var r=n(134),i=n(102).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(75),i=n(60),o=n(270),a=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(80),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},function(t,e,n){var r=n(32),i=n(272),o=n(28)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){var r=n(77);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(30);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){var r=n(21),i=n(141),o=n(137),a=n(37);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(t){c.forEach=o}}},function(t,e,n){var r=n(30),i=n(28),o=n(276),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r,i,o=n(21),a=n(277),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},function(t,e,n){var r=n(101);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(28),i=n(142),o=n(37),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),t.exports=function(t){s[a][t]=!0}},function(t,e,n){var r=n(45),i=n(58),o=n(33),a=n(143);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,u=0;s>u;)i.f(t,n=r[u++],e[n]);return t}},function(t,e,n){var r=n(101);t.exports=r("document","documentElement")},function(t,e,n){"use strict";var r=n(145).IteratorPrototype,i=n(142),o=n(96),a=n(104),s=n(67),u=function(){return this};t.exports=function(t,e,n){var c=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,c,!1,!0),s[c]=u,t}},function(t,e,n){var r=n(30);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(32);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){"use strict";var r=n(45),i=n(30),o=n(143),a=n(135),s=n(128),u=n(66),c=n(76),l=Object.assign;t.exports=!l||i((function(){var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||"abcdefghijklmnopqrst"!=o(l({},e)).join("")}))?function(t,e){for(var n=u(t),i=arguments.length,l=1,f=a.f,h=s.f;i>l;)for(var p,d=c(arguments[l++]),y=f?o(d).concat(f(d)):o(d),m=y.length,v=0;m>v;)p=y[v++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:l},function(t,e,n){"use strict";var r=n(148),i={};i[n(28)("toStringTag")]="z",t.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(t,e,n){var r=n(21),i=n(287).trim,o=n(149),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");t.exports=u?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},function(t,e,n){var r=n(57),i="["+n(149)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e,n){var r=n(30);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){"use strict";var r=n(42),i=n(21),o=n(136),a=n(59),s=n(105),u=n(152),c=n(153),l=n(32),f=n(30),h=n(293),p=n(104),d=n(294);t.exports=function(t,e,n,y,m){var v=i[t],g=v&&v.prototype,b=v,_=y?"set":"add",w={},T=function(t){var e=g[t];a(g,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(o(t,"function"!=typeof v||!(m||g.forEach&&!f((function(){(new v).entries().next()})))))b=n.getConstructor(e,t,y,_),s.REQUIRED=!0;else if(o(t,!0)){var S=new b,E=S[_](m?{}:-0,1)!=S,k=f((function(){S.has(1)})),O=h((function(t){new v(t)})),C=!m&&f((function(){for(var t=new v,e=5;e--;)t[_](e,e);return!t.has(-0)}));O||((b=e((function(e,n){c(e,b,t);var r=d(new v,e,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=g,g.constructor=b),(k||C)&&(T("delete"),T("has"),y&&T("get")),(C||E)&&T(_),m&&g.clear&&delete g.clear}return w[t]=b,r({global:!0,forced:b!=v},w),p(b,t),m||n.setStrong(b,t,y),b}},function(t,e,n){var r=n(28),i=n(67),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},function(t,e,n){var r=n(148),i=n(67),o=n(28)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(33);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(28)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){var r=n(32),i=n(147);t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},function(t,e,n){"use strict";var r=n(151),i=n(105).getWeakData,o=n(33),a=n(32),s=n(153),u=n(152),c=n(103),l=n(36),f=n(65),h=f.set,p=f.getterFor,d=c.find,y=c.findIndex,m=0,v=function(t){return t.frozen||(t.frozen=new g)},g=function(){this.entries=[]},b=function(t,e){return d(t.entries,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=y(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,c){var f=t((function(t,r){s(t,f,e),h(t,{type:e,id:m++,frozen:void 0}),null!=r&&u(r,t[c],t,n)})),d=p(e),y=function(t,e,n){var r=d(t),a=i(o(e),!0);return!0===a?v(r).set(e,n):a[r.id]=n,t};return r(f.prototype,{delete:function(t){var e=d(this);if(!a(t))return!1;var n=i(t);return!0===n?v(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=d(this);if(!a(t))return!1;var n=i(t);return!0===n?v(e).has(t):n&&l(n,e.id)}}),r(f.prototype,n?{get:function(t){var e=d(this);if(a(t)){var n=i(t);return!0===n?v(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return y(this,t,e)}}:{add:function(t){return y(this,t,!0)}}),f}}},function(t,e,n){var r=n(139),i=n(66),o=n(76),a=n(60),s=function(t){return function(e,n,s,u){r(n);var c=i(e),l=o(c),f=a(c.length),h=t?f-1:0,p=t?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=p;break}if(h+=p,t?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=p)h in l&&(u=n(u,l[h],h,c));return u}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){"use strict";var r=n(33);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},,,,,,,,,,,,,,function(t,e,n){"use strict";var r,i=n(1);!function(t){t.None="None",t.Complete="Complete",t.Incomplete="Incomplete"}(r||(r={}));n(323);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(c,t);var e,n,i,o=u(c);function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=o.call(this,t,e)).update(),n}return e=c,(n=[{key:"update",value:function(){this.options_.activityStatus===r.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===r.Complete?r.Incomplete:r.Complete,this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&a(e.prototype,n),i&&a(e,i),Object.defineProperty(e,"prototype",{writable:!1}),c}(i.a.getComponent("Button"));function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g(t);if(e){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){if(e&&("object"===h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}f.prototype.controlText_="ActivityStatus";var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(o,t);var e,n,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"setActivityStatus",value:function(t,e){var n=this;t!==this.activityStatus&&(this.activityStatus=t,this.onToggleStatus=e,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&d(e.prototype,n),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a.getPlugin("plugin"));i.a.registerPlugin("activityStatusPlugin",b)},function(t,e,n){"use strict";var r=n(1);n(322);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(u,t);var e,n,r,i=s(u);function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t,e)).update(),n}return e=u,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(r.a.getComponent("Button"));function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v(t);if(e){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}l.prototype.controlText_="Favourite";var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(o,t);var e,n,r,i=y(o);function o(){return h(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"setFavourite",value:function(t,e){var n=this;t!==this.isFavourite&&(this.isFavourite=t,this.onClickFavourite=e,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new l(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&p(e.prototype,n),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("favouritePlugin",g)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){},function(t,e,n){},function(t,e,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);n(231),n(232);var r=n(188),i=n(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=u(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function u(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,n,r,o=l(u);function u(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),n=o.call(this,t),void 0===e.startTime)throw Error("Invalid clip start");if(void 0===e.endTime)throw Error("Invalid clip end");if(e.startTime>e.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(e.startTime.toPrecision(4)),n._clipEnd=parseFloat(e.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(h(n)),n.player.duration=n.duration.bind(h(n)),n.player.currentTime=n.currentTime.bind(h(n)),n.player.buffered=n.buffered.bind(h(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return e=u,(n=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),s(p(u.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return void 0!==t&&this.playerDurationFn(t),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if(void 0===t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),n=0;return e>=this.clipStart&&(n=e-this.clipStart),this.player.getCache().currentTime=n,t?n:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],n=0;n<t.length;n++)e[n]=[Math.max(0,t.start(n)-this.clipStart),Math.min(Math.max(0,t.end(n)-this.clipStart),this.player.duration())];return i.a.createTimeRanges(e)}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(i.a.getPlugin("plugin"));i.a.registerPlugin("clipPlugin",d);n(689);function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=b(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function b(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}function _(t,e){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function w(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=S(t);if(e){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T(this,n)}}function T(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(o,t);var e,n,r,i=w(o);function o(){var t;return m(this,o),(t=i.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){g(S(o.prototype),"handleClick",this).call(this,null)}}])&&v(e.prototype,n),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a.getComponent("Button"));function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C(t,e){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=L(t);if(e){var i=L(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(t,e){if(e&&("object"===k(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function L(t){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}E.prototype.controlText_="Create Clip",i.a.registerComponent("CreateClipButton",E);var A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(o,t);var e,n,r,i=P(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=o,(n=[{key:"onReady",value:function(){var t,e=this.player.getChild("collapserator"),n=null===(t=null==e?void 0:e.children())||void 0===t?void 0:t.findIndex((function(t){return"CustomControlSpacer"===t.name()}));n&&-1!==n&&e.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&O(e.prototype,n),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a.getPlugin("plugin"));i.a.registerPlugin("createClipButtonPlugin",A);n(690);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(){return(R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=D(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function D(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=U(t)););return t}function M(t,e){return(M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=U(t);if(e){var i=U(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B(this,n)}}function B(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function U(t){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var F=i.a.getComponent("PlayToggle"),V=i.a.getPlugin("plugin"),H=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&M(t,e)}(o,t);var e,n,r,i=N(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).pictureInPictureEnabled=!1,n.options=e,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){var t=this;this.enablePictureInPicture(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var e;null===(e=t.player)||void 0===e||e.off("playerresize",t.onPlayerResize)}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var e=t.children().findIndex((function(t){var e;return"fullscreentoggle"===(null===(e=t.name())||void 0===e?void 0:e.toLowerCase())}));-1===e&&(e=t.children().length-1),t.addChild("pictureInPictureToggle",{},e);var n=t.getChild("pictureInPictureToggle");null==n||n.enable()}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var t=this.getToggleParentComponent(),e=null==t?void 0:t.getChild("pictureInPictureToggle");e&&t.removeChild(e)}}},{key:"togglePictureInPicture",value:function(t){if(t!==this.player.isInPictureInPicture()){var e=t?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(t),this.player.trigger(e),t?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var t=this.player.el().getBoundingClientRect();0!==t.width&&(t.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new F(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,R(U(o.prototype),"dispose",this).call(this)}}])&&j(e.prototype,n),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(V);i.a.registerPlugin("pictureInPicture",H);n(338);var q=n(113),W=n(15);function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var G=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={}}var e,n,r;return e=t,(n=[{key:"subscribe",value:function(t,e){this.registerListener(t,e)}},{key:"subscribeOnce",value:function(t,e){this.registerListener(t,e,1)}},{key:"unsubscribe",value:function(t,e){this.deregisterListener(t,e)}},{key:"trigger",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.triggerCallbacks(t,n)}},{key:"registerListener",value:function(t,e,n){var r;if("string"!=typeof t)throw new Error("Event name must be a string");if("function"!=typeof e)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[t]=null!==(r=this.listeners[t])&&void 0!==r?r:[],this.listeners[t].push({callback:e,executionLimit:n})}},{key:"deregisterListener",value:function(t,e){var n;if("string"!=typeof t)throw new Error("Event name must be a string");if(e&&"function"!=typeof e)throw new Error("Event callback must be a function");if(e){var r=null===(n=this.listeners[t])||void 0===n?void 0:n.findIndex((function(t){return t.callback===e}));"number"==typeof r&&-1!==r&&(this.listeners[t].splice(r,1),0===this.listeners[t].length&&delete this.listeners[t])}else this.listeners[t]=[]}},{key:"triggerCallbacks",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[t]){var o=[];this.listeners[t].forEach((function(t){var e,n;"number"==typeof t.executionLimit&&(t.executionCount=null!==(n=t.executionCount)&&void 0!==n?n:0,t.executionCount++,t.executionCount===t.executionLimit&&o.push(t.callback)),(e=t.callback).apply.apply(e,[null].concat(r))})),o.length&&o.forEach((function(n){return e.deregisterListener(t,n)}))}}}])&&z(e.prototype,n),r&&z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());n(691);function Y(t){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(){return(K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Q(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Q(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=et(t)););return t}function $(t,e){return($=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=et(t);if(e){var i=et(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(t,e){if(e&&("object"===Y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tt(t)}function tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function et(t){return(et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(a,t);var e,n,r,o=J(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=G,n.pointOfInterest=e.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(tt(n)),n.onMouseLeave=n.onMouseLeave.bind(tt(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(tt(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(tt(n)),n.initialize(),n}return e=a,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(K(et(a.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return K(et(a.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var t=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/t*100+"%"}},{key:"updateBuffered",value:function(t){var e=this.getPointOfInterestTime()<=t;e!==this.hasBuffered&&(this.hasBuffered=e,this.hasBuffered?this.addClass("cv-point-of-interest-indicator-buffered"):this.removeClass("cv-point-of-interest-indicator-buffered"))}},{key:"updatePlaybackProgress",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasPlayed){this.hasPlayed=e;var n="cv-point-of-interest-indicator-played";e?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(t){t?this.removeClass("cv-point-of-interest-indicator-hidden"):this.addClass("cv-point-of-interest-indicator-hidden")}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(t){t.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var t=this.getTimeTooltip();null==t||t.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var t,e,n=null===(t=this.getSeekBar())||void 0===t?void 0:t.el();if(n){var r=i.a.dom.findPosition(n),o=this.getPointOfInterestTime()/this.player().duration();null===(e=this.getMouseTimeDisplay())||void 0===e||e.update(r,o)}}},{key:"showMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.removeForceShow()}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player().controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var t;return null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var t;return null===(t=this.getMouseTimeDisplay())||void 0===t?void 0:t.getChild("TimeTooltip")}}])&&X(e.prototype,n),r&&X(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.a.getComponent("Component"));function rt(t){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ot(){return(ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=at(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function at(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lt(t)););return t}function st(t,e){return(st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=lt(t);if(e){var i=lt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ct(this,n)}}function ct(t,e){if(e&&("object"===rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lt(t){return(lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ft=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}(a,t);var e,n,r,o=ut(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).pointsOfInterestVisible=e.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return e=a,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){i.a.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){i.a.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,e,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.a.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=ot(lt(a.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&it(e.prototype,n),r&&it(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.a.getComponent("MenuItem"));function ht(t){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dt(t,e){return(dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=gt(t);if(e){var i=gt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mt(this,n)}}function mt(t,e){if(e&&("object"===ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vt(t)}function vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gt(t){return(gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}i.a.registerComponent("PointsOfInterestMenuItem",ft);var bt=i.a.getPlugin("plugin"),_t=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}(o,t);var e,n,r,i=yt(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==e?void 0:e.pointsOfInterest,n.initialize=n.initialize.bind(vt(n)),n.updateBuffered=n.updateBuffered.bind(vt(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(vt(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return e=o,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(W.a.hasLocalStorage()&&"false"===W.a.get("cvplayer-points-of-interest")&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var t=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var e,n;null===(e=t.player)||void 0===e||e.off("progress",t.updateBuffered),null===(n=t.player)||void 0===n||n.off("timeupdate",t.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(t){W.a.set("cvplayer-points-of-interest",t.toString()),this.pointOfInterestIndicators.forEach((function(e){return e.toggleVisibility(t)}))}},{key:"setupTrack",value:function(){var t=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(e){t.addCue({startTime:e.startTime,endTime:e.endTime,text:e.description})})),t.trigger({type:"loadeddata",target:t})}},{key:"createPointOfInterestIndicators",value:function(){var t,e=this,n=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.pointsOfInterest.forEach((function(t){var r=new nt(e.player,{pointOfInterest:t});e.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var t;(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:ft,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updateBuffered(Object(q.a)(t.player))}))}},{key:"updatePlaybackProgress",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updatePlaybackProgress(t.player.currentTime())}))}}])&&pt(e.prototype,n),r&&pt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(bt);i.a.registerPlugin("pointsOfInterestPlugin",_t);n(337);function wt(t){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Tt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==wt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Et(){return(Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=kt(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function kt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xt(t)););return t}function Ot(t,e){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ct(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xt(t);if(e){var i=xt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pt(this,n)}}function Pt(t,e){if(e&&("object"===wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xt(t){return(xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},At=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e)}(o,t);var e,n,r,i=Ct(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"configurePlugins",value:function(){try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),this.options.pointsOfInterest&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(t){console.log("failed to register plugins",t)}}},{key:"setNextVideo",value:function(t,e,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(t,e,n)}},{key:"enablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(t){var e=this.player.pictureInPicture();e&&e.togglePictureInPicture(t)}},{key:"additionalSetup",value:function(t){var e=this,n=Object.create(null,{additionalSetup:{get:function(){return Et(xt(o.prototype),"additionalSetup",e)}}});return Lt(this,void 0,void 0,Tt().mark((function e(){var r;return Tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.additionalSetup.call(this,t),this.options.showResources&&t.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:t.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==t.mediaType){e.next=7;break}if(null!==(r=t.additionalData)){e.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}])&&St(e.prototype,n),r&&St(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a);n.d(e,"Player",(function(){return At}))}])}));
31
+ e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){var n=/[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]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function s(t,e,n,r,i,o){for(var a,s=++e,u=0;;){var c=t.charAt(s);switch(c){case"=":if(1===u)a=t.slice(e,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=t.slice(e,s)),e=s+1,!((s=t.indexOf(c,e))>0))throw new Error("attribute value no end '"+c+"' match");l=t.slice(e,s).replace(/&#?\w+;/g,i),n.add(a,l,e-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');l=t.slice(e,s).replace(/&#?\w+;/g,i),n.add(a,l,e),o.warning('attribute "'+a+'" missed start quot('+c+")!!"),e=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(t.slice(e,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(t.slice(e,s)),s;case">":switch(u){case 0:n.setTagName(t.slice(e,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=t.slice(e,s)).slice(-1)&&(n.closed=!0,l=l.slice(0,-1));case 2:2===u&&(l=a),4==u?(o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===r[""]&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),n.add(l,l,e));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":c=" ";default:if(c<=" ")switch(u){case 0:n.setTagName(t.slice(e,s)),u=6;break;case 1:a=t.slice(e,s),u=2;break;case 4:var l=t.slice(e,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l,e);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,e),e=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,e=s;break;case 3:u=4,e=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(t,e,n){for(var r=t.tagName,i=null,o=t.length;o--;){var a=t[o],s=a.qName,u=a.value;if((p=s.indexOf(":"))>0)var c=a.prefix=s.slice(0,p),l=s.slice(p+1),h="xmlns"===c&&l;else l=s,c=null,h="xmlns"===s&&"";a.localName=l,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(h,u))}for(o=t.length;o--;){(c=(a=t[o]).prefix)&&("xml"===c&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==c&&(a.uri=n[c||""]))}var p;(p=r.indexOf(":"))>0?(c=t.prefix=r.slice(0,p),l=t.localName=r.slice(p+1)):(c=null,l=t.localName=r);var d=t.uri=n[c||""];if(e.startElement(d,l,r,t),!t.closed)return t.currentNSMap=n,t.localNSMap=i,!0;if(e.endElement(d,l,r),i)for(c in i)e.endPrefixMapping(c)}function c(t,e,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=t.indexOf("</"+n+">",e),a=t.substring(e+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return e+1}function l(t,e,n,r){var i=r[n];return null==i&&((i=t.lastIndexOf("</"+n+">"))<e&&(i=t.lastIndexOf("</"+n)),r[n]=i),i<e}function f(t,e){for(var n in t)e[n]=t[n]}function h(t,e,n,r){switch(t.charAt(e+2)){case"-":return"-"===t.charAt(e+3)?(i=t.indexOf("--\x3e",e+4))>e?(n.comment(t,e+4,i-e-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,i-e-9),n.endCDATA(),i+3}var o=function(t,e){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=e,i.exec(t);for(;n=i.exec(t);)if(r.push(n),n[1])return r}(t,e),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],c=a>4&&o[4][0],l=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),c&&c.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),l.index+l[0].length}}return-1}function p(t,e,n){var r=t.indexOf("?>",e);if(r){var i=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function d(t){}function y(t,e){return t.__proto__=e,t}o.prototype={parse:function(t,e,n){var r=this.domBuilder;r.startDocument(),f(e,e={}),function(t,e,n,r,i){function o(t){var e=t.slice(1,-1);return e in n?n[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function f(e){if(e>T){var n=t.substring(T,e).replace(/&#?\w+;/g,o);b&&y(T),r.characters(n,0,e-T),T=e}}function y(e,n){for(;e>=v&&(n=g.exec(t));)m=n.index,v=m+n[0].length,b.lineNumber++;b.columnNumber=e-m+1}var m=0,v=0,g=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:e}],w={},T=0;for(;;){try{var S=t.indexOf("<",T);if(S<0){if(!t.substr(T).match(/^\s*$/)){var E=r.doc,k=E.createTextNode(t.substr(T));E.appendChild(k),r.currentElement=k}return}switch(S>T&&f(S),t.charAt(S+1)){case"/":var O=t.indexOf(">",S+3),C=t.substring(S+2,O),P=_.pop();O<0?(C=t.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+C+" is not complete:"+P.tagName),O=S+1+C.length):C.match(/\s</)&&(C=C.replace(/[\s<].*/,""),i.error("end tag name: "+C+" maybe not complete"),O=S+1+C.length);var x=P.localNSMap,L=P.tagName==C;if(L||P.tagName&&P.tagName.toLowerCase()==C.toLowerCase()){if(r.endElement(P.uri,P.localName,C),x)for(var A in x)r.endPrefixMapping(A);L||i.fatalError("end tag name: "+C+" is not match the current start tagName:"+P.tagName)}else _.push(P);O++;break;case"?":b&&y(S),O=p(t,S,r);break;case"!":b&&y(S),O=h(t,S,r,i);break;default:b&&y(S);var I=new d,j=_[_.length-1].currentNSMap,R=(O=s(t,S,I,j,o,i),I.length);if(!I.closed&&l(t,O,I.tagName,w)&&(I.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&R){for(var D=a(b,{}),M=0;M<R;M++){var N=I[M];y(N.offset),N.locator=a(b,{})}r.locator=D,u(I,r,j)&&_.push(I),r.locator=b}else u(I,r,j)&&_.push(I);"http://www.w3.org/1999/xhtml"!==I.uri||I.closed?O++:O=c(t,O,I.tagName,o,r)}}catch(t){i.error("element parse error: "+t),O=-1}O>T?T=O:f(Math.max(S,T)+1)}}(t,e,n,r,this.errorHandler),r.endDocument()}},d.prototype={setTagName:function(t){if(!i.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,n){if(!i.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},y({},y.prototype)instanceof y||(y=function(t,e){function n(){}for(e in n.prototype=e,n=new n,t)n[e]=t[e];return n}),e.XMLReader=o},function(t,e,n){"use strict";var r=n(249),i=function(t,e){var n=1;for(t>e&&(n=-1);Math.abs(e-t)>4294967296;)t+=8589934592*n;return t},o=function(t){var e,n;o.prototype.init.call(this),this.type_=t||"shared",this.push=function(t){"shared"!==this.type_&&t.type!==this.type_||(void 0===n&&(n=t.dts),t.dts=i(t.dts,n),t.pts=i(t.pts,n),e=t.dts,this.trigger("data",t))},this.flush=function(){n=e,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,e=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,t.exports={TimestampRolloverStream:o,handleRollover:i}},function(t,e,n){"use strict";var r=function(){this.init=function(){var t={};this.on=function(e,n){t[e]||(t[e]=[]),t[e]=t[e].concat(n)},this.off=function(e,n){var r;return!!t[e]&&(r=t[e].indexOf(n),t[e]=t[e].slice(),t[e].splice(r,1),r>-1)},this.trigger=function(e){var n,r,i,o;if(n=t[e])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){t={}}}};r.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},r.prototype.push=function(t){this.trigger("data",t)},r.prototype.flush=function(t){this.trigger("done",t)},r.prototype.partialFlush=function(t){this.trigger("partialdone",t)},r.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},r.prototype.reset=function(t){this.trigger("reset",t)},t.exports=r},function(t,e,n){"use strict";var r=n(125),i=function(t){var e=31&t[1];return e<<=8,e|=t[2]},o=function(t){return!!(64&t[1])},a=function(t){var e=0;return(48&t[3])>>>4>1&&(e+=t[4]+1),e},s=function(t){switch(t){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}};t.exports={parseType:function(t,e){var n=i(t);return 0===n?"pat":n===e?"pmt":e?"pes":null},parsePat:function(t){var e=o(t),n=4+a(t);return e&&(n+=t[n]+1),(31&t[n+10])<<8|t[n+11]},parsePmt:function(t){var e={},n=o(t),r=4+a(t);if(n&&(r+=t[r]+1),1&t[r+5]){var i;i=3+((15&t[r+1])<<8|t[r+2])-4;for(var s=12+((15&t[r+10])<<8|t[r+11]);s<i;){var u=r+s;e[(31&t[u+1])<<8|t[u+2]]=t[u],s+=5+((15&t[u+3])<<8|t[u+4])}return e}},parsePayloadUnitStartIndicator:o,parsePesType:function(t,e){switch(e[i(t)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(t){if(!o(t))return null;var e=4+a(t);if(e>=t.byteLength)return null;var n,r=null;return 192&(n=t[e+7])&&((r={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,r.pts*=4,r.pts+=(6&t[e+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,r.dts*=4,r.dts+=(6&t[e+18])>>>1)),r},videoPacketContainsKeyFrame:function(t){for(var e=4+a(t),n=t.subarray(e),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(t,e,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(t,e){var n=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return n=n>=0?n:0,(16&t[e+5])>>4?n+20:n+10},o=function(t,e){return t.length-e<10||t[e]!=="I".charCodeAt(0)||t[e+1]!=="D".charCodeAt(0)||t[e+2]!=="3".charCodeAt(0)?e:(e+=i(t,e),o(t,e))},a=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};t.exports={isLikelyAacData:function(t){var e=o(t,0);return t.length>=e+2&&255==(255&t[e])&&240==(240&t[e+1])&&16==(22&t[e+1])},parseId3TagSize:i,parseAdtsSize:function(t,e){var n=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|n},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return r[(60&t[e+2])>>>2];e++}return null},parseAacTimestamp:function(t){var e,n,r;e=10,64&t[5]&&(e+=4,e+=a(t.subarray(10,14)));do{if((n=a(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){r=t.subarray(e+10,e+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(t,e,n){var r,i="";for(r=e;r<n;r++)i+="%"+("00"+t[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}e+=10,e+=n}while(e<t.byteLength);return null}}},function(t,e,n){var r=n(74).toUnsigned,i=n(126),o=function(t,e){var n,a,s,u,c,l=[];if(!e.length)return null;for(n=0;n<t.byteLength;)a=r(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),s=i(t.subarray(n+4,n+8)),u=a>1?n+a:t.byteLength,s===e[0]&&(1===e.length?l.push(t.subarray(n+8,u)):(c=o(t.subarray(n+8,u),e.slice(1))).length&&(l=l.concat(c))),n=u;return l};t.exports=o},function(t,e){t.exports=function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],c=65536&r.flags[0],l=131072&r.flags[0];return e=8,i&&(e+=4,r.baseDataOffset=n.getUint32(12),e+=4),o&&(r.sampleDescriptionIndex=n.getUint32(e),e+=4),a&&(r.defaultSampleDuration=n.getUint32(e),e+=4),s&&(r.defaultSampleSize=n.getUint32(e),e+=4),u&&(r.defaultSampleFlags=n.getUint32(e)),c&&(r.durationIsEmpty=!0),!i&&l&&(r.baseDataOffsetIsMoof=!0),r}},function(t,e,n){var r=n(255);t.exports=function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},i=new DataView(t.buffer,t.byteOffset,t.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],u=2&n.flags[1],c=4&n.flags[1],l=8&n.flags[1],f=i.getUint32(4),h=8;for(o&&(n.dataOffset=i.getInt32(h),h+=4),a&&f&&(e={flags:r(t.subarray(h,h+4))},h+=4,s&&(e.duration=i.getUint32(h),h+=4),u&&(e.size=i.getUint32(h),h+=4),l&&(1===n.version?e.compositionTimeOffset=i.getInt32(h):e.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(e),f--);f--;)e={},s&&(e.duration=i.getUint32(h),h+=4),u&&(e.size=i.getUint32(h),h+=4),c&&(e.flags=r(t.subarray(h,h+4)),h+=4),l&&(1===n.version?e.compositionTimeOffset=i.getInt32(h):e.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(e);return n}},function(t,e){t.exports=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}}},function(t,e,n){var r=n(74).toUnsigned;t.exports=function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:r(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=r(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),e}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r=n(21),i=n(98),o=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=o},function(t,e,n){var r=n(36),i=n(266),o=n(127),a=n(58);t.exports=function(t,e){for(var n=i(e),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(t,l)||s(t,l,u(e,l))}}},function(t,e,n){var r=n(101),i=n(268),o=n(135),a=n(33);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){t.exports=n(21)},function(t,e,n){var r=n(134),i=n(102).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(75),i=n(60),o=n(270),a=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(80),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},function(t,e,n){var r=n(32),i=n(272),o=n(28)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){var r=n(77);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(30);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){var r=n(21),i=n(141),o=n(137),a=n(37);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(t){c.forEach=o}}},function(t,e,n){var r=n(30),i=n(28),o=n(276),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r,i,o=n(21),a=n(277),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},function(t,e,n){var r=n(101);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(28),i=n(142),o=n(37),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),t.exports=function(t){s[a][t]=!0}},function(t,e,n){var r=n(45),i=n(58),o=n(33),a=n(143);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,u=0;s>u;)i.f(t,n=r[u++],e[n]);return t}},function(t,e,n){var r=n(101);t.exports=r("document","documentElement")},function(t,e,n){"use strict";var r=n(145).IteratorPrototype,i=n(142),o=n(96),a=n(104),s=n(67),u=function(){return this};t.exports=function(t,e,n){var c=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,c,!1,!0),s[c]=u,t}},function(t,e,n){var r=n(30);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(32);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){"use strict";var r=n(45),i=n(30),o=n(143),a=n(135),s=n(128),u=n(66),c=n(76),l=Object.assign;t.exports=!l||i((function(){var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||"abcdefghijklmnopqrst"!=o(l({},e)).join("")}))?function(t,e){for(var n=u(t),i=arguments.length,l=1,f=a.f,h=s.f;i>l;)for(var p,d=c(arguments[l++]),y=f?o(d).concat(f(d)):o(d),m=y.length,v=0;m>v;)p=y[v++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:l},function(t,e,n){"use strict";var r=n(148),i={};i[n(28)("toStringTag")]="z",t.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(t,e,n){var r=n(21),i=n(287).trim,o=n(149),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");t.exports=u?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},function(t,e,n){var r=n(57),i="["+n(149)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e,n){var r=n(30);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){"use strict";var r=n(42),i=n(21),o=n(136),a=n(59),s=n(105),u=n(152),c=n(153),l=n(32),f=n(30),h=n(293),p=n(104),d=n(294);t.exports=function(t,e,n,y,m){var v=i[t],g=v&&v.prototype,b=v,_=y?"set":"add",w={},T=function(t){var e=g[t];a(g,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(o(t,"function"!=typeof v||!(m||g.forEach&&!f((function(){(new v).entries().next()})))))b=n.getConstructor(e,t,y,_),s.REQUIRED=!0;else if(o(t,!0)){var S=new b,E=S[_](m?{}:-0,1)!=S,k=f((function(){S.has(1)})),O=h((function(t){new v(t)})),C=!m&&f((function(){for(var t=new v,e=5;e--;)t[_](e,e);return!t.has(-0)}));O||((b=e((function(e,n){c(e,b,t);var r=d(new v,e,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=g,g.constructor=b),(k||C)&&(T("delete"),T("has"),y&&T("get")),(C||E)&&T(_),m&&g.clear&&delete g.clear}return w[t]=b,r({global:!0,forced:b!=v},w),p(b,t),m||n.setStrong(b,t,y),b}},function(t,e,n){var r=n(28),i=n(67),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},function(t,e,n){var r=n(148),i=n(67),o=n(28)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(33);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(28)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){var r=n(32),i=n(147);t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},function(t,e,n){"use strict";var r=n(151),i=n(105).getWeakData,o=n(33),a=n(32),s=n(153),u=n(152),c=n(103),l=n(36),f=n(65),h=f.set,p=f.getterFor,d=c.find,y=c.findIndex,m=0,v=function(t){return t.frozen||(t.frozen=new g)},g=function(){this.entries=[]},b=function(t,e){return d(t.entries,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=y(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,c){var f=t((function(t,r){s(t,f,e),h(t,{type:e,id:m++,frozen:void 0}),null!=r&&u(r,t[c],t,n)})),d=p(e),y=function(t,e,n){var r=d(t),a=i(o(e),!0);return!0===a?v(r).set(e,n):a[r.id]=n,t};return r(f.prototype,{delete:function(t){var e=d(this);if(!a(t))return!1;var n=i(t);return!0===n?v(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=d(this);if(!a(t))return!1;var n=i(t);return!0===n?v(e).has(t):n&&l(n,e.id)}}),r(f.prototype,n?{get:function(t){var e=d(this);if(a(t)){var n=i(t);return!0===n?v(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return y(this,t,e)}}:{add:function(t){return y(this,t,!0)}}),f}}},function(t,e,n){var r=n(139),i=n(66),o=n(76),a=n(60),s=function(t){return function(e,n,s,u){r(n);var c=i(e),l=o(c),f=a(c.length),h=t?f-1:0,p=t?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=p;break}if(h+=p,t?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=p)h in l&&(u=n(u,l[h],h,c));return u}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){"use strict";var r=n(33);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},,,,,,,,,,,,,,function(t,e,n){"use strict";var r,i=n(1);!function(t){t.None="None",t.Complete="Complete",t.Incomplete="Incomplete"}(r||(r={}));n(323);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(c,t);var e,n,i,o=u(c);function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=o.call(this,t,e)).update(),n}return e=c,(n=[{key:"update",value:function(){this.options_.activityStatus===r.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.options_.activityStatus===r.Complete?r.Incomplete:r.Complete,this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}}])&&a(e.prototype,n),i&&a(e,i),Object.defineProperty(e,"prototype",{writable:!1}),c}(i.a.getComponent("Button"));function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g(t);if(e){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){if(e&&("object"===h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}f.prototype.controlText_="ActivityStatus";var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(o,t);var e,n,r,i=m(o);function o(){return p(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"setActivityStatus",value:function(t,e){var n=this;t!==this.activityStatus&&(this.activityStatus=t,this.onToggleStatus=e,this.player.ready((function(){n.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button))}}])&&d(e.prototype,n),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a.getPlugin("plugin"));i.a.registerPlugin("activityStatusPlugin",b)},function(t,e,n){"use strict";var r=n(1);n(322);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(u,t);var e,n,r,i=s(u);function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t,e)).update(),n}return e=u,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(r.a.getComponent("Button"));function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=v(t);if(e){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===f(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}l.prototype.controlText_="Favourite";var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(o,t);var e,n,r,i=y(o);function o(){return h(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"setFavourite",value:function(t,e){var n=this;t!==this.isFavourite&&(this.isFavourite=t,this.onClickFavourite=e,this.player.ready((function(){n.renderFavouriteButton()})))}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new l(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&p(e.prototype,n),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a.getPlugin("plugin"));r.a.registerPlugin("favouritePlugin",g)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){},function(t,e,n){},function(t,e,n){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);n(231),n(232);var r=n(188),i=n(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=u(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function u(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,n,r,o=l(u);function u(t,e){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),n=o.call(this,t),void 0===e.startTime)throw Error("Invalid clip start");if(void 0===e.endTime)throw Error("Invalid clip end");if(e.startTime>e.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(e.startTime.toPrecision(4)),n._clipEnd=parseFloat(e.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(h(n)),n.player.duration=n.duration.bind(h(n)),n.player.currentTime=n.currentTime.bind(h(n)),n.player.buffered=n.buffered.bind(h(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return e=u,(n=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),s(p(u.prototype),"dispose",this).call(this)}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return void 0!==t&&this.playerDurationFn(t),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if(void 0===t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[e].concat(r))}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),n=0;return e>=this.clipStart&&(n=e-this.clipStart),this.player.getCache().currentTime=n,t?n:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],n=0;n<t.length;n++)e[n]=[Math.max(0,t.start(n)-this.clipStart),Math.min(Math.max(0,t.end(n)-this.clipStart),this.player.duration())];return i.a.createTimeRanges(e)}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(i.a.getPlugin("plugin"));i.a.registerPlugin("clipPlugin",d);n(691);function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=b(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function b(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}function _(t,e){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function w(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=S(t);if(e){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T(this,n)}}function T(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(o,t);var e,n,r,i=w(o);function o(){var t;return m(this,o),(t=i.apply(this,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return e=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){g(S(o.prototype),"handleClick",this).call(this,null)}}])&&v(e.prototype,n),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a.getComponent("Button"));function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function C(t,e){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=L(t);if(e){var i=L(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(t,e){if(e&&("object"===k(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function L(t){return(L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}E.prototype.controlText_="Create Clip",i.a.registerComponent("CreateClipButton",E);var A=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(o,t);var e,n,r,i=P(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).options=e,t.ready((function(){return n.onReady()})),n}return e=o,(n=[{key:"onReady",value:function(){var t,e=this.player.getChild("collapserator"),n=null===(t=null==e?void 0:e.children())||void 0===t?void 0:t.findIndex((function(t){return"CustomControlSpacer"===t.name()}));n&&-1!==n&&e.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&O(e.prototype,n),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.a.getPlugin("plugin"));i.a.registerPlugin("createClipButtonPlugin",A);n(692);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(){return(R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=D(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function D(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=U(t)););return t}function M(t,e){return(M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=U(t);if(e){var i=U(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B(this,n)}}function B(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function U(t){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var F=i.a.getComponent("PlayToggle"),V=i.a.getPlugin("plugin"),H=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&M(t,e)}(o,t);var e,n,r,i=N(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e)).pictureInPictureEnabled=!1,n.options=e,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return e=o,(n=[{key:"initialize",value:function(){var t=this;this.enablePictureInPicture(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var e;null===(e=t.player)||void 0===e||e.off("playerresize",t.onPlayerResize)}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var t=this.getToggleParentComponent();if(t){this.pictureInPictureEnabled=!0;var e=t.children().findIndex((function(t){var e;return"fullscreentoggle"===(null===(e=t.name())||void 0===e?void 0:e.toLowerCase())}));-1===e&&(e=t.children().length-1),t.addChild("pictureInPictureToggle",{},e);var n=t.getChild("pictureInPictureToggle");null==n||n.enable()}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var t=this.getToggleParentComponent(),e=null==t?void 0:t.getChild("pictureInPictureToggle");e&&t.removeChild(e)}}},{key:"togglePictureInPicture",value:function(t){if(t!==this.player.isInPictureInPicture()){var e=t?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(t),this.player.trigger(e),t?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var t=this.player.el().getBoundingClientRect();0!==t.width&&(t.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new F(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,R(U(o.prototype),"dispose",this).call(this)}}])&&j(e.prototype,n),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(V);i.a.registerPlugin("pictureInPicture",H);n(338);var q=n(113),W=n(15);function z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var G=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={}}var e,n,r;return e=t,(n=[{key:"subscribe",value:function(t,e){this.registerListener(t,e)}},{key:"subscribeOnce",value:function(t,e){this.registerListener(t,e,1)}},{key:"unsubscribe",value:function(t,e){this.deregisterListener(t,e)}},{key:"trigger",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.triggerCallbacks(t,n)}},{key:"registerListener",value:function(t,e,n){var r;if("string"!=typeof t)throw new Error("Event name must be a string");if("function"!=typeof e)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[t]=null!==(r=this.listeners[t])&&void 0!==r?r:[],this.listeners[t].push({callback:e,executionLimit:n})}},{key:"deregisterListener",value:function(t,e){var n;if("string"!=typeof t)throw new Error("Event name must be a string");if(e&&"function"!=typeof e)throw new Error("Event callback must be a function");if(e){var r=null===(n=this.listeners[t])||void 0===n?void 0:n.findIndex((function(t){return t.callback===e}));"number"==typeof r&&-1!==r&&(this.listeners[t].splice(r,1),0===this.listeners[t].length&&delete this.listeners[t])}else this.listeners[t]=[]}},{key:"triggerCallbacks",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[t]){var o=[];this.listeners[t].forEach((function(t){var e,n;"number"==typeof t.executionLimit&&(t.executionCount=null!==(n=t.executionCount)&&void 0!==n?n:0,t.executionCount++,t.executionCount===t.executionLimit&&o.push(t.callback)),(e=t.callback).apply.apply(e,[null].concat(r))})),o.length&&o.forEach((function(n){return e.deregisterListener(t,n)}))}}}])&&z(e.prototype,n),r&&z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());n(693);function Y(t){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function K(){return(K="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=Q(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Q(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=et(t)););return t}function $(t,e){return($=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function J(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=et(t);if(e){var i=et(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(t,e){if(e&&("object"===Y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tt(t)}function tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function et(t){return(et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(a,t);var e,n,r,o=J(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=G,n.pointOfInterest=e.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(tt(n)),n.onMouseLeave=n.onMouseLeave.bind(tt(n)),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(tt(n)),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(tt(n)),n.initialize(),n}return e=a,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(K(et(a.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(t,e,n){return K(et(a.prototype),"createEl",this).call(this,t,Object.assign(Object.assign({},e),{className:this.buildCSSClass()}),n)}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var t=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/t*100+"%"}},{key:"updateBuffered",value:function(t){var e=this.getPointOfInterestTime()<=t;e!==this.hasBuffered&&(this.hasBuffered=e,this.hasBuffered?this.addClass("cv-point-of-interest-indicator-buffered"):this.removeClass("cv-point-of-interest-indicator-buffered"))}},{key:"updatePlaybackProgress",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasPlayed){this.hasPlayed=e;var n="cv-point-of-interest-indicator-played";e?this.addClass(n):this.removeClass(n)}}},{key:"toggleVisibility",value:function(t){t?this.removeClass("cv-point-of-interest-indicator-hidden"):this.addClass("cv-point-of-interest-indicator-hidden")}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(t){t.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var t=this.getTimeTooltip();null==t||t.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var t,e,n=null===(t=this.getSeekBar())||void 0===t?void 0:t.el();if(n){var r=i.a.dom.findPosition(n),o=this.getPointOfInterestTime()/this.player().duration();null===(e=this.getMouseTimeDisplay())||void 0===e||e.update(r,o)}}},{key:"showMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.removeForceShow()}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player().controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var t;return null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var t;return null===(t=this.getMouseTimeDisplay())||void 0===t?void 0:t.getChild("TimeTooltip")}}])&&X(e.prototype,n),r&&X(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.a.getComponent("Component"));function rt(t){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ot(){return(ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=at(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function at(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lt(t)););return t}function st(t,e){return(st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=lt(t);if(e){var i=lt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ct(this,n)}}function ct(t,e){if(e&&("object"===rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lt(t){return(lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ft=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}(a,t);var e,n,r,o=ut(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).pointsOfInterestVisible=e.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return e=a,(n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){i.a.dom.addClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){i.a.dom.removeClass(this.toggleEl,"on"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,e,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=i.a.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=ot(lt(a.prototype),"createEl",this).call(this,t,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Points of Interest</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&it(e.prototype,n),r&&it(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.a.getComponent("MenuItem"));function ht(t){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dt(t,e){return(dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=gt(t);if(e){var i=gt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mt(this,n)}}function mt(t,e){if(e&&("object"===ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vt(t)}function vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gt(t){return(gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}i.a.registerComponent("PointsOfInterestMenuItem",ft);var bt=i.a.getPlugin("plugin"),_t=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}(o,t);var e,n,r,i=yt(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t)).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==e?void 0:e.pointsOfInterest,n.initialize=n.initialize.bind(vt(n)),n.updateBuffered=n.updateBuffered.bind(vt(n)),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(vt(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return e=o,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(W.a.hasLocalStorage()&&"false"===W.a.get("cvplayer-points-of-interest")&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var t=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var e,n;null===(e=t.player)||void 0===e||e.off("progress",t.updateBuffered),null===(n=t.player)||void 0===n||n.off("timeupdate",t.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(t){W.a.set("cvplayer-points-of-interest",t.toString()),this.pointOfInterestIndicators.forEach((function(e){return e.toggleVisibility(t)}))}},{key:"setupTrack",value:function(){var t=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(e){t.addCue({startTime:e.startTime,endTime:e.endTime,text:e.description})})),t.trigger({type:"loadeddata",target:t})}},{key:"createPointOfInterestIndicators",value:function(){var t,e=this,n=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.pointsOfInterest.forEach((function(t){var r=new nt(e.player,{pointOfInterest:t});e.pointOfInterestIndicators.push(r),n.addChild(r)}))}},{key:"addMenuItem",value:function(){var t;(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:ft,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updateBuffered(Object(q.a)(t.player))}))}},{key:"updatePlaybackProgress",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updatePlaybackProgress(t.player.currentTime())}))}}])&&pt(e.prototype,n),r&&pt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(bt);i.a.registerPlugin("pointsOfInterestPlugin",_t);n(337);function wt(t){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Tt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return k()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==e&&n.call(m,i)&&(d=m);var v=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var r;this._invoke=function(i,o){function a(){return new e((function(r,a){!function r(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==wt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,a,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(v),s(v,a,"Generator"),s(v,i,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Et(){return(Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=kt(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function kt(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=xt(t)););return t}function Ot(t,e){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ct(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xt(t);if(e){var i=xt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pt(this,n)}}function Pt(t,e){if(e&&("object"===wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xt(t){return(xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Lt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},At=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e)}(o,t);var e,n,r,i=Ct(o);function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,t,e)}return e=o,(n=[{key:"configurePlugins",value:function(){try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),this.options.pointsOfInterest&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(t){console.log("failed to register plugins",t)}}},{key:"setNextVideo",value:function(t,e,n){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(t,e,n)}},{key:"enablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(t){var e=this.player.pictureInPicture();e&&e.togglePictureInPicture(t)}},{key:"additionalSetup",value:function(t){var e=this,n=Object.create(null,{additionalSetup:{get:function(){return Et(xt(o.prototype),"additionalSetup",e)}}});return Lt(this,void 0,void 0,Tt().mark((function e(){var r;return Tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.additionalSetup.call(this,t),this.options.showResources&&t.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:t.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==t.mediaType){e.next=7;break}if(null!==(r=t.additionalData)){e.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}])&&St(e.prototype,n),r&&St(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(r.a);n.d(e,"Player",(function(){return At}))}])}));