!function(e,t){module.exports=t();}(commonjsGlobal,function(){for(vare,u="7.17.0",i={},a=function(e,t){returni[e]=i[e]||[],t&&(i[e]=i[e].concat(t)),i[e]},n=function(e,t){t=a(e).indexOf(t);return!(t<=-1)&&(i[e]=i[e].slice(),i[e].splice(t,1),!0)},l={prefixed:!0},t=[["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"]],r=t[0],s=0;s<t.length;s++)if(t[s][1]indocument){e=t[s];break}if(e){for(varo=0;o<e.length;o++)l[r[o]]=e[o];l.prefixed=e[0]!==r[0];}varc=[],d=function(a,s){returnfunction(e,t,i){varn,r=s.levels[t],t=newRegExp("^("+r+")$");"log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(a+":"),c&&(c.push([].concat(i)),n=c.length-1e3,c.splice(0,0<n?n:0)),!window.console||(n=!(n=window.console[e])&&"debug"===e?window.console.info||window.console.log:n)&&r&&t.test(e)&&n[Array.isArray(i)?"apply":"call"](window.console,i);}};varh=functiont(i){functionn(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];a("log",r,t);}varr="info",a=d(i,n);returnn.createLogger=function(e){returnt(i+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},n.level=function(e){if("string"==typeofe){if(!n.levels.hasOwnProperty(e))thrownewError('"'+e+'" in not a valid log level');r=e;}returnr},(n.history=function(){returnc?[].concat(c):[]}).filter=function(t){return(c||[]).filter(function(e){returnnewRegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){c&&(c.length=0);},n.history.disable=function(){null!==c&&(c.length=0,c=null);},n.history.enable=function(){null===c&&(c=[]);},n.error=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returna("error",r,t)},n.warn=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returna("warn",r,t)},n.debug=function(){for(vare=arguments.length,t=newArray(e),i=0;i<e;i++)t[i]=arguments[i];returna("debug",r,t)},n}("VIDEOJS"),p=h.createLogger,f="undefined"!=typeofglobalThis?globalThis:"undefined"!=typeofwindow?window:"undefined"!=typeofcommonjsGlobal?commonjsGlobal:"undefined"!=typeofself?self:{};functionm(e,t){returne(t={exports:{}},t.exports),t.exports}varg=m(function(e){functiont(){returne.exports=t=Object.assign||function(e){for(vart=1;t<arguments.length;t++){vari,n=arguments[t];for(iinn)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);}returne},t.apply(this,arguments)}e.exports=t;}),y=Object.prototype.toString,v=function(e){returnT(e)?Object.keys(e):[]};function_(t,i){v(t).forEach(function(e){returni(t[e],e)});}functionb(i){for(vare=arguments.length,t=newArray(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];returnObject.assign?g.apply(void0,[i].concat(t)):(t.forEach(function(e){e&&_(e,function(e,t){i[t]=e;});}),i)}functionT(e){return!!e&&"object"==typeofe}functionw(e){returnT(e)&&"[object Object]"===y.call(e)&&e.constructor===Object}functionS(e,t){if(!e||!t)return"";if("function"!=typeofwindow.getComputedStyle)return"";vari;try{i=window.getComputedStyle(e);}catch(e){return""}returni?i.getPropertyValue(t)||i[t]:""}varE=window.navigator&&window.navigator.userAgent||"",k=/AppleWebKit\/([\d.]+)/i.exec(E),C=k?parseFloat(k.pop()):null,I=/iPod/i.test(E),x=(jt=E.match(/OS (\d+)_/i))&&jt[1]?jt[1]:null,A=/Android/i.test(E),P=function(){vare=E.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)returnnull;vart=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);returnt&&i?parseFloat(e[1]+"."+e[2]):t||null}(),L=A&&P<5&&C<537,D=/Firefox/i.test(E)
var$t=function(e){varn={};returne&&e.trim().split("\n").forEach(function(e){vart=e.indexOf(":"),i=e.slice(0,t).trim().toLowerCase(),t=e.slice(t+1).trim();"undefined"==typeofn[i]?n[i]=t:Array.isArray(n[i])?n[i].push(t):n[i]=[n[i],t];}),n},Jt=ei,I=ei;functionZt(e,t,i){varn=e;returnYt(t)?(i=t,"string"==typeofe&&(n={uri:e})):n=g({},t,{uri:e}),n.callback=i,n}functionei(e,t,i){returnti(t=Zt(e,t,i))}functionti(n){if("undefined"==typeofn.callback)thrownewError("callback argument missing");varr=!1,a=function(e,t,i){r||(r=!0,n.callback(e,t,i));};functions(){vare=void0,e=l.response||l.responseText||function(e){try{if("document"===e.responseType)returne.responseXML;vart=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)returne.responseXML}catch(e){}returnnull}(l);if(m)try{e=JSON.parse(e);}catch(e){}returne}functiont(e){returnclearTimeout(u),(e=!(einstanceofError)?newError(""+(e||"Unknown XMLHttpRequest Error")):e).statusCode=0,a(e,g)}functione(){if(!o){clearTimeout(u);vare=n.useXDR&&void0===l.status?200:1223===l.status?204:l.status,t=g,i=null;return0!==e?(t={body:s(),statusCode:e,method:d,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(t.headers=$t(l.getAllResponseHeaders()))):i=newError("Internal XMLHttpRequest Error"),a(i,t,t.body)}}vari,o,u,l=n.xhr||null,c=(l=l||new(n.cors||n.useXDR?ei.XDomainRequest:ei.XMLHttpRequest)).url=n.uri||n.url,d=l.method=n.method||"GET",h=n.body||n.data,p=l.headers=n.headers||{},f=!!n.sync,m=!1,g={body:void0,headers:{},statusCode:0,method:d,url:c,rawRequest:l};if("json"inn&&!1!==n.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===n.json?h:n.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(e,0);},l.onload=e,l.onerror=t,l.onprogress=function(){},l.onabort=function(){o=!0;},l.ontimeout=t,l.open(d,c,!f,n.username,n.password),f||(l.withCredentials=!!n.withCredentials),!f&&0<n.timeout&&(u=setTimeout(function(){vare;o||(o=!0,l.abort("timeout"),(e=newError("XMLHttpRequest timeout")).code="ETIMEDOUT",t(e));},n.timeout)),l.setRequestHeader)for(iinp)p.hasOwnProperty(i)&&l.setRequestHeader(i,p[i]);elseif(n.headers&&!function(e){for(vartine)if(e.hasOwnProperty(t))return;return1}(n.headers))thrownewError("Headers cannot be set on an XDomainRequest object");return"responseType"inn&&(l.responseType=n.responseType),"beforeSend"inn&&"function"==typeofn.beforeSend&&n.beforeSend(l),l.send(h||null),l}ei.XMLHttpRequest=Kt.XMLHttpRequest||function(){},ei.XDomainRequest="withCredentials"innewei.XMLHttpRequest?ei.XMLHttpRequest:Kt.XDomainRequest,function(e,t){for(vari=0;i<e.length;i++)t(e[i]);}(["get","put","post","patch","head","delete"],function(n){ei["delete"===n?"del":n]=function(e,t,i){return(t=Zt(e,t,i)).method=n.toUpperCase(),ti(t)};}),Jt.default=I;functionii(e,t){vari=newwindow.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e);},i.onparsingerror=function(e){n.push(e);},i.onflush=function(){t.trigger({type:"loadeddata",target:t});},i.parse(e),0<n.length&&(window.console&&window.console.groupCollapsed&&window.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(function(e){returnh.error(e)}),window.console&&window.console.groupEnd&&window.console.groupEnd()),i.flush();}functionni(e,n){vart={uri:e};(e=Ut(e))&&(t.cors=e),(e="use-credentials"===n.tech_.crossOrigin())&&(t.withCredentials=e),Jt(t,Ve(this,function(e,t,i){returne?h.error(e,t):(n.loaded_=!0,void("function"!=typeofwindow.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){return"vttjserror"!==e.type?ii(i,n):voidh.error("vttjs failed to load, stopping trying to process "+n.src)}):ii(i,n)))}));}varri=function(u){functione(e){vart;if(!(e=void0===e?{}:e).tech)thrownewError("A tech was not provided.");vare=lt(e,{kind:Wt[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=zt[e.mode]||"disabled",
/*! @name m3u8-parser @version 4.7.0 @license Apache-2.0 */functionor(e){vart=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),e={};returnt[1]&&(e.length=parseInt(t[1],10)),t[2]&&(e.offset=parseInt(t[2],10)),e}functionur(e){for(vart,i=e.split(newRegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);returnn}functionlr(t){vari={};returnObject.keys(t).forEach(function(e){i[e.toLowerCase().replace(/-(\w)/g,function(e){returne[1].toUpperCase()})]=t[e];}),i}functioncr(e){vart,i,n,r,a=e.serverControl,s=e.targetDuration,o=e.partTargetDuration;a&&(t="#EXT-X-SERVER-CONTROL",i="holdBack",n="partHoldBack",r=s&&3*s,e=o&&2*o,s&&!a.hasOwnProperty(i)&&(a[i]=r,this.trigger("info",{message:t+" defaulting HOLD-BACK to targetDuration * 3 ("+r+")."})),r&&a[i]<r&&(this.trigger("warn",{message:t+" clamping HOLD-BACK ("+a[i]+") to targetDuration * 3 ("+r+")"}),a[i]=r),o&&!a.hasOwnProperty(n)&&(a[n]=3*o,this.trigger("info",{message:t+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+a[n]+")."})),o&&a[n]<e&&(this.trigger("warn",{message:t+" clamping PART-HOLD-BACK ("+a[n]+") to partTargetDuration * 2 ("+e+")."}),a[n]=e));}functiondr(e){returne&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})}functionhr(e){vare=(e=void0===e?"":e).split(","),a=[];returne.forEach(function(n){varr;n=n.trim(),Er.forEach(function(e){vart,i=Sr[e].exec(n.toLowerCase());!i||i.length<=1||(r=e,t=n.substring(0,i[1].length),i=n.replace(t,""),a.push({type:t,details:i,mediaType:e}));}),r||a.push({type:n,details:"",mediaType:"unknown"});}),a}functionpr(e){returnSr.audio.test((e=void0===e?"":e).trim().toLowerCase())}functionfr(e){if(e&&"string"==typeofe){vart=e.toLowerCase().split(",").map(function(e){returndr(e.trim())}),i="video";1===t.length&&pr(t[0])?i="audio":1===t.length&&(n=t[0],Sr.text.test((n=void0===n?"":n).trim().toLowerCase()))&&(i="application");varn="mp4";returnt.every(function(e){returnSr.mp4.test(e)})?n="mp4":t.every(function(e){returnSr.webm.test(e)})?n="webm":t.every(function(e){returnSr.ogg.test(e)})&&(n="ogg"),i+"/"+n+';codecs="'+e+'"'}}functionmr(e){returnvoid0===e&&(e=""),window.MediaSource&&window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported(fr(e))||!1}functiongr(e){return(e=void0===e?"":e).toLowerCase().split(",").every(function(e){e=e.trim();for(vart=0;t<kr.length;t++)if(Sr["muxer"+kr[t]].test(e))return!0;return!1})}functionyr(e){returnIr.test(e)?"hls":xr.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}functionvr(e,t){if(/^[a-z]+:/i.test(t))returnt;/^data:/.test(e)&&(e=window.location&&window.location.href||"");vari="function"==typeofwindow.URL,n=/^\/\//.test(e),r=!window.location&&!/\/\//i.test(e);if(i?e=newwindow.URL(e,window.location||Ar):/\/\//i.test(e)||(e=ir.buildAbsoluteURL(window.location&&window.location.href||"",e)),i){i=newURL(t,e);returnr?i.href.slice(Ar.length):n?i.href.slice(i.protocol.length):i.href}returnir.buildAbsoluteURL(e,t)}var_r=function(t){functione(){vare=t.call(this)||this;returne.buffer="",e}returnft(e,t),e.prototype.push=function(e){vart;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1);},e}(rr),br=String.fromCharCode(9),Tr=function(t){functione(){vare=t.call(this)||this;returne.customParsers=[],e.tagMappers=[],e}ft(e,t);vari=e.prototype;returni.push=function(i){varr,a,s=this;0!==(i=i.trim()).length&&("#"===i[0]?this.tagMappers.reduce(function(e,t){t=t(i);returnt===i?e:e.concat([t])},[i]).forEach(function(e){for(vart,i,n=0;n<s.customParsers.length;n++)if(s.customParsers[n].call(s,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),r=/^#EXTM3U/.exec(e))s.trigger("data",{type:"tag",tagType:"m3u"});else{if(r=/^#EXTINF:?(
vare;n(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]));});}returnu.prototype.decryptChunk_=function(t,i,n,r){returnfunction(){vare=function(e,t,i){for(varn,r,a,s,o=newInt32Array(e.buffer,e.byteOffset,e.byteLength>>2),u=newm(Array.prototype.slice.call(t)),e=newUint8Array(e.byteLength),l=newInt32Array(e.buffer),c=i[0],d=i[1],h=i[2],p=i[3],f=0;f<o.length;f+=4)n=g(o[f]),r=g(o[f+1]),a=g(o[f+2]),s=g(o[f+3]),u.decrypt(n,r,a,s,l,f),l[f]=g(l[f]^c),l[f+1]=g(l[f+1]^d),l[f+2]=g(l[f+2]^h),l[f+3]=g(l[f+3]^p),c=n,d=r,h=a,p=s;returne}(t,i,n);r.set(e,t.byteOffset);}},t(u,null,[{key:"STEP",get:function(){return32e3}}]),u}();self.onmessage=function(e){varr=e.data,t=newUint8Array(r.encrypted.bytes,r.encrypted.byteOffset,r.encrypted.byteLength),i=newUint32Array(r.key.bytes,r.key.byteOffset,r.key.byteLength/4),e=newUint32Array(r.iv.bytes,r.iv.byteOffset,r.iv.byteLength/4);newa(t,i,e,function(e,t){vari,n;self.postMessage((i={source:r.source,decrypted:t},n={},Object.keys(i).forEach(function(e){vart=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t;}),n),[t.buffer]);});};}))),ac={AUDIO:function(s,o){returnfunction(){vare=o.segmentLoaders[s],t=o.mediaTypes[s],i=o.blacklistCurrentPlaylist;Rl(e,t);varn=t.activeTrack(),e=t.activeGroup(),e=(e.filter(function(e){returne.default})[0]||e[0]).id,r=t.tracks[e];if(n!==r){for(varaintr.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),t.tracks)t.tracks[a].enabled=t.tracks[a]===r;t.onTrackChanged();}elsei({message:"Problem encountered loading the default audio track."});}},SUBTITLES:function(i,n){returnfunction(){vare=n.segmentLoaders[i],t=n.mediaTypes[i];tr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Rl(e,t);e=t.activeTrack();e&&(e.mode="disabled"),t.onTrackChanged();}}},sc={AUDIO:function(e,t,i){varn,r,a;t&&(n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],t.on("loadedmetadata",function(){vare=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load();}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load();}),t.on("error",ac[e](e,i)));},SUBTITLES:function(e,t,i){varn=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){vare=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load();}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load();}),t.on("error",ac[e](e,i));}},oc={AUDIO:function(e,t){vari,n,r=t.vhs,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions,u=t.master.mediaGroups,l=t.mediaTypes[e],c=l.groups,d=l.tracks,h=l.logger_,p=t.masterPlaylistLoader,f=Yo(p.master);for(iinu[e]&&0!==Object.keys(u[e]).length||(u[e]={main:{default:{default:!0}}},f&&(u[e].main.default.playlists=p.master.playlists)),u[e])for(varminc[i]||(c[i]=[]),u[e][i]){varg=u[e][i][m],y=void0,y=f?(h("AUDIO group '"+i+"' label '"+m+"' is a master playlist"),g.isMasterPlaylist=!0,null):"vhs-json"===a&&g.playlists?newll(g.playlists[0],r,o):g.resolvedUri?newll(g.resolvedUri,r,o):g.playlists&&"dash"===a?newpl(g.playlists[0],r,o,p):null,g=tr.mergeOptions({id:m,playlistLoader:y},g);sc[e](e,g.playlistLoader,t),c[i].push(g),"undefined"==typeofd[m]&&(g=newtr.AudioTrack({id:m,kind:(n=void0,n=(y=g).default?"main":"alternative",n=y.characteristics&&0<=y.characteristics.indexOf("public.accessibility.describes-video")?"main-desc":n),enabled:!1,language:g.language,default:g.default,label:m}),d[m]=g);}s.on("error",ac[e](e,t));},SUBTITLES:function(e,t){vari,n=t.tech,r=t.vhs,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions,u=t.master.mediaGroups,l=t.mediaTypes[e],c=l.groups,d=l.tracks,h=t.masterPlaylistLoader;for(iinu[e])for(varpinc[i]||(c[i]=[]),u[e][i])if(!u[e][i][p].forced){varf=u[e][i][p],m=void0;if("hls"===a)m=newll(f.resolvedUri,r,o);elseif("dash"===a){if(!f.playlists.filter(function(e){returne.excludeUntil!==1/0}).length)return;m=newpl(f.playlists[0],r,o,h);}else"vhs-json