shaka-player 4.9.10 → 4.9.11
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/deps.js +1 -1
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.js +23 -21
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.js +612 -612
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +1 -1
- package/dist/shaka-player.ui.debug.d.ts +1 -1
- package/dist/shaka-player.ui.debug.js +26 -24
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.js +773 -773
- package/dist/shaka-player.ui.map +3 -3
- package/externs/mediatailor.js +2 -2
- package/lib/ads/media_tailor_ad.js +47 -3
- package/lib/player.js +13 -4
- package/package.json +1 -1
package/dist/shaka-player.ui.js
CHANGED
|
@@ -127,18 +127,18 @@ bd.prototype.resolve=bd.prototype.resolve;bd.prototype.resolveDictionary=bd.prot
|
|
|
127
127
|
q.qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Wa();this.g.g={}}};P("shaka.util.EventManager",jd);jd.prototype.removeAll=jd.prototype.qb;jd.prototype.unlisten=jd.prototype.Wa;jd.prototype.listenOnce=jd.prototype.ma;jd.prototype.listen=jd.prototype.s;jd.prototype.release=jd.prototype.release;function kd(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ld(a,d);this.target.addEventListener(b,c,this.g)}
|
|
128
128
|
kd.prototype.Wa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ld(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return md(a)?b:b.capture||!1}
|
|
129
129
|
function md(a){var b=nd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}nd=b}return b||!1}var nd=void 0;function od(a){if(pd.has(a))return pd.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);pd.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),pd.set(a,b),b):!1}function qd(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var pd=new Map;function rd(a,b){this.g=a;this.h=b}rd.prototype.toString=function(){return"v"+this.g+"."+this.h};function sd(a,b){var c=new rd(5,0),d=td,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function ud(a,b,c,d){Ya([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function vd(a,b,c,d){Xa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var td=null;function wd(){}wd.prototype.extract=function(){};wd.prototype.decode=function(){return[]};wd.prototype.clear=function(){};wd.prototype.getStreams=function(){return[]};function xd(){}xd.prototype.init=function(){};xd.prototype.parse=function(){return[]};function yd(){}yd.prototype.init=function(){};yd.prototype.i=function(){};yd.prototype.g=function(){};yd.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",yd);function zd(a){this.l=new xd;if(a=Ad[a.toLowerCase()])this.l=a();this.h=new wd;if(a=Bd)this.h=a()}zd.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};zd.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Gb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
130
|
-
zd.prototype.g=function(){this.h.clear()};zd.prototype.j=function(){return this.h.getStreams()};P("shaka.media.ClosedCaptionParser",zd);zd.findDecoder=function(){return Bd};zd.unregisterDecoder=function(){Bd=null};zd.registerDecoder=function(a){Bd=a};zd.findParser=function(a){return Ad[a]};zd.unregisterParser=function(a){delete Ad[a]};zd.registerParser=function(a,b){Ad[a]=b};var Ad={},Bd=null;function Cd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Dd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function
|
|
131
|
-
function
|
|
130
|
+
zd.prototype.g=function(){this.h.clear()};zd.prototype.j=function(){return this.h.getStreams()};P("shaka.media.ClosedCaptionParser",zd);zd.findDecoder=function(){return Bd};zd.unregisterDecoder=function(){Bd=null};zd.registerDecoder=function(a){Bd=a};zd.findParser=function(a){return Ad[a]};zd.unregisterParser=function(a){delete Ad[a]};zd.registerParser=function(a,b){Ad[a]=b};var Ad={},Bd=null;function Cd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Dd(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Ed(a,b,c){c||(c=Cd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Af:d.Af},e=a.next()){d.Af=e.value;e=b.findIndex(function(f){return function(g){return c(f.Af,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
131
|
+
function Hd(a,b,c){c||(c=Cd);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Jd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kd;this.position=null;this.positionAlign=Ld;this.size=0;this.textAlign=Md;this.direction=Nd;this.writingMode=Od;this.lineInterpretation=Pd;this.line=null;this.lineHeight="";this.lineAlign=Qd;this.displayAlign=Rd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Sd;this.fontStyle=Td;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
132
132
|
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={uc:32,rows:15}}function Ud(a,b){a=new Jd(a,b,"");a.lineBreak=!0;return a}Jd.prototype.clone=function(){var a=new Jd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
133
|
-
function Vd(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!
|
|
133
|
+
function Vd(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Hd(a.nestedCues,b.nestedCues,Vd))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Hd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}P("shaka.text.Cue",Jd);Jd.equal=Vd;Jd.prototype.clone=Jd.prototype.clone;var Ld="auto";
|
|
134
134
|
Jd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ld};var Md="center",Wd={LEFT:"left",RIGHT:"right",CENTER:Md,START:"start",END:"end"};Jd.textAlign=Wd;var Rd="after",Xd={BEFORE:"before",CENTER:"center",AFTER:Rd};Jd.displayAlign=Xd;var Nd="ltr";Jd.direction={HORIZONTAL_LEFT_TO_RIGHT:Nd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Od="horizontal-tb";Jd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Od,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Pd=0;
|
|
135
|
-
Jd.lineInterpretation={LINE_NUMBER:Pd,PERCENTAGE:1};var Qd="start"
|
|
135
|
+
Jd.lineInterpretation={LINE_NUMBER:Pd,PERCENTAGE:1};var Qd="start",Yd={CENTER:"center",START:Qd,END:"end"};Jd.lineAlign=Yd;var ae={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Jd.defaultTextColor=ae;var be={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Jd.defaultTextBackgroundColor=be;var Sd=400;Jd.fontWeight={NORMAL:Sd,BOLD:700};
|
|
136
136
|
var Td="normal",ce={NORMAL:Td,ITALIC:"italic",OBLIQUE:"oblique"};Jd.fontStyle=ce;Jd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Kd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=de;this.scroll=ee}P("shaka.text.CueRegion",Kd);var de=1;Kd.units={PX:0,PERCENTAGE:de,LINES:2};var ee="";Kd.scrollMode={NONE:ee,UP:"up"};function fe(){}fe.prototype.destroy=function(){};function ge(a,b,c){he[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,df:b}}function ie(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([je,ke,le,me]),e=d.next();!e.done;e=d.next())if(e=he[c+"-"+e.value]){var f=e.df(),g=f.isSupported(a,b);f.destroy();if(g)return e.df}return null}P("shaka.transmuxer.TransmuxerEngine",fe);fe.findTransmuxer=ie;fe.unregisterTransmuxer=function(a,b){delete he[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
137
137
|
fe.registerTransmuxer=ge;fe.prototype.destroy=fe.prototype.destroy;var he={},me=1,le=2,ke=3,je=4;fe.PluginPriority={FALLBACK:me,PREFERRED_SECONDARY:le,PREFERRED:ke,APPLICATION:je};function ne(){}function oe(a,b){var c=a;b&&!pe.includes(a)&&(c+='; codecs="'+b+'"');return c}function qe(a,b){b&&(a+='; codecs="'+b+'"');return a}function re(a,b,c){var d=oe(a,b);b=qe(a,b);ie(b)?(a=ie(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
138
138
|
function se(a,b,c){var d=[b];te.forEach(function(e,f){var g=a[f];"codecs"==f?pe.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ue(a){return a.split(";")[0].split("/")[1]}
|
|
139
|
-
function
|
|
140
|
-
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function Ce(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=
|
|
141
|
-
function Fe(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ge(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function
|
|
139
|
+
function ve(a){var b=we(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
140
|
+
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function Ce(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=we(c.value),b.push(c[0]);return b.sort().join(",")}function De(a){return a.split(";")[0]}
|
|
141
|
+
function Fe(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ge(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function we(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}P("shaka.util.MimeUtils",ne);ne.getFullTypeWithAllCodecs=qe;ne.getFullType=oe;
|
|
142
142
|
var te=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),pe=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function He(a){this.i=null;this.j=a;this.F=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.A=function(){};this.o=new Map}function Ie(a){return Je[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Bd:!1}He.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
143
143
|
function Ke(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Gb(b)),p.return();f=a.F?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Gb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);F(p)})}
|
|
144
144
|
He.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));F(d)})};function Le(a,b,c){a.l=b;a.m=c}function Me(a,b,c){a.G=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
@@ -146,8 +146,8 @@ function Ne(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.nex
|
|
|
146
146
|
function Oe(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Ne(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
|
|
147
147
|
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}P("shaka.text.TextEngine",He);He.prototype.destroy=He.prototype.destroy;He.findParser=function(a){return Je[a]};He.unregisterParser=function(a){delete Je[a]};He.registerParser=function(a,b){Je[a]=b};var Je={};function Pe(a,b){return a.concat(b)}function Qe(){}function Re(a){return null!=a};function Se(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer instanceof ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Te(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ue(){}
|
|
148
148
|
function Ve(a,b,c,d){var e=a.variants;if(b.length||c.length)e=We(e,b,c);if(d.length){b=new fb;c=t(e);for(e=c.next();!e.done;e=c.next())e=e.value,b.push(String(e.video.width||0),e);var f=[];b.forEach(function(u,v){u=0;var w=[],A={};v=t(v);for(var z=v.next();!z.done;A={Id:A.Id},z=v.next())A.Id=z.value,z=d.filter(function(C){return function(y){return C.Id.decodingInfos[0][y]}}(A)).length,z>u?(u=z,w=[A.Id]):z==u&&w.push(A.Id);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
149
|
-
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=
|
|
150
|
-
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=qd();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=
|
|
149
|
+
g.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=ve(m.codecs),p=ve(g.codecs);n==p&&g.bandwidth>m.bandwidth&&(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);e.set(k,l)}c=Array.from(b).sort(function(u,
|
|
150
|
+
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=qd();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=ve(m.codecs),p=ve(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=ve(m.codecs),p=ve(g.codecs),n==p&&g.bandwidth>m.bandwidth&&(l.push(g),r.push(g.id)))}else l.push(g),
|
|
151
151
|
r.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!r.includes(u.id)?!1:!0})}
|
|
152
152
|
function We(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Hf:d.Hf},e=b.next())if(d.Hf=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Hf)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={yf:d.yf},b=c.next())if(d.yf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.yf)}}(d)),b.length){a=b;break}return a}function Xe(a,b,c){a.variants=a.variants.filter(function(d){return Ye(d,b,c)})}
|
|
153
153
|
function Ye(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
@@ -304,7 +304,7 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a)
|
|
|
304
304
|
function(m){k.push({box:m,zb:1701733238})}).W("avc1",function(m){k.push({box:m,zb:1701733238})}).W("avc3",function(m){k.push({box:m,zb:1701733238})}).W("ac-3",function(m){k.push({box:m,zb:1701733217})}).W("ec-3",function(m){k.push({box:m,zb:1701733217})}).W("ac-4",function(m){k.push({box:m,zb:1701733217})}).W("mp4a",function(m){k.push({box:m,zb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw eb(Ec(a)),new U(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
|
|
305
305
|
e=Ci(e,g,l.box,h,l.zb);return Ub()&&jc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
306
306
|
function Ci(a,b,c,d,e){var f=Di.value(),g=a.subarray(c.start,c.start+c.size),h=Lb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ei(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Vb()||Ub()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ei(e,d.start,d.size+k.byteLength);k=Lb(e,b.start);b=Qg(b);
|
|
307
|
-
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ei(a,b,c){a=Lb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Di=new Nb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Fi(a,b,c,d,e,f,g){this.P=a;this.Va=b;this.Aa=c;this.Hg=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Fi.prototype.Ob=function(){return this.Va};Fi.prototype.Mb=function(){return this.Aa};Fi.prototype.Sd=function(){return this.g};function Gi(a,b){return a===b?!0:a&&b?a.Ob()==b.Ob()&&a.Mb()==b.Mb()&&
|
|
307
|
+
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ei(a,b,c){a=Lb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Di=new Nb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Fi(a,b,c,d,e,f,g){this.P=a;this.Va=b;this.Aa=c;this.Hg=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Fi.prototype.Ob=function(){return this.Va};Fi.prototype.Mb=function(){return this.Aa};Fi.prototype.Sd=function(){return this.g};function Gi(a,b){return a===b?!0:a&&b?a.Ob()==b.Ob()&&a.Mb()==b.Mb()&&Hd(a.P().sort(),b.P().sort())&&Eb(a.Sd(),b.Sd()):a==b}P("shaka.media.InitSegmentReference",Fi);
|
|
308
308
|
Fi.prototype.getEndByte=Fi.prototype.Mb;Fi.prototype.getStartByte=Fi.prototype.Ob;
|
|
309
309
|
function Hi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Ii:r;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Va=d;this.Aa=e;this.sa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.u=null;this.j=0;this.o=void 0===v?!1:v;this.Se=this.fe=!1;a=t(this.g);for(b=a.next();!b.done;b=
|
|
310
310
|
a.next())b.value.Rh();this.o&&this.g.length&&this.g[this.g.length-1].Qh();this.F=this.mimeType=this.codecs=null}q=Hi.prototype;q.P=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.$i=function(){return this.endTime};q.Ob=function(){return this.Va};q.Mb=function(){return this.Aa};q.tj=function(){return this.tilesLayout};q.sj=function(){return this.A};q.zc=function(){return this.status};q.Qj=function(){this.status=Ji};q.Gg=function(){this.preload=!0};q.Ij=function(){return this.preload};
|
|
@@ -603,16 +603,16 @@ function To(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Qb(functio
|
|
|
603
603
|
function io(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Bm(b(),!0,e):e()}b||(b=function(){return null});return new qg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(oo("downloadheadersreceived",f));d(function(){if(a.$){var h=a.$;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
604
604
|
bo(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],bo(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(oo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)zn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
605
605
|
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}zn(h,f,{ot:wn,su:!h.i})}}catch(M){Za("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case Bg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=Dn(k);var p=n.ot===An||n.ot===un||n.ot===vn||n.ot===Fn,r=k.stream;if(r){var u=h.h.Oa();if(p&&(n.bl=Hn(h,r.type),n.ot!==Fn)){var v=In(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
|
|
606
|
-
if(r.segmentIndex&&m){var w=r.segmentIndex.Wb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!
|
|
606
|
+
if(r.segmentIndex&&m){var w=r.segmentIndex.Wb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Hd(m.P(),A.P())){var z=A.P()[0],C=f.uris[0],y=new URL(z),B=new URL(C);if(y.origin!==B.origin)var D=z;else{for(var K=y.pathname.split("/").slice(1),I=B.pathname.split("/").slice(1,-1);K[0]===I[0];)K.shift(),I.shift();for(;I.length;)I.shift(),K.unshift("..");D=K.join("/")}n.nor=D}if((A.Va||A.Aa)&&(m.Va!=A.Va||m.Aa!=A.Aa)){var J=A.Va+"-";A.Aa&&(J+=A.Aa);n.nrr=J}}}var H=h.h.Oa()||1,G=In(h,r.type)||
|
|
607
607
|
500,N=r.bandwidth;var L=N?N*(m.endTime-m.startTime)/1E3/(G/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(L)||(n.rtp=L)}}p&&n.ot!==Fn&&(n.tb=Jn(h,n.ot)/1E3);zn(h,f,n)}}catch(M){Za("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:zn(h,f,{ot:"k"});break;case 4:zn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.K)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.u)&&(f.Ae=isNaN(f.Ae)?e:f.Ae+e)})}
|
|
608
608
|
function Vo(a,b){return new Sk(a.h,a.i,a.g.streaming,b,function(){a.Za&&dl(a.Za,!0);a.j&&a.j.ke();a.N&&kp(a)},function(c){return a.dispatchEvent(c)})}
|
|
609
609
|
function Wo(a,b){b=new Pm(a.Ac,a.U()||0<b);b.addEventListener("enter",function(d){Ho(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ho(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ho(a,"timelineregionenter",e),Ho(a,"timelineregionexit",e))});var c=new cl(a.h);c.g.add(b);a.ib&&c.g.add(a.ib);return c}
|
|
610
610
|
function Xo(a,b,c){a.N=new $f;a.N.g=bg;cg(a.N,c,Math.min(.5,c/2));wo(a);a.qf=(new Qb(function(){kp(a)})).xa(.25);a.m.s(b,"waiting",function(){return kp(a)});a.m.s(b,"stalled",function(){return kp(a)});a.m.s(b,"canplaythrough",function(){return kp(a)});a.m.s(b,"progress",function(){return kp(a)})}
|
|
611
611
|
function kp(a){switch(a.l){case ep:if(a.h.ended)var b=!0;else{var c=Mi(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case So:a:if(a.h.ended||Vj(a.H))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.ic();var d=Mi(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Oi(a.h.buffered,a.h.currentTime);c=a.N;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?ag:bg;c.g=d;(b=b!=d)&&d===ag&&(c.h=Date.now());b&&wo(a)}function Lo(a,b,c,d){return new Mj(a,b,c,d)}
|
|
612
612
|
function ho(a){return new qn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},Lb:function(){return a.Lb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Oa:function(){return a.Oa()},hc:function(){return a.hc()},Db:function(){return a.Db()},U:function(){return a.U()}},a.g.cmcd)}
|
|
613
|
-
function Ro(a){return new Cl(a.i,{Ke:function(){return a.G?a.G.ze():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Oa:function(){return a.Oa()},ka:a.H,Zb:a.I,onError:function(b){return uo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Uj:function(){a.K&&a.K.update&&a.K.update()},Lg:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.G){a.G.Th();var
|
|
614
|
-
f);a.dispatchEvent(oo("segmentappended",d));a.o&&c.fastSwitching&&b.fe&&b.Se&&a.o.trySuggestStreams()},Tj:function(b,c){(c=c.Hg)&&a.ib&&zl(a.ib,c,b)},rh:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new Vg(Gb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,
|
|
615
|
-
return d},bf:function(b,c,d){Mo(a,b,c,d)},Ge:function(b,c){return a.Ge(b,c)}})}
|
|
613
|
+
function Ro(a){return new Cl(a.i,{Ke:function(){return a.G?a.G.ze():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Oa:function(){return a.Oa()},ka:a.H,Zb:a.I,onError:function(b){return uo(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Uj:function(){a.K&&a.K.update&&a.K.update()},Lg:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.G){a.G.Th();var h=Wj(a.H,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.G.ze()<h&&a.G.Pf(h)}kp(a);d=(new Map).set("start",
|
|
614
|
+
d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(oo("segmentappended",d));a.o&&c.fastSwitching&&b.fe&&b.Se&&a.o.trySuggestStreams()},Tj:function(b,c){(c=c.Hg)&&a.ib&&zl(a.ib,c,b)},rh:function(b,c){var d=a.F;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new Vg(Gb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,
|
|
615
|
+
f),f+=b.length;Uh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},bf:function(b,c,d){Mo(a,b,c,d)},Ge:function(b,c){return a.Ge(b,c)}})}
|
|
616
616
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=mm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(sd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(sd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
617
617
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&sd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){sd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
618
618
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
|
|
@@ -691,14 +691,14 @@ X.prototype.isAudioOnly=X.prototype.ed;X.prototype.isInProgress=X.prototype.Ec;X
|
|
|
691
691
|
X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.ck;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.Ah;X.prototype.unloadAndSavePreload=X.prototype.Bk;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Fk;X.prototype.unload=X.prototype.Oc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.ph;X.prototype.attach=X.prototype.tc;
|
|
692
692
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.B(2);break}return E(k,li(),3);case 3:b=k.h;case 2:var l={};if(Rb())for(var m in Ai)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Rb()?!!Ai[n]:Sb(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(pe));
|
|
693
693
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Ie(n)?!0:Rb()?od(n)||(ie(n)?!0:!1):Sb(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,oc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=yp;for(h in g)f[h]=g[h]();return k.return(f)}})};X.isBrowserSupported=qo;X.setAdManagerFactory=function(a){jo=a};X.registerSupportPlugin=function(a,b){yp[a]=b};X.prototype.destroy=X.prototype.destroy;var po=0,fo=1,So=2,ep=3;
|
|
694
|
-
X.LoadMode={DESTROYED:po,NOT_LOADED:fo,MEDIA_SOURCE:So,SRC_EQUALS:ep};X.version="v4.9.
|
|
694
|
+
X.LoadMode={DESTROYED:po,NOT_LOADED:fo,MEDIA_SOURCE:So,SRC_EQUALS:ep};X.version="v4.9.11";var zp=["4","9"];td=new function(a){this.g=a;this.i=ud;this.h=vd}(new rd(Number(zp[0]),Number(zp[1])));var yp={},jo=null;function Ap(){this.h=[];this.j=this.i=this.g=0};function Bp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new jd;this.m.s(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.s(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Bp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
695
695
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
696
696
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
697
697
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
698
698
|
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",Bp);Bp.prototype.release=Bp.prototype.release;
|
|
699
699
|
Bp.prototype.getPodIndex=Bp.prototype.getPodIndex;Bp.prototype.getTimeOffset=Bp.prototype.getTimeOffset;Bp.prototype.getMediaUrl=Bp.prototype.getMediaUrl;Bp.prototype.getAdvertiserName=Bp.prototype.getAdvertiserName;Bp.prototype.getCreativeAdId=Bp.prototype.getCreativeAdId;Bp.prototype.getAdId=Bp.prototype.getAdId;Bp.prototype.getVastMediaWidth=Bp.prototype.getVastMediaWidth;Bp.prototype.getVastMediaHeight=Bp.prototype.getVastMediaHeight;Bp.prototype.getVastMediaBitrate=Bp.prototype.getVastMediaBitrate;
|
|
700
700
|
Bp.prototype.getDescription=Bp.prototype.getDescription;Bp.prototype.getTitle=Bp.prototype.getTitle;Bp.prototype.getPositionInSequence=Bp.prototype.getPositionInSequence;Bp.prototype.getSequenceLength=Bp.prototype.getSequenceLength;Bp.prototype.setMuted=Bp.prototype.setMuted;Bp.prototype.resize=Bp.prototype.resize;Bp.prototype.isLinear=Bp.prototype.isLinear;Bp.prototype.isMuted=Bp.prototype.isMuted;Bp.prototype.setVolume=Bp.prototype.setVolume;Bp.prototype.getVolume=Bp.prototype.getVolume;
|
|
701
|
-
Bp.prototype.play=Bp.prototype.play;Bp.prototype.pause=Bp.prototype.pause;Bp.prototype.skip=Bp.prototype.skip;Bp.prototype.canSkipNow=Bp.prototype.canSkipNow;Bp.prototype.getTimeUntilSkippable=Bp.prototype.getTimeUntilSkippable;Bp.prototype.isSkippable=Bp.prototype.isSkippable;Bp.prototype.isPaused=Bp.prototype.isPaused;Bp.prototype.getRemainingTime=Bp.prototype.getRemainingTime;Bp.prototype.getMinSuggestedDuration=Bp.prototype.getMinSuggestedDuration;Bp.prototype.getDuration=Bp.prototype.getDuration;function Cp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new jd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.
|
|
701
|
+
Bp.prototype.play=Bp.prototype.play;Bp.prototype.pause=Bp.prototype.pause;Bp.prototype.skip=Bp.prototype.skip;Bp.prototype.canSkipNow=Bp.prototype.canSkipNow;Bp.prototype.getTimeUntilSkippable=Bp.prototype.getTimeUntilSkippable;Bp.prototype.isSkippable=Bp.prototype.isSkippable;Bp.prototype.isPaused=Bp.prototype.isPaused;Bp.prototype.getRemainingTime=Bp.prototype.getRemainingTime;Bp.prototype.getMinSuggestedDuration=Bp.prototype.getMinSuggestedDuration;Bp.prototype.getDuration=Bp.prototype.getDuration;function Cp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.H=!1;this.A=this.u=null;this.I=NaN;this.m=e;this.j=null;this.h=new jd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.o,this.i);this.G.initialize();this.l=new google.ima.AdsLoader(this.G);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.11");this.g=null;this.F=d||new google.ima.AdsRenderingSettings;this.h.s(this.l,
|
|
702
702
|
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Dp(f,g)});this.h.s(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Ep(f,g)});this.h.s(this.i,"ended",function(){f.l.contentComplete()});this.h.ma(this.i,"play",function(){f.H=!0})}Cp.prototype.configure=function(a){this.u=a};Cp.prototype.stop=function(){this.g&&this.g.stop();this.o&&en(this.o)};
|
|
703
703
|
Cp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.G.destroy()};function Ep(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new S("ad-error",b));Fp(a,null);a.m(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
704
704
|
function Dp(a,b){a.m(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.u.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.F);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.s(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.s(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.F);a.m(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -711,687 +711,687 @@ a.h.s(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paus
|
|
|
711
711
|
a.h.s(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.s(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.s(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.s(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.s(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.s(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.s(a.g,
|
|
712
712
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.s(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.s(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.s(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
713
713
|
function Ip(a,b){var c=b.getAd();c?(a.j=new Bp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new S("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.u.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Ya("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
714
|
-
function Fp(a,b){a.m(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Jp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.
|
|
715
|
-
q.getTimeUntilSkippable=function(){if(
|
|
716
|
-
q.isLinear=function(){return this.
|
|
717
|
-
q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
function
|
|
714
|
+
function Fp(a,b){a.m(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.u.customPlayheadTracker||a.i.ended||a.i.play())};function Jp(a){this.h=a||"";this.g=0}function Kp(a){Lp(a,/[ \t]+/gm)}function Lp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Mp(a){return a.g==a.h.length?null:(a=Lp(a,/[^ \t\n]*/gm))?a[0]:null};function Np(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Lp(new Jp(a),Op),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=Np.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
|
|
715
|
+
q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};
|
|
716
|
+
q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.o};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
|
|
717
|
+
q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",Np);Np.prototype.release=Np.prototype.release;Np.prototype.getPodIndex=Np.prototype.getPodIndex;Np.prototype.getTimeOffset=Np.prototype.getTimeOffset;
|
|
718
|
+
Np.prototype.getMediaUrl=Np.prototype.getMediaUrl;Np.prototype.getAdvertiserName=Np.prototype.getAdvertiserName;Np.prototype.getCreativeAdId=Np.prototype.getCreativeAdId;Np.prototype.getAdId=Np.prototype.getAdId;Np.prototype.getVastMediaWidth=Np.prototype.getVastMediaWidth;Np.prototype.getVastMediaHeight=Np.prototype.getVastMediaHeight;Np.prototype.getVastMediaBitrate=Np.prototype.getVastMediaBitrate;Np.prototype.getDescription=Np.prototype.getDescription;Np.prototype.getTitle=Np.prototype.getTitle;
|
|
719
|
+
Np.prototype.getPositionInSequence=Np.prototype.getPositionInSequence;Np.prototype.getSequenceLength=Np.prototype.getSequenceLength;Np.prototype.setMuted=Np.prototype.setMuted;Np.prototype.resize=Np.prototype.resize;Np.prototype.isLinear=Np.prototype.isLinear;Np.prototype.isMuted=Np.prototype.isMuted;Np.prototype.setVolume=Np.prototype.setVolume;Np.prototype.getVolume=Np.prototype.getVolume;Np.prototype.play=Np.prototype.play;Np.prototype.pause=Np.prototype.pause;Np.prototype.skip=Np.prototype.skip;
|
|
720
|
+
Np.prototype.canSkipNow=Np.prototype.canSkipNow;Np.prototype.getTimeUntilSkippable=Np.prototype.getTimeUntilSkippable;Np.prototype.isSkippable=Np.prototype.isSkippable;Np.prototype.isPaused=Np.prototype.isPaused;Np.prototype.getRemainingTime=Np.prototype.getRemainingTime;Np.prototype.getMinSuggestedDuration=Np.prototype.getMinSuggestedDuration;Np.prototype.getDuration=Np.prototype.getDuration;var Op=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Pp(a,b,c,d){this.F=a;this.L=b;this.h=c;this.l=null;this.S=NaN;this.i=d;this.K=!1;this.A=null;this.j=[];this.O=[];this.N=this.G=this.g=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.R=!0;this.J="";this.o=new jd}Pp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Wa(b.target,b.type,b.listener);Qp(this);this.m=[];this.u=[];this.I="";this.R=!0;this.J="";this.A=null;this.j=[];this.O=[];this.H.clear()};
|
|
721
|
+
Pp.prototype.release=function(){this.stop();this.o&&this.o.release()};Pp.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(Rp(this,this.I,this.R),this.R=!1)};Pp.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
722
|
+
function Sp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=vg([b],eg()),d.method="POST",c&&(e=JSON.stringify(c),d.body=vc(e)),f=a.L.request(7,d),ta(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=rc(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new mb(b),m=new mb(k.trackingUrl),a.I=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.S,a.i(new S("ads-loaded",(new Map).set("loadTime",p))),r=new mb(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
723
723
|
return va(u,0)}wa(u);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.J);a.l=null;F(u)})}
|
|
724
|
-
function
|
|
725
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",g))),
|
|
726
|
-
function
|
|
727
|
-
function
|
|
728
|
-
function
|
|
729
|
-
function
|
|
730
|
-
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&
|
|
731
|
-
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(
|
|
732
|
-
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.F.appendChild(m)}a.N=e;a.g=new
|
|
733
|
-
function
|
|
734
|
-
function
|
|
724
|
+
function Rp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(z){if(1==z.g)return d=vg([b],eg()),e=a.L.request(7,d),ta(z,2),E(z,e.promise,4);if(2!=z.g){f=z.h;g=[];h=rc(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Tp(a,A);g=a.getCuePoints();a.i(new S("ad-cue-points-changed",
|
|
725
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",g))),Qp(a),a.j=[];c&&(a.K||0<g.length)&&Up(a);return va(z,0)}wa(z);F(z)})}
|
|
726
|
+
function Tp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Vp(b);if(d=a.H.get(c))return m.return();e=vg([b.staticResource],eg());f=a.L.request(7,e);ta(m,2);a.H.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=rc(g.data),k=JSON.parse(h),l=k.apps,a.H.set(c,l),va(m,0);wa(m);a.H.delete(c);F(m)})}
|
|
727
|
+
function Vp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Up(a){Wp(a);a.K||(Xp(a),a.o.s(a.h,"seeked",function(){Xp(a)}),a.o.s(a.h,"ended",function(){Qp(a)}));a.o.s(a.h,"timeupdate",function(){Wp(a)})}
|
|
728
|
+
function Xp(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.O.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
729
|
+
function Wp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),Yp(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),Yp(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),Yp(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
730
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Yp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Qp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.O.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Qp(a);a.N=e;a.g=new Np(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&Yp(a,"breakStart");Zp(a);break}}}if(!a.g)for(d=
|
|
731
|
+
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(Vp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Qp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
732
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.F.appendChild(m)}a.N=e;a.g=new Np(g,f+1,e.ads.length,!1,a.h);a.G=g;0===f&&Yp(a,"breakStart");Zp(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
733
|
+
function Qp(a){if(a.g){for(;a.F.lastChild;)a.F.removeChild(a.F.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.m;(void 0===b?0:b)?Yp(a,"skip"):Yp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Wa(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Yp(a,"breakEnd");a.g=null;a.G=null;a.N=null}}
|
|
734
|
+
function Zp(a){var b=!1;a.h.paused?b=!0:(Yp(a,"impression"),Yp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Yp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Yp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Yp(a,"impression"),Yp(a,"start"),b=!1):Yp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Yp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.s(d.target,
|
|
735
735
|
d.type,d.listener)}
|
|
736
|
-
function
|
|
736
|
+
function Yp(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.N.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=vg([d],eg()),d.method="POST",a.L.request(7,d))}switch(b){case "impression":a.i(new S("ad-impression"));break;case "start":a.i(new S("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new S("ad-muted"));break;case "unmute":a.i(new S("ad-volume-changed"));break;
|
|
737
737
|
case "resume":a.i(new S("ad-resumed"));break;case "pause":a.i(new S("ad-paused"));break;case "firstQuartile":a.i(new S("ad-first-quartile"));break;case "midpoint":a.i(new S("ad-midpoint"));break;case "thirdQuartile":a.i(new S("ad-third-quartile"));break;case "complete":a.i(new S("ad-complete"));a.i(new S("ad-stopped"));break;case "skip":a.i(new S("ad-skipped"));a.i(new S("ad-stopped"));break;case "breakStart":a.F.setAttribute("ad-active","true");break;case "breakEnd":a.F.removeAttribute("ad-active");
|
|
738
|
-
break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function
|
|
738
|
+
break;case "skipStateChanged":a.i(new S("ad-skip-state-changed"))}};function $p(a,b){this.g=a;this.i=null;this.h=b}q=$p.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
739
739
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.h.muted=a};
|
|
740
740
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};
|
|
741
|
-
q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd"
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
741
|
+
q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",$p);$p.prototype.release=$p.prototype.release;$p.prototype.getPodIndex=$p.prototype.getPodIndex;
|
|
742
|
+
$p.prototype.getTimeOffset=$p.prototype.getTimeOffset;$p.prototype.getMediaUrl=$p.prototype.getMediaUrl;$p.prototype.getAdvertiserName=$p.prototype.getAdvertiserName;$p.prototype.getCreativeAdId=$p.prototype.getCreativeAdId;$p.prototype.getAdId=$p.prototype.getAdId;$p.prototype.getVastMediaWidth=$p.prototype.getVastMediaWidth;$p.prototype.getVastMediaHeight=$p.prototype.getVastMediaHeight;$p.prototype.getVastMediaBitrate=$p.prototype.getVastMediaBitrate;$p.prototype.getDescription=$p.prototype.getDescription;
|
|
743
|
+
$p.prototype.getTitle=$p.prototype.getTitle;$p.prototype.getPositionInSequence=$p.prototype.getPositionInSequence;$p.prototype.getSequenceLength=$p.prototype.getSequenceLength;$p.prototype.setMuted=$p.prototype.setMuted;$p.prototype.resize=$p.prototype.resize;$p.prototype.isLinear=$p.prototype.isLinear;$p.prototype.isMuted=$p.prototype.isMuted;$p.prototype.setVolume=$p.prototype.setVolume;$p.prototype.getVolume=$p.prototype.getVolume;$p.prototype.play=$p.prototype.play;$p.prototype.pause=$p.prototype.pause;
|
|
744
|
+
$p.prototype.skip=$p.prototype.skip;$p.prototype.canSkipNow=$p.prototype.canSkipNow;$p.prototype.getTimeUntilSkippable=$p.prototype.getTimeUntilSkippable;$p.prototype.isSkippable=$p.prototype.isSkippable;$p.prototype.isPaused=$p.prototype.isPaused;$p.prototype.getRemainingTime=$p.prototype.getRemainingTime;$p.prototype.getMinSuggestedDuration=$p.prototype.getMinSuggestedDuration;$p.prototype.getDuration=$p.prototype.getDuration;function aq(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.A=this.m=this.o=null;this.F="";this.G=[];this.h=new jd;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){bq(e,f)});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
|
|
745
|
+
e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new $p(f,e.l);e.A&&(e.m.i=e.A);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
|
|
746
746
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
|
|
747
747
|
this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.s(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
|
|
748
|
-
f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=
|
|
749
|
-
function
|
|
748
|
+
f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=aq.prototype;q.configure=function(){};q.stop=function(){this.F="";this.o=null;this.G=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.G};
|
|
749
|
+
function bq(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.s(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function cq(){gb.call(this);this.g=this.h=this.i=null;this.j=new Ap;this.m=navigator.language;this.l=null}na(cq,gb);q=cq.prototype;q.setLocale=function(a){this.m=a};q.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.i&&this.i.release();this.i=new Cp(a,b,this.m,c,function(e){return dq(d,e)});this.i.configure(this.l)};
|
|
750
750
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.j=new Ap};q.requestClientSideAds=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.I=Date.now()/1E3;b.l.requestAds(a)};
|
|
751
|
-
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new
|
|
752
|
-
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new
|
|
753
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.
|
|
754
|
-
(c.I=!0),c.j=new gg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.
|
|
751
|
+
q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new U(1,10,10001);var b=this.i;b.F=a;b.g&&b.g.updateAdsRenderingSettings(b.F)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Pp(a,b,c,function(e){return dq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new U(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new gg,Sp(d,a,b),d.J=c||"",d.S=Date.now()/1E3,a=d.l);return a};
|
|
752
|
+
q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new U(1,10,10005);var b=this.h;b.I=a;b.i(new S("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.g&&this.g.release();this.g=new aq(a,b,this.m,function(d){return dq(c,d)});this.g.configure(this.l)};
|
|
753
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.9.11";c=this.g;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
754
|
+
(c.I=!0),c.j=new gg,c.g.requestStream(a),c.F=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new U(1,10,10003);(a.mpt||a.mpv)&&Ya('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.9.11";this.g.g.replaceAdTagParameters(a)};
|
|
755
755
|
q.getServerSideCuePoints=function(){sd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
756
756
|
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
757
|
-
function
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
757
|
+
function dq(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",cq);cq.prototype.onCueMetadataChange=cq.prototype.onCueMetadataChange;cq.prototype.onHlsTimedMetadata=cq.prototype.onHlsTimedMetadata;cq.prototype.onDashTimedMetadata=cq.prototype.onDashTimedMetadata;cq.prototype.onManifestUpdated=cq.prototype.onManifestUpdated;
|
|
758
|
+
cq.prototype.getStats=cq.prototype.getStats;cq.prototype.getCuePoints=cq.prototype.getCuePoints;cq.prototype.getServerSideCuePoints=cq.prototype.getServerSideCuePoints;cq.prototype.replaceServerSideAdTagParameters=cq.prototype.replaceServerSideAdTagParameters;cq.prototype.requestServerSideStream=cq.prototype.requestServerSideStream;cq.prototype.initServerSide=cq.prototype.initServerSide;cq.prototype.addMediaTailorTrackingUrl=cq.prototype.addMediaTailorTrackingUrl;
|
|
759
|
+
cq.prototype.requestMediaTailorStream=cq.prototype.requestMediaTailorStream;cq.prototype.initMediaTailor=cq.prototype.initMediaTailor;cq.prototype.updateClientSideAdsRenderingSettings=cq.prototype.updateClientSideAdsRenderingSettings;cq.prototype.requestClientSideAds=cq.prototype.requestClientSideAds;cq.prototype.onAssetUnload=cq.prototype.onAssetUnload;cq.prototype.release=cq.prototype.release;cq.prototype.initClientSide=cq.prototype.initClientSide;cq.prototype.configure=cq.prototype.configure;
|
|
760
|
+
cq.prototype.setLocale=cq.prototype.setLocale;cq.ADS_LOADED="ads-loaded";cq.AD_STARTED="ad-started";cq.AD_FIRST_QUARTILE="ad-first-quartile";cq.AD_MIDPOINT="ad-midpoint";cq.AD_THIRD_QUARTILE="ad-third-quartile";cq.AD_COMPLETE="ad-complete";cq.AD_STOPPED="ad-stopped";cq.AD_SKIPPED="ad-skipped";cq.AD_VOLUME_CHANGED="ad-volume-changed";cq.AD_MUTED="ad-muted";cq.AD_PAUSED="ad-paused";cq.AD_RESUMED="ad-resumed";cq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";cq.CUEPOINTS_CHANGED="ad-cue-points-changed";
|
|
761
|
+
cq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";cq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";cq.AD_CLICKED="ad-clicked";cq.AD_PROGRESS="ad-progress";cq.AD_BUFFERING="ad-buffering";cq.AD_IMPRESSION="ad-impression";cq.AD_DURATION_CHANGED="ad-duration-changed";cq.AD_CLOSED="ad-closed";cq.AD_LOADED="ad-loaded";cq.ALL_ADS_COMPLETED="all-ads-completed";cq.AD_LINEAR_CHANGED="ad-linear-changed";cq.AD_METADATA="ad-metadata";cq.AD_RECOVERABLE_ERROR="ad-recoverable-error";cq.AD_ERROR="ad-error";
|
|
762
|
+
cq.AD_BREAK_READY="ad-break-ready";cq.AD_INTERACTION="ad-interaction";jo=function(){return new cq};function eq(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
763
763
|
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Pi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
764
|
-
function
|
|
765
|
-
function
|
|
766
|
-
var
|
|
767
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},
|
|
768
|
-
|
|
769
|
-
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;
|
|
770
|
-
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.La();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(
|
|
771
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new gg,this.u=!0,
|
|
772
|
-
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new U(1,8,8E3);if(!
|
|
773
|
-
q.get=function(a,b){var c=this;if("video"==a){if(
|
|
774
|
-
q.set=function(a,b,c){this.g[a][b]=c;
|
|
775
|
-
q.Yh=function(a,b){
|
|
776
|
-
function
|
|
777
|
-
function
|
|
778
|
-
q.destroy=function(a){a&&this.g.Zc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;gb.prototype.release.call(this);return Promise.all(a)};q.kc=function(){return this.l};q.bd=function(){return this.u};q.Tf=function(){return this.g.m&&
|
|
779
|
-
q.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.Oc(),0):b.return()})};q.Vg=function(a){this.g.Vg(a)};q.mi=function(){
|
|
780
|
-
q.vh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.Zc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new
|
|
781
|
-
function
|
|
782
|
-
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
783
|
-
function
|
|
784
|
-
function
|
|
785
|
-
function
|
|
786
|
-
function
|
|
787
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(
|
|
788
|
-
function
|
|
789
|
-
function
|
|
790
|
-
if("setVideoContainer"==b)return function(c){return a.h.bh(c)};if(a.g.Ka()){if("getManifest"==b||"drmInfo"==b)return function(){Ya(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ya(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ka()&&0==Object.keys(a.g.g.video).length&&(
|
|
791
|
-
function
|
|
792
|
-
|
|
764
|
+
function fq(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=gq(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
765
|
+
function gq(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
766
|
+
var hq="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),iq="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),jq=["loop","playbackRate"],kq=["pause","play"],lq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
767
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},mq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},nq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},oq=[["getConfiguration","configure"]],pq=[["isTextTrackVisible","setTextTrackVisibility"]],qq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
768
|
+
rq=["attach","attachCanvas","detach","load","unload"];function sq(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new Qb(b);this.N=c;this.u=!1;this.A=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.o=null;this.F=function(){return tq(h)};this.G=function(k,l){k=fq(l);switch(k.type){case "event":var m=k.targetName,n=Ua(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new U(p.severity,p.category,
|
|
769
|
+
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;uq.add(this)}q=sq.prototype;q.destroy=function(){uq.delete(this);vq(this);wq&&xq(this);this.l&&(this.l.stop(),this.l=null);this.H=this.A=null;this.h=this.m=!1;this.G=this.F=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.Ka=function(){return this.h};q.gf=function(){return this.K};
|
|
770
|
+
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.La();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(uq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new gg;d.u=!0;yq(d,e)}},function(b){for(var c=t(uq),d=c.next();!d.done;d=c.next())d=d.value,zq="available"==b,d.l.La()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});zq&&this.l.V(Aq);(a=wq)&&
|
|
771
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new gg,this.u=!0,yq(this,a)):wq=null}else window.__onGCastApiAvailable!==Bq&&(Cq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Bq)};q.Vg=function(a){this.o=a;this.h&&Dq(this,{type:"appData",appData:this.o})};
|
|
772
|
+
q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new U(1,8,8E3);if(!zq)throw new U(1,8,8001);if(a.h)throw new U(1,8,8002);a.j=new gg;chrome.cast.requestSession(function(c){return yq(a,c)},function(c){return Eq(a,c)});return E(b,a.j,0)})};function Fq(a){a.h&&chrome.cast.requestSession(function(b){return yq(a,b)},function(b){return Eq(a,b)})}q.Zc=function(){if(this.h){vq(this);if(wq){xq(this);try{wq.stop(function(){},function(){})}catch(a){}wq=null}tq(this)}};
|
|
773
|
+
q.get=function(a,b){var c=this;if("video"==a){if(kq.includes(b))return function(){return c.Yh.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))}}else if("player"==a){if(nq[b]&&!this.get("player","isLive")())return function(){};if(qq.includes(b))return function(){return c.Yh.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(rq.includes(b))return function(){return c.dk.apply(c,[a,b].concat(x(Ka.apply(0,arguments))))};if(lq[b]||mq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
774
|
+
q.set=function(a,b,c){this.g[a][b]=c;Dq(this,{type:"set",targetName:a,property:b,value:c})};function yq(a,b){var c=a.O();wq=b;b.addUpdateListener(a.F);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);tq(a);Dq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Eq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))}
|
|
775
|
+
q.Yh=function(a,b){Dq(this,{type:"call",targetName:a,methodName:b,args:Ka.apply(2,arguments)})};q.dk=function(a,b){var c=Ka.apply(2,arguments),d=new gg,e=this.J.toString();this.J++;this.i[e]=d;try{Dq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function xq(a){var b=wq;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
776
|
+
function tq(a){var b=wq?"connected"==wq.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};vq(a)}a.h=b;a.K=b?wq.receiver.friendlyName:"";a.l.La()}function vq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new U(1,7,7E3))}}function Dq(a,b){b=eq(b);var c=wq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},bb)}catch(d){throw b=new U(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.A("player",c),a.Zc(),b;}}var Aq=.02,zq=!1,wq=null,Cq=null,uq=new Set;
|
|
777
|
+
function Bq(a){Cq?window.__onGCastApiAvailable=Cq:delete window.__onGCastApiAvailable;Cq=null;if(a)for(var b=t(uq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Gq(a,b,c,d){d=void 0===d?!1:d;gb.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.u=this.l=null;this.G=c;this.F=d;this.A=new Map;this.g=new sq(c,function(){return Hq(e)},function(){return Iq(e)},function(f,g){return Jq(e,f,g)},function(){return Kq(e)},function(){return Lq(e)},d);Mq(this)}na(Gq,gb);q=Gq.prototype;
|
|
778
|
+
q.destroy=function(a){a&&this.g.Zc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;gb.prototype.release.call(this);return Promise.all(a)};q.kc=function(){return this.l};q.bd=function(){return this.u};q.Tf=function(){return this.g.m&&zq};q.Ka=function(){return this.g.Ka()};q.gf=function(){return this.g.gf()};
|
|
779
|
+
q.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.Oc(),0):b.return()})};q.Vg=function(a){this.g.Vg(a)};q.mi=function(){Fq(this.g)};q.Zc=function(){this.g.Zc()};
|
|
780
|
+
q.vh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.Zc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new sq(a,function(){return Hq(c)},function(){return Iq(c)},function(e,f){return Jq(c,e,f)},function(){return Kq(c)},function(){return Lq(c)},b);c.g.init();F(d)})};
|
|
781
|
+
function Mq(a){a.g.init();a.m=new jd;for(var b=t(hq),c=b.next();!c.done;c=b.next())a.m.s(a.i,c.value,function(f){a.g.Ka()||(f=Ua(f),a.j.dispatchEvent(f))});for(var d in Va)a.m.s(a.h,Va[d],function(f){a.g.Ka()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wd=e,Object.defineProperty(a.l,b.wd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Nq(a,f.wd)}}(b),set:function(f){return function(g){var h=f.wd;a.g.Ka()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wd:b.wd};a.u={};Oq(a,
|
|
782
|
+
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Pq(a,f)}})});Qq(a);a.j=new gb;a.j.uf=a.l;a.o=new gb;a.o.uf=a.u}function Qq(a){var b=new Map;Oq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
783
|
+
function Oq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
784
|
+
function Lq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.$c(),startTime:null};a.i.pause();for(var c=t(jq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(oq);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(pq);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Hq(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
|
|
785
|
+
function Iq(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
786
|
+
function Kq(a){for(var b=t(oq),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(jq);for(d=c.next();!d.done;d=c.next())d=
|
|
787
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(jq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(pq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.nf(h);g&&a.h.Tg(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new S("error",l);a.h.dispatchEvent(l)})}
|
|
788
|
+
function Nq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ka()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ka()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
789
|
+
function Pq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.hc()};if("getDrmEngine"==b)return function(){return a.h.F};if("getAdManager"==b)return function(){return a.h.He()};
|
|
790
|
+
if("setVideoContainer"==b)return function(c){return a.h.bh(c)};if(a.g.Ka()){if("getManifest"==b||"drmInfo"==b)return function(){Ya(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ya(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ka()&&0==Object.keys(a.g.g.video).length&&(lq[b]||mq[b])||!a.g.Ka()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
791
|
+
function Jq(a,b,c){a.g.Ka()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",Gq);Gq.prototype.changeReceiverId=Gq.prototype.vh;Gq.prototype.forceDisconnect=Gq.prototype.Zc;Gq.prototype.suggestDisconnect=Gq.prototype.mi;Gq.prototype.setAppData=Gq.prototype.Vg;Gq.prototype.cast=Gq.prototype.cast;Gq.prototype.receiverName=Gq.prototype.gf;Gq.prototype.isCasting=Gq.prototype.Ka;Gq.prototype.canCast=Gq.prototype.Tf;Gq.prototype.getPlayer=Gq.prototype.bd;
|
|
792
|
+
Gq.prototype.getVideo=Gq.prototype.kc;Gq.prototype.destroy=Gq.prototype.destroy;function Rq(a,b,c,d){gb.call(this);var e=this;this.g=a;this.h=b;this.j=new jd;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.o=!0;this.m=0;this.F=!1;this.A=!0;this.u=this.l=null;this.I=new Qb(function(){Sq(e)});Tq(this)}na(Rq,gb);q=Rq.prototype;q.isConnected=function(){return this.H};q.Ej=function(){return this.o};q.tk=function(a){this.i=a};q.Mi=function(){this.i=null};
|
|
793
793
|
q.vk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.rk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.qk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
794
794
|
q.destroy=function(){var a=this,b,c;return O(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.o=!0,a.l=null,a.u=null,gb.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
795
|
-
function
|
|
796
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
797
|
-
a.j.s(a.g,"ended",function(){(new Qb(function(){a.g&&a.g.ended&&(a.o=!0,
|
|
798
|
-
function
|
|
799
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
800
|
-
function
|
|
801
|
-
1);
|
|
802
|
-
function
|
|
803
|
-
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return
|
|
804
|
-
function
|
|
805
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
806
|
-
function
|
|
807
|
-
P("shaka.cast.CastReceiver",
|
|
808
|
-
r||-1===u)p=
|
|
809
|
-
function
|
|
810
|
-
function
|
|
811
|
-
var
|
|
812
|
-
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),
|
|
813
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),
|
|
814
|
-
var
|
|
815
|
-
function
|
|
816
|
-
50;e.regionAnchorY=50;break;case
|
|
817
|
-
function
|
|
818
|
-
b=null;c=t(
|
|
819
|
-
b.skip(1),d=
|
|
820
|
-
function
|
|
821
|
-
var
|
|
822
|
-
function
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
function
|
|
826
|
-
"white";e=!1;7>f?d=
|
|
827
|
-
|
|
828
|
-
e-1,e,b.h),
|
|
829
|
-
function
|
|
830
|
-
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=
|
|
831
|
-
"\u266a"):
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
b).box("dvh1",b).box("dvhe",b).box("encv",Sg).box("sinf",Pg).box("frma",function(f){f=dj(f.reader).cb;f in
|
|
835
|
-
|
|
836
|
-
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Fa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Ya("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);
|
|
837
|
-
function
|
|
838
|
-
c+(n[l].Rg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",
|
|
839
|
-
P("shaka.cea.TsCeaParser",
|
|
840
|
-
l.nd});f.length&&(a=
|
|
841
|
-
function
|
|
842
|
-
function
|
|
843
|
-
function
|
|
844
|
-
function
|
|
845
|
-
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Wg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Hc(h,b,g.init||a||k||l);if(h=
|
|
846
|
-
function
|
|
847
|
-
function
|
|
795
|
+
function Tq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Uq(a)};b.onSenderDisconnected=function(){return Uq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Vq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Vq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return Wq(a,
|
|
796
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Xq(a,e)};b.start();b=t(hq);for(var c=b.next();!c.done;c=b.next())a.j.s(a.g,c.value,function(e){return Yq(a,"video",e)});for(var d in Va)a.j.s(a.h,Va[d],function(e){return Yq(a,"player",e)});a.j.s(a.g,"loadeddata",function(){a.F=!0});a.j.s(a.h,"loading",function(){a.o=!1;Zq(a)});a.j.s(a.g,"playing",function(){a.o=!1;Zq(a)});a.j.s(a.g,"pause",function(){Zq(a)});a.j.s(a.h,"unloading",function(){a.o=!0;Zq(a)});
|
|
797
|
+
a.j.s(a.g,"ended",function(){(new Qb(function(){a.g&&a.g.ended&&(a.o=!0,Zq(a))})).V($q)})}function Uq(a){a.m=0;a.A=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Zq(a)}function Zq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);ar(a)||br(a);F(c)})}
|
|
798
|
+
function cr(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ta(r,5),E(r,a.h.load(b.manifest,b.startTime),7)):E(r,Promise.resolve(),3);case 7:va(r,3);break;case 5:return g=wa(r),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
|
|
799
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),br(a));F(r)}})}function Yq(a,b,c){a.h&&(Sq(a),Vq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
800
|
+
function Sq(a){a.I.V(dr);for(var b={video:{},player:{}},c=t(iq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in nq)0==a.m%nq[e]&&(b.player[e]=a.h[e]());for(var f in lq)0==a.m%lq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Vq(a,{type:"update",update:b},a.l);for(var g in mq)0==a.m%mq[g]&&(b={player:{}},b.player[g]=a.h[g](),Vq(a,{type:"update",update:b},a.l));a.F&&(a.m+=
|
|
801
|
+
1);ar(a)}function ar(a){return a.A&&(a.g.duration||a.h.U())?(er(a),a.A=!1,!0):!1}function er(a,b){var c={contentId:a.h.$c(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);br(a,void 0===b?0:b,c)}
|
|
802
|
+
function Xq(a,b){var c=fq(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.A=!0;cr(a,c.initState,c.appData);Sq(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
803
|
+
"player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return fr(a,g,f,null)},function(h){return fr(a,g,f,h)})}}
|
|
804
|
+
function Wq(a,b){var c=fq(b.data);switch(c.type){case "PLAY":a.g.play();br(a);break;case "PAUSE":a.g.pause();br(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),br(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),br(a));break;case "STOP":a.h.Oc().then(function(){a.h&&br(a)});break;case "GET_STATUS":er(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
805
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||br(a);break;case "LOAD":a.m=0;a.F=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&er(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Vq(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Vq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
806
|
+
function fr(a,b,c,d){a.h&&Vq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Vq(a,b,c,d){a.H&&(a=eq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function br(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?gr:a.h.Wd()?hr:a.g.paused?ir:jr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Vq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
807
|
+
P("shaka.cast.CastReceiver",Rq);Rq.prototype.destroy=Rq.prototype.destroy;Rq.prototype.setContentArtist=Rq.prototype.qk;Rq.prototype.setContentImage=Rq.prototype.rk;Rq.prototype.setContentTitle=Rq.prototype.vk;Rq.prototype.clearContentMetadata=Rq.prototype.Mi;Rq.prototype.setContentMetadata=Rq.prototype.tk;Rq.prototype.isIdle=Rq.prototype.Ej;Rq.prototype.isConnected=Rq.prototype.isConnected;var dr=.5,$q=5,gr="IDLE",jr="PLAYING",hr="BUFFERING",ir="PAUSED";function kr(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(y){return null!=y&&""!=y.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=lr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
808
|
+
r||-1===u)p=mr(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,A=v.i,z=v.j,C=v.h;if(w!=h||A!=k||z!=l||C!=m)n.payload&&a.nestedCues.push(n),n=lr(d,e,w,A,z,C),h=w,k=A,l=z,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=mr(d,e),a.nestedCues.push(n));n=lr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
809
|
+
function lr(a,b,c,d,e,f){a=new Jd(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function mr(a,b){a=new Jd(a,b,"");a.lineBreak=!0;return a}function nr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function or(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.u=b;this.j=this.m=!1;this.l="white";this.o="black";pr(this)}function qr(a,b,c){var d="CC"+((a.A<<1|a.u)+1),e=new Jd(b,c,"");e.lineInterpretation=1;var f=rr.get(a.g);f&&(e.line=f);return kr(e,d,a.i,b,c)}function pr(a){sr(a,0,15);a.g=1}
|
|
810
|
+
function tr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ur:d=vr.has(c)?vr.get(c):String.fromCharCode(c);break;case wr:d=xr.get(c);break;case yr:a.i[a.g].pop();d=zr.get(c);break;case Ar:a.i[a.g].pop(),d=Br.get(c)}d&&a.i[a.g].push(new nr(d,a.m,a.j,a.o,a.l))}}function Cr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function sr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
811
|
+
var ur=0,wr=1,yr=2,Ar=3,vr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),xr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),zr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
812
|
+
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Br=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
813
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),rr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Dr(a,b){this.h=Er;this.o=new or(a,b);this.i=new or(a,b);this.g=this.j=new or(a,b);this.l=0;this.m=null}function Fr(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Gr&&a.h!==Hr&&(e=qr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,sr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,sr(c,0,15),d.g=15);a.h=Gr;d.h=b;return e}function Ir(a){a.h=Jr;a.g=a.j;a.g.h=0}function Kr(a){Za("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Hr}
|
|
814
|
+
var Er=0,Jr=1,Gr=3,Hr=4,Lr="black green blue cyan red yellow magenta black".split(" "),Mr="white green blue cyan red yellow magenta white_italics".split(" ");function Nr(a,b){this.K=b;this.O=a;this.L=this.l=!1;this.m=this.o=this.I=this.N=this.J=0;this.H=Or;this.i=[];this.g=this.h=this.j=0;this.G=this.A=!1;this.F="white";this.u="black";Pr(this)}function Pr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Qr())}function Qr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Rr(a,b){Sr(a)&&(a.i[a.h][a.g]=new nr(b,a.G,a.A,a.u,a.F),a.g++)}function Sr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Nr.prototype.isVisible=function(){return this.l};
|
|
815
|
+
function Tr(a,b,c){var d=new Jd(a.j,b,"");d.textAlign=a.H===Ur?"left":a.H===Vr?"right":Md;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.N;e.viewportAnchorUnits=a.L?de:2;switch(a.I){case Wr:e.regionAnchorX=0;e.regionAnchorY=0;break;case Xr:e.regionAnchorX=50;e.regionAnchorY=0;break;case Yr:e.regionAnchorX=100;e.regionAnchorY=0;break;case Zr:e.regionAnchorX=0;e.regionAnchorY=50;break;case $r:e.regionAnchorX=
|
|
816
|
+
50;e.regionAnchorY=50;break;case as:e.regionAnchorX=100;e.regionAnchorY=50;break;case bs:e.regionAnchorX=0;e.regionAnchorY=100;break;case cs:e.regionAnchorX=50;e.regionAnchorY=100;break;case ds:e.regionAnchorX=100,e.regionAnchorY=100}if(c=kr(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ur=0,Vr=1,Or=2,Wr=0,Xr=1,Yr=2,Zr=3,$r=4,as=5,bs=6,cs=7,ds=8;function es(){this.i=[];this.h=null;this.g=0}function fs(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new gs(a.h)),a.h=null,a.g=0))}function gs(a){this.g=0;this.h=a}gs.prototype.Ba=function(){return this.g<this.h.length};gs.prototype.Fa=function(){return this.g};function hs(a){if(!a.Ba())throw new U(2,2,3E3);return a.h[a.g++]}gs.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};function is(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
817
|
+
function js(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=hs(b).value;b=null;c=t(ks(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Tr(e,d,a.i)),Pr(e);return b}if(137===c)for(b=hs(b).value,b=t(ks(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=hs(b).value;b=null;c=t(ks(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Tr(e,d,a.i)),e.l=!1;return b}if(139===c){c=hs(b).value;
|
|
818
|
+
b=null;c=t(ks(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Tr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=hs(b).value,ls(a,b,d);if(143===c)return d=ls(a,255,d),ms(a),d;if(144===c)b.skip(1),d=hs(b).value,a.g&&(a.g.A=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=hs(b).value,c=hs(b).value,b.skip(1),a.g&&(b=ns((c&48)>>4,(c&12)>>2,c&3),a.g.F=ns((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=hs(b).value,b=hs(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
819
|
+
b.skip(1),d=hs(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Nr(c,a.i);f.j=d;a.h[c]=f}d=hs(b).value;f=hs(b).value;var g=hs(b).value,h=hs(b).value,k=hs(b).value;b=hs(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.A=!1,b.F="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.N=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
820
|
+
function ks(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function ls(a,b,c){var d=null;b=t(ks(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Tr(f,c,a.i));a.h[e]=null}return d}function ms(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ns(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return os[a<<2|b<<1|c]}
|
|
821
|
+
var ps=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),os="black blue green cyan red magenta yellow white".split(" ");function qs(){this.h=[];this.g=[];this.i=new es;this.l=0;this.m=new Map([["CC1",new Dr(0,0)],["CC2",new Dr(0,1)],["CC3",new Dr(1,0)],["CC4",new Dr(1,1)]]);this.u=this.o=0;this.j=new Map;this.F=!0;this.A=new Set;rs(this)}qs.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;rs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())ms(b.value)};
|
|
822
|
+
function rs(a){a.o=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Er,c.g=c.j,c.m=null,pr(c.i),pr(c.j),pr(c.o);a.F=!0}
|
|
823
|
+
qs.prototype.extract=function(a,b){if(this.F){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.F=!1}a=new Hg(a,0);if(!(8>a.getLength())&&181===a.X()&&49===a.za()&&1195456820===a.T()&&3===a.X()&&(c=a.X(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.X(),f=(e&4)>>2,g=a.X(),h=a.X();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,vb:g,Ub:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
824
|
+
qs.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=ss(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())fs(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=ts(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
825
|
+
function ss(a,b){var c=b.type;if(16===(b.vb&112)){var d=b.vb>>3&1;0===c?a.o=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.o))+1);c=a.m.get(d);if(255===b.vb&&255===b.Ub||!b.vb&&!b.Ub||!us(b.vb)||!us(b.Ub))return 45<=++a.l&&rs(a),null;a.l=0;b.vb&=127;b.Ub&=127;var e=b.vb;if(1<=e&&15>=e||!b.vb&&!b.Ub)return null;e=null;if(16===(b.vb&112))a:{a.A.add(d),d=b.vb;a=b.Ub;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
826
|
+
"white";e=!1;7>f?d=Mr[f]:7===f&&(e=!0);a=1===(a&1);c.h!==Hr&&(f=c.g,c.h===Gr&&b!==f.g&&(c=1+b-f.h,Cr(f,c,1+f.g-f.h,f.h),sr(f,0,c-1),sr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",tr(c.g,ur,32),d=!1,b=Mr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Lr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))tr(c.g,
|
|
827
|
+
wr,a);else if(18===(d&246)&&32===(a&224))tr(c.g,d&1?Ar:yr,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Ub){case 32:Ir(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Fr(c,2,a);break;case 38:d=Fr(c,3,a);break;case 39:d=Fr(c,4,a);break;case 40:tr(c.g,ur,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:pr(c.o);Kr(c);break;case 43:Kr(c);break;case 44:b=c.i;d=null;c.h!==Hr&&(d=qr(b,c.l,a));sr(b,0,15);break;case 45:b=c.g;c.h!==Gr?d=null:(d=qr(b,c.l,a),e=b.g-b.h+1,Cr(b,
|
|
828
|
+
e-1,e,b.h),sr(b,0,e-1),sr(b,b.g,15-b.g),c.l=a);break;case 46:sr(c.j,0,15);break;case 47:b=null,c.h!==Hr&&(b=qr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ir(c),c.l=a,d=b}e=d;break a}e=null}else a=b.Ub,tr(c.g,ur,b.vb),tr(c.g,ur,a);return e}
|
|
829
|
+
function ts(a,b){var c=[];try{for(;b.Ba();){var d=hs(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=hs(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new is(e));for(var g=a.j.get(e),h=b.Fa();b.Fa()-h<f;){e=b;var k=hs(e),l=k.value,m=k.pts;if(16===l){var n=hs(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!Sr(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.m-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=Tr(r,p,g.i));if(r.h+1>=r.o){p=r;for(var u=
|
|
830
|
+
0,v=1;16>v;v++,u++)p.i[u]=p.i[v];for(v=0;1>v;v++,u++)p.i[u]=Qr()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=Tr(r,p,g.i));r.i[r.h]=Qr();r.g=0;break;case 12:r.isVisible()&&(e=Tr(r,p,g.i)),Pr(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=js(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Rr(g.g,
|
|
831
|
+
"\u266a"):Rr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Rr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ps.has(e)){var A=ps.get(e);Rr(g.g,A)}else Rr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Rr(g.g,"_"):Rr(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof U&&3E3===z.code)Za("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}function us(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
832
|
+
qs.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",qs);Bd=function(){return new qs};function vs(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ws(){this.j=new Map;this.i=this.h=0;this.g=xs}
|
|
833
|
+
ws.prototype.init=function(a){function b(f){f=f.name;f in ys&&(c.g=ys[f])}var c=this,d=[],e=[];(new Kg).box("moov",Pg).box("mvex",Pg).W("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.T();g=g.T();c.h=f;c.i=g}).box("trak",Pg).W("tkhd",function(f){f=bj(f.reader,f.version);d.push(f.trackId)}).box("mdia",Pg).W("mdhd",function(f){f=$i(f.reader,f.version);e.push(f.timescale)}).box("minf",Pg).box("stbl",Pg).W("stsd",Rg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
834
|
+
b).box("dvh1",b).box("dvhe",b).box("encv",Sg).box("sinf",Pg).box("frma",function(f){f=dj(f.reader).cb;f in ys&&(c.g=ys[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==xs&&Ya("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
835
|
+
ws.prototype.parse=function(a){var b=this;if(this.g==xs)return[];var c=[],d=0,e=[];(new Kg).box("moof",function(f){d=f.start;e=[];Pg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Nd:b.h,Fe:b.i,Vh:[],timescale:9E4});Pg(f)}).W("trun",function(f){var g=e[e.length-1];f=aj(f.reader,f.version,f.flags);g.Vh.push(f)}).W("tfhd",function(f){var g=e[e.length-1];f=Yi(f.reader,f.flags);g.Nd=f.Nd||b.h;g.Fe=f.Fe||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).W("tfdt",function(f){var g=e[e.length-
|
|
836
|
+
1];f=Zi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Fa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Ya("Unable to find base media decode time for CEA captions!"),new U(2,2,2010);f.reader.seek(h);zs(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Nd,l.Fe,g,l.Vh,c)}}).parse(a,!1);return c};
|
|
837
|
+
function zs(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Zh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Oi);b.Ba();){g=b.T();var p=b.X(),r=null;r=!1;h=1;switch(a.g){case As:r=p&31;r=6==r;break;case Bs:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].jf||0),p=(c+p)/d,h=t(vs(b.Hb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
|
|
838
|
+
c+(n[l].Rg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",ws);var xs=0,As=1,Bs=2,ys={avc1:As,avc3:As,hev1:Bs,hvc1:Bs,dvav:As,dva1:As,dvh1:Bs,dvhe:Bs};Ad["video/mp4"]=function(){return new ws};function Cs(){this.g=null}Cs.prototype.init=function(){};Cs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new vj;var b=[];a=Gb(a);if(!Cj(a))return b;a=this.g.parse(a);var c=a.Od(),d=a.Ne();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(vs(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
839
|
+
P("shaka.cea.TsCeaParser",Cs);Ad["video/mp2t"]=function(){return new Cs};function Ds(a,b,c){var d=Es(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.nd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=Fs(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.nd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.nd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
840
|
+
l.nd});f.length&&(a=Gs(e,k,f,c,h),0==a.length&&(a=[Hc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Hc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{yh:h,Ml:e,drmInfos:a,Qf:g,Dh:!0}}
|
|
841
|
+
function Hs(a,b,c,d){var e=Ds(a,c,d);if(b.Dh){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Dh=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new U(2,4,4008);return e.yh||b.yh}
|
|
842
|
+
function Is(a){var b=0,c=Lb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Js(a){a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return gh(c)}return""}
|
|
843
|
+
function Ks(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=gh(b)))return b;a=kh(a.node,"urn:microsoft:playready","pro");if(!a||!gh(a))return"";a=gh(a);a=Cc(a);a=Is(a).filter(function(c){return c.type===Ls})[0];if(!a)return"";a=sc(a.value,!0);return(a=Yg(a,"WRMHEADER"))?Js(a):""}
|
|
844
|
+
function Gs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.nd];if(h){var k;if((k=kh(g.node,"urn:microsoft:playready","pro"))&&gh(k)){k=gh(k);k=Cc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Wg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.nd)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
|
|
845
|
+
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Wg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Hc(h,b,g.init||a||k||l);if(h=Ms.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Es(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Ns(c.value))&&b.push(c);return b}
|
|
846
|
+
function Ns(a){var b=a.attributes.schemeIdUri,c=nh(a,"urn:mpeg:cenc:2013","default_KID"),d=lh(a,"urn:mpeg:cenc:2013","pssh").map(hh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Cc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,nd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
847
|
+
function Fs(a){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new U(2,4,4051);b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=yc(b.attributes.keyUriTemplate);
|
|
848
848
|
if(!a||!b)throw new U(2,4,4051);a=Dc(a.substr(2));if(16!=a.byteLength)throw new U(2,4,4048);return{Lj:b,iv:a}}
|
|
849
|
-
var
|
|
850
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=gh(a))?a:""});function
|
|
849
|
+
var Ls=1,Ms=(new Map).set("com.widevine.alpha",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"urn:microsoft","laurl"))?yc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Ks).set("com.microsoft.playready.recommendation",Ks).set("com.microsoft.playready.software",Ks).set("com.microsoft.playready.hardware",Ks).set("org.w3.clearkey",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
850
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=gh(a))?a:""});function Os(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Ya("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
851
851
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
852
|
-
function
|
|
853
|
-
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,jh:r,Qb:n,nk:k.length+h}),r=l}}e=k}return{timescale:d,bb:c,le:g,ac:f/d||0,ih:f,timeline:e}}function
|
|
854
|
-
function
|
|
855
|
-
function
|
|
856
|
-
[];r.children.length;){var u=r.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return
|
|
857
|
-
function
|
|
858
|
-
;function
|
|
859
|
-
function
|
|
860
|
-
function
|
|
861
|
-
d)}function
|
|
862
|
-
function
|
|
863
|
-
function
|
|
864
|
-
function
|
|
865
|
-
function
|
|
866
|
-
3,3009);H=G.g.byteOffset;G=new
|
|
867
|
-
D.next())I=K.value,I.codecs=a.M.codecs,I.mimeType=a.M.mimeType;h.ce(z);r=new Xk(z);k&&r.Xc(y,B,!0);return J.return(r)})}function
|
|
868
|
-
function
|
|
869
|
-
a.va.duration?a.va.start+a.va.duration:Infinity,b);g&&(g.segmentIndex=f);return{wc:function(){f&&0!=f.getNumReferences()||f.We(h);return Promise.resolve(f)}}}function
|
|
870
|
-
function
|
|
871
|
-
function
|
|
872
|
-
(p=d.segmentIndex);var r=a.va.start,u=a.va.duration?r+a.va.duration:Infinity,v=!(a.Kb&&a.va.Zd);p?(c=p,
|
|
873
|
-
function
|
|
874
|
-
function
|
|
852
|
+
function Ps(a,b){var c=Qs(a,b,"timescale"),d=1;c&&(d=vh(c)||1);c=Qs(a,b,"duration");(c=vh(c||""))&&(c/=d);var e=Qs(a,b,"startNumber"),f=Number(Qs(a,b,"presentationTimeOffset"))||0,g=wh(e||"");if(null==e||null==g)g=1;e=null;if(b=Rs(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.va.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=mh(n,"t",wh),u=mh(n,"d",wh),v=mh(n,"r",uh);n=mh(n,"k",uh)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=mh(p,"t",wh);if(null==
|
|
853
|
+
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,jh:r,Qb:n,nk:k.length+h}),r=l}}e=k}return{timescale:d,bb:c,le:g,ac:f/d||0,ih:f,timeline:e}}function Ss(a,b){return[b(a.M),b(a.Ea),b(a.Ha)].filter(Re)}function Qs(a,b,c){b=Ss(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
854
|
+
function Rs(a,b,c){b=Ss(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=jh(d.value,c));d=b.next());return a}
|
|
855
|
+
function Ts(a,b,c,d,e,f){for(var g=nh(a,"http://www.w3.org/1999/xlink","href"),h=nh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=$g("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ig(new U(2,4,4028));if("onLoad"!=h)return ig(new U(2,4,4027));var p=Gc([d],[g]);return e.request(0,vg(p,b)).Na(function(r){r=Xg(r.data,a.tagName);if(!r)return ig(new U(2,4,4001,g));for(a.children=
|
|
856
|
+
[];r.children.length;){var u=r.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Us(a,b,c,p[0],e,f+1)})}
|
|
857
|
+
function Us(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=Ts(a,b,c,d,e,f);c&&(g=g.Na(void 0,function(){return Us(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=t(ch(a)),l=k.next();!l.done;h={Sc:h.Sc},l=k.next())h.Sc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==nh(h.Sc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Sc}}(h)):"SegmentTimeline"!=h.Sc.tagName&&g.push(Us(h.Sc,b,c,d,e,f));return mg(g).Na(function(){return a})}
|
|
858
|
+
;function Vs(a,b,c,d,e,f,g){var h,k=(new Kg).W("sidx",function(l){h=Ws(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
|
|
859
|
+
function Ws(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.T();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.T();var m=g.reader.T()}else l=g.reader.md(),m=g.reader.md();g.reader.skip(2);var n=g.reader.za();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.T(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.T();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new Hi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Xs(a){this.h=Lb(a);this.g=new Hg(this.h,0)}Xs.prototype.Ba=function(){return this.g.Ba()};
|
|
860
|
+
function Ys(a){var b=Zs(a);if(7<b.length)throw new U(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Zs(a);a:{d=t($s);for(var e=d.next();!e.done;e=d.next())if(Eb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Fa();else{if(8==b.length&&b[1]&224)throw new U(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Fa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Fa();d=Lb(a.h,a.g.Fa(),b);a.g.skip(b);return new at(c,
|
|
861
|
+
d)}function Zs(a){var b=a.g.Fa(),c=a.g.X();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gb(a.h,b,c)}var $s=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function at(a,b){this.id=a;this.g=b}
|
|
862
|
+
function bt(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ct(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Xs(a.g);for(var n=null,p=null;a.Ba();){var r=Ys(a);if(187==r.id){var u=dt(r);u&&(r=c*u.Ek,u=b+u.bk,null!=n&&m.push(new Hi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Hi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
863
|
+
function dt(a){var b=new Xs(a.g);a=Ys(b);if(179!=a.id)throw new U(2,3,3013);a=bt(a);b=Ys(b);if(183!=b.id)throw new U(2,3,3012);b=new Xs(b.g);for(var c=0;b.Ba();){var d=Ys(b);if(241==d.id){c=bt(d);break}}return{Ek:a,bk:c}};function et(a,b,c){b=Rs(a,b,"Initialization");if(!b)return null;var d=a.M.Ua(),e=b.attributes.sourceURL;e&&(d=Gc(d,[yc(e)]));e=0;var f=null;if(b=mh(b,"range",th))e=b.start,f=b.end;c=new Fi(function(){return d},e,f,ft(a),null,null,c);c.codecs=a.M.codecs;c.mimeType=a.M.mimeType;return c}
|
|
864
|
+
function gt(a,b,c){var d=Number(Qs(a,ht,"presentationTimeOffset"))||0,e=Qs(a,ht,"timescale"),f=1;e&&(f=vh(e)||1);var g=d/f||0,h=et(a,ht,c);it(a,h);var k=Te(a);return{wc:function(){var l=Rs(k,ht,"RepresentationIndex");var m=k.M.Ua();l&&(l=yc(l.attributes.sourceURL))&&(m=Gc(m,[l]));l=jt(k);return kt(k,b,h,m,l.start,l.end,g)}}}
|
|
865
|
+
function kt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.Kb||!a.va.Zd,l=a.va.start,m=a.va.duration,n=a.M.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.P(),c.Va,c.Aa,!0):null],p=null,E(J,Promise.all(u),2);v=J.h;w=v[0];A=v[1]||null;z=null;C=l-g;y=l;B=m?l+m:Infinity;if("mp4"==n)var H=Vs(w,e,d,c,C,y,B);else{H=new Xs(A);if(440786851!=Ys(H).id)throw new U(2,3,3008);var G=Ys(H);if(408125543!=G.id)throw new U(2,
|
|
866
|
+
3,3009);H=G.g.byteOffset;G=new Xs(G.g);for(var N=null;G.Ba();){var L=Ys(G);if(357149030==L.id){N=L;break}}if(!N)throw new U(2,3,3010);N=new Xs(N.g);L=1E6;for(G=null;N.Ba();){var M=Ys(N);if(2807729==M.id)L=bt(M);else if(17545==M.id)if(4==M.g.byteLength)G=M.g.getFloat32(0);else if(8==M.g.byteLength)G=M.g.getFloat64(0);else throw new U(2,3,3003);}if(null==G)throw new U(2,3,3011);N=L/1E9;G*=N;L=Ys(new Xs(w));if(475249515!=L.id)throw new U(2,3,3007);H=ct(L,H,N,G,d,c,C,y,B)}z=H;D=t(z);for(K=D.next();!K.done;K=
|
|
867
|
+
D.next())I=K.value,I.codecs=a.M.codecs,I.mimeType=a.M.mimeType;h.ce(z);r=new Xk(z);k&&r.Xc(y,B,!0);return J.return(r)})}function ht(a){return a.od}function jt(a){var b=Rs(a,ht,"RepresentationIndex");a=Qs(a,ht,"indexRange");a=th(a||"");b&&(a=mh(b,"range",th,a));return a}function it(a,b){lt(a,b);if(!jt(a))throw new U(2,4,4002);}function lt(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Mc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
|
|
868
|
+
function ft(a){var b=a.M;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.jd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function mt(a,b,c){var d=et(a,nt,c),e=ot(a);if(!e.bb&&!e.timeline&&1<e.gd.length)throw new U(2,4,4002);if(!e.bb&&!a.va.duration&&!e.timeline&&1==e.gd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.Ha.id&&a.M.id&&(g=b[a.Ha.id+","+a.M.id])&&(f=g.segmentIndex);var h=pt(a.va.start,a.va.duration,a.M.Ua,e,d,c,a.M.mimeType,a.M.codecs);b=!f;f?f.ae(h,a.presentationTimeline.Cb()):f=new Xk(h);a.presentationTimeline.ce(h);a.Kb&&a.va.Zd||f.Xc(a.va.start,
|
|
869
|
+
a.va.duration?a.va.start+a.va.duration:Infinity,b);g&&(g.segmentIndex=f);return{wc:function(){f&&0!=f.getNumReferences()||f.We(h);return Promise.resolve(f)}}}function nt(a){return a.bc}function ot(a){var b=qt(a);a=Ps(a,nt);var c=a.le;0==c&&(c=1);var d=0;a.bb?d=a.bb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{bb:a.bb,startTime:d,le:c,ac:a.ac,timeline:a.timeline,gd:b}}
|
|
870
|
+
function pt(a,b,c,d,e,f,g,h){var k=d.gd.length;d.timeline&&d.timeline.length!=d.gd.length&&(k=Math.min(d.timeline.length,d.gd.length));for(var l=a-d.ac,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={Gd:r.Gd,Cd:r.Cd},u++){r.Cd=d.gd[u];var v=p;p=void 0;p=null!=d.bb?v+d.bb:d.timeline?d.timeline[u].end:v+b;r.Gd=null;v=new Hi(a+v,a+p,function(w){return function(){null==w.Gd&&(w.Gd=Gc(c(),[w.Cd.Sj]));return w.Gd}}(r),r.Cd.start,r.Cd.end,e,l,a,m,[],"",null,null,Ii,f);v.codecs=h;v.mimeType=g;n.push(v)}return n}
|
|
871
|
+
function qt(a){return[a.M.bc,a.Ea.bc,a.Ha.bc].filter(Re).map(function(b){return fh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.zg&&(a.zg=!0);var c=yc(b.attributes.media);b=mh(b,"mediaRange",th,{start:0,end:null});return{Sj:c,start:b.start,end:b.end}})};function rt(a,b,c,d,e,f,g,h,k){k||a.M.dd||(a.M.dd=Qs(a,st,"initialization"));var l=a.M.dd?tt(a,g):null,m=ut(a);vt(m);var n=Te(a);if(m.Vd)return lt(a,l),{wc:function(){var w=Os(m.Vd,n.M.id,null,null,n.bandwidth||null,null);w=Gc(n.M.Ua(),[w]);return kt(n,b,l,w,0,null,m.ac)}};if(m.bb)return d||"image"===a.Ea.contentType||(a.presentationTimeline.Ig(m.bb),a.presentationTimeline.Ze(a.va.start)),{wc:function(){return wt(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.Ha.id&&a.M.id&&(d=a.Ha.id+","+a.M.id,d=c[d])&&
|
|
872
|
+
(p=d.segmentIndex);var r=a.va.start,u=a.va.duration?r+a.va.duration:Infinity,v=!(a.Kb&&a.va.Zd);p?(c=p,xt(c,m,r,u,v,l),c.eb(a.presentationTimeline.Cb())):p=new yt(m,a.M.id,a.bandwidth,a.M.Ua,r,u,l,v,g,a.M.Sg);m.timeline&&"image"!==a.Ea.contentType&&a.presentationTimeline.Uh(m.timeline,r);d&&a.Kb&&(d.segmentIndex=p);return{wc:function(){p instanceof yt&&0==p.getNumReferences()&&xt(p,m,r,u,v,l);return Promise.resolve(p)}}}function st(a){return a.mc}
|
|
873
|
+
function ut(a){var b=Ps(a,st),c=Qs(a,st,"media"),d=Qs(a,st,"index");return{bb:b.bb,timescale:b.timescale,le:b.le,ac:b.ac,ih:b.ih,timeline:b.timeline,hd:c&&yc(c),Vd:d,mimeType:a.M.mimeType,codecs:a.M.codecs}}function vt(a){var b=a.Vd?1:0;b+=a.timeline?1:0;b+=a.bb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Vd&&(a.timeline=null),a.bb=null);if(!a.Vd&&!a.hd)throw new U(2,4,4002);}
|
|
874
|
+
function wt(a,b,c,d,e,f,g){function h(G){var N=(G-v)*u,L=N+b.ac,M=N+n;N=M+u;var Q=Math.min(N,l());M=new Hi(M,Q,function(){var T=L*w;"BigInt"in window&&T>Number.MAX_SAFE_INTEGER&&(T=BigInt(L)*BigInt(w));T=Os(A,C,G,null,z,T);return Gc(y(),[T])},0,null,d,B,n,l(),[],"",null,null,Ii,f);M.codecs=a.M.codecs;M.mimeType=a.M.mimeType;M.i=N;return M}function k(){var G=[Math.max(m.Cb(),n),Math.min(m.ic(),l())].map(function(N){return N-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.M.Ya&&G[1]++;return G.map(function(N){return N+
|
|
875
875
|
v})}function l(){var G=null!=p&&e[p]||r;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.va.start,p=a.Ha.id,r=a.va.duration,u=b.bb,v=b.le,w=b.timescale,A=b.hd,z=a.bandwidth||null,C=a.M.id,y=a.M.Ua,B=n-b.ac,D=k();c=a.Kb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var K=c;K<=g;++K){var I=h(K);D.push(I)}var J=new Xk(D);D=m.ic()<l();K=m.U();if(D||K){var H=Math.max(c,g+1);c=u;a.M.Ya&&(c=.1);J.rf(c,function(){var G=m.Cb();J.eb(G);var N=t(k());N.next();N=N.next().value;for(var L=[];H<=N;){var M=
|
|
876
|
-
h(H);L.push(M);H++}return G>l()&&!L.length?null:L})}return Promise.resolve(J)}function
|
|
877
|
-
function
|
|
876
|
+
h(H);L.push(M);H++}return G>l()&&!L.length?null:L})}return Promise.resolve(J)}function tt(a,b){var c=a.M.dd;c||(c=Qs(a,st,"initialization"));if(!c)return null;c=yc(c);var d=a.M.id,e=a.bandwidth||null,f=a.M.Ua;b=new Fi(function(){var g=Os(c,d,null,null,e,null);return Gc(f(),[g])},0,null,ft(a),null,null,b);b.codecs=a.M.codecs;b.mimeType=a.M.mimeType;return b}
|
|
877
|
+
function yt(a,b,c,d,e,f,g,h,k,l){Xk.call(this,[]);this.h=a;this.H=b;this.F=c;this.G=d;this.i=e;this.l=f;this.u=g;this.A=k;this.I=l;h&&zt(this)}na(yt,Xk);q=yt.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Xk.prototype.release.call(this);this.h=null};
|
|
878
878
|
q.eb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
|
|
879
|
-
function
|
|
880
|
-
function
|
|
879
|
+
function xt(a,b,c,d,e,f){At(a,f);if(a.h){c=a.h.timeline;a.h.hd=b.hd;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&zt(a)}function At(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ki(c,b)}}
|
|
880
|
+
function zt(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.eb(a.i)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
881
881
|
q.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.hd,e=this.h.timeline[a],f=e.nk,g=this.h.ih+e.jh;c=this.i-this.h.ac;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],p=(e.end-e.start)/e.Qb,r={},u=0;u<e.Qb;r={Hd:r.Hd,Gf:r.Gf},u++){var v=e.start+p*u,w=v+p;r.Gf=u+1;r.Hd=null;v=new Hi(this.i+v,this.i+w,function(A){return function(){if(!b.h)return[];
|
|
882
|
-
null==A.Hd&&(A.Hd=
|
|
883
|
-
function
|
|
884
|
-
function
|
|
882
|
+
null==A.Hd&&(A.Hd=Bt(b.h.hd,b.H,f,b.F,g,A.Gf,b.G));return A.Hd}}(r),0,null,this.u,c,this.i,this.l,[],"",null,null,Ii,this.A);v.codecs=l;v.mimeType=m;0==this.I?0<u&&v.Ue():0!=u%this.I&&v.Ue();n.push(v)}c=new Hi(this.i+e.start,k,function(){return 0<e.Qb?[]:Bt(d,b.H,f,b.F,g,null,b.G)},0,null,this.u,c,this.i,this.l,n,"",null,null,Ii,this.A,0<e.Qb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
883
|
+
function Bt(a,b,c,d,e,f,g){a=Os(a,b,c,f,d||null,e);return Gc(g(),[a]).map(function(h){return h.toString()})};function Ct(a){var b=De(a),c=b.split("/")[0];a=Fe(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,oe:null,colorGamut:null}}
|
|
884
|
+
function Dt(a,b){function c(y){w=y.name;Sg(y)}function d(y){var B=cj(y.reader);p=B.channelCount;r=B.sampleRate;e(y.name)}function e(y){y=y.toLowerCase();switch(y){case "avc1":case "avc3":g.push(y+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(y+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(y+".05.04");k=!0;break;case "vp09":g.push(y+".00.10.08");k=!0;break;case "av01":g.push(y+".0.01M.08");k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(y),
|
|
885
885
|
h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Kg).box("moov",Pg).box("trak",Pg).W("tkhd",function(y){y=bj(y.reader,y.version);m=String(y.height);n=String(y.width)}).box("mdia",Pg).W("mdhd",function(y){l=$i(y.reader,y.version).language}).box("minf",Pg).box("stbl",Pg).W("stsd",Rg).box("mp4a",function(y){var B=cj(y.reader);p=B.channelCount;r=B.sampleRate;y.reader.Ba()?Pg(y):e(y.name)}).box("esds",function(y){y=y.reader;for(var B="mp4a",D,K;y.Ba();){D=y.X();for(var I=
|
|
886
886
|
y.X();I&128;)I=y.X();if(3==D)y.za(),I=y.X(),I&128&&y.za(),I&64&&y.skip(y.X()),I&32&&y.za();else if(4==D)K=y.X(),y.skip(12);else if(5==D)break}K&&(B+="."+fj(K),5==D&&y.Ba()&&(D=y.X(),K=(D&248)>>3,31===K&&y.Ba()&&(K=32+((D&7)<<3)+((y.X()&224)>>5)),B+="."+K));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("avcC",function(y){var B=
|
|
887
887
|
w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}y=y.reader;y.skip(1);y=B+"."+fj(y.X())+fj(y.X())+fj(y.X());g.push(y);k=!0}).box("hvcC",function(y){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=y.reader;D.skip(1);y=D.X();var K=["","A","B","C"][y>>6],I=y&31,J=D.T(),H=(y&32)>>5?"H":"L";y=[D.X(),D.X(),D.X(),D.X(),D.X(),D.X()];D=D.X();for(var G=0,N=0;32>N;N++){G|=J&1;if(31==N)break;G<<=1;J>>=1}B=B+("."+K+I)+("."+fj(G,!0));B+="."+H+D;K="";for(I=y.length;I--;)if((H=
|
|
888
888
|
y[I])||K)K="."+H.toString(16).toUpperCase()+K;B+=K;g.push(B);k=!0}).box("dvcC",function(y){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var D=y.reader;D.skip(2);y=D.X();D=D.X();g.push(B+"."+gj(y>>1&127)+"."+gj(y<<5&32|D>>3&31));k=!0}).W("vpcC",function(y){var B=w||"",D=y.reader;y=D.X();var K=D.X();D=D.X()>>4&15;g.push(B+"."+gj(y)+"."+gj(K)+"."+gj(D));k=!0}).box("av1C",function(y){var B=w||"",D=y.reader;D.skip(1);y=D.X();
|
|
889
889
|
D=D.X();var K=y>>>5,I=(D&64)>>6;g.push(B+"."+K+"."+gj(y&31)+(D>>>7?"H":"M")+"."+gj(2===K&&I?(D&32)>>5?12:10:I?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+gj(1)+"."+gj(1)+"."+gj(1)+".0");k=!0}).box("enca",Tg).box("encv",Sg).box("sinf",Pg).box("frma",function(y){y=dj(y.reader).cb;e(y)}).box("colr",function(y){g=g.map(function(K){if(K.startsWith("av01.")){var I=y.reader,J=I.Fa(),H=I.Hb(4);var G=String.fromCharCode(H[0]);G+=String.fromCharCode(H[1]);G+=String.fromCharCode(H[2]);G+=String.fromCharCode(H[3]);
|
|
890
|
-
if("nclx"===G){H=I.za();G=I.za();var N=I.za(),L=I.X()>>7,M=K.split(".");10==M.length&&(M[6]=gj(H),M[7]=gj(G),M[8]=gj(N),M[9]=String(L),K=M.join("."))}I.seek(J)}return K});var B=ej(y.reader),D=B.colorGamut;u=B.oe;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var C=new zd("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);C.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:
|
|
891
|
-
language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:z,oe:u,colorGamut:v}}function
|
|
892
|
-
function
|
|
893
|
-
function
|
|
894
|
-
function
|
|
895
|
-
function
|
|
896
|
-
function
|
|
897
|
-
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new mb(k.location)).Vb))return!1;return!0});d.length&&(a.F=d[0].Og);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.F=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Gc(a.i,d)};function
|
|
898
|
-
function
|
|
899
|
-
q.Wf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R;return O(function(ra){if(1==ra.g){e=Oc;if(!b&&1==a.length)return f=
|
|
900
|
-
return E(ra,Promise.all([
|
|
890
|
+
if("nclx"===G){H=I.za();G=I.za();var N=I.za(),L=I.X()>>7,M=K.split(".");10==M.length&&(M[6]=gj(H),M[7]=gj(G),M[8]=gj(N),M[9]=String(L),K=M.join("."))}I.seek(J)}return K});var B=ej(y.reader),D=B.colorGamut;u=B.oe;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,z=new Map;if(k){var C=new zd("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);C.g()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:Et(f.concat(g)).join(", "),
|
|
891
|
+
language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:z,oe:u,colorGamut:v}}function Et(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ce(d);b.has(e)||(c.push(d),b.add(e))}b=Nc("audio",c);d=Nc("video",c);a=Nc(Mc,c);d=Ft(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
892
|
+
function Ft(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?od('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function Gt(a){var b=null;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).box("minf",Pg).box("stbl",Pg).W("stsd",Rg).box("encv",Sg).box("enca",Tg).box("sinf",Pg).box("schi",Pg).W("tenc",function(c){c=c.reader;c.X();c.X();c.X();c.X();b=Ec(c.Hb(16))}).parse(a,!0);return b};function Ht(a){this.o=null;this.A=a;this.I=new og;this.i=[];this.h=null;this.m=[];this.F=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}Ht.prototype.configure=function(a){this.o=a};Ht.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Ht.prototype.setManifestType=function(a){this.u=a};
|
|
893
|
+
function It(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Gc(a.i,[Jt(a,b)]),d=vg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),pg(a.I,e),ta(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=rc(f.data),h=JSON.parse(g),1==h.VERSION&&Kt(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Qb(function(){It(a,b)});a.g.V(a.G);F(l)})}
|
|
894
|
+
function Jt(a,b){if(!a.m.length)return b;b=new mb(b);var c=a.F||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Cb(e)&&qb(b,e);return b.toString()}function Kt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Qb(function(){It(a,d)});if(c=b.TTL)a.G=c;a.g.V(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
|
|
895
|
+
function Lt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Ht.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
896
|
+
function Mt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={sc:e.sc},g=f.next())if(e.sc=g.value,g=b.get(e.sc))d.push({Og:e.sc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Wk==k.sc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].zi?(h=new mb(h),ob(h,g["URI-REPLACEMENT"].zi),d.push({Og:e.sc,location:h.toString()})):d.push({Og:e.sc,location:h}))}e=Date.now();f=t(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
897
|
+
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new mb(k.location)).Vb))return!1;return!0});d.length&&(a.F=d[0].Og);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.F=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Gc(a.i,d)};function Nt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.u=this.o=!1;this.m=new Set}q=Nt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};q.wj=function(){return this.j};q.sg=function(){return this.l.slice()};q.aj=function(){return this.i};
|
|
898
|
+
function Ot(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Pt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Qt(n),n]})),l=new Map(h.textStreams.map(function(n){return[Rt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[St(n),n]}));if(b){var m=Tt(Mc);l.set(Rt(m),m);m=Tt("image");h.set(St(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{qh:c,ti:d,ni:e,Lh:f}}
|
|
899
|
+
q.Wf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R;return O(function(ra){if(1==ra.g){e=Oc;if(!b&&1==a.length)return f=Ot(a,!1),g=f.qh,h=f.ti,k=f.ni,l=f.Lh,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ra.B(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return ra.return();u=Ot(a,!0);v=u.qh;w=u.ti;A=u.ni;z=u.Lh;
|
|
900
|
+
return E(ra,Promise.all([Ut(d,d.h,v,n,Vt,Wt,m),Ut(d,d.g,w,n,Vt,Wt,m),Ut(d,d.l,A,n,Vt,Wt,m),Ut(d,d.i,z,n,Vt,Wt,m)]),2)}C=0;y=[];if(d.g.length&&d.h.length)for(H=t(d.h),G=H.next();!G.done;G=H.next())for(N=G.value,L=t(d.g),M=L.next();!M.done;M=L.next())Q=M.value,T=pi(N.drmInfos,Q.drmInfos),N.drmInfos.length&&Q.drmInfos.length&&!T.length||(R=C++,y.push({id:R,language:N.language,disabledUntilTime:0,primary:N.primary,audio:N,video:Q,bandwidth:(N.bandwidth||0)+(Q.bandwidth||0),drmInfos:T,allowedByApplication:!0,
|
|
901
901
|
allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),K=D.next();!K.done;K=D.next())I=K.value,J=C++,y.push({id:J,language:I.language,disabledUntilTime:0,primary:I.primary,audio:I.type==e.ba?I:null,video:I.type==e.ua?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=y;F(ra)})};
|
|
902
|
-
function
|
|
903
|
-
R]}))});f=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.Nf}).map(function(R){return[
|
|
902
|
+
function Xt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M;return O(function(Q){switch(Q.g){case 1:b=Oc;if(1==a.length)return Q.return(a[0]);c=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.ba}).map(function(R){return[Pt(R),R]}))});d=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.ua}).map(function(R){return[Qt(R),R]}))});e=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.Da}).map(function(R){return[Rt(R),
|
|
903
|
+
R]}))});f=a.map(function(T){return new Map(T.filter(function(R){return R.type===b.Nf}).map(function(R){return[St(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Yt(b.Da),k.set(Rt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=Yt(b.Nf),p.set(St(r),r);u=new Nt;return E(Q,Ut(u,[],c,0,Zt,$t,0),2);case 2:return v=Q.h,E(Q,Ut(u,[],d,0,Zt,$t,0),3);case 3:return w=Q.h,E(Q,Ut(u,[],e,0,Zt,$t,0),4);case 4:return A=Q.h,E(Q,Ut(u,[],f,0,Zt,$t,0),5);case 5:z=Q.h;C=0;if(w.length&&v.length)for(I=
|
|
904
904
|
t(v),J=I.next();!J.done;J=I.next())for(H=J.value,G=t(w),N=G.next();!N.done;N=G.next())L=N.value,M=C++,L.variantIds.push(M),H.variantIds.push(M);else for(y=w.concat(v),B=t(y),D=B.next();!D.done;D=B.next())K=D.value,K.variantIds=[C++];return Q.return(w.concat(v).concat(A).concat(z))}})}
|
|
905
|
-
function
|
|
906
|
-
y.next())for(B=u.value,D={},K=t(B),A=K.next();!A.done;D={ye:D.ye},A=K.next())if(D.ye=A.value,!
|
|
907
|
-
function
|
|
908
|
-
function
|
|
909
|
-
function
|
|
910
|
-
function
|
|
911
|
-
function
|
|
912
|
-
function
|
|
913
|
-
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
914
|
-
b)}function
|
|
915
|
-
function
|
|
916
|
-
function
|
|
917
|
-
function
|
|
918
|
-
function
|
|
919
|
-
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=
|
|
920
|
-
function
|
|
921
|
-
function
|
|
922
|
-
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
923
|
-
function
|
|
924
|
-
function
|
|
925
|
-
function
|
|
926
|
-
function
|
|
927
|
-
function
|
|
928
|
-
var
|
|
929
|
-
q.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.l&&this.l.presentationTimeline.U()&&this.I.La();this.h&&this.h.configure(this.g);this.m&&(this.m.$h(this.g.dash.multiTypeVariantsAllowed&&qd()),this.m.ji(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.i=b,E(e,
|
|
905
|
+
function Ut(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I;return O(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.B(4);break}n=m.value;return E(J,au(a,n,c,d,f,h,g),5);case 5:p=J.h;if(!p)throw new U(2,4,4037);m=l.next();J.B(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())z=A.value,(C=bu(a,z,c,e,f,h))&&b.push(C);y=t(h);for(u=y.next();!u.done;u=
|
|
906
|
+
y.next())for(B=u.value,D={},K=t(B),A=K.next();!A.done;D={ye:D.ye},A=K.next())if(D.ye=A.value,!cu(D.ye)&&(I=b.some(function(H){return function(G){return du(a,H.ye,G)}}(D))))throw new U(2,4,4037);return J.return(b)}})}function au(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return eu(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,fu(b,d+g),2):h.B(2):h.return(!1);gu(b,d,e,f,g);return h.return(!0)})}
|
|
907
|
+
function fu(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return E(l,Promise.all(c),2)}if(a.segmentIndex instanceof $k)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
|
|
908
|
+
function bu(a,b,c,d,e,f){if(cu(b))return null;var g=d(b);eu(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.B(0);g.segmentIndex=new $k;return E(h,fu(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;gu(g,0,e,f,0);return g}
|
|
909
|
+
function gu(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Yc(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
910
|
+
function Vt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
911
|
+
function Zt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
912
|
+
function Wt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=pi(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new U(2,4,4038);a.drmInfos=
|
|
913
|
+
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Vt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Wt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Wt(a.trickModeVideo,
|
|
914
|
+
b)}function $t(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
915
|
+
function eu(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=hu(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
916
|
+
function hu(a,b,c){var d={audio:Pt,video:Qt,text:Rt,image:St}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return du(a,l,m)},video:function(l,m){return du(a,l,m)},text:iu,image:ju}[c.type];for(var g={audio:ku,video:lu,text:mu,image:nu}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!cu(e)&&b.delete(d(e));return e}
|
|
917
|
+
function ou(a,b){function c(d){if(!pu.has(d)){var e=ve(d);pu.set(d,e)}return pu.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}q.$h=function(a){this.o=a};q.ji=function(a){this.u=a};function du(a,b,c){return!ou(b,c)&&!a.o||b.drmInfos&&!oi(b.drmInfos,c.drmInfos)?!1:!0}function iu(a,b){return b.language?a.forced!==b.forced||0==Yc(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function ju(){return!0}
|
|
918
|
+
function ku(a,b,c){var d=ou(a,b),e=ou(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Yc(a.language,b.language);e=Yc(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
919
|
+
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=qu(a.channelsCount,b.channelsCount,c.channelsCount);if(d==ru)return!0;if(d==su)return!1;d=qu(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==ru?!0:d==su?!1:a.bandwidth&&tu(a.bandwidth,b.bandwidth,c.bandwidth)==ru?!0:!1}
|
|
920
|
+
function lu(a,b,c){var d=ou(a,b),e=ou(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=qu(a.width*a.height,b.width*b.height,c.width*c.height);if(d==ru)return!0;if(d==su)return!1;if(a.frameRate){d=qu(a.frameRate,b.frameRate,c.frameRate);if(d==ru)return!0;if(d==su)return!1}return a.bandwidth&&tu(a.bandwidth,b.bandwidth,c.bandwidth)==ru?!0:!1}
|
|
921
|
+
function mu(a,b,c){var d=Yc(a.language,b.language),e=Yc(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
922
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function nu(a,b,c){return qu(a.width*a.height,b.width*b.height,c.width*c.height)==ru?!0:!1}
|
|
923
|
+
function Yt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
924
|
+
function Tt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Xk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
925
|
+
function qu(a,b,c){if(b==a&&a!=c)return su;if(c==a&&a!=b)return ru;if(b>a){if(c<=a||c-a<b-a)return ru;if(c-a>b-a)return su}else{if(c>a)return su;if(a-c<a-b)return ru;if(a-c>a-b)return su}return uu}function tu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?ru:b<a?su:uu}function cu(a){switch(a.type){case Mc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
926
|
+
function Qt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Pt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Rt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
927
|
+
function St(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",Nt);Nt.prototype.setUseStreamOnce=Nt.prototype.ji;Nt.prototype.setAllowMultiTypeVariants=Nt.prototype.$h;Nt.prototype.combinePeriods=Nt.prototype.Wf;Nt.prototype.getImageStreams=Nt.prototype.aj;Nt.prototype.getTextStreams=Nt.prototype.sg;Nt.prototype.getVariants=Nt.prototype.wj;var ru=1,uu=0,su=-1,pu=new Map;function vu(a,b){var c=new DOMParser,d=wu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function xu(a,b){try{var c=uc(a);return vu(c,b)}catch(d){return null}}
|
|
928
|
+
var wu=new Nb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function yu(){var a=this;this.i=this.g=null;this.A=[];this.l=null;this.R=1;this.F=[];this.j={Ye:"",type:"",profiles:[],Yb:null,Ya:0,Ua:null,ge:0};this.o=new Map;this.u={};this.N={};this.m=new Nt;this.H=0;this.O=new gd(5);this.I=new Qb(function(){zu(a)});this.L=new og;this.J=null;this.S=[];this.K=Infinity;this.G=!1;this.h=null}q=yu.prototype;
|
|
929
|
+
q.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.l&&this.l.presentationTimeline.U()&&this.I.La();this.h&&this.h.configure(this.g);this.m&&(this.m.$h(this.g.dash.multiTypeVariantsAllowed&&qd()),this.m.ji(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.i=b,E(e,Au(c),2);d=e.h;c.i&&Bu(c,d);if(!c.i)throw new U(2,7,7001);return e.return(c.l)})};
|
|
930
930
|
q.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.i=null;this.A=[];this.l=null;this.u={};this.o.clear();this.j={Ye:"",type:"",profiles:[],Yb:null,Ya:0,Ua:null,ge:0};this.m=null;null!=this.I&&(this.I.stop(),this.I=null);this.h&&this.h.destroy();return this.L.destroy()};
|
|
931
|
-
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,
|
|
931
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,Au(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.l&&this.l.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.l.presentationTimeline.ic();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Bu(this,0))}}};
|
|
932
932
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
933
|
-
function
|
|
934
|
-
function
|
|
935
|
-
p=a.g.dash.xlinkFailGracefully;r=
|
|
936
|
-
function
|
|
937
|
-
b.attributes.id||"";a.j.ge=mh(b,"publishTime",ph)||0;a.F=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new
|
|
938
|
-
H.next())N=G.value,L=N.attributes.serviceLocation,M=hh(N),L&&M&&(
|
|
939
|
-
mh(b,"suggestedPresentationDelay",qh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=mh(b,"maxSegmentDuration",qh));Ga=b.attributes.type||"static";a.j.type=Ga;if(a.l)for($a=a.l.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())
|
|
940
|
-
(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.mf(Fa);
|
|
941
|
-
$a.Ig(db||1);return E(pc,u,2);case 2:return a.G&&(sa=0,oj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Wg(oj)),a.l?E(pc,
|
|
942
|
-
case 8:
|
|
943
|
-
function
|
|
944
|
-
N}}else if("type"===n.ec){a.l.presentationTimeline.Mc("static"==p);a.j.type=p;N=t(a.o.values());for(L=N.next();!L.done;L=N.next())L.value.Kb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.ec?a.j.ge=ph(p)||0:null===n.ec&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Bh(a.F,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(N=n.id,L=t(a.o.keys()),M=L.next();!M.done;M=L.next())if(M=M.value,M.startsWith(N)){var Q=a.o.get(M);
|
|
945
|
-
|
|
946
|
-
Q=fh(M,"S"),Bh(Q,l),M.children=Q;z=N;C=t(z);for(w=C.next();!w.done;w=C.next())y=w.value,g.add(y)}B=t(g);for(w=B.next();!w.done;w=B.next())D=w.value,
|
|
947
|
-
Infinity));F(G)})}function
|
|
948
|
-
function
|
|
949
|
-
function
|
|
950
|
-
return c}function
|
|
951
|
-
function
|
|
933
|
+
function Au(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Cu(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=Mt(a.h,"Location",!0),e.length&&(d=e)),f=vg(d,a.g.retryParameters),g=Date.now(),E(m,Du(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.i)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,Eu(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.O.sample(1,l);return m.return(l)})}
|
|
934
|
+
function Eu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=wm;if(f!=g){sd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=xu(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=vc(h.outerHTML)}k=Xg(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=xm;l!=m&&l(k);if("Patch"===d)return v.return(Fu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Gu(a,k,c));
|
|
935
|
+
p=a.g.dash.xlinkFailGracefully;r=Us(k,a.g.retryParameters,p,c,a.i.networkingEngine);pg(a.L,r);return E(v,r.promise,2)}u=v.h;return v.return(Gu(a,u,c))})}
|
|
936
|
+
function Gu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa,Ia,Pa,Ja,db,Ga,$a,xb,ad,xe,Fd,Rc,ye,ze,Ae,Gd,mj,dh,nj,oj,eh,Be;return O(function(pc){switch(pc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=fh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=hh(l))p=Gc(d,[n])[0],m&&(a.h?Lt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Mt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.j.Ye=
|
|
937
|
+
b.attributes.id||"";a.j.ge=mh(b,"publishTime",ph)||0;a.F=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.i){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Ht(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(z=mh(v,"queryBeforeStart",yh,!1))?u=It(a.h,A):It(a.h,A);C=t(f.keys());for(y=C.next();!y.done;y=C.next())B=y.value,D=f.get(B),Lt(a.h,"Location",B,D)}K=fh(b,"BaseURL");J=!1;if(a.h)for(H=t(K),G=H.next();!G.done;G=
|
|
938
|
+
H.next())N=G.value,L=N.attributes.serviceLocation,M=hh(N),L&&M&&(Lt(a.h,"BaseURL",L,M),J=!0);J&&a.h||(Q=K.map(hh),I=Gc(d,Q));T=function(){return a.h&&J?Mt(a.h,"BaseURL"):I?I:[]};a.j.Ua=T;R=0;K&&K.length&&(R=mh(K[0],"availabilityTimeOffset",xh)||0);a.j.Ya=R;ra=a.g.dash.ignoreMinBufferTime;sa=0;ra||(sa=mh(b,"minBufferTime",qh)||0);a.H=mh(b,"minimumUpdatePeriod",qh,-1);Ca=mh(b,"availabilityStartTime",ph);Fa=mh(b,"timeShiftBufferDepth",qh);Ia=a.g.dash.ignoreSuggestedPresentationDelay;Pa=null;Ia||(Pa=
|
|
939
|
+
mh(b,"suggestedPresentationDelay",qh));Ja=a.g.dash.ignoreMaxSegmentDuration;db=null;Ja||(db=mh(b,"maxSegmentDuration",qh));Ga=b.attributes.type||"static";a.j.type=Ga;if(a.l)for($a=a.l.presentationTimeline,xb=t(Object.values(a.u)),ad=xb.next();!ad.done;ad=xb.next())xe=ad.value,xe.segmentIndex&&xe.segmentIndex.eb($a.Cb());else Fd=a.g.defaultPresentationDelay||1.5*sa,Rc=null!=Pa?Pa:Fd,$a=new Bk(Ca,Rc,a.g.dash.autoCorrectDrift);$a.Mc("static"==Ga);(ye=$a.U())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
940
|
+
(Fa=a.g.availabilityWindowOverride);null==Fa&&(Fa=Infinity);$a.mf(Fa);ze=b.attributes.profiles||"";a.j.profiles=ze.split(",");Ae={Kb:"static"!=Ga,presentationTimeline:$a,Ha:null,va:null,Ea:null,M:null,bandwidth:0,zg:!1,Ya:R,Yb:null,profiles:ze.split(",")};Gd=Hu(a,Ae,T,b);mj=Gd.duration;dh=Gd.periods;"static"!=Ga&&Gd.Bh||$a.sb(mj||Infinity);a.K&&!a.G&&(nj=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.G=a.i.isLowLatencyMode());a.G?$a.ai(a.K):a.K&&Ya("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
941
|
+
$a.Ig(db||1);return E(pc,u,2);case 2:return a.G&&(sa=0,oj=null!=Pa?Pa:a.g.defaultPresentationDelay,$a.Wg(oj)),a.l?E(pc,Iu(a,Gd.periods,!1),4):E(pc,a.m.Wf(dh,Ae.Kb),6);case 6:a.l={presentationTimeline:$a,variants:a.m.j,textStreams:a.m.sg(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:sa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Ju(b),nextUrl:Ku(b)};if(!$a.ri()){pc.B(7);break}eh=fh(b,"UTCTiming");return E(pc,Lu(a,T,eh),8);
|
|
942
|
+
case 8:Be=pc.h;if(!a.i)return pc.return();$a.bi(Be);case 7:$a.Te();case 4:a.i.makeTextStreamsForClosedCaptions(a.l),F(pc)}})}function Iu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.Wf(b,!0,c),2);a.l.variants=a.m.j;d=a.m.sg();0<d.length&&(a.l.textStreams=d);a.l.imageStreams=a.m.i;a.i.filter(a.l);F(e)})}
|
|
943
|
+
function Fu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H;return O(function(G){if(1==G.g){c=b.attributes.mpdId;d=mh(b,"originalPublishTime",ph);if(!c||c!==a.j.Ye||d!==a.j.ge)throw a.F=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(ch(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ah(l.attributes.sel||""),n=m[m.length-1],p=hh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.ec){r=hh(l)||"";var N=qh(r);if(null!=N){a.j.Yb=N;for(var L=t(a.o.values()),M=L.next();!M.done;M=L.next())M.value.Yb=
|
|
944
|
+
N}}else if("type"===n.ec){a.l.presentationTimeline.Mc("static"==p);a.j.type=p;N=t(a.o.values());for(L=N.next();!L.done;L=N.next())L.value.Kb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.ec?a.j.ge=ph(p)||0:null===n.ec&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Bh(a.F,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id)for(N=n.id,L=t(a.o.keys()),M=L.next();!M.done;M=L.next())if(M=M.value,M.startsWith(N)){var Q=a.o.get(M);Rs(Q,
|
|
945
|
+
st,"SegmentTimeline").children=[];Mu(a,M);a.o.delete(M)}}else if("SegmentTemplate"===n.name){L=Ah(l.attributes.sel||"");N=L[L.length-1];if(N.ec){L=Nu(a,L);M=hh(l)||"";Q=t(L);for(var T=Q.next();!T.done;T=Q.next())T=a.o.get(T.value),Ch(T.M.mc,l.tagName,N.ec,M);N=L}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){N=Ah(l.attributes.sel||"");N=Nu(a,N);L=t(N);for(M=L.next();!M.done;M=L.next())M=a.o.get(M.value),M=Rs(M,st,"SegmentTimeline"),
|
|
946
|
+
Q=fh(M,"S"),Bh(Q,l),M.children=Q;z=N;C=t(z);for(w=C.next();!w.done;w=C.next())y=w.value,g.add(y)}B=t(g);for(w=B.next();!w.done;w=B.next())D=w.value,Mu(a,D);K=t(f);for(I=K.next();!I.done;I=K.next())J=I.value,e.push.apply(e,x(Hu(a,{Kb:"dynamic"==a.j.type,presentationTimeline:a.l.presentationTimeline,Ha:null,va:null,Ea:null,M:null,bandwidth:0,zg:!1,Ya:a.j.Ya,profiles:a.j.profiles,Yb:a.j.Yb},a.j.Ua,J).periods));return e.length?E(G,Iu(a,e,!0),2):G.B(2)}"static"==a.j.type&&(H=a.j.Yb,a.l.presentationTimeline.sb(H||
|
|
947
|
+
Infinity));F(G)})}function Nu(a,b){var c="",d="",e="";b=t(b);for(var f=b.next();!f.done;f=b.next())f=f.value,"Period"===f.name?c=f.id:"AdaptationSet"===f.name?d=f.id:"Representation"===f.name&&(e=f.id);b=[];if(e)b.push(c+","+e);else for(a=t(a.o.values()),e=a.next();!e.done;e=a.next())e=e.value,e.Ha.id===c&&e.Ea.id===d&&e.M.id&&b.push(c+","+e.M.id);return b}
|
|
948
|
+
function Mu(a,b){var c=a.o.get(b),d=a.u[b];d.segmentIndex&&d.segmentIndex.eb(a.l.presentationTimeline.Cb());try{var e=rt(c,function(f,g,h,k){return Ou(a,f,g,h,k)},a.u,!0,a.g.dash.initialSegmentLimit,a.N,c.M.aesKey,null,!0);d.createSegmentIndex=function(){var f;return O(function(g){if(1==g.g){if(d.segmentIndex)return g.B(0);f=d;return E(g,e.wc(),3)}f.segmentIndex=g.h;F(g)})}}catch(f){if(b=c.M.contentType,b!=Mc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
949
|
+
function Ju(a){var b=jh(a,"ServiceDescription");if(!b)return null;a=jh(b,"Latency");b=jh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
950
|
+
return c}function Ku(a){a=fh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
951
|
+
function Hu(a,b,c,d){var e=b.Yb;e||(e=mh(d,"mediaPresentationDuration",qh),a.j.Yb=e);var f=[],g=0;d=fh(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=mh(k,"start",qh,g),n=k.attributes.id,p=mh(k,"duration",qh),r=null;if(l){var u=mh(l,"start",qh);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.J&&null!==n&&null!==m&&m<a.J)||a.S.includes(n)||h+1==d.length){null!==m&&(null===a.J||m>a.J)&&(a.J=m);g=Pu(a,b,c,{start:m,duration:r,node:k,Zd:null==r||!l});f.push(g);b.Ha.id&&
|
|
952
952
|
r&&(a.N[b.Ha.id]=r);if(null==r){g=null;break}g=m+r}}a.S=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Bh:!1}:{periods:f,duration:g,Bh:!0}}
|
|
953
|
-
function
|
|
954
|
-
}d=c.filter(function(m){return!m.hh});c=c.filter(function(m){return m.hh});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.hh.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={xe:h.xe},l=k.next())h.xe=l.value,h.xe.trickModeVideo=e.streams.find(function(m){return function(n){return
|
|
955
|
-
d,Mc);d=
|
|
956
|
-
function
|
|
953
|
+
function Pu(a,b,c,d){b.Ha=Qu(a,d.node,null,c);b.va=d;b.Ha.Ya=b.Ya;b.Ha.id||(b.Ha.id="__shaka_period_"+d.start);var e=fh(d.node,"EventStream");c=b.presentationTimeline.Cb();e=t(e);for(var f=e.next();!f.done;f=e.next())Ru(a,d.start,d.duration,f.value,c);c=fh(d.node,"AdaptationSet").map(function(m){return Su(a,b,m)}).filter(Re);if(b.Kb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.fk);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);
|
|
954
|
+
}d=c.filter(function(m){return!m.hh});c=c.filter(function(m){return m.hh});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.hh.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={xe:h.xe},l=k.next())h.xe=l.value,h.xe.trickModeVideo=e.streams.find(function(m){return function(n){return ve(m.xe.codecs)==ve(n.codecs)}}(h))}}}c=Tu(a.g.disableAudio,d,"audio");e=Tu(a.g.disableVideo,d,"video");f=Tu(a.g.disableText,
|
|
955
|
+
d,Mc);d=Tu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.Ha.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Tu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
956
|
+
function Su(a,b,c){function d(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function e(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ea=Qu(a,c,b.Ha,null);var f=!1,g=fh(c,"Role"),h=g.map(function(G){return G.attributes.value}).filter(Re),k=void 0,l=b.Ea.contentType==Mc;l&&(k="subtitle");g=t(g);for(var m=g.next();!m.done;m=g.next()){m=m.value;var n=m.attributes.schemeIdUri;if(null==
|
|
957
957
|
n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":f=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=fh(c,"EssentialProperty");g=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?g=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=d(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=
|
|
958
958
|
w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=fh(c,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=e(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(r=d(parseInt(v.attributes.value,10)));n=fh(c,"Accessibility");var z=new Map,C;n=t(n);for(v=
|
|
959
959
|
n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var y=t(w),B=y.next();!B.done;B=y.next()){var D=B.value,K=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],K=D[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,K=D);z.set(B,Sc(K))}}else z.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),B=w.next();!B.done;B=w.next())B=B.value,
|
|
960
|
-
D=y=void 0,B.includes("=")?(B=B.split("="),y="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,D=B),z.set(y,Sc(D));else z.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(c,"ContentProtection");var I=
|
|
961
|
-
fh(c,"Label"))&&m.length&&(m=gh(m[0]))&&(H=m);m=fh(c,"Representation");c=m.map(function(G){if(G=
|
|
960
|
+
D=y=void 0,B.includes("=")?(B=B.split("="),y="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(y="svc"+v,v++,D=B),z.set(y,Sc(D));else z.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(c,"ContentProtection");var I=Ds(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Sc(b.Ea.language||"und"),H=c.attributes.label;(m=
|
|
961
|
+
fh(c,"Label"))&&m.length&&(m=gh(m[0]))&&(H=m);m=fh(c,"Representation");c=m.map(function(G){if(G=Uu(a,b,I,k,J,H,f,h,z,G,C,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||r,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==c.length){g="image"==b.Ea.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||g)return null;throw new U(2,4,4003);}if(!b.Ea.contentType||"application"==b.Ea.contentType)for(b.Ea.contentType=Vu(c[0].mimeType,c[0].codecs),l=t(c),v=l.next();!v.done;v=l.next())v.value.type=
|
|
962
962
|
b.Ea.contentType;l=b.Ea.id||"__fake__"+a.R++;n=t(c);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(I.drmInfos);for(y=w.next();!y.done;y=w.next())y=y.value,y.keyIds=y.keyIds&&v.keyIds?new Set([].concat(x(y.keyIds),x(v.keyIds))):y.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(G){return G.attributes.id}).filter(Re);return{id:l,contentType:b.Ea.contentType,language:J,Nl:f,streams:c,drmInfos:I.drmInfos,hh:g,fk:m}}
|
|
963
|
-
function
|
|
964
|
-
16!=H.data.byteLength)throw new U(2,4,4049);G={name:"AES-CBC"};N=w;return E(L,window.crypto.subtle.importKey("raw",H.data,G,!0,["decrypt"]),3)}N.cryptoKey=L.h;w.fetchKey=void 0;F(L)})}}}b.M.aesKey=w;A=function(H,G,N,L){return
|
|
965
|
-
return Promise.resolve(H)}}}}catch(H){if((v||u)&&4002==H.code)return null;throw H;}n=fh(l,"ContentProtection");n=
|
|
966
|
-
"http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var I;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(I="PQ");v=b.M.id?b.Ha.id+","+b.M.id:"";a.F.length&&p&&a.o.set(b.Ha.id+","+p,
|
|
963
|
+
function Uu(a,b,c,d,e,f,g,h,k,l,m,n){b.M=Qu(a,l,b.Ea,null);var p=b.M.id;a.K=Math.min(a.K,b.M.Ya);if(!Wu(b.M))return null;var r=b.va.start;b.bandwidth=mh(l,"bandwidth",vh)||0;var u=b.M.contentType,v=u==Mc||"application"==u;u="image"==u;try{var w=void 0;if(c.Qf){var A=b.M.Ua,z=Gc(A(),[c.Qf.Lj]),C=vg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.Qf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,G,N;return O(function(L){if(1==L.g)return E(L,Du(a,C,6),2);if(3!=L.g){H=L.h;if(!H.data||
|
|
964
|
+
16!=H.data.byteLength)throw new U(2,4,4049);G={name:"AES-CBC"};N=w;return E(L,window.crypto.subtle.importKey("raw",H.data,G,!0,["decrypt"]),3)}N.cryptoKey=L.h;w.fetchKey=void 0;F(L)})}}}b.M.aesKey=w;A=function(H,G,N,L){return Ou(a,H,G,N,L)};if(b.M.od)var y=gt(b,A,w);else if(b.M.bc)y=mt(b,a.u,w);else if(b.M.mc)y=rt(b,A,a.u,!!a.l,a.g.dash.initialSegmentLimit,a.N,w,n,!1);else{var B=b.va.duration||0,D=b.M.Ua;y={wc:function(){var H=Zk(r,B,D());H.Yc(function(G){G.mimeType=b.M.mimeType;G.codecs=b.M.codecs});
|
|
965
|
+
return Promise.resolve(H)}}}}catch(H){if((v||u)&&4002==H.code)return null;throw H;}n=fh(l,"ContentProtection");n=Hs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;fh(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.attributes.schemeIdUri&&"JOC"==H.attributes.value})&&(A=!0);z=!1;v&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=fh(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile",
|
|
966
|
+
"http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var I;l=b.M.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(I="PQ");v=b.M.id?b.Ha.id+","+b.M.id:"";a.F.length&&p&&a.o.set(b.Ha.id+","+p,Xu(b));var J=v&&a.u[v]?a.u[v]:{id:a.R++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){J.segmentIndex&&
|
|
967
967
|
(J.segmentIndex.release(),J.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:l,frameRate:b.M.frameRate,pixelAspectRatio:b.M.pixelAspectRatio,bandwidth:b.bandwidth,width:b.M.width,height:b.M.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.Ea.language,label:f,type:b.Ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.M.jd,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:A,
|
|
968
968
|
closedCaptions:k,hdr:I,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([oe(b.M.mimeType,b.M.codecs)])};J.createSegmentIndex=function(){var H;return O(function(G){if(1==G.g){if(J.segmentIndex)return G.B(0);H=J;return E(G,y.wc(),3)}H.segmentIndex=G.h;F(G)})};v&&b.Kb&&!a.u[v]&&(a.u[v]=J);return J}
|
|
969
|
-
function
|
|
970
|
-
b[d]={start:e.start,duration:e.duration,node:null,Zd:e.Zd}):b[d]=a[d];return b}function
|
|
971
|
-
function
|
|
972
|
-
function
|
|
973
|
-
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=
|
|
974
|
-
xh)||0:0;z=c.Ya+y+z+C;C=null;(y=jh(b,"SegmentSequenceProperties"))&&(y=jh(y,"SAP"))&&(C=mh(y,"cadence",uh));return{Ua:function(){return Gc(d(),f.length?a.h&&h?
|
|
975
|
-
function
|
|
976
|
-
function
|
|
977
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function
|
|
978
|
-
function
|
|
979
|
-
function
|
|
980
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ya("NTP UTCTiming scheme is not supported");break;default:Ya("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return E(n
|
|
969
|
+
function Xu(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={od:null,bc:null,mc:e.mc,Ua:e.Ua,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,jd:e.jd,audioSamplingRate:e.audioSamplingRate,Ya:e.Ya,dd:e.dd}}else"periodInfo"==d?(e=a[d],
|
|
970
|
+
b[d]={start:e.start,duration:e.duration,node:null,Zd:e.Zd}):b[d]=a[d];return b}function zu(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,ta(d,2),E(d,Au(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Bu(a,b);F(d)}})}
|
|
971
|
+
function Bu(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.I.V(Math.max(c-b,hd(a.O)))}}
|
|
972
|
+
function Qu(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,jd:null,audioSamplingRate:null,Ya:0,Sg:0};d=d||c.Ua;var e=b.attributes.id,f=fh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=hh(m);l&&m&&(Lt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(hh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=nh(b,
|
|
973
|
+
"urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Et(m).join(",");n=mh(b,"frameRate",zh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Yu(fh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=fh(b,"AudioChannelConfiguration");u=Zu(u)||c.jd;var v=mh(b,"audioSamplingRate",wh)||c.audioSamplingRate;k||(k=Vu(l,m));var w=jh(b,"SegmentBase"),A=jh(b,"SegmentTemplate"),z=w?mh(w,"availabilityTimeOffset",xh)||0:0,C=A?mh(A,"availabilityTimeOffset",xh)||0:0,y=f&&f.length?mh(f[0],"availabilityTimeOffset",
|
|
974
|
+
xh)||0:0;z=c.Ya+y+z+C;C=null;(y=jh(b,"SegmentSequenceProperties"))&&(y=jh(y,"SAP"))&&(C=mh(y,"cadence",uh));return{Ua:function(){return Gc(d(),f.length?a.h&&h?Mt(a.h,e):g?g:[]:[])},od:w||c.od,bc:jh(b,"SegmentList")||c.bc,mc:A||c.mc,width:mh(b,"width",wh)||c.width,height:mh(b,"height",wh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,jd:u,audioSamplingRate:v,Ya:z,dd:null,Sg:C||c.Sg}}
|
|
975
|
+
function Yu(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
976
|
+
function Zu(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
977
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Wu(a){var b=a.od?1:0;b+=a.bc?1:0;b+=a.mc?1:0;if(0==b)return a.contentType==Mc||"application"==a.contentType?!0:!1;1!=b&&(a.od&&(a.bc=null),a.mc=null);return!0}
|
|
978
|
+
function $u(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[yc(c)],f=Gc(b(),e),g=vg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),pg(a.L,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=rc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
979
|
+
function Lu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);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":return n.B(8);
|
|
980
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ya("NTP UTCTiming scheme is not supported");break;default:Ya("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return E(n,$u(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,$u(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
|
|
981
981
|
3);break;case 5:wa(n);case 3:g=f.next();n.B(2);break;case 4:return Ya("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
982
|
-
function
|
|
983
|
-
function
|
|
984
|
-
function
|
|
985
|
-
function
|
|
986
|
-
function
|
|
987
|
-
function
|
|
988
|
-
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=
|
|
989
|
-
g.name&&(g.attributes.push(new
|
|
990
|
-
var
|
|
991
|
-
function
|
|
992
|
-
new Map;this.ya=new Map;this.na=new Map;this.Za=this.G=!1;this.Xa=new gd(5);this.j=null;this.ea=!0}q=
|
|
982
|
+
function Ru(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=mh(d,"timescale",wh)||1;d=t(fh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=mh(k,"presentationTime",wh)||0,m=mh(k,"duration",wh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:Dh(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
|
|
983
|
+
function Ou(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=Bg,g=e?0:1,h=Bl(b,c,d,a.g.retryParameters),E(l,Du(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Vu(a,b){b=oe(a,b);return Ie(b)?Mc:a.split("/")[0]}function Du(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);pg(a.L,b);return b.promise}
|
|
984
|
+
function Cu(a){var b=a.j.ge;if(!a.j.Ye||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=wh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(Re);return d.length?Gc(a.A,d):[]}P("shaka.dash.DashParser",yu);Ai["application/dash+xml"]=function(){return new yu};Ai["video/vnd.mpeg.dash.mpd"]=function(){return new yu};function av(){}P("shaka.dependencies",av);av.has=function(a){return bv.has(a)};av.add=function(a,b){if(!cv[a])throw Error(a+" is not supported");a==dv?sd("mux.js","mux.js is no longer used in Shaka Player."):bv.set(a,function(){return b})};var dv="muxjs",cv={Ol:dv,ISOBoxer:"ISOBoxer"};av.Allowed=cv;var bv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function ev(a,b,c){this.type=a;this.g=b;this.segments=c||null}function fv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}fv.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
985
|
+
function gv(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function hv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Y(a,b,c){return(a=hv(a,b))?a.value:c||null}function iv(a,b){a=hv(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function jv(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.Qb=c}function kv(a,b){this.name=a;this.value=b};function lv(a,b){return a.filter(function(c){return c.name==b})}function mv(a,b){return a.filter(function(c){return iv(c,"TYPE")==b})}function nv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function ov(a,b,c){c=void 0===c?0:c;return(a=nv(a,b))?Number(a.value):c}function pv(a,b,c){return b?qv(a,[b],c):[]}
|
|
986
|
+
function qv(a,b,c){if(!b.length)return[];b=Gc(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new U(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function rv(){this.g=0}
|
|
987
|
+
function sv(a,b){b=rc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=tv(a,f),--a.g,uv.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=tv(a,g);if(vv.includes(g.name)){if(1!=b)throw new U(2,4,4017);g=
|
|
988
|
+
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=tv(a,k),uv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Y(k,"TYPE")?f.push(k):"MAP"==Y(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new jv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new jv("",d,f)));return new ev(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
989
|
+
g.name&&(g.attributes.push(new kv("URI",h)),d=!0)}}return new ev(b,e)}function tv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Jp(d);var f;(f=Lp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Lp(d,g);)c.push(new kv(f[1],f[2]||f[3])),Kp(d)}return new fv(a,b,c,e)}
|
|
990
|
+
var uv="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),vv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function wv(){}function xv(a){try{var b=yv(a);return kg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ig(c)}}
|
|
991
|
+
function yv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Cc(a):e=vc(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",wv);wv.parse=xv;rg("data",xv);function zv(){var a=this;this.g=this.h=null;this.F=1;this.u=new Map;this.J=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Mc,new Map);this.O.set("image",new Map);this.Sa=new Set;this.i=new Map;this.l=null;this.N="";this.Ma=new rv;this.K=-1;this.$=Infinity;this.Z=this.ib=!1;this.A=new Qb(function(){Av(a)});this.oa=Bv;this.o=null;this.Ta=0;this.m=Infinity;this.Ja=this.ra=this.R=0;this.S=new og;this.H=new Map;this.I=new Map;this.aa=new Map;this.ha=new Map;this.L=
|
|
992
|
+
new Map;this.ya=new Map;this.na=new Map;this.Za=this.G=!1;this.Xa=new gd(5);this.j=null;this.ea=!0}q=zv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.G=b.isLowLatencyMode(),E(e,Cv(c,[a]),2)):3!=e.g?(d=e.h,c.N=d.uri,E(e,Dv(c,d.data,a),3)):e.return(c.o)})};
|
|
993
993
|
q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.S&&(a.push(this.S.destroy()),this.S=null);this.g=this.h=null;this.Sa.clear();this.o=null;this.i.clear();this.J.clear();this.I.clear();this.u.clear();this.aa.clear();this.ha.clear();this.L.clear();this.ya.clear();this.na.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
994
|
-
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!
|
|
995
|
-
h&&
|
|
996
|
-
function
|
|
997
|
-
b.P().includes(m)||b.Xh.push(m);n=
|
|
998
|
-
0,J=
|
|
999
|
-
function
|
|
994
|
+
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!Ev(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Fv(a,g));return E(m,Promise.all(b),2)}Gv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Td});d.length&&!h&&(k=Hv,Iv(a,k.Bi),l=d.map(function(n){return n.Xb}),a.l.sb(Math.min.apply(Math,x(l))),a.h.updateDuration());
|
|
995
|
+
h&&Jv(a);F(m)})};function Kv(a,b){return Ev(a)?a.O.get(b.type):b.Ve}
|
|
996
|
+
function Fv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q;return O(function(T){if(1==T.g){c=[];d=t(b.P());for(e=d.next();!e.done;e=d.next())f=e.value,g=new mb(f),h=g.g,b.Ce&&(0<=b.Fb&&h.add("_HLS_msn",String(b.Fb)),0<=b.Gb&&h.add("_HLS_part",String(b.Gb))),b.De&&h.add("_HLS_skip","YES"),Cb(h)&&qb(g,h),c.push(g.toString());return E(T,Cv(a,c,!0),2)}if(3!=T.g){k=T.h;if(!b.stream.segmentIndex)return T.return();l=sv(a.Ma,k.data);if(1!=l.type)throw new U(2,4,4017);m=k.uri;m==k.originalUri||
|
|
997
|
+
b.P().includes(m)||b.Xh.push(m);n=lv(l.g,"EXT-X-DEFINE");p=Lv(a,n,m);r=b.stream;u=Kv(a,b);return E(T,Mv(a,l,r.mimeType,b.P,p),3)}v=T.h;w=v.keyIds;A=v.drmInfos;z=function(R,ra){return R.size===ra.size&&[].concat(x(R)).every(function(sa){return ra.has(sa)})};z(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));C=Nv(a,l,u,p,b.P,b.type);y=C.segments;if(B=C.bandwidth)r.bandwidth=B;r.segmentIndex.ae(y,a.l.Cb());y.length&&(D=ov(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(K=nv(l.g,"EXT-X-SKIP"))?Number(Y(K,"SKIPPED-SEGMENTS")):
|
|
998
|
+
0,J=Ov(D,y),H=J.Fb,G=J.Gb,b.Fb=H+I,b.Gb=G,N=u.get(D),r.segmentIndex.eb(N));L=r.segmentIndex.g[0]||null;b.Ic=L.startTime;M=y[y.length-1];b.Xb=M.endTime;if(Q=nv(l.g,"EXT-X-ENDLIST"))b.Td=!0;Pv(a,l);F(T)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
999
|
+
function Qv(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Kv(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.Zf=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,Rv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.K-c.Zf,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),Sv(a,
|
|
1000
1000
|
c,d)}
|
|
1001
|
-
function
|
|
1002
|
-
function
|
|
1003
|
-
function
|
|
1004
|
-
u=
|
|
1005
|
-
|
|
1001
|
+
function Tv(a,b){if(Infinity==a.$){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.$=Math.min(a.$,d.h))}}b=a.$;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!Rv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.P(),"Expect AV sync issues!");else for(Sv(a,c,f.h-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.eh(b)}}}
|
|
1002
|
+
function Sv(a,b,c){b.Ic+=c;b.Xb+=c;a=Kv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.P()}
|
|
1003
|
+
function Dv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa,Ia,Pa,Ja,db;return O(function(Ga){switch(Ga.g){case 1:d=sv(a.Ma,b);e=lv(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Bk(null,0);a.l.Mc(!0);k=function(){return[c]};if(1==d.type)return a.ea=!1,w=lv(d.g,"EXT-X-DEFINE"),A=Lv(a,w,a.N),E(Ga,Uv(a,d,k,A),7);Vv(a,e);l=lv(d.g,"EXT-X-MEDIA");m=lv(d.g,"EXT-X-STREAM-INF");n=lv(d.g,"EXT-X-IMAGE-STREAM-INF");p=lv(d.g,"EXT-X-I-FRAME-STREAM-INF");r=lv(d.g,"EXT-X-SESSION-KEY");
|
|
1004
|
+
u=lv(d.g,"EXT-X-SESSION-DATA");v=lv(d.g,"EXT-X-CONTENT-STEERING");Wv(a,u);return E(Ga,Xv(a,v),4);case 4:return Yv(a,m),Zv(a,l),E(Ga,$v(a,m,r,l,k,a.u),5);case 5:return f=Ga.h,g=aw(a,l),E(Ga,bw(a,n,p),6);case 6:h=Ga.h;Ga.B(3);break;case 7:return z=Ga.h,C=z.type,y=z.mimeType,B=z.codecs,D=z.language,K=z.height,I=z.width,J=z.channelCount,H=z.sampleRate,G=z.closedCaptions,N=z.oe,L=z.colorGamut,E(Ga,cw(a,a.F++,A,d,k,B,C,D,!0,"Media Playlist",J,G,null,!1,H,!1,y),8);case 8:M=Ga.h,a.i.set(c,M),"video"==C&&
|
|
1005
|
+
dw(M.stream,I,K,null,N,null,L),f.push({id:0,language:Sc(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?M.stream:null,video:"video"==C?M.stream:null,bandwidth:M.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);1==d.type&&(Ev(a)&&(ew(a,d),Q=a.m,a.A.V(Q)),T=Array.from(a.i.values()),fw(a,T),Jv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
|
|
1006
1006
|
ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.Z||!a.g.hls.disableCodecGuessing){Ga.B(9);break}R=[];ra=t(a.o.variants);for(sa=ra.next();!sa.done;sa=ra.next())Ca=sa.value,Ca.audio&&""===Ca.audio.codecs&&R.push(Ca.audio.createSegmentIndex()),Ca.video&&""===Ca.video.codecs&&R.push(Ca.video.createSegmentIndex());return E(Ga,Promise.all(R),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Fa=
|
|
1007
1007
|
[];Ia=f[0];Pa=t([Ia.video,Ia.audio]);for(Ja=Pa.next();!Ja.done;Ja=Pa.next())(db=Ja.value)&&!db.segmentIndex&&Fa.push(db.createSegmentIndex());if(0<Fa.length)return E(Ga,Promise.all(Fa),0)}Ga.B(0)}})}
|
|
1008
|
-
function
|
|
1009
|
-
t(
|
|
1008
|
+
function Uv(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I;return O(function(J){switch(J.g){case 1:e=Ct(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=pv(c(),f.h,d);h=g[0];k=new mb(h);l=k.ob.split(".").pop();if(m=gw[l])return J.return(Ct(m));n=Bg;p=null;r=hw(a,b,f.g,c,d);a.aa.clear();if(!r){J.B(2);break}u=Bl(r.P(),r.Ob(),r.Mb(),a.g.retryParameters);return E(J,iw(a,u,n,{type:0}),3);case 3:v=J.h,p=v.data;case 2:w=0;A=null;if(z=nv(f.g,"EXT-X-BYTERANGE"))C=
|
|
1009
|
+
t(jw(null,z.value)),w=C.next().value,A=C.next().value;y=Bl(g,w,A,a.g.retryParameters);return E(J,iw(a,y,n,{type:1}),4);case 4:B=J.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var H=B.data;var G=Gb(H);G=(new vj).parse(G);var N=G.Od();G=G.vg();var L=[],M=!1,Q=!1;switch(N.audio){case "aac":case "aac-loas":L.push("mp4a.40.2");M=!0;break;case "mp3":L.push("mp4a.40.34");M=!0;break;case "ac3":L.push("ac-3");M=!0;break;case "ec3":L.push("ec-3");M=!0;break;
|
|
1010
1010
|
case "opus":L.push("opus"),M=!0}switch(N.video){case "avc":G.cb?L.push(G.cb):L.push("avc1.42E01E");Q=!0;break;case "hvc":G.cb?L.push(G.cb):L.push("hvc1.1.6.L93.90");Q=!0;break;case "av1":L.push("av01.0.01M.08"),Q=!0}if(L.length){N=M&&!Q;M=new Map;if(Q){Q=new zd("video/mp2t");Q.i(H);H=t(Q.j());for(var T=H.next();!T.done;T=H.next())T=T.value,M.set(T,T);Q.g()}G={type:N?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:G.height,width:G.width,channelCount:null,sampleRate:null,
|
|
1011
|
-
closedCaptions:M,oe:null,colorGamut:null}}else G=null;if(K=G)return J.return(K)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(I=
|
|
1012
|
-
function
|
|
1013
|
-
c.h&&a.l.di(c.h);a.l.Te()}function
|
|
1014
|
-
function
|
|
1015
|
-
function
|
|
1016
|
-
function
|
|
1017
|
-
function
|
|
1018
|
-
function
|
|
1019
|
-
function
|
|
1020
|
-
function
|
|
1021
|
-
p=Y(g,"CHARACTERISTICS"),r=
|
|
1022
|
-
function
|
|
1023
|
-
function
|
|
1024
|
-
z(m,""):null;db.B(6);break}return E(db,
|
|
1025
|
-
Fa=Y(M,"VIDEO-RANGE"),(Ia=Y(M,"REQ-VIDEO-LAYOUT"))&&Ia.includes(",")&&(Pa=Ia.split(",").filter(function(Ga){return"CH-STEREO"==Ga||"CH-MONO"==Ga}),Ia=Pa[0]),Ia=Ia||"CH-MONO",Ja=
|
|
1026
|
-
function
|
|
1027
|
-
"URI")});k=e.audio.find(function(w){return w&&w.P().find(function(A){return u.includes(A)})});h=
|
|
1028
|
-
p=Y(c,"NAME"),r=
|
|
1029
|
-
function
|
|
1030
|
-
function
|
|
1031
|
-
function
|
|
1011
|
+
closedCaptions:M,oe:null,colorGamut:null}}else G=null;if(K=G)return J.return(K)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(I=Dt(p,B.data))return J.return(I);return J.return(e)}})}
|
|
1012
|
+
function Jv(a){if(Ev(a)){if(a.oa==kw){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Xb),c=Math.min(c,e.Ic));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.u);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.mf(b)}}else a.l.sb(lw(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
1013
|
+
c.h&&a.l.di(c.h);a.l.Te()}function Vv(a,b){var c=(new mb(a.N)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"QUERYPARAM");d&&f&&(a.u.has(d)||a.u.set(d,f));e&&(d=c.get(e)[0])&&!a.u.has(d)&&a.u.set(e,d)}}
|
|
1014
|
+
function Lv(a,b,c){c=(new mb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Y(f,"NAME"),h=Y(f,"VALUE");e=Y(f,"QUERYPARAM");f=Y(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.u.get(f))&&d.set(f,e)}return d}
|
|
1015
|
+
function Yv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"AUDIO");c=Y(d,"VIDEO");var f=Y(d,"SUBTITLES");d=mw(a,d);if(f){var g=Kc(Mc,d);a.I.set(f,g);Dd(d,g)}e&&(f=Kc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=Kc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
1016
|
+
function Wv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"DATA-ID");c=Y(d,"URI");var f=Y(d,"LANGUAGE");d=Y(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",pv([a.N],c,a.u)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new S("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1017
|
+
function Xv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Y(f,"PATHWAY-ID"),h=Y(f,"SERVER-URI"),g&&h){a.j=new Ht(a.h);a.j.configure(a.g);a.j.i=[a.N];a.j.setManifestType("HLS");a.j.h=g;c=It(a.j,h);break}return E(k,c,0)})}
|
|
1018
|
+
function aw(a,b){var c=mv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return nw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=iv(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=ow(Mc,d)||pw(Mc),qw(f.stream)}}return b.filter(function(g){return g})}
|
|
1019
|
+
function qw(a){a.fullMimeTypes=new Set([oe(a.mimeType,a.codecs)])}
|
|
1020
|
+
function bw(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return E(m,rw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=iv(g,"URI"),k=Y(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Y(g,"LANGUAGE"),n=Y(g,"NAME"),
|
|
1021
|
+
p=Y(g,"CHARACTERISTICS"),r=sw(a,a.F++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Y(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var z=Y(g,"BANDWIDTH");z&&(r.stream.bandwidth=Number(z));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
1022
|
+
function tw(a,b,c){b=b.filter(function(h){var k=Y(h,"URI")||"";return"SUBTITLES"!=Y(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=gv(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)nw(a,d[g],c)}
|
|
1023
|
+
function $v(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa,Ia,Pa,Ja;return O(function(db){switch(db.g){case 1:g=[];h=new Set;if(!(0<c.length)){db.B(2);break}k=t(c);l=k.next();case 3:if(l.done){db.B(2);break}m=l.value;n=iv(m,"METHOD");p=Y(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){db.B(4);break}if(uw(n)){u=pv(e(),iv(m,"URI"),f);v=u.sort().join("");a.L.has(v)||(w=vg(u,a.g.retryParameters),A=iw(a,w,6),a.L.set(v,A));db.B(4);break}if("identity"!=p){r=(z=vw[p])?
|
|
1024
|
+
z(m,""):null;db.B(6);break}return E(db,ww(a,m,"",e,null,f),9);case 9:r=db.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),y=C.next();!y.done;y=C.next())B=y.value,h.add(B);g.push(r)}case 4:l=k.next();db.B(3);break;case 2:D={};K=t(b);for(I=K.next();!I.done;I=K.next())J=I.value,H=gv(J),D[H]?D[H].push(J):D[H]=[J];G=[];for(N in D)L=D[N],M=L[0],Q=Y(M,"FRAME-RATE"),T=Number(Y(M,"AVERAGE-BANDWIDTH"))||Number(iv(M,"BANDWIDTH")),R=Y(M,"RESOLUTION"),ra=t(R?R.split("x"):[null,null]),sa=ra.next().value,Ca=ra.next().value,
|
|
1025
|
+
Fa=Y(M,"VIDEO-RANGE"),(Ia=Y(M,"REQ-VIDEO-LAYOUT"))&&Ia.includes(",")&&(Pa=Ia.split(",").filter(function(Ga){return"CH-STEREO"==Ga||"CH-MONO"==Ga}),Ia=Pa[0]),Ia=Ia||"CH-MONO",Ja=xw(a,L,d,T),G.push.apply(G,x(yw(a,Ja.audio,Ja.video,T,sa,Ca,Q,Fa,Ia,g,h)));return db.return(G.filter(function(Ga){return null!=Ga}))}})}
|
|
1026
|
+
function xw(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=t(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Y(n,"AUDIO");var p=Y(n,"VIDEO"),r=m||p;r&&(g.includes(r)||g.push(r),(n=Y(n,"PATHWAY-ID"))&&f.set(r,n),m?h=!0:p&&(k=!0))}g.length&&c.length&&(l=c.filter(function(w){return g.includes(iv(w,"GROUP-ID"))}),tw(a,l,f));l=(f=g.sort().join(","))&&a.J.has(f)?a.J.get(f):[];h?e.audio.push.apply(e.audio,x(l)):k&&e.video.push.apply(e.video,x(l));m=!1;var u=b.map(function(w){return iv(w,
|
|
1027
|
+
"URI")});k=e.audio.find(function(w){return w&&w.P().find(function(A){return u.includes(A)})});h=mw(a,b[0]);p=Kc("video",h);(r=Kc("audio",h))&&!p?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&r&&p?(k="video",h=[[p,r].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var v=n=r=p=m=null;!l.length&&(c=c.find(function(w){var A=Y(w,"URI")||"",z=Y(w,"TYPE");w=iv(w,"GROUP-ID");return"SUBTITLES"!=z&&""==A&&g.includes(w)}))&&(m=Y(c,"LANGUAGE"),
|
|
1028
|
+
p=Y(c,"NAME"),r=zw(c),Aw(c),n=Y(c,"CHARACTERISTICS"),v=Bw(c));a=Cw(a,b,h,k,m,p,r,n,v);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
1029
|
+
function mw(a,b){var c=Y(b,"CODECS")||"";b=Y(b,"SUPPLEMENTAL-CODECS");a.Z=0<c.length;a.Z||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return Et(a)}function zw(a){return(a=Y(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
1030
|
+
function Bw(a){return(a=Y(a,"SAMPLE-RATE"))?parseInt(a,10):null}function Aw(a){return(a=Y(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
1031
|
+
function yw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())dw(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;r=r?r.P().sort().join(","):"";var u=f?f.P().sort().join(","):
|
|
1032
1032
|
"";r=r+" - "+u;h&&k&&!oi(n,p)||a.Sa.has(r)||(h={id:a.F++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Sa.add(r))}return e}
|
|
1033
|
-
function
|
|
1034
|
-
function
|
|
1035
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&
|
|
1036
|
-
function
|
|
1033
|
+
function Zv(a,b){b=mv(b,"CLOSED-CAPTIONS");a.ea=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Y(d,"LANGUAGE");c=Sc(e||"und");e||(e=Y(d,"NAME"))&&(c=e);e=iv(d,"GROUP-ID");d=iv(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
|
|
1034
|
+
function nw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=iv(k,"URI");k=iv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=iv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Mc);if(k==Mc)b=Y(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.I.has(l)){b=a.I.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.F++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
|
|
1035
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&Lt(a.j,l,m,n)}}c=Y(h,"LANGUAGE");f=Y(h,"NAME");m="YES"==Y(h,"DEFAULT");n="audio"==k?zw(h):null;var p="audio"==k?Aw(h):!1,r=Y(h,"CHARACTERISTICS"),u="YES"==Y(h,"FORCED");h="audio"==k?Bw(h):null;d=sw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.J.has(g)?a.J.get(g).push(d):a.J.set(g,[d]);a.i.set(e,d);return d}
|
|
1036
|
+
function rw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=iv(b,"URI");d=Y(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=sw(a,a.F++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Y(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1037
1037
|
Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
|
|
1038
|
-
function
|
|
1039
|
-
function
|
|
1040
|
-
break}if(Q=0<H.segments.length)T=H.segments[0],
|
|
1041
|
-
z.Fb=sa.Fb;z.Gb=sa.Gb;z.Fg=!0;w.segmentIndex=Ca.segmentIndex;w.encrypted=Ca.encrypted;w.drmInfos=Ca.drmInfos;w.keyIds=Ca.keyIds;w.mimeType=Ca.mimeType;w.bandwidth=w.bandwidth||Ca.bandwidth;w.codecs=w.codecs||Ca.codecs;w.closedCaptions=w.closedCaptions||Ca.closedCaptions;
|
|
1042
|
-
|
|
1043
|
-
function(){if(C)return C;y=new AbortController;return C=new Promise(function(B){B(u(y.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&y.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return z}function
|
|
1044
|
-
function
|
|
1045
|
-
function
|
|
1046
|
-
function
|
|
1047
|
-
D=B.drmInfos;K=B.keyIds;I=B.encrypted;J=B.Fi;if(I&&!D.length&&!J)throw new U(2,4,4026);H=
|
|
1048
|
-
Xb:L,De:T,Ce:R,Td:!1,Zf:-1,Fb:Ca,Gb:Fa,Ve:A,Fg:!1})}})}function
|
|
1049
|
-
function
|
|
1038
|
+
function Cw(a,b,c,d,e,f,g,h,k){for(var l=a.F++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=iv(r,"URI");r=Y(r,"PATHWAY-ID");a.j&&r&&Lt(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Y(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.H.get(b);break a}a.ea=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}b=null}c=Jc(d,c);d=sw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
1039
|
+
function sw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa,Ia,Pa,Ja,db,Ga,$a;return O(function(xb){switch(xb.g){case 1:return D=Oc,K=z.P(),E(xb,Cv(a,z.P(),!0),2);case 2:I=xb.h;if(B.aborted)return xb.return();J=I.uri;J==I.originalUri||K.includes(J)||A.push(J);H=sv(a.Ma,I.data);if(1!=H.type)throw new U(2,4,4017);G=lv(H.g,"EXT-X-DEFINE");N=Lv(a,G,J);L=void 0;M=!1;if(!(!a.Z&&a.g.hls.disableCodecGuessing||a.ea&&e==D.ua&&!a.g.hls.disableClosedCaptionsDetection)){xb.B(3);
|
|
1040
|
+
break}if(Q=0<H.segments.length)T=H.segments[0],nv(T.g,"EXT-X-GAP")&&(Q=!1);if(!Q){xb.B(3);break}a.ea=!1;return E(xb,Uv(a,H,v,N),5);case 5:R=xb.h,!R.closedCaptions.size||l&&l.size==R.closedCaptions.size||(l=R.closedCaptions,M=!0),!a.Z&&a.g.hls.disableCodecGuessing&&(L=R.mimeType,d=R.codecs);case 3:return ra=Ev(a),E(xb,cw(a,0,N,H,v,d,e,f,g,h,k,l,m,n,p,r,L),6);case 6:sa=xb.h;if(B.aborted)return xb.return();Ca=sa.stream;Ev(a)&&!ra&&ew(a,H);z.Ic=sa.Ic;z.Xb=sa.Xb;z.De=sa.De;z.Ce=sa.Ce;z.Td=sa.Td;z.Ve=sa.Ve;
|
|
1041
|
+
z.Fb=sa.Fb;z.Gb=sa.Gb;z.Fg=!0;w.segmentIndex=Ca.segmentIndex;w.encrypted=Ca.encrypted;w.drmInfos=Ca.drmInfos;w.keyIds=Ca.keyIds;w.mimeType=Ca.mimeType;w.bandwidth=w.bandwidth||Ca.bandwidth;w.codecs=w.codecs||Ca.codecs;w.closedCaptions=w.closedCaptions||Ca.closedCaptions;qw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&M&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ua||e==D.ba)for(Fa=t(a.i.values()),Ia=Fa.next();!Ia.done;Ia=Fa.next())Pa=Ia.value,Pa.Fg||Pa.type!=e||(Pa.stream.mimeType=Ca.mimeType,
|
|
1042
|
+
qw(Pa.stream));e==D.Da&&(Ja=Ca.segmentIndex.get(0))&&Ja.sa&&(w.mimeType="application/mp4",qw(w));Dw(a)&&(a.ib?fw(a,[z]):(a.ib=!0,db=Array.from(a.i.values()),Ga=db.filter(function(ad){return ad.stream.segmentIndex}),fw(a,Ga),Jv(a),$a=a.m,0<$a&&a.A.V($a)));F(xb)}})}function v(){return a.j&&1<c.length?Mt(a.j,b):A.concat(qv([a.N],c,a.u))}var w=Ew(a,d,e,f,g,h,k,l,m,n,p,r),A=[],z={stream:w,type:e,Xh:A,P:v,Ic:0,Xb:0,Ve:new Map,De:!1,Ce:!1,Td:!1,Zf:-1,Fb:-1,Gb:-1,Fg:!1},C=null,y=new AbortController;w.createSegmentIndex=
|
|
1043
|
+
function(){if(C)return C;y=new AbortController;return C=new Promise(function(B){B(u(y.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&y.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return z}function lw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Xb));return b}
|
|
1044
|
+
function Gv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Yc(function(e){c.push(e)});a.l.ce(c)}function fw(a,b){if(!Ev(a))for(var c=lw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Xc(0,c);Gv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Qv(a,b):(Tv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Qv(a,b))}
|
|
1045
|
+
function Rv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Dw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1046
|
+
function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w){var A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T,R,ra,sa,Ca,Fa;return O(function(Ia){switch(Ia.g){case 1:var Pa=nv(d.g,"EXT-X-PLAYLIST-TYPE"),Ja=nv(d.g,"EXT-X-ENDLIST");Ja=Pa&&"VOD"==Pa.value||Ja;Pa=Pa&&"EVENT"==Pa.value&&!Ja;Pa=!Ja&&!Pa;Ja?Iv(a,Bv):Pa?Iv(a,kw):Iv(a,Fw);Ev(a)&&Pv(a,d);A=Ev(a)?a.O.get(g):new Map;z=Nv(a,d,A,c,e,g);C=z.segments;y=z.bandwidth;if(w){Ia.B(2);break}return E(Ia,Gw(a,g,f,C),3);case 3:w=Ia.h;case 2:return E(Ia,Mv(a,d,w,e,c),4);case 4:B=Ia.h;
|
|
1047
|
+
D=B.drmInfos;K=B.keyIds;I=B.encrypted;J=B.Fi;if(I&&!D.length&&!J)throw new U(2,4,4026);H=Ew(a,f,g,h,k,l,m,n,p,r,u,v);H.encrypted=I;H.drmInfos=D;H.keyIds=K;H.mimeType=w;y&&(H.bandwidth=y);qw(H);Ev(a)&&Pv(a,d);G=C[0].startTime;N=C[C.length-1];L=N.endTime;M=new Xk(C);H.segmentIndex=M;T=(Q=nv(d.g,"EXT-X-SERVER-CONTROL"))?null!=hv(Q,"CAN-SKIP-UNTIL"):!1;R=Q?null!=hv(Q,"CAN-BLOCK-RELOAD"):!1;ra=ov(d.g,"EXT-X-MEDIA-SEQUENCE",0);sa=Ov(ra,C);Ca=sa.Fb;Fa=sa.Gb;return Ia.return({stream:H,type:g,Xh:[],P:e,Ic:G,
|
|
1048
|
+
Xb:L,De:T,Ce:R,Td:!1,Zf:-1,Fb:Ca,Gb:Fa,Ve:A,Fg:!1})}})}function Ov(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Fb:a,Gb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Fb:a,Gb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{Fb:a,Gb:c}}
|
|
1049
|
+
function Ew(a,b,c,d,e,f,g,h,k,l,m,n){var p=ow(c,b)||pw(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Mc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.F++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1050
1050
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==Mc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Sc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
1051
|
-
fullMimeTypes:new Set};
|
|
1052
|
-
function
|
|
1053
|
-
!0;G=Y(I,"KEYFORMAT")||"identity";N=null;if(
|
|
1054
|
-
function
|
|
1055
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u,v;return O(function(w){if(1==w.g)return l=
|
|
1051
|
+
fullMimeTypes:new Set};qw(a);return a}
|
|
1052
|
+
function Mv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M,Q,T;return O(function(R){switch(R.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=lv(k.g,"EXT-X-KEY"),m=null,l.length)for(m=hw(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];A=new Set;z=t(f);C=z.next();case 2:if(C.done){R.B(4);break}y=C.value;B=t(y);D=B.next().value;K=B.next().value;I=D;J=K;H=iv(I,"METHOD");if("NONE"==H){R.B(3);break}u=
|
|
1053
|
+
!0;G=Y(I,"KEYFORMAT")||"identity";N=null;if(uw(H)){v=!0;R.B(3);break}if("identity"!=G){N=(L=vw[G])?L(I,c):null;R.B(6);break}return E(R,ww(a,I,c,d,J,e),8);case 8:N=R.h;case 6:if(N){if(N.keyIds)for(M=t(N.keyIds),Q=M.next();!Q.done;Q=M.next())T=Q.value,A.add(T);w.push(N)}case 3:C=z.next();R.B(2);break;case 4:return R.return({drmInfos:w,keyIds:A,encrypted:u,Fi:v})}})}
|
|
1054
|
+
function Hw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ya("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=Y(b,"IV","");if(g){var h=Dc(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=ov(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ha.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(iv(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1055
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u,v;return O(function(w){if(1==w.g)return l=pv(d(),iv(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=vg(l,a.g.retryParameters),p=iw(a,n,6),a.L.set(m,p)),E(w,a.L.get(m),2);if(3!=w.g){r=w.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new U(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};v=k;return E(w,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}v.cryptoKey=w.h;k.fetchKey=void 0;
|
|
1056
1056
|
F(w)})};a.ha.set(c,k)}return a.ha.get(c)}
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1059
|
-
function
|
|
1060
|
-
function
|
|
1061
|
-
function
|
|
1062
|
-
if(!a.G)return null}var A=[];v=!1;var z=null,C=!1,y=!1;if(a.G&&d.Qb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=u,D={},K=0;K<d.Qb.length;D={Ed:D.Ed,ve:D.ve},K++){var I=d.Qb[K],J=0==K?c:A[A.length-1],H=0==K?e:J.endTime,G=Number(Y(I,"DURATION"))||a.R;if(G){var N=H+G,L=0,M=null;"EXT-X-PRELOAD-HINT"==I.name?(L=(L=Y(I,"BYTERANGE-START"))?Number(L):0,(J=Y(I,"BYTERANGE-LENGTH"))?M=L+Number(J)-1:L&&(M=Number.MAX_SAFE_INTEGER)):(L=Y(I,"BYTERANGE"),M=t(
|
|
1063
|
-
L=M.next().value,M=M.next().value);D.ve=Y(I,"URI");if(D.ve){J=Ii;"YES"==Y(I,"GAP")&&(J=2,C=!0);D.Ed=null;var Q=function(R){return function(){null==R.Ed&&(R.Ed=
|
|
1064
|
-
v&&(C||0!=A[0].Va?(v=!1,z=null):A=[]);(m=
|
|
1065
|
-
function
|
|
1066
|
-
function
|
|
1067
|
-
h=
|
|
1057
|
+
function Pv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=nv(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=nv(b.g,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=nv(b.g,"EXT-X-PART-INF"))a.R=Number(iv(e,"PART-TARGET"));b=nv(b.g,"EXT-X-SERVER-CONTROL");a.G&&a.R?(a.m=a.Za?5*a.R<=c?Math.min(a.R,a.m):Math.min(c,a.m):Math.min(a.R,a.m),a.Ja=b?Number(iv(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1058
|
+
hv(b,"HOLD-BACK"):null,a.ra=c?Number(c.value):0);a.Ta=Math.max(d,a.Ta)}function ew(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.Ja)b=a.Ja;else if(a.ra)b=a.ra;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Ta*c}a.l.gi(0);a.l.Wg(b);a.l.Mc(!1)}
|
|
1059
|
+
function hw(a,b,c,d,e){var f=nv(c,"EXT-X-MAP");if(!f)return null;var g=iv(f,"URI"),h=pv(d(),g,e);g=[h.toString(),Y(f,"BYTERANGE","")].join("-");if(!a.aa.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?uw(iv(m,"METHOD"))&&m.id<f.id&&(k=Hw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Iw(h,f,l,k);a.aa.set(g,b)}return a.aa.get(g)}
|
|
1060
|
+
function Iw(a,b,c,d){var e=0,f=null;b=Y(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Fi(function(){return a},e,f,null,null,null,d)}
|
|
1061
|
+
function Jw(a,b,c,d,e,f,g,h,k){var l=d.g,m=nv(l,"EXTINF"),n=0,p=0,r=null;d.Qb.length&&!a.G&&Ya("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=nv(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=ph(v.value))}var w=Ii;nv(l,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.Qb.length)throw new U(2,4,4024,"EXTINF");
|
|
1062
|
+
if(!a.G)return null}var A=[];v=!1;var z=null,C=!1,y=!1;if(a.G&&d.Qb.length){n=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var B=u,D={},K=0;K<d.Qb.length;D={Ed:D.Ed,ve:D.ve},K++){var I=d.Qb[K],J=0==K?c:A[A.length-1],H=0==K?e:J.endTime,G=Number(Y(I,"DURATION"))||a.R;if(G){var N=H+G,L=0,M=null;"EXT-X-PRELOAD-HINT"==I.name?(L=(L=Y(I,"BYTERANGE-START"))?Number(L):0,(J=Y(I,"BYTERANGE-LENGTH"))?M=L+Number(J)-1:L&&(M=Number.MAX_SAFE_INTEGER)):(L=Y(I,"BYTERANGE"),M=t(jw(J,L)),
|
|
1063
|
+
L=M.next().value,M=M.next().value);D.ve=Y(I,"URI");if(D.ve){J=Ii;"YES"==Y(I,"GAP")&&(J=2,C=!0);D.Ed=null;var Q=function(R){return function(){null==R.Ed&&(R.Ed=pv(h(),R.ve,f));return R.Ed}}(D);n&&0<=L&&null!=M&&(z=Q,v=!0);H=new Hi(H,N,Q,L,M,b,0,0,Infinity,[],"",null,B,J,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.Gg(),y=!0);"YES"!=Y(I,"INDEPENDENT")&&0<K&&H.Ue();A.push(H);B&&(B+=G)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(A.length)n=A[A.length-1].endTime;else return null;
|
|
1064
|
+
v&&(C||0!=A[0].Va?(v=!1,z=null):A=[]);(m=nv(l,"EXT-X-BYTERANGE"))?(r=t(jw(c,m.value)),p=r.next().value,r=r.next().value):A.length&&(p=A[0].Va,r=A[A.length-1].Aa);c="";m=null;"image"==g&&(c="1x1",g=nv(l,"EXT-X-TILES"))&&(c=iv(g,"LAYOUT"),(g=Y(g,"DURATION"))&&(m=Number(g)));var T=null;b=new Hi(e,n,function(){if(z)return z();null==T&&(T=pv(h(),d.h,f));return T||[]},p,r,b,0,0,Infinity,A,c,m,u,w,k,0<A.length&&!!d.h);v&&(a.Za=!0,b.Ph(),y&&b.Gg());return b}
|
|
1065
|
+
function jw(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Aa+1,d=c+b-1);return[c,d]}
|
|
1066
|
+
function Nv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=ov(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=ov(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=nv(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Ev(a)&&c.has(p)&&(r=c.get(p));0===r&&a.oa==kw&&0<c.size&&!c.has(p)&&(r=a.l.Cb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],z=0==w?r:v.endTime;p=l+n+w;nv(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var y=C.next();!y.done;y=C.next())y=y.value,"EXT-X-KEY"==y.name&&(uw(iv(y,"METHOD"))?
|
|
1067
|
+
h=Hw(a,y,b,e,d):h=void 0);c.set(p,z);C=hw(a,b,A.g,e,d);!a.G&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.G=a.h.isLowLatencyMode());if(z=Jw(a,C,v,A,z,d,f,e,h))(v=ov(A.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:z.endTime-z.startTime}):m.length&&(v=m.pop(),v.duration+=z.endTime-z.startTime,m.push(v)),v=z,z.j=k,Rv(a,f)&&null!=a.K&&p<a.K||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
|
|
1068
1068
|
b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={vd:c.vd,ud:c.ud,pe:c.pe,cc:c.cc,rd:c.rd},d++)if(c.cc=u[d],null==c.cc.h)for(c.ud=0,c.vd=d,e=function(B){return function(){var D=u[B.vd];if(D){if(null!=D.h)return D.h+B.ud;B.ud-=D.endTime-D.startTime;B.vd+=1}return null}}(c),c.rd=0,c.pe=d,g=function(B){return function(){var D=u[B.pe];if(D){D!=B.cc&&(B.rd+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.rd;--B.pe}return null}}(c);null==c.cc.h;)c.cc.h=g(),null==c.cc.h&&(c.cc.h=
|
|
1069
|
-
e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.$;if(m&&Infinity!=c&&!
|
|
1070
|
-
function
|
|
1071
|
-
function
|
|
1072
|
-
1001!=w.code){z.B(3);break}u.method="GET";return E(z,
|
|
1073
|
-
function
|
|
1074
|
-
function
|
|
1075
|
-
function
|
|
1076
|
-
3);case 3:r=B.h,l=Ec(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.na.has(e)){v=a.na.get(e);B.B(5);break}w=Bl(e.P(),e.Ob(),e.Mb(),a.g.retryParameters);A=Bg;return E(B,
|
|
1077
|
-
var
|
|
1078
|
-
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
1079
|
-
|
|
1080
|
-
Gb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Wg(a,b,new Set,0);return Hc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},
|
|
1081
|
-
function
|
|
1082
|
-
function
|
|
1083
|
-
2)),[0,0]));h=
|
|
1084
|
-
case "audio":g=
|
|
1085
|
-
255]));e=
|
|
1086
|
-
a.byteLength);b.set(
|
|
1087
|
-
function
|
|
1088
|
-
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=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].concat(x(
|
|
1089
|
-
a.encrypted&&(g=
|
|
1090
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=
|
|
1091
|
-
a.wa);else{c=
|
|
1092
|
-
a=
|
|
1093
|
-
function
|
|
1094
|
-
0,0,0,0,0,1,8]);f=
|
|
1095
|
-
function
|
|
1096
|
-
0;var p=Math.floor(m%(
|
|
1097
|
-
g,k);e.call(d,b,[f,
|
|
1098
|
-
function
|
|
1099
|
-
var
|
|
1100
|
-
0,0,0,0,0,0,0]),
|
|
1101
|
-
function
|
|
1102
|
-
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,
|
|
1103
|
-
function
|
|
1069
|
+
e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.$;if(m&&Infinity!=c&&!Rv(a,f))for(a=t(u),d=a.next();!d.done;d=a.next())d.value.eh(c);return{segments:u,bandwidth:b}}function ow(a,b){if(a==Mc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1070
|
+
function pw(a){return a==Mc?"text/vtt":Kw[a].mp4}
|
|
1071
|
+
function Gw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(z){switch(z.g){case 1:e=Bg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return z.return(pw(b));h=g.P();k=new mb(h[0]);l=k.ob.split(".").pop();m=Kw[b];if((n=m[l])||(n=gw[l])||(n=ow(b,c)))return z.return(n);r=1;u=vg(h,a.g.retryParameters);ta(z,2);u.method="HEAD";return E(z,iw(a,u,e,{type:r}),4);case 4:v=z.h;p=v.headers["content-type"];va(z,3);break;case 2:w=wa(z);if(!w||1002!=w.code&&
|
|
1072
|
+
1001!=w.code){z.B(3);break}u.method="GET";return E(z,iw(a,u,e,{type:r}),6);case 6:A=z.h,p=A.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(pw(b))}})}function dw(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Cv(a,b,c){return iw(a,vg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1073
|
+
function Av(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();Ev(a)&&(d=(c-b)/1E3,a.Xa.sample(1,d),e=a.m,f=Math.max(0,e-hd(a.Xa)),a.A.V(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.V(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();F(h)}})}
|
|
1074
|
+
function Ev(a){return a.oa!=Bv}function Iv(a,b){a.oa=b;a.l&&a.l.Mc(!Ev(a));Ev(a)||a.A.stop()}function iw(a,b,c,d){if(!a.S)throw new U(2,7,7001);b=a.h.networkingEngine.request(c,b,d);pg(a.S,b);return b.promise}function uw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1075
|
+
function ww(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,C,y;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if(nc())throw new U(2,4,4041);g=iv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=pv(d(),iv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ec(Cc(k[0].split("data:text/plain;base64,").pop()));B.B(2);break}m=k.sort().join("");a.ya.has(m)||(n=vg(k,a.g.retryParameters),p=iw(a,n,6),a.ya.set(m,p));return E(B,a.ya.get(m),
|
|
1076
|
+
3);case 3:r=B.h,l=Ec(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.B(4);break}if(a.na.has(e)){v=a.na.get(e);B.B(5);break}w=Bl(e.P(),e.Ob(),e.Mb(),a.g.retryParameters);A=Bg;return E(B,iw(a,w,A,{type:0}),6);case 6:z=B.h,v=Gt(z.data),a.na.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),B.return(Ic(C,y))}})}P("shaka.hls.HlsParser",zv);
|
|
1077
|
+
var gw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Kw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1078
|
+
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},vw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new U(2,4,4040);if(nc())throw new U(2,4,4041);a=iv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Hc("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=
|
|
1079
|
+
iv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=iv(a,"URI");b=yv(b.split("?")[0]);b=Gb(b.data);c=Hc("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=iv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=iv(a,"URI");a=yv(a.split("?")[0]);a=
|
|
1080
|
+
Gb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Wg(a,b,new Set,0);return Hc("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},Bv="VOD",Fw="EVENT",kw="LIVE",Hv={Bi:Bv,Qk:Fw,Yk:kw};Ai["application/x-mpegurl"]=function(){return new zv};Ai["application/vnd.apple.mpegurl"]=function(){return new zv};function Lw(a){var b=0,c=Lb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Mw(a){if(a=Nw(a))a:{a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=jh(b.value,"LA_URL")){a=gh(b);break a}a=""}else a="";return a}
|
|
1081
|
+
function Nw(a){a=Cc(gh(a));a=Lw(a).filter(function(b){return b.type===Ow})[0];if(!a)return null;a=sc(a.value,!0);return(a=Yg(a,"WRMHEADER"))?a:null}var Ow=1,Pw=(new Map).set("com.microsoft.playready",Mw).set("com.microsoft.playready.recommendation",Mw).set("com.microsoft.playready.software",Mw).set("com.microsoft.playready.hardware",Mw);function bx(a){if(!cx){cx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);dx=ex("ftyp",b,d,b,c);b=ex("dref",fx);gx=ex("dinf",b)}this.g=a}
|
|
1082
|
+
function hx(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=ex;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(ix+1));m=Math.floor(m%(ix+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(jx(h,4)),[0,0,0,0],x(jx(n,4)),x(jx(m,4)),[0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(jx(k,2)),[0,0],x(jx(l,
|
|
1083
|
+
2)),[0,0]));h=ex("tkhd",h);k=ex;n=g.duration*g.timescale;l=Math.floor(n/(ix+1));n=Math.floor(n%(ix+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(jx(g.timescale,4)),x(jx(l,4)),x(jx(n,4)),x(jx(m,2)),[0,0]));l=ex("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=kx;break;case "audio":m=lx}n=ex("hdlr",m);a:{switch(g.type){case "video":g=ex("minf",ex("vmhd",mx),gx,nx(g));break a;
|
|
1084
|
+
case "audio":g=ex("minf",ex("smhd",ox),gx,nx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Fc.apply(zc,x(b));f=a.g[0];c=ex;d=f.duration*f.timescale;e=Math.floor(d/(ix+1));d=Math.floor(d%(ix+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(jx(f.timescale,4)),x(jx(e,4)),x(jx(d,4)),[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,
|
|
1085
|
+
255]));e=ex("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(jx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=ex("trex",k),h.call(g,k);a=Fc.apply(zc,x(d));a=ex("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Fc.apply(zc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(dx.byteLength+
|
|
1086
|
+
a.byteLength);b.set(dx);b.set(a,dx.byteLength);return b}
|
|
1087
|
+
function nx(a){var b=ex,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Ia.byteLength)var e=ex("avcC",a.Ia);else{e=ex;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.ub.length;n++){var p=px(a.ub[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1088
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=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].concat(x(jx(c,2)),x(jx(d,2)),[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]));d="avc1";h=qx(a);g=new Uint8Array([]);
|
|
1089
|
+
a.encrypted&&(g=rx(a),d="encv");c=ex(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Ia.byteLength&&(c=ex("hvcC",a.Ia)),d=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].concat(x(jx(d,2)),x(jx(e,2)),[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="hvc1",h=qx(a),g=new Uint8Array([]),a.encrypted&&(g=rx(a),e="encv"),c=ex(e,d,
|
|
1090
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=ex(".mp3",sx(a));else if(a.codecs.includes("ac-3"))c=ex("dac3",a.wa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=rx(a),d="enca"),a=ex(d,sx(a),c,e);else if(a.codecs.includes("ec-3"))c=ex("dec3",a.wa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=rx(a),d="enca"),a=ex(d,sx(a),c,e);else if(a.codecs.includes("opus"))c=ex("dOps",a.wa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=rx(a),d="enca"),a=ex(d,sx(a),c,e);else{if(0<a.wa.byteLength)c=ex("esds",
|
|
1091
|
+
a.wa);else{c=ex;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Jc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(jx(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=rx(a),d="enca");
|
|
1092
|
+
a=ex(d,sx(a),c,e)}c=a}a=ex("stsd",tx,c);return b("stbl",a,ex("stts",ux),ex("stsc",vx),ex("stsz",wx),ex("stco",xx))}function qx(a){if(!a.Pa&&!a.Ra)return new Uint8Array([]);var b=a.Ra;a=new Uint8Array([].concat(x(jx(a.Pa,4)),x(jx(b,4))));return ex("pasp",a)}function sx(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(jx(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1093
|
+
function rx(a){var b=ex;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(jx(d,4))));c=ex("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=ex("schm",d);e=ex;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=px(h.value)}a=new Uint8Array([0,
|
|
1094
|
+
0,0,0,0,0,1,8]);f=ex("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1095
|
+
function yx(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=ex;var g=new Uint8Array([0,0,0,0].concat(x(jx(c.data?c.data.Ib:0,4))));g=ex("mfhd",g);var h;var k=c.data?c.data.rb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.hb<<4|m.kb<<2|m.jb}k=ex("sdtp",l);var n=k.length+92;l=ex;h=new Uint8Array([0,0,0,58].concat(x(jx(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=ex("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1096
|
+
0;var p=Math.floor(m%(ix+1));m=new Uint8Array([1,0,0,0].concat(x(jx(Math.floor(m/(ix+1)),4)),x(jx(p,4))));m=ex("tfdt",m);var r=n;n=c.data?c.data.rb:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(jx(p,4)),x(jx(r,4))),0);for(r=0;r<p;r++){var w=n[r];u=jx(w.duration,4);var A=jx(w.size,4),z=w.flags;w=jx(w.wb,4);v.set([].concat(x(u),x(A),[z.xb<<2|z.hb,z.kb<<6|z.jb<<4|z.yb,z.gb&61440,z.gb&15],x(w)),12+16*r)}n=ex("trun",v);k=l("traf",h,m,n,k);f=f("moof",
|
|
1097
|
+
g,k);e.call(d,b,[f,zx(c)])}return Fc.apply(zc,x(b))}function zx(a){a=(a.data?a.data.rb:[]).map(function(b){return b.data});a=Fc.apply(zc,x(a));return ex("mdat",a)}function jx(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function px(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1098
|
+
function ex(a){var b=Ka.apply(1,arguments),c=Ax[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Ax[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1099
|
+
var cx=!1,ix=Math.pow(2,32)-1,Ax={},kx=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]),lx=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]),ux=new Uint8Array([0,0,0,0,0,0,0,0]),vx=new Uint8Array([0,0,0,0,0,0,0,0]),xx=new Uint8Array([0,0,0,0,0,0,0,0]),wx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),mx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ox=new Uint8Array([0,
|
|
1100
|
+
0,0,0,0,0,0,0]),tx=new Uint8Array([0,0,0,0,0,0,0,1]),dx=new Uint8Array([]),fx=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),gx=new Uint8Array([]);function Bx(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.F=new gd(5);this.o=new Qb(function(){Cx(a)});this.A=new og;this.m=new Map}q=Bx.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,Dx(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})};
|
|
1101
|
+
function Cx(a){var b;O(function(c){switch(c.g){case 1:return ta(c,2),E(c,Dx(a),4);case 4:va(c,3);break;case 2:b=wa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1102
|
+
q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return ta(c,2),E(c,Dx(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};
|
|
1103
|
+
function Dx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=vg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),pg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=wm){sd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=xu(m,"SmoothStreamingMedia");if(!m)throw new U(2,4,4046,
|
|
1104
1104
|
l);n(m);m=vc(m.outerHTML)}var p=Xg(m,"SmoothStreamingMedia");if(!p)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=xm&&l(p);a.i||(a.i=new Bk(null,0));if(l=mh(p,"IsLive",yh,!1))throw new U(2,4,4047);a.i.Mc(!l);n=mh(p,"TimeScale",wh,1E7);m=mh(p,"DVRWindowLength",wh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=mh(p,"CanSeek",yh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.mf(r);m=mh(p,
|
|
1105
|
-
"Duration",wh,Infinity);l||a.i.sb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};r=fh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=
|
|
1106
|
-
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Ec(z);break a}z=null}else z=null;C=Cc(gh(v));w=Dc(w.replace(/-/g,""));w=[{initData:Wg(C,w,new Set,0),initDataType:"cenc",keyId:z}];w=Hc(A,"cenc",w);z&&w.keyIds.add(z);if(A=
|
|
1107
|
-
mh(K,"d",wh);K=mh(K,"r",uh);if(!H)break;J=null!=J?J:B;K=K||0;if(0>K)if(I){I=mh(I,"t",wh);if(null==I)break;else if(J>=I)break;K=Math.ceil((I-J)/H)-1}else{if(Infinity==z)break;else if(J/w>=z)break;K=Math.ceil((z*w-J)/H)-1}for(I=0;I<=K;++I)B=J+H,y.push({start:J/w,end:B/w,jh:J}),J=B}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=
|
|
1105
|
+
"Duration",wh,Infinity);l||a.i.sb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};r=fh(p,"Protection");var u;n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var z=Nw(v);if(z)a:{z=t(ih(z,"DATA"));for(var C=z.next();!C.done;C=z.next())if(C=jh(C.value,"KID")){z=Cc(gh(C));z=new Uint8Array([z[3],z[2],z[1],z[0],z[5],
|
|
1106
|
+
z[4],z[7],z[6]].concat(x(z.slice(8))));z=Ec(z);break a}z=null}else z=null;C=Cc(gh(v));w=Dc(w.replace(/-/g,""));w=[{initData:Wg(C,w,new Set,0),initDataType:"cenc",keyId:z}];w=Hc(A,"cenc",w);z&&w.keyIds.add(z);if(A=Pw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=fh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;z=l.duration;C=fh(v,"c");for(var y=[],B=0,D=0;D<C.length;++D){var K=C[D],I=C[D+1],J=mh(K,"t",wh),H=
|
|
1107
|
+
mh(K,"d",wh);K=mh(K,"r",uh);if(!H)break;J=null!=J?J:B;K=K||0;if(0>K)if(I){I=mh(I,"t",wh);if(null==I)break;else if(J>=I)break;K=Math.ceil((I-J)/H)-1}else{if(Infinity==z)break;else if(J/w>=z)break;K=Math.ceil((z*w-J)/H)-1}for(I=0;I<=K;++I)B=J+H,y.push({start:J/w,end:B/w,jh:J}),J=B}w=y;A=t(A);for(z=A.next();!z.done;z=A.next())(z=Ex(a,v,z.value,w,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=Mc||a.g.disableText||m.push(z):n.push(z):r.push(z))}p=[];r=t(0<r.length?
|
|
1108
1108
|
r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,z=z.value,C=0,u&&u.bandwidth&&0<u.bandwidth&&(C+=u.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(C+=z.bandwidth),z={id:a.u++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!z&&z.primary,audio:u,video:z,bandwidth:C,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1109
1109
|
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.Te());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.F.sample(1,h);F(k)})}
|
|
1110
|
-
function
|
|
1110
|
+
function Ex(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Ya("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=mh(c,"Bitrate",vh),m=mh(c,"MaxWidth",vh),n=mh(c,"MaxHeight",vh),p=mh(c,"Channels",vh),r=mh(c,"SamplingRate",vh),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.sb(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1111
1111
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Sc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1112
|
-
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=
|
|
1113
|
-
e),null;c=
|
|
1114
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,ub:A,wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:null,stream:w},A=
|
|
1112
|
+
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Fx[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Ya('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Gx.includes(e.toUpperCase()))return Ya("Codec not supported:",
|
|
1113
|
+
e),null;c=Hx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=Ix(e,c);break;case "video":if(!c)return Ya("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=Jx(c);break;case "text":if(w.type=Mc,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(oe(w.mimeType,w.codecs));
|
|
1114
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,ub:A,wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:null,stream:w},A=hx(new bx([A])),a.m.set(w.id,A);A=Kx(a,new Fi(function(){return[]},0,null,null,void 0,
|
|
1115
1115
|
A),w,b,d);w.segmentIndex=new Xk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1116
|
-
function
|
|
1117
|
-
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
1118
|
-
function
|
|
1119
|
-
Ai["application/vnd.ms-sstr+xml"]=function(){return new
|
|
1120
|
-
function
|
|
1121
|
-
K.value.byteLength;if(!g){H.B(5);break}return E(H,g(K.value),5);case 5:I=Date.now();if(100<I-r||K.done)J=K.done?0:w-n,e(I-r,n-p,J),p=n,r=I;K.done?B.close():(B.enqueue(K.value),D());F(H)}})}D()};new k({start:A});return E(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:va(y,3);break;case 2:z=wa(y);if(d.sh)throw new U(1,1,7001,a,b);if(d.pi)throw new U(1,1,1003,a,b);throw new U(1,1,1002,a,z,b);case 3:return C=
|
|
1122
|
-
function
|
|
1123
|
-
|
|
1124
|
-
function
|
|
1116
|
+
function Hx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1117
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ix(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Jx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1118
|
+
function Kx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={Dd:g.Dd},h=e.next())g.Dd=h.value,d.push(new Hi(g.Dd.start,g.Dd.end,function(k){return function(){return Gc(a.l,[f.replace("{start time}",String(k.Dd.jh))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Bx);var Gx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Fx={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1119
|
+
Ai["application/vnd.ms-sstr+xml"]=function(){return new Bx};function Lx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=uc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function Mx(){}function Nx(a,b,c,d,e){var f=new Ox;Fg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Px,h={sh:!1,pi:!1};a=Qx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new hg(a,function(){h.sh=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Qb(function(){h.pi=!0;g.abort()});k.V(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1120
|
+
function Qx(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,z,C;return O(function(y){switch(y.g){case 1:return h=Rx,k=Sx,p=n=0,r=Date.now(),ta(y,2),E(y,h(a,c),4);case 4:l=y.h;f(Tx(l.headers));if("HEAD"==c.method){y.B(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var K,I,J;return O(function(H){switch(H.g){case 1:return ta(H,2),E(H,u.read(),4);case 4:K=H.h;va(H,3);break;case 2:return wa(H),H.return();case 3:if(K.done){H.B(5);break}n+=
|
|
1121
|
+
K.value.byteLength;if(!g){H.B(5);break}return E(H,g(K.value),5);case 5:I=Date.now();if(100<I-r||K.done)J=K.done?0:w-n,e(I-r,n-p,J),p=n,r=I;K.done?B.close():(B.enqueue(K.value),D());F(H)}})}D()};new k({start:A});return E(y,l.arrayBuffer(),6);case 6:m=y.h;case 5:va(y,3);break;case 2:z=wa(y);if(d.sh)throw new U(1,1,7001,a,b);if(d.pi)throw new U(1,1,1003,a,b);throw new U(1,1,1002,a,z,b);case 3:return C=Tx(l.headers),y.return(Lx(C,m,l.status,a,l.url,b))}})}
|
|
1122
|
+
function Tx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Ux(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",Mx);Mx.isSupported=Ux;Mx.parse=Nx;var Rx=window.fetch,Px=window.AbortController,Sx=window.ReadableStream,Ox=window.Headers;
|
|
1123
|
+
Ux()&&(rg("http",Nx,2,!0),rg("https",Nx,2,!0),rg("blob",Nx,2,!0));function Vx(){}
|
|
1124
|
+
function Wx(a,b,c,d,e){var f=new Xx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new U(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=Yx(f);e(r);n=!0}};f.onload=function(r){var u=Yx(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=Lx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new U(1,
|
|
1125
1125
|
1,1002,a,r,c))};f.ontimeout=function(){m(new U(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new hg(k,function(){f.abort();return Promise.resolve()})}
|
|
1126
|
-
function
|
|
1127
|
-
function
|
|
1128
|
-
function
|
|
1129
|
-
function
|
|
1130
|
-
q.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1131
|
-
q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,
|
|
1132
|
-
function
|
|
1133
|
-
function
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1136
|
-
function
|
|
1137
|
-
function
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
function
|
|
1141
|
-
function
|
|
1142
|
-
|
|
1143
|
-
function
|
|
1144
|
-
function
|
|
1145
|
-
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
1146
|
-
|
|
1126
|
+
function Yx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",Vx);Vx.parse=Wx;var Xx=window.XMLHttpRequest;rg("http",Wx,1,!0);rg("https",Wx,1,!0);rg("blob",Wx,1,!0);function Zx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function $x(a){return a.P().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Va+":"+a.Aa}function ay(a,b){return Bl(a.g.P(),a.g.Va,a.g.Aa,b.streaming.retryParameters)};function by(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function cy(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}by.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function dy(a){var b=this;this.o=a;this.j=new Map;this.i=new Dg(function(){return ey(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new by}dy.prototype.destroy=function(){return this.i.destroy()};function fy(a,b,c){a.m=b;a.l=c}function ey(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1127
|
+
function gy(a,b,c,d,e,f){Eg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return E(u,hy(a,c),2);h=u.h;if(a.i.g)throw new U(2,9,7001);if(e)for(m in k=Gb(h),l=new Vg(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function iy(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1128
|
+
function hy(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=Bg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Dd(a.h,e);return g.return(f.data)})};function jy(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new gg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}jy.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return E(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);F(b)})};
|
|
1129
|
+
function ky(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}jy.prototype.store=function(){return this.h};jy.prototype.promise=function(){return this.g};function ly(a){this.h=a;this.g=[]}ly.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function my(a,b){return ny(a,b,"readwrite")}function ny(a,b,c){c=a.h.transaction([b],c);var d=new jy(c,b);a.g.push(d);d.promise().then(function(){Dd(a.g,d)},function(){Dd(a.g,d)});return d};function oy(a,b,c){this.h=new ly(a);this.i=b;this.g=c}q=oy.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return py(this.i)};q.removeSegments=function(a,b){return qy(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,ry(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.wh(e)}))})};q.addManifests=function(){return py(this.g)};
|
|
1130
|
+
q.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function sy(a,b,c){a=my(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=my(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return qy(this,this.g,a,b)};
|
|
1131
|
+
q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,ry(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ld(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ny(a.h,a.g,"readonly"),c=new Map,E(d,ky(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Ld(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};q.wh=function(a){return a};q.Ld=function(a){return Promise.resolve(a)};
|
|
1132
|
+
function py(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=my(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={we:g.we},k=h.next())l=k.value,g.we=e.add(l),g.we.onsuccess=function(n){return function(){f.push(n.we.result)}}(g);return E(m,d.promise(),2)}return m.return(f)})};
|
|
1133
|
+
function qy(a,b,c,d){a=my(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={ue:e.ue},f=c.next())e.ue=f.value,b.delete(e.ue).onsuccess=function(g){return function(){return d(g.ue)}}(e);return a.promise()}
|
|
1134
|
+
function ry(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=ny(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Bd:h.Bd,xd:h.xd},l=k.next())h.xd=l.value,h.Bd=e.get(h.xd),h.Bd.onsuccess=function(n){return function(){void 0==n.Bd.result&&g.push(n.xd);f[n.xd]=n.Bd.result}}(h);return E(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function ty(a){this.g=new ly(a)}ty.prototype.destroy=function(){return this.g.destroy()};ty.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=ny(a.g,"session-ids","readonly"),c=[],E(d,ky(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};ty.prototype.add=function(a){var b=my(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
1135
|
+
ty.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=my(b.g,"session-ids"),E(d,ky(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function uy(){this.g=new Map}uy.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};uy.prototype.init=function(){var a=this;vy.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1136
|
+
function wy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Eb:d,$a:f},$a:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function xy(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Eb:d,$a:f},e)})})}
|
|
1137
|
+
function yy(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function zy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ay(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1138
|
+
function By(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=vy,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Cy(a,b){vy.set(a,b)}P("shaka.offline.StorageMuxer",uy);uy.unregister=function(a){vy.delete(a)};uy.register=Cy;uy.prototype.destroy=uy.prototype.destroy;var vy=new Map;function Dy(){oy.apply(this,arguments)}na(Dy,oy);Dy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=my(c.h,c.g);e=d.store();f=new gg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
|
|
1139
|
+
Dy.prototype.Ld=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Ey(a.periods[c],e),b.push(f);return E(h,Xt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1140
|
+
function Ey(a,b){Fy(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Gy(e,a.startTime,b)})}
|
|
1141
|
+
function Gy(a,b,c){var d=a.initSegmentUri?Hy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1142
|
+
Hy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Dy.prototype.wh=function(a){return{data:a.data}};
|
|
1143
|
+
function Hy(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new U(2,9,9004,"Could not parse uri "+a);}
|
|
1144
|
+
function Fy(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1145
|
+
f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Iy(){oy.apply(this,arguments)}na(Iy,oy);
|
|
1146
|
+
Iy.prototype.Ld=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Jy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,Xt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1147
1147
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1148
|
-
function
|
|
1149
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1150
|
-
q.init=function(){var a=this,b=new gg,c=!1,d=new Qb(function(){c=!0;b.reject(new U(2,9,9017))});d.V(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new
|
|
1151
|
-
new
|
|
1148
|
+
function Jy(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1149
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Ky(){oy.apply(this,arguments)}na(Ky,oy);q=Ky.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return sy(this,a,b)};q.Ld=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ly(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ly.prototype;
|
|
1150
|
+
q.init=function(){var a=this,b=new gg,c=!1,d=new Qb(function(){c=!0;b.reject(new U(2,9,9017))});d.V(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Dy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Iy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1151
|
+
new Iy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Ky(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ty(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new U(2,
|
|
1152
1152
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),F(b)}})};
|
|
1153
1153
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
1154
|
-
q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,
|
|
1155
|
-
function
|
|
1156
|
-
function
|
|
1157
|
-
function
|
|
1154
|
+
q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,My(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
|
|
1155
|
+
function My(){var a=new gg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}Cy("idb",function(){return cc()||Vb()||!window.indexedDB?null:new Ly});function Ny(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ny.prototype.Eb=function(){return this.i};Ny.prototype.$a=function(){return this.h};Ny.prototype.key=function(){return this.l};Ny.prototype.toString=function(){return this.j};
|
|
1156
|
+
function Oy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Ny(b,c,d,Number(a[4])):null};function Py(a,b){this.h=a;this.g=b}
|
|
1157
|
+
function Qy(a,b){var c=new Bk(null,0);c.sb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ry(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mc}).map(function(l){return Sy(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Sy(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1158
1158
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
|
|
1159
|
-
function
|
|
1160
|
-
b.next())for(e=e.value,g=
|
|
1161
|
-
function
|
|
1159
|
+
function Ry(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1160
|
+
b.next())for(e=e.value,g=Sy(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Sy(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
1161
|
+
function Sy(a,b,c){var d=b.segments.map(function(e){return Ty(a,e,b)});c.ce(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Xk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1162
1162
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([oe(b.mimeType,b.codecs)])}}
|
|
1163
|
-
function
|
|
1164
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=
|
|
1163
|
+
function Ty(a,b,c){var d=new Ny("segment",a.h,a.g,b.dataKey);a=new Hi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?Uy(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function Uy(a,b){var c=new Ny("segment",a.h,a.g,b);return new Fi(function(){return[c.toString()]},0,null)};function Vy(){this.g=null}q=Vy.prototype;q.configure=function(){};
|
|
1164
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=Oy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new uy;ua(m,2);return E(m,e.init(),4);case 4:return E(m,yy(e,d.Eb(),d.$a()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Py(d.Eb(),d.$a()),l=Qy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),E(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
1165
1165
|
q.update=function(){};
|
|
1166
|
-
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
1167
|
-
q.onInitialVariantChosen=function(){};q.banLocation=function(){};Ai["application/x-offline-manifest"]=function(){return new
|
|
1168
|
-
function
|
|
1169
|
-
function
|
|
1170
|
-
h.g)return ta(h,2),E(h,Yh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);F(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1171
|
-
function
|
|
1172
|
-
case 4:b.h=null,b.g=null,F(k)}})})}function
|
|
1173
|
-
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1174
|
-
function
|
|
1175
|
-
p,b,c,e,f),v=u.Nj,w=u.gh,E(y,l.$a.addManifests([v]),11);case 11:A=y.h;
|
|
1176
|
-
|
|
1177
|
-
function
|
|
1178
|
-
2)}if(!B)return L.B(0);
|
|
1179
|
-
z=Object.values(l),E(C,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function
|
|
1180
|
-
function
|
|
1181
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return v=wa(A),E(A,
|
|
1182
|
-
function
|
|
1166
|
+
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new uy,ta(m,2,3),E(m,e.init(),5);case 5:return E(m,yy(e,d.Eb(),d.$a()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),E(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.B(3)}})};
|
|
1167
|
+
q.onInitialVariantChosen=function(){};q.banLocation=function(){};Ai["application/x-offline-manifest"]=function(){return new Vy};function Wy(){}function Xy(a){var b=Oy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=kg(a)):a=b&&"segment"==b.g?Yy(b.key(),b):ig(new U(2,1,9004,a));return a}
|
|
1168
|
+
function Yy(a,b){var c=new uy;return kg(void 0).Na(function(){return c.init()}).Na(function(){return yy(c,b.Eb(),b.$a())}).Na(function(d){return d.getSegments([b.key()])}).Na(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",Wy);Wy.plugin=Xy;rg("offline",Xy);function Zy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,$y(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=az(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
|
|
1169
|
+
function az(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Eh({Zb:b,onError:function(){},$e:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),E(f,Mh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
|
|
1170
|
+
h.g)return ta(h,2),E(h,Yh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);F(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function $y(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ed(a.audioCapabilities,b.audioCapabilities,c)&&Ed(a.videoCapabilities,b.videoCapabilities,c)};function bz(a,b,c){var d=b.presentationTimeline.getDuration();b=cz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function dz(a,b){var c=Qy(new Py(a.Eb(),a.$a()),b),d=b.appMetadata||{};c=cz(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1171
|
+
function cz(a){var b=[],c=Af(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(rf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(sf(c.value));return b};function ez(){this.g={}}function fz(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function gz(a,b){a.g[b.id]=b.bandwidth||2048}function hz(a,b){a=a.g[b];null==a&&(a=0);return a};function iz(a){var b=this;if(a&&a.constructor!=X)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.hc()):(this.h=vm(),this.g=new qg);this.i=[];this.j=[];var c=!a;this.l=new Dg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return ey(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return E(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return E(k,b.g.destroy(),4);
|
|
1172
|
+
case 4:b.h=null,b.g=null,F(k)}})})}function jz(){if(Rb())a:{var a=t(vy.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=iz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=mm(a,b));return zm(this.h,a)};q.getConfiguration=function(){var a=vm();zm(a,this.h,vm());return a};q.hc=function(){return this.g};
|
|
1173
|
+
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new dy(this.g);this.j.push(f);b=kz(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.B(2):E(h,Um(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=zi(a,c||null);return h.return(g())})},e,f);b=new hg(b,function(){return ey(f)});b.finally(function(){Dd(d.j,f)});return lz(this,b)};
|
|
1174
|
+
function kz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,z,C;return O(function(y){switch(y.g){case 1:return mz(),h=g=null,k=new uy,n=m=l=null,ta(y,2,3),E(y,d(),5);case 5:return g=y.h,E(y,nz(a,b,g,e),6);case 6:p=y.h;oz(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.Ec();if(!r)throw new U(2,9,9005,b);return E(y,a.Wc(p,function(B){n=n||B},e),7);case 7:h=y.h;oz(a);if(n)throw n;return E(y,pz(p,h,e),8);case 8:return E(y,k.init(),9);case 9:return oz(a),E(y,wy(k),10);case 10:return l=y.h,oz(a),u=qz(h,
|
|
1175
|
+
p,b,c,e,f),v=u.Nj,w=u.gh,E(y,l.$a.addManifests([v]),11);case 11:A=y.h;oz(a);m=A[0];oz(a);if(n)throw n;return E(y,rz(a,w,m,v,f,e,l.$a,p,h),12);case 12:return oz(a),sz(p,v,h,e),E(y,l.$a.updateManifest(m,v),13);case 13:return oz(a),z=new Ny("manifest",l.path.Eb,l.path.$a,m),y.return(dz(z,v));case 3:return xa(y),E(y,k.destroy(),14);case 14:if(!g){y.B(15);break}return E(y,g.stop(),15);case 15:if(!h){y.B(17);break}return E(y,h.destroy(),17);case 17:ya(y,0);break;case 2:C=wa(y);if(null==m){y.B(19);break}return E(y,
|
|
1176
|
+
tz(m),19);case 19:throw n||C;}})}
|
|
1177
|
+
function rz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,z;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(y,B){var D,K,I,J,H,G,N;return O(function(L){if(1==L.g){D={};K=t(y);for(I=K.next();!I.done;D={rc:D.rc},I=K.next())D.rc=I.value,J=ay(D.rc,f),H=D.rc.i,G=D.rc.h,N=function(M){return function(Q){var T,R,ra;return O(function(sa){if(1==sa.g)return E(sa,g.addSegments([{data:Q}]),2);T=sa.h;oz(a);R=M.rc.g;ra=$x(R);l[ra]=T[0];m+=Q.byteLength;F(sa)})}}(D),gy(e,D.rc.groupId,J,H,G,N);return E(L,iy(e),
|
|
1178
|
+
2)}if(!B)return L.B(0);oz(a);sz(h,d,k,f);return E(L,g.updateManifest(c,d),0)})};p=!1;ta(C,2);if(!uz(h)||!p||vz(h)){C.B(4);break}return E(C,n(b.filter(function(y){return y.h}),!0),5);case 5:return oz(a),b=b.filter(function(y){return!y.h}),r=l,u=m,l={},m=0,E(C,wz(g,c,d,r,u,function(){return oz(a)}),6);case 6:oz(a);case 4:if(p){C.B(7);break}return E(C,n(b,!1),8);case 8:return oz(a),v=l,w=m,l={},m=0,E(C,wz(g,c,d,v,w,function(){return oz(a)}),9);case 9:oz(a);case 7:va(C,0);break;case 2:return A=wa(C),
|
|
1179
|
+
z=Object.values(l),E(C,g.removeSegments(z,function(){}),10);case 10:throw A;}})}function tz(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new uy,E(f,b.init(),2);case 2:return E(f,wy(b),3);case 3:return c=f.h,d=new Ny("manifest",c.path.Eb,c.path.$a,a),E(f,b.destroy(),4);case 4:return e=new iz,E(f,e.remove(d.toString()),0)}})}
|
|
1180
|
+
function wz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;ta(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
1181
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();va(A,0);break;case 2:return v=wa(A),E(A,tz(b),5);case 5:if(g){A.B(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
|
|
1182
|
+
function pz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y,B,D,K,I,J,H,G,N,L,M;return O(function(Q){switch(Q.g){case 1:return d={width:Infinity,height:Infinity},Xe(a,c.restrictions,d),E(Q,af(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ve(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(rf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,e.push(sf(r));
|
|
1183
1183
|
u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(tf(w));return E(Q,c.offline.trackSelectionCallback(e),3);case 3:A=Q.h;z=a.presentationTimeline.getDuration();C=0;y=t(A);for(B=y.next();!B.done;B=y.next())D=B.value,K=D.bandwidth*z/8,C+=K;ta(Q,4);return E(Q,c.offline.downloadSizeCallback(C),6);case 6:I=Q.h;if(!I)throw new U(2,9,9014);va(Q,5);break;case 4:J=wa(Q);if(J instanceof U)throw J;throw new U(2,9,9015);case 5:H=new Set;G=new Set;N=new Set;L=t(A);for(B=L.next();!B.done;B=
|
|
1184
|
-
L.next())M=B.value,"variant"==M.type&&H.add(M.id),"text"==M.type&&G.add(M.id),"image"==M.type&&N.add(M.id);a.variants=a.variants.filter(function(T){return H.has(T.id)});a.textStreams=a.textStreams.filter(function(T){return G.has(T.id)});a.imageStreams=a.imageStreams.filter(function(T){return N.has(T.id)});
|
|
1185
|
-
function
|
|
1186
|
-
p&&n&&(p.initData=[]);return{Nj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Pd(),streams:f,sessionIds:n?ci(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},gh:m}}function
|
|
1187
|
-
function
|
|
1188
|
-
function
|
|
1189
|
-
function
|
|
1190
|
-
function
|
|
1191
|
-
function
|
|
1192
|
-
q.list=function(){return
|
|
1193
|
-
function
|
|
1194
|
-
c.configure(d.manifest),
|
|
1195
|
-
function
|
|
1196
|
-
function
|
|
1197
|
-
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;
|
|
1198
|
-
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function
|
|
1199
|
-
function
|
|
1200
|
-
function
|
|
1201
|
-
function
|
|
1202
|
-
function
|
|
1203
|
-
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
function
|
|
1207
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange"
|
|
1208
|
-
function
|
|
1209
|
-
function
|
|
1210
|
-
(r+="; spatialRendering=true");l=od(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,
|
|
1211
|
-
function
|
|
1212
|
-
function
|
|
1184
|
+
L.next())M=B.value,"variant"==M.type&&H.add(M.id),"text"==M.type&&G.add(M.id),"image"==M.type&&N.add(M.id);a.variants=a.variants.filter(function(T){return H.has(T.id)});a.textStreams=a.textStreams.filter(function(T){return G.has(T.id)});a.imageStreams=a.imageStreams.filter(function(T){return N.has(T.id)});xz(a);F(Q)}})}
|
|
1185
|
+
function qz(a,b,c,d,e,f){var g=bz(c,b,d),h=e.offline.progressCallback;fy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Uh(a,"cenc",r)});var k=uz(b)&&!vz(b),l=null;k&&(l=yz.get(a.g.keySystem));for(var m=new ez,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())gz(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())fz(m,n.value);m=zz(f,m,b,e);f=m.streams;m=m.gh;p=a.g;n=e.offline.usePersistentLicense;
|
|
1186
|
+
p&&n&&(p.initData=[]);return{Nj:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Pd(),streams:f,sessionIds:n?ci(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},gh:m}}function uz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1187
|
+
function vz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function sz(a,b,c,d){b.expiration=c.Pd();c=ci(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(uz(a)&&d.offline.usePersistentLicense&&!c.length)throw new U(2,9,9007);}q.remove=function(a){return Az(this,Bz(this,a))};
|
|
1188
|
+
function Bz(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:mz();c=Oy(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new uy;ua(k,2);return E(k,e.init(),4);case 4:return E(k,yy(e,d.Eb(),d.$a()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([Cz(a,h,e),Dz(f,d,h)]),2);case 2:return xa(k),E(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1189
|
+
function Ez(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:oe(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:oe(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Cz(a,b,c){return O(function(d){return E(d,Fz(a.g,a.h.drm,c,b),0)})}
|
|
1190
|
+
function Dz(a,b,c){function d(){}var e=Gz(c);dz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.ek=function(){return Az(this,Hz(this))};
|
|
1191
|
+
function Hz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return mz(),b=a.g,c=a.h.drm,d=new uy,e=!1,ua(n,2),E(n,d.init(),4);case 4:f=[],zy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,Zy(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return xa(n),E(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1192
|
+
q.list=function(){return Az(this,Iz())};function Iz(){var a,b,c;return O(function(d){switch(d.g){case 1:return mz(),a=[],b=new uy,ua(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),xy(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=dz(new Ny("manifest",e.Eb,e.$a,l),k);a.push(k)});F(h)})})}),E(d,c,2);case 2:return xa(d),E(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1193
|
+
function nz(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1194
|
+
c.configure(d.manifest),oz(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,oz(a),k=Jz(h),E(l,Promise.all(hb(k,function(m){return m.createSegmentIndex()})),3);oz(a);if(e)throw e;return l.return(h)})}q.Wc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Eh({Zb:d.g,onError:b,$e:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Jh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Wh(e),3):f.return(e)})};
|
|
1195
|
+
function zz(a,b,c,d){var e=new Map,f=Jz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Kz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),gh:Array.from(e.values())}}
|
|
1196
|
+
function Kz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1197
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;Lz(d,c.presentationTimeline.Cb(),function(l){var m=$x(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=hz(b,d.id)*p;p=cy(a.g,p);f.set(m,new Zx(l,p,k,!1))}l.sa&&(n=$x(l.sa),f.has(n)||(p=.5*hz(b,d.id),p=cy(a.g,p),f.set(n,new Zx(l.sa,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1198
|
+
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function Lz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function oz(a){if(a.l.g)throw new U(2,9,7001);}function mz(){if(!jz())throw new U(2,9,9E3);}
|
|
1199
|
+
function Az(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ua(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Dd(a.i,b);return ya(c,0)})}function lz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Dd(a.i,c)})}function Gz(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1200
|
+
function Fz(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ay(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ez(d,!1),videoCapabilities:Ez(d,!0)}});return E(h,Zy(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1201
|
+
function Jz(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1202
|
+
function xz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",iz);iz.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new uy,ua(b,2),E(b,By(a),2)):5!=b.g?(xa(b),E(b,a.destroy(),5)):ya(b,0)})};
|
|
1203
|
+
iz.prototype.list=iz.prototype.list;iz.prototype.removeEmeSessions=iz.prototype.ek;iz.prototype.remove=iz.prototype.remove;iz.prototype.store=iz.prototype.store;iz.prototype.getNetworkingEngine=iz.prototype.hc;iz.prototype.getConfiguration=iz.prototype.getConfiguration;iz.prototype.configure=iz.prototype.configure;iz.prototype.destroy=iz.prototype.destroy;iz.support=jz;
|
|
1204
|
+
var yz=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");yp.offline=jz;function Mz(){}function Nz(){for(var a=t(Oz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ya("Error installing polyfill!",c)}}}function Pz(a,b){a={priority:b||0,callback:a};for(b=0;b<Oz.length;b++)if(Oz[b].priority<a.priority){Oz.splice(b,0,a);return}Oz.push(a)}P("shaka.polyfill",Mz);Mz.register=Pz;Mz.installAll=Nz;var Oz=[];function Qz(){this.g=new Rz}function Sz(){window.AbortController||(window.AbortController=Qz,window.AbortSignal=Rz)}Qz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(Qz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Mz.AbortController=Qz;Qz.install=Sz;
|
|
1205
|
+
function Rz(){gb.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(Rz,gb);da.Object.defineProperties(Rz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Pz(Sz);function Tz(){}function Uz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Vz(b.value)}function Vz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Mz.Aria=Tz;Tz.install=Uz;Pz(Uz);function Wz(){}function Xz(){Yz()}Mz.EncryptionScheme=Wz;Wz.install=Xz;Pz(Xz,-2);function Zz(){}
|
|
1206
|
+
function $z(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1207
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",aA);document.addEventListener("webkitfullscreenerror",aA);document.addEventListener("mozfullscreenchange",aA);document.addEventListener("mozfullscreenerror",aA);document.addEventListener("MSFullscreenChange",aA);document.addEventListener("MSFullscreenError",aA)}}
|
|
1208
|
+
function aA(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Mz.Fullscreen=Zz;Zz.install=$z;Pz($z);function bA(){}function cA(){var a=!0;!cc()||cc()&&Wb("Android")||cc()&&Wb("Fuchsia")||(a=!1);if(dc()||gc()||fc()||$b()||Xb()||Wb("PC=EOS")||hc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),dA=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=eA)}
|
|
1209
|
+
function eA(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Sb(e),!f)||d&&(g=d.contentType,h=Sb(g),!h))return p.return(b)}else return p.return(b);p.B(2);break}if(!Rb())return p.return(b);if(!c){p.B(3);break}return E(p,fA(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;cc()&&d.spatialRendering&&
|
|
1210
|
+
(r+="; spatialRendering=true");l=od(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,gA(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
|
|
1211
|
+
function fA(a){var b,c;return O(function(d){return 1==d.g?cc()?E(d,hA(a),3):Xb()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(od(b))):d.B(2):2!=d.g?(c=d.h,d.return(c)):d.return(od(a.contentType))})}
|
|
1212
|
+
function gA(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Xb()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
|
|
1213
1213
|
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;ta(p,2);if(ri.has(k+"#"+l+"#"+m)){n=ri.get(k+"#"+l+"#"+m)||null;p.B(4);break}return E(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,ri.set(k+"#"+l+"#"+m,n);case 4:va(p,3);break;case 2:wa(p);case 3:return p.return(n)}})}
|
|
1214
|
-
function
|
|
1215
|
-
var
|
|
1216
|
-
function
|
|
1217
|
-
function
|
|
1218
|
-
function
|
|
1219
|
-
function
|
|
1220
|
-
function
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
function
|
|
1214
|
+
function hA(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(od(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in iA?(c=iA[b],d.B(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,iA[b]=c);return d.return(c)})}Mz.MediaCapabilities=bA;bA.install=cA;
|
|
1215
|
+
var dA=null;bA.originalMcap=dA;var iA={};bA.memoizedCanDisplayTypeRequests_=iA;Pz(cA,-1);function jA(){}function kA(){var a=ic();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(lA(),mA()):15>=a&&lA():Wb("DT_STB_BCM")?(lA(),mA()):(Zb()||Yb()||Wb("Tizen 4"))&&nA();(window.MediaSource||window.ManagedMediaSource)&&oA();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&pA()}
|
|
1216
|
+
function lA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ka.apply(0,arguments));b.abort=function(){};return b}}function mA(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1217
|
+
function oA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ue(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ue(c)&&b(c)}}}
|
|
1218
|
+
function nA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Ce(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Ce(c)&&b(c)}}}
|
|
1219
|
+
function pA(){var a=MediaSource.isTypeSupported;$b()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Mz.MediaSource=jA;jA.install=kA;Pz(kA);function qA(){}function rA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?sA():void 0!=window.orientation&&tA())}function sA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1220
|
+
function tA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new uA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}Mz.Orientation=qA;qA.install=rA;function uA(){gb.call(this);this.type="";this.angle=0}na(uA,gb);
|
|
1221
|
+
uA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1222
|
+
uA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Pz(rA);function vA(){}var wA,xA,yA,zA,AA,BA;function CA(a,b){try{var c=new DA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function EA(a){var b=this.mediaKeys;b&&b!=a&&FA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?FA(a,this):Promise.resolve()}
|
|
1223
|
+
function GA(a){a=Gb(a.initData);if(Lb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=sc(a.subarray(4),!0);a=vc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ib(a);this.dispatchEvent(b)}Mz.PatchedMediaKeysApple=vA;
|
|
1224
|
+
vA.uninstall=function(){wA&&(wA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",xA),HTMLMediaElement.prototype.setMediaKeys=yA,window.MediaKeys=zA,window.MediaKeySystemAccess=AA,navigator.requestMediaKeySystemAccess=BA,xA=BA=yA=AA=zA=null,window.shakaMediaKeysPolyfill="")};
|
|
1225
|
+
vA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)wA=!0,xA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),yA=HTMLMediaElement.prototype.setMediaKeys,zA=window.MediaKeys,AA=window.MediaKeySystemAccess,BA=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=EA;window.MediaKeys=HA;window.MediaKeySystemAccess=DA;navigator.requestMediaKeySystemAccess=
|
|
1226
|
+
CA;window.shakaMediaKeysPolyfill=IA}};
|
|
1227
|
+
function DA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1228
1228
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1229
|
-
|
|
1230
|
-
function
|
|
1231
|
-
q.generateRequest=function(a,b){var c=this;this.h=new gg;try{var d=this.l.createSession("video/mp4",Gb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.s(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.zc()?"license-request":"license-renewal").set("message",Ib(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.s(d,"webkitkeyadded",function(){c.g&&(
|
|
1232
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
1233
|
-
q.update=function(a){this.g=new gg;try{this.i.update(Gb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
1234
|
-
function
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1237
|
-
function
|
|
1238
|
-
function
|
|
1239
|
-
function
|
|
1229
|
+
DA.prototype.createMediaKeys=function(){var a=new HA(this.keySystem);return Promise.resolve(a)};DA.prototype.getConfiguration=function(){return this.g};function HA(a){this.h=new WebKitMediaKeys(a);this.g=new jd}HA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new JA(this.h,a)};HA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1230
|
+
function FA(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.s(b,"webkitneedkey",GA);try{return Ik(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}HA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function JA(a){gb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new jd;this.sessionId="";this.expiration=NaN;this.closed=new gg;this.keyStatuses=new KA}na(JA,gb);q=JA.prototype;
|
|
1231
|
+
q.generateRequest=function(a,b){var c=this;this.h=new gg;try{var d=this.l.createSession("video/mp4",Gb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.s(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.zc()?"license-request":"license-renewal").set("message",Ib(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.s(d,"webkitkeyadded",function(){c.g&&(LA(c,"usable"),c.g.resolve(),c.g=null)});this.j.s(d,"webkitkeyerror",
|
|
1232
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:LA(c,"output-not-allowed");break;default:LA(c,"internal-error")}});LA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1233
|
+
q.update=function(a){this.g=new gg;try{this.i.update(Gb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function LA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
|
|
1234
|
+
function KA(){this.size=0;this.g=void 0}q=KA.prototype;q.zc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,qi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=qi.value();return this.g&&Eb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var IA="apple";function MA(){}function NA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Yb()||Wb("Tizen 4")||Wb("Tizen 5.0")||ac())&&(MediaKeys.prototype.setServerCertificate=OA)}function OA(){return Promise.resolve(!1)}Mz.PatchedMediaKeysCert=MA;MA.install=NA;Pz(NA);function PA(){}function QA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=RA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=SA,window.MediaKeys=TA,window.MediaKeySystemAccess=UA,window.shakaMediaKeysPolyfill=VA)}function RA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1235
|
+
function SA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Mz.PatchedMediaKeysNop=PA;PA.install=QA;function TA(){throw new TypeError("Illegal constructor.");}TA.prototype.createSession=function(){};TA.prototype.setServerCertificate=function(){};TA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function UA(){this.keySystem="";throw new TypeError("Illegal constructor.");}UA.prototype.getConfiguration=function(){};
|
|
1236
|
+
UA.prototype.createMediaKeys=function(){};var VA="nop";Pz(QA,-10);function WA(){}
|
|
1237
|
+
function XA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)YA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=ZA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=$A;window.MediaKeys=aB;window.MediaKeySystemAccess=bB;window.shakaMediaKeysPolyfill=cB}}
|
|
1238
|
+
function dB(a){var b=YA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function ZA(a,b){try{var c=new bB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function $A(a){var b=this.mediaKeys;b&&b!=a&&eB(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&eB(a,this);return Promise.resolve()}Mz.PatchedMediaKeysWebkit=WA;WA.install=XA;
|
|
1239
|
+
function bB(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1240
1240
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1241
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1242
|
-
function
|
|
1243
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.s(b,c+"keyerror",function(d){var e=
|
|
1244
|
-
|
|
1245
|
-
function
|
|
1246
|
-
function
|
|
1247
|
-
function
|
|
1248
|
-
function
|
|
1249
|
-
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
1250
|
-
q.forEach=function(a){this.g&&a(this.g,qi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=qi.value();return this.g&&Eb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var
|
|
1251
|
-
function
|
|
1252
|
-
function
|
|
1253
|
-
function
|
|
1254
|
-
P("shaka.text.LrcTextParser",
|
|
1255
|
-
|
|
1256
|
-
{uc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ih(e,"metadata")[0])?g.children:[];h=ih(e,"style");e=ih(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Kd;var v=u.attributes["xml:id"];if(v){r.id=v;var w=null;n&&(w=
|
|
1257
|
-
100*r.height/w)),r.widthUnits=A||null!=v?de:0,r.heightUnits=A||null!=w?de:0)}if(u=
|
|
1258
|
-
2,2001,"<p> can only be inside <div> in TTML");n=t(fh(d,"div"));for(p=n.next();!p.done;p=n.next())if(fh(p.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1259
|
-
function
|
|
1260
|
-
[];if(!A)for(var z=t(r.children),C=z.next();!C.done;C=z.next())(C=
|
|
1261
|
-
if(!C&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Jd(n,z,""),e.lineBreak=!0,e;b="";A&&(b=yc(gh(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Jd(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
1262
|
-
!r.attributes.style&&(g=
|
|
1263
|
-
function
|
|
1264
|
-
g))a.backgroundColor=h;if(h=
|
|
1265
|
-
"bold"==h&&(a.fontWeight=700);h=
|
|
1266
|
-
d.split(" "),d[0].match(
|
|
1241
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}bB.prototype.createMediaKeys=function(){var a=new aB(this.g);return Promise.resolve(a)};bB.prototype.getConfiguration=function(){return this.h};function aB(a){this.l=a;this.h=null;this.g=new jd;this.i=[];this.j=new Map}
|
|
1242
|
+
function eB(a,b){a.h=b;a.g.qb();var c=YA;b&&(a.g.s(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ib(d.initData);a.h.dispatchEvent(e)}),a.g.s(b,c+"keymessage",function(d){var e=fB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.zc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.s(b,c+"keyadded",function(d){if(d=fB(a,d.sessionId))gB(d,"usable"),
|
|
1243
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.s(b,c+"keyerror",function(d){var e=fB(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?gB(e,"output-restricted"):1==f?gB(e,"expired"):gB(e,"internal-error"))}}))}
|
|
1244
|
+
aB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new hB(b,this.l,a);this.i.push(a);return a};aB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};aB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1245
|
+
function fB(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function hB(a,b,c){gb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new gg;this.keyStatuses=new iB}na(hB,gb);
|
|
1246
|
+
function jB(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Gb(vc("LOAD_SESSION|"+c));else{var e=vc("PERSISTENT|");d=Fc(e,b)}else d=Gb(b)}catch(g){return Promise.reject(g)}a.h=new gg;var f=dB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Qb(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).V(.01)}return a.h}
|
|
1247
|
+
function kB(a,b,c){if(a.g)a.g.then(function(){return kB(a,b,c)}).catch(function(){return kB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=rc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Cc(e.keys[0].k);e=Cc(e.keys[0].kid)}else d=Gb(c),e=null;var f=dB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1248
|
+
function gB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q=hB.prototype;q.generateRequest=function(a,b){return jB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?jB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new gg;kB(this,b,a);return b};
|
|
1249
|
+
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=dB("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function iB(){this.size=0;this.g=void 0}q=iB.prototype;q.zc=function(){return this.g};
|
|
1250
|
+
q.forEach=function(a){this.g&&a(this.g,qi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=qi.value();return this.g&&Eb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var YA="",cB="webkit";Pz(XA);function lB(){}function mB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nB,Object.defineProperty(a,"disablePictureInPicture",{get:oB,set:pB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qB,document.addEventListener("webkitpresentationmodechanged",rB,!0))}}
|
|
1251
|
+
function rB(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1252
|
+
function nB(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function qB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1253
|
+
function oB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Mz.PiPWebkit=lB;lB.install=mB;Pz(mB);function sB(){}function tB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=uB))}function uB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Mz.RandomUUID=sB;sB.install=tB;Pz(tB);function vB(){}function wB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:xB})}function xB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Mz.Symbol=vB;vB.install=wB;Pz(wB);function yB(){}function zB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Mz.VideoPlayPromise=yB;yB.install=zB;Pz(zB);function AB(){}function BB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||ac())&&(a.getVideoPlaybackQuality=CB)}}function CB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Mz.VideoPlaybackQuality=AB;AB.install=BB;Pz(BB);function DB(){}function EB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=FB;else if(6==b)a=GB;else{try{var c=!!FB(1,2,"")}catch(d){c=!1}c&&(a=FB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function FB(a,b,c){return new window.TextTrackCue(a,b,c)}function GB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Mz.VTTCue=DB;DB.install=EB;Pz(EB);function HB(){}HB.prototype.parseInit=function(){};HB.prototype.setSequenceMode=function(){};HB.prototype.setManifestType=function(){};HB.prototype.parseMedia=function(a,b){var c=null,d=[];a=rc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=IB.exec(e))){var f=JB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Jd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1254
|
+
P("shaka.text.LrcTextParser",HB);HB.prototype.parseMedia=HB.prototype.parseMedia;HB.prototype.setManifestType=HB.prototype.setManifestType;HB.prototype.setSequenceMode=HB.prototype.setSequenceMode;HB.prototype.parseInit=HB.prototype.parseInit;var IB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,JB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Je["application/x-subtitle-lrc"]=function(){return new HB};function KB(){}KB.prototype.parseInit=function(){};KB.prototype.setSequenceMode=function(){};KB.prototype.setManifestType=function(){};
|
|
1255
|
+
KB.prototype.parseMedia=function(a,b,c){var d=rc(a);a=[];if(""==d)return a;var e=Yg(d,"tt");if(!e)throw new U(2,2,2005,"Failed to parse TTML.");d=ih(e,"body")[0];if(!d)return[];var f=oh(e,LB,"frameRate"),g=oh(e,LB,"subFrameRate"),h=oh(e,LB,"frameRateMultiplier"),k=oh(e,LB,"tickRate"),l=oh(e,LB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=oh(e,MB,"extent");if("default"!=m&&"preserve"!=m)throw new U(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new NB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1256
|
+
{uc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ih(e,"metadata")[0])?g.children:[];h=ih(e,"style");e=ih(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Kd;var v=u.attributes["xml:id"];if(v){r.id=v;var w=null;n&&(w=OB.exec(n)||PB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,z=QB(u,h,"extent");if(z){var C=(A=OB.exec(z))||PB.exec(z);null!=C&&(r.width=Number(C[1]),r.height=Number(C[2]),A||(null!=v&&(r.width=100*r.width/v),null!=w&&(r.height=
|
|
1257
|
+
100*r.height/w)),r.widthUnits=A||null!=v?de:0,r.heightUnits=A||null!=w?de:0)}if(u=QB(u,h,"origin"))if(C=(A=OB.exec(u))||PB.exec(u),null!=C)r.viewportAnchorX=Number(C[1]),r.viewportAnchorY=Number(C[2]),A?z||(r.width=100-r.viewportAnchorX,r.widthUnits=de,r.height=100-r.viewportAnchorY,r.heightUnits=de):(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=v&&(r.viewportAnchorX=100*r.viewportAnchorX/v)),r.viewportAnchorUnits=A||null!=v?de:0}else r=null;r&&k.push(r)}if(fh(d,"p").length)throw new U(2,
|
|
1258
|
+
2,2001,"<p> can only be inside <div> in TTML");n=t(fh(d,"div"));for(p=n.next();!p.done;p=n.next())if(fh(p.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=RB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1259
|
+
function RB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(bh(a)){if(!m)return null;var r={tagName:"span",children:[gh(a)],attributes:{},parent:null}}else r=a;for(var u=null,v=t(SB),w=v.next();!w.done&&!(u=TB(r,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=oh(r,SB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new mb(n),A=new mb(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(bh);h=
|
|
1260
|
+
[];if(!A)for(var z=t(r.children),C=z.next();!C.done;C=z.next())(C=RB(C.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(C);d=null!=l;n=gh(r);n=r.children.length&&n&&/\S/.test(n);C=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(C||n||"br"==r.tagName||0!=h.length||d&&!w))return null;z=UB(r,c);n=z.start;for(z=z.end;p&&p.tagName&&"tt"!=p.tagName;)z=VB(p,c,n,z),n=z.start,z=z.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;z=null==z?Infinity:z+b.periodStart;n=Math.max(n,b.segmentStart);z=Math.min(z,b.segmentEnd);
|
|
1261
|
+
if(!C&&0<h.length)for(n=Infinity,z=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),z=Math.max(z,c.endTime);if("br"==r.tagName)return e=new Jd(n,z,""),e.lineBreak=!0,e;b="";A&&(b=yc(gh(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Jd(n,z,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=TB(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var y=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==y})[0]}g=k;l&&d&&!r.attributes.region&&
|
|
1262
|
+
!r.attributes.style&&(g=TB(l,"region",f,"")[0]);WB(b,r,g,u,v,e,a,0==h.length);return b}
|
|
1263
|
+
function WB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==XB(b,c,f,"direction",g)&&(a.direction="rtl");h=XB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Nd);(h=XB(b,c,f,"textAlign",!0))?(a.positionAlign=YB[h],a.lineAlign=ZB[h],a.textAlign=Wd[h.toUpperCase()]):a.textAlign=Md;if(h=XB(b,c,f,"displayAlign",!0))a.displayAlign=Xd[h.toUpperCase()];if(h=XB(b,c,f,"color",g))a.color=h;if(h=XB(b,c,f,"backgroundColor",
|
|
1264
|
+
g))a.backgroundColor=h;if(h=XB(b,c,f,"border",g))a.border=h;if(h=XB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=XB(b,c,f,"fontWeight",g))&&
|
|
1265
|
+
"bold"==h&&(a.fontWeight=700);h=XB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=XB(b,c,f,"lineHeight",g))&&h.match($B)&&(a.lineHeight=h);(h=XB(b,c,f,"fontSize",g))&&(h.match($B)||h.match(aC))&&(a.fontSize=h);if(h=XB(b,c,f,"fontStyle",g))a.fontStyle=ce[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=gh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=XB(b,c,f,"textOutline",g))d=
|
|
1266
|
+
d.split(" "),d[0].match($B)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match($B)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=XB(b,c,f,"letterSpacing",g))&&d.match($B)&&(a.letterSpacing=d);(d=XB(b,c,f,"linePadding",g))&&d.match($B)&&(a.linePadding=d);if(d=XB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=QB(c,f,"textDecoration"))&&bC(a,d);(d=cC(b,f,"textDecoration"))&&bC(a,d);if(d=XB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(XB(b,c,f,"ruby",g)){case "container":a.rubyTag=
|
|
1267
1267
|
"ruby";break;case "text":a.rubyTag="rt"}}
|
|
1268
|
-
function
|
|
1269
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Dd(a.textDecoration,"overline")}}function
|
|
1270
|
-
function
|
|
1271
|
-
function
|
|
1272
|
-
function
|
|
1273
|
-
function
|
|
1274
|
-
function
|
|
1275
|
-
var
|
|
1276
|
-
end:"end"},
|
|
1277
|
-
|
|
1278
|
-
Je['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1279
|
-
|
|
1280
|
-
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new
|
|
1281
|
-
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
1268
|
+
function bC(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Dd(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Dd(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1269
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Dd(a.textDecoration,"overline")}}function XB(a,b,c,d,e){e=void 0===e?!0:e;return(a=cC(a,c,d))?a:e?QB(b,c,d):null}function QB(a,b,c){if(!a)return null;var d=oh(a,MB,c);return d?d:dC(a,b,c)}function cC(a,b,c){var d=oh(a,MB,c);return d?d:dC(a,b,c)}
|
|
1270
|
+
function dC(a,b,c){a=TB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=nh(a[e],"urn:ebu:tt:style",c);f||(f=oh(a[e],MB,c));f||(f=cC(a[e],b,c));f&&(d=f)}return d}function TB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?nh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1271
|
+
function VB(a,b,c,d){a=UB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function UB(a,b){var c=eC(a.attributes.begin,b),d=eC(a.attributes.end,b);a=eC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1272
|
+
function eC(a,b){var c=null;if(fC.test(a)){a=fC.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(gC.test(a))c=hC(gC,a);else if(iC.test(a))c=hC(iC,a);else if(jC.test(a))a=jC.exec(a),c=Number(a[1])/b.frameRate;else if(kC.test(a))a=kC.exec(a),c=Number(a[1])/b.g;else if(lC.test(a))c=hC(lC,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1273
|
+
function hC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}P("shaka.text.TtmlTextParser",KB);KB.prototype.parseMedia=KB.prototype.parseMedia;KB.prototype.setManifestType=KB.prototype.setManifestType;KB.prototype.setSequenceMode=KB.prototype.setSequenceMode;KB.prototype.parseInit=KB.prototype.parseInit;
|
|
1274
|
+
function NB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1275
|
+
var OB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,aC=/^(\d{1,2}(?:\.\d+)?|100)%$/,$B=/^(\d+px|\d+em|\d*\.?\d+c)$/,PB=/^(\d+)px (\d+)px$/,fC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,gC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,iC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,jC=/^(\d*(?:\.\d*)?)f$/,kC=/^(\d*(?:\.\d*)?)t$/,lC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ZB={left:Qd,center:"center",right:"end",start:Qd,
|
|
1276
|
+
end:"end"},YB={left:"line-left",center:"center",right:"line-right"},LB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],MB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],SB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Je["application/ttml+xml"]=function(){return new KB};function mC(){this.g=new KB}mC.prototype.parseInit=function(a){var b=!1;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).box("minf",Pg).box("stbl",Pg).W("stsd",Rg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};mC.prototype.setSequenceMode=function(){};mC.prototype.setManifestType=function(){};
|
|
1277
|
+
mC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kg).box("mdat",Ug(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new U(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",mC);mC.prototype.parseMedia=mC.prototype.parseMedia;mC.prototype.setManifestType=mC.prototype.setManifestType;mC.prototype.setSequenceMode=mC.prototype.setSequenceMode;mC.prototype.parseInit=mC.prototype.parseInit;Je['application/mp4; codecs="stpp"']=function(){return new mC};
|
|
1278
|
+
Je['application/mp4; codecs="stpp.ttml"']=function(){return new mC};Je['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new mC};Je['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new mC};Je['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new mC};Je['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new mC};Je['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new mC};Je['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new mC};function nC(){this.h=!1;this.g="UNKNOWN"}nC.prototype.parseInit=function(){};nC.prototype.setSequenceMode=function(a){this.h=a};nC.prototype.setManifestType=function(a){this.g=a};
|
|
1279
|
+
nC.prototype.parseMedia=function(a,b){a=rc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new U(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new U(2,2,2E3);a=oC(new Jp(a[1]));if(null==a)throw new U(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));
|
|
1280
|
+
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Jp(e);var f=new Kd;Mp(e);Kp(e);for(var g=Mp(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
|
|
1281
|
+
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Kp(e);g=Mp(e)}b.push(f)}d=new Map;pC(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
|
|
1282
1282
|
l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Jd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=
|
|
1283
1283
|
700;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Td;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
|
|
1284
|
-
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new
|
|
1285
|
-
function
|
|
1286
|
-
function
|
|
1287
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1288
|
-
m.next())
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1291
|
-
if(!f)break;if(f=
|
|
1292
|
-
function
|
|
1293
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ld);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1294
|
-
function
|
|
1295
|
-
Je["text/vtt"]=function(){return new
|
|
1296
|
-
|
|
1297
|
-
p.value;var r=p.Rg||l,u=p.jf?c+p.jf:a;a=u+(r||0);var v=0;do{var w=m.T();v+=w;var A=m.T(),z=null;"vttc"==Og(A)?8<w&&(z=m.Hb(w-8)):m.skip(w-8);r&&z&&(w=
|
|
1298
|
-
function
|
|
1299
|
-
function
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Ff:e.Ff},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
1304
|
-
function
|
|
1284
|
+
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Jp(f[0]),k=oC(g),n=Lp(g,/[ \t]+--\x3e[ \t]+/g),l=oC(g),null==k||null==n||null==l)Ya("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Jd(k,l,"");Kp(g);for(k=Mp(g);k;)qC(m,k,b),Kp(g),k=Mp(g);rC(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
|
|
1285
|
+
function pC(a){for(var b=t(Object.entries(ae)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Jd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(be));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Jd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1286
|
+
function rC(a,b,c){if(a.includes("<")){0===c.size&&pC(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(sC)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1287
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=tC(a);try{var m=Yg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
|
|
1288
|
+
m.next())uC(a.value,b,c);else b.payload=yc(a);else b.payload=yc(a)}else b.payload=yc(a)}function tC(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function vC(a,b){return a&&0<a.length?a:b}
|
|
1289
|
+
function uC(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kd;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=vC(g.backgroundColor,d.backgroundColor),d.color=vC(g.color,d.color),d.fontFamily=vC(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1290
|
+
vC(g.fontSize,d.fontSize),d.textShadow=vC(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Ud(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1291
|
+
if(!f)break;if(f=oC(new Jp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(bh(a)||1==e.length&&bh(e[0]))for(c=gh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Ud(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=yc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())uC(a.value,d,c)}
|
|
1292
|
+
function qC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Md:a.textAlign=Wd[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1293
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ld);else if(d=/^region:(.*)$/.exec(b)){if(b=wC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Yd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Pd,a.line=Number(c[1]),c[2]&&(a.lineAlign=Yd[c[2].toUpperCase()])}
|
|
1294
|
+
function wC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function oC(a){a=Lp(a,sC);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.VttTextParser",nC);nC.prototype.parseMedia=nC.prototype.parseMedia;nC.prototype.setManifestType=nC.prototype.setManifestType;nC.prototype.setSequenceMode=nC.prototype.setSequenceMode;nC.prototype.parseInit=nC.prototype.parseInit;var sC=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1295
|
+
Je["text/vtt"]=function(){return new nC};Je['text/vtt; codecs="vtt"']=function(){return new nC};Je['text/vtt; codecs="wvtt"']=function(){return new nC};function xC(){this.g=null}xC.prototype.parseInit=function(a){var b=this,c=!1;(new Kg).box("moov",Pg).box("trak",Pg).box("mdia",Pg).W("mdhd",function(d){d=$i(d.reader,d.version);b.g=d.timescale}).box("minf",Pg).box("stbl",Pg).W("stsd",Rg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};xC.prototype.setSequenceMode=function(){};xC.prototype.setManifestType=function(){};
|
|
1296
|
+
xC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Kg).box("moof",Pg).box("traf",Pg).W("tfdt",function(C){g=!0;c=Zi(C.reader,C.version).baseMediaDecodeTime}).W("tfhd",function(C){l=Yi(C.reader,C.flags).Nd}).W("trun",function(C){h=!0;d=aj(C.reader,C.version,C.flags).Zh}).box("mdat",Ug(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new Hg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
|
|
1297
|
+
p.value;var r=p.Rg||l,u=p.jf?c+p.jf:a;a=u+(r||0);var v=0;do{var w=m.T();v+=w;var A=m.T(),z=null;"vttc"==Og(A)?8<w&&(z=m.Hb(w-8)):m.skip(w-8);r&&z&&(w=yC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(Re)};function yC(a,b,c){var d,e,f;(new Kg).box("payl",Ug(function(g){d=rc(g)})).box("iden",Ug(function(g){e=rc(g)})).box("sttg",Ug(function(g){f=rc(g)})).parse(a);return d?zC(d,e,f,b,c):null}
|
|
1298
|
+
function zC(a,b,c,d,e){d=new Jd(d,e,"");rC(a,d,new Map);b&&(d.id=b);if(c)for(a=new Jp(c),b=Mp(a);b;)qC(d,b,[]),Kp(a),b=Mp(a);return d}P("shaka.text.Mp4VttParser",xC);xC.prototype.parseMedia=xC.prototype.parseMedia;xC.prototype.setManifestType=xC.prototype.setManifestType;xC.prototype.setSequenceMode=xC.prototype.setSequenceMode;xC.prototype.parseInit=xC.prototype.parseInit;Je['application/mp4; codecs="wvtt"']=function(){return new xC};function AC(){}AC.prototype.parseInit=function(){};AC.prototype.setSequenceMode=function(){};AC.prototype.setManifestType=function(){};AC.prototype.parseMedia=function(a){var b=rc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Jp(c[0]),e=BC(d),f=Lp(d,/,/g);d=BC(d);if(null==e||null==f||null==d)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Jd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1299
|
+
function BC(a){a=Lp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}P("shaka.text.SbvTextParser",AC);AC.prototype.parseMedia=AC.prototype.parseMedia;AC.prototype.setManifestType=AC.prototype.setManifestType;AC.prototype.setSequenceMode=AC.prototype.setSequenceMode;AC.prototype.parseInit=AC.prototype.parseInit;Je["text/x-subviewer"]=function(){return new AC};function CC(){this.g=new nC}CC.prototype.parseInit=function(){};CC.prototype.setSequenceMode=function(){};CC.prototype.setManifestType=function(){};CC.prototype.parseMedia=function(a,b,c){a=rc(a);a=DC(a);a=Gb(vc(a));return this.g.parseMedia(a,b,c)};
|
|
1300
|
+
function DC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",CC);CC.srt2webvtt=DC;CC.prototype.parseMedia=CC.prototype.parseMedia;
|
|
1301
|
+
CC.prototype.setManifestType=CC.prototype.setManifestType;CC.prototype.setSequenceMode=CC.prototype.setSequenceMode;CC.prototype.parseInit=CC.prototype.parseInit;Je["text/srt"]=function(){return new CC};function EC(){}EC.prototype.parseInit=function(){};EC.prototype.setSequenceMode=function(){};EC.prototype.setManifestType=function(){};
|
|
1302
|
+
EC.prototype.parseMedia=function(a){var b="",c="";a=rc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=FC.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=GC.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(HC);else if("Style"==e){e=f.split(HC);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1303
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Ff:e.Ff},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=GC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(HC);else if("Dialogue"==f){g=g.split(HC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=IC(f.Start);var k=IC(f.End);g=new Jd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Ff=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Ff}}(e)))&&JC(g,f);d.push(g)}return d};
|
|
1304
|
+
function JC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=KC(c))a.color=c;if(c=b.BackColour)if(c=KC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Rd;a.textAlign="start";break;case 2:a.displayAlign=Rd;a.textAlign=Md;break;case 3:a.displayAlign=Rd;a.textAlign="end";
|
|
1305
1305
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Md;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Md;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1306
|
-
function
|
|
1307
|
-
var
|
|
1308
|
-
function
|
|
1309
|
-
function
|
|
1310
|
-
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function
|
|
1311
|
-
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Xi(e),g=f.length;g<e.length&&!
|
|
1312
|
-
k.Oe,g+l),size:k.ia,duration:1024,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:h},stream:b};c=new
|
|
1313
|
-
P("shaka.transmuxer.AacTransmuxer",
|
|
1306
|
+
function KC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function IC(a){a=LC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",EC);EC.prototype.parseMedia=EC.prototype.parseMedia;EC.prototype.setManifestType=EC.prototype.setManifestType;EC.prototype.setSequenceMode=EC.prototype.setSequenceMode;EC.prototype.parseInit=EC.prototype.parseInit;
|
|
1307
|
+
var FC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,GC=/^\s*([^:]+):\s*(.*)/,HC=/\s*,\s*/,LC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Je["text/x-ssa"]=function(){return new EC};function MC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Oe:c,ia:a}:null}function NC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,cb:"mp4a.40."+e}}
|
|
1308
|
+
function OC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1309
|
+
function PC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1310
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function QC(a){this.i=a;this.h=0;this.g=new Map}q=QC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?od(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Fe(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1311
|
+
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Xi(e),g=f.length;g<e.length&&!OC(e,g);g++);a=1E3*c.endTime;f=Wi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=NC(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=MC(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var l=k.Oe+k.ia;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1312
|
+
k.Oe,g+l),size:k.ia,duration:1024,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});g+=l}c=f.sampleRate;a=Math.floor(a*c/1E3);d={id:b.id,type:"audio",codecs:f.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:a,rb:h},stream:b};c=new bx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=hx(c),this.g.set(b.id,d));b=yx(c);this.h++;b=Fc(d,b);return Promise.resolve(b)};
|
|
1313
|
+
P("shaka.transmuxer.AacTransmuxer",QC);QC.prototype.transmux=QC.prototype.transmux;QC.prototype.getOriginalMimeType=QC.prototype.getOriginalMimeType;QC.prototype.convertCodecs=QC.prototype.convertCodecs;QC.prototype.isSupported=QC.prototype.isSupported;QC.prototype.destroy=QC.prototype.destroy;ge("audio/aac",function(){return new QC("audio/aac")},me);function RC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1314
1314
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,wa:a,ia:e}}
|
|
1315
|
-
function
|
|
1316
|
-
q.transmux=function(a,b,c,d){a=Gb(a);for(var e=Xi(a),f=e.length;f<a.length&&!
|
|
1317
|
-
wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});f+=l.ia}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ub:[],wa:h,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:k},stream:b};c=new
|
|
1318
|
-
|
|
1319
|
-
q.transmux=function(a,b,c,d){a=Gb(a);for(var e=Xi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=
|
|
1320
|
-
size:l.ia,duration:1536,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});f+=l.ia}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ub:[],wa:h,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:k},stream:b};c=new
|
|
1321
|
-
|
|
1315
|
+
function SC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function TC(a){this.i=a;this.h=0;this.g=new Map}q=TC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?od(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1316
|
+
q.transmux=function(a,b,c,d){a=Gb(a);for(var e=Xi(a),f=e.length;f<a.length&&!SC(a,f);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=RC(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.wa;k.push({data:a.subarray(f,f+l.ia),size:l.ia,duration:1536,
|
|
1317
|
+
wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});f+=l.ia}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ub:[],wa:h,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:k},stream:b};c=new bx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=hx(c),this.g.set(b.id,d));b=yx(c);this.h++;b=Fc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",TC);TC.prototype.transmux=TC.prototype.transmux;
|
|
1318
|
+
TC.prototype.getOriginalMimeType=TC.prototype.getOriginalMimeType;TC.prototype.convertCodecs=TC.prototype.convertCodecs;TC.prototype.isSupported=TC.prototype.isSupported;TC.prototype.destroy=TC.prototype.destroy;ge("audio/ac3",function(){return new TC("audio/ac3")},me);function UC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new hj(a.subarray(b+2));jj(c,2);jj(c,3);var d=kj(c,11)+1<<1,e=kj(c,2);if(3==e){e=kj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=kj(c,2);var g=kj(c,3),h=kj(c,1);c=kj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,wa:a,ia:d}};function VC(a){this.i=a;this.h=0;this.g=new Map}q=VC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?od(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1319
|
+
q.transmux=function(a,b,c,d){a=Gb(a);for(var e=Xi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Wi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=UC(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.wa;k.push({data:a.subarray(f,f+l.ia),
|
|
1320
|
+
size:l.ia,duration:1536,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});f+=l.ia}c=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ub:[],wa:h,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:k},stream:b};c=new bx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=hx(c),this.g.set(b.id,d));b=yx(c);this.h++;b=Fc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",VC);VC.prototype.transmux=VC.prototype.transmux;
|
|
1321
|
+
VC.prototype.getOriginalMimeType=VC.prototype.getOriginalMimeType;VC.prototype.convertCodecs=VC.prototype.convertCodecs;VC.prototype.isSupported=VC.prototype.isSupported;VC.prototype.destroy=VC.prototype.destroy;ge("audio/ec3",function(){return new VC("audio/ec3")},me);function WC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new hj(b.data),d=sj(c);sj(c);sj(c);pj(c);if(XC.includes(d)&&(d=V(c),3===d&&jj(c,1),pj(c),pj(c),jj(c,1),rj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)rj(c)&&(6>e?tj(c,16):tj(c,64))}pj(c);d=V(c);if(0===d)V(c);else if(1===d)for(jj(c,1),pj(c),pj(c),d=V(c),e=0;e<d;e++)pj(c);pj(c);jj(c,1);var f=V(c),g=V(c),h=kj(c,1);0===h&&jj(c,1);jj(c,1);var k=0,l=0,m=0,n=0;
|
|
1322
1322
|
rj(c)&&(k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(rj(c)&&rj(c)){var p=sj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=kj(c,16),e=kj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
|
|
1323
1323
|
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ia:a,Pa:d,Ra:e}}
|
|
1324
|
-
function
|
|
1325
|
-
{data:Fc.apply(zc,x(c)),Yd:b}:null}var
|
|
1326
|
-
Ia:b,Pa:a.lk,Ra:a.kk}}function
|
|
1327
|
-
function
|
|
1324
|
+
function YC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=uj(new hj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1325
|
+
{data:Fc.apply(zc,x(c)),Yd:b}:null}var XC=[100,110,122,244,44,83,86,118,128,138,139,134];function ZC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=$C(b.fullData);a=aD(c.fullData);var f=bD(d.fullData);b=cD(b.fullData,c.fullData,d.fullData,{Jg:e.Jg,fh:e.fh,mg:a.mg,ng:a.ng,gg:a.gg,lg:a.lg,hg:a.hg,ig:a.ig,jg:a.jg,kg:a.kg,$f:a.$f,ag:a.ag,cg:a.cg,dg:a.dg,eg:a.eg,fg:a.fg,Xf:a.Xf,Xe:a.Xe,Vf:a.Vf,Sf:a.Sf,Rf:a.Rf,Mg:f.Mg});return{height:a.height,width:a.width,
|
|
1326
|
+
Ia:b,Pa:a.lk,Ra:a.kk}}function $C(a){var b=new hj(a,!0);sj(b);sj(b);kj(b,4);kj(b,2);kj(b,6);a=kj(b,3);b=rj(b);return{Jg:a+1,fh:b}}
|
|
1327
|
+
function aD(a){a=new hj(a,!0);sj(a);sj(a);var b=0,c=0,d=0,e=0;kj(a,4);var f=kj(a,3);rj(a);for(var g=kj(a,2),h=kj(a,1),k=kj(a,5),l=sj(a),m=sj(a),n=sj(a),p=sj(a),r=sj(a),u=sj(a),v=sj(a),w=sj(a),A=sj(a),z=sj(a),C=sj(a),y=[],B=[],D=0;D<f;D++)y.push(rj(a)),B.push(rj(a));if(0<f)for(D=f;8>D;D++)kj(a,2);for(D=0;D<f;D++)y[D]&&kj(a,88),B[D]&&sj(a);V(a);y=V(a);3==y&&kj(a,1);B=V(a);D=V(a);rj(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var K=V(a),I=V(a),J=V(a);if(rj(a))for(var H=0;H<=f;H++)V(a),V(a),V(a);else V(a),
|
|
1328
1328
|
V(a),V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(rj(a)&&rj(a))for(H=0;4>H;H++)for(var G=0;G<(3===H?2:6);G++)if(rj(a)){var N=Math.min(64,1<<4+(H<<1));1<H&&qj(a);for(var L=0;L<N;L++)qj(a)}else V(a);rj(a);rj(a);rj(a)&&(sj(a),V(a),V(a),rj(a));H=V(a);for(N=G=0;N<H;N++)if(L=!1,0!==N&&(L=rj(a)),L){N===H&&V(a);rj(a);V(a);for(var M=L=0;M<=G;M++){var Q=rj(a),T=!1;Q||(T=rj(a));(Q||T)&&L++}G=L}else{M=V(a);L=V(a);G=M+L;for(Q=0;Q<M;Q++)V(a),rj(a);for(M=0;M<L;M++)V(a),rj(a)}if(rj(a))for(H=V(a),G=0;G<H;G++){for(N=0;N<
|
|
1329
1329
|
J+4;N++)kj(a,1);kj(a,1)}H=J=1;G=0;rj(a);rj(a);if(rj(a)){rj(a)&&(N=sj(a),L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<N&&16>=N?(J=L[N-1],H=M[N-1]):255===N&&(J=kj(a,16),H=kj(a,16)));rj(a)&&rj(a);rj(a)&&(kj(a,3),rj(a),rj(a)&&(sj(a),sj(a),sj(a)));rj(a)&&(V(a),V(a));rj(a);rj(a);rj(a);if(N=rj(a))V(a),V(a),V(a),V(a);if(rj(a)&&(kj(a,32),kj(a,32),rj(a)&&V(a),rj(a))){M=!1;N=rj(a);L=rj(a);if(N||L){if(M=rj(a))sj(a),kj(a,5),rj(a),kj(a,5);kj(a,4);kj(a,4);M&&
|
|
1330
1330
|
kj(a,4);kj(a,5);kj(a,5);kj(a,5)}for(Q=0;Q<=f;Q++){var R=!0;T=1;rj(a)||(R=rj(a));var ra=!1;R?V(a):ra=rj(a);ra||(T=V(a)+1);if(N){for(R=0;R<T;R++)V(a),V(a),M&&(V(a),V(a));rj(a)}if(L){for(R=0;R<T;R++)V(a),V(a),M&&(V(a),V(a));rj(a)}}}rj(a)&&(rj(a),rj(a),rj(a),G=V(a),V(a),V(a),V(a),V(a))}return{gg:C,mg:g,ng:h,lg:k,hg:l,ig:m,jg:n,kg:p,$f:r,ag:u,cg:v,dg:w,eg:A,fg:z,Xe:G,Xf:0,Vf:y,Sf:K,Rf:I,width:B-(b+c)*(1===y||2===y?2:1),height:D-(d+e)*(1===y?2:1),lk:J,kk:H}}
|
|
1331
|
-
function
|
|
1332
|
-
function
|
|
1333
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function
|
|
1334
|
-
function
|
|
1335
|
-
var
|
|
1336
|
-
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Xi(e).length;f<e.length&&!
|
|
1337
|
-
duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:a},stream:b};g=new
|
|
1338
|
-
|
|
1339
|
-
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Od().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.fc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=
|
|
1340
|
-
|
|
1331
|
+
function bD(a){var b=new hj(a,!0);sj(b);sj(b);V(b);V(b);rj(b);rj(b);kj(b,3);rj(b);rj(b);V(b);V(b);qj(b);rj(b);rj(b);rj(b)&&V(b);qj(b);qj(b);rj(b);rj(b);rj(b);rj(b);a=rj(b);b=rj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Mg:c}}
|
|
1332
|
+
function cD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.mg&3)<<6|(d.ng?1:0)<<5|d.lg&31;e[2]=d.hg;e[3]=d.ig;e[4]=d.jg;e[5]=d.kg;e[6]=d.$f;e[7]=d.ag;e[8]=d.cg;e[9]=d.dg;e[10]=d.eg;e[11]=d.fg;e[12]=d.gg;e[13]=240|(d.Xe&3840)>>8;e[14]=d.Xe&255;e[15]=252|d.Mg&3;e[16]=252|d.Vf&3;e[17]=248|d.Sf&7;e[18]=248|d.Rf&7;e[19]=0;e[20]=0;e[21]=(d.Xf&3)<<6|(d.Jg&7)<<3|(d.fh?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1333
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function dD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*eD[14*(3===c?3-d:3===d?3:4)+e-1];f=fD[3*(3===c?0:2===c?1:2)+f];c=gD[c][d];var h=hD[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ia:k,jk:8*c*h}}return null}
|
|
1334
|
+
function iD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function jD(a,b){if(b+1<a.length&&iD(a,b)){var c=dD(a,b),d=4;c&&c.ia&&(d=c.ia);b+=d;return b===a.length||b+1<a.length&&iD(a,b)}return!1}
|
|
1335
|
+
var eD=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],fD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],gD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],hD=[0,1,1,4];function kD(a){this.i=a;this.h=0;this.g=new Map}q=kD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?od(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1336
|
+
q.transmux=function(a,b,c,d){for(var e=Gb(a),f=Xi(e).length;f<e.length&&!jD(e,f);f++);var g;for(a=[];f<e.length;){var h=dD(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));g||(g=h);f+h.ia<=e.length&&a.push({data:e.subarray(f,f+h.ia),size:h.ia,duration:1152,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});f+=h.ia}if(!g)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=9E4*g.jk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1337
|
+
duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.h,baseMediaDecodeTime:c,rb:a},stream:b};g=new bx([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=hx(g),this.g.set(b.id,d));b=yx(g);this.h++;b=Fc(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",kD);kD.prototype.transmux=kD.prototype.transmux;kD.prototype.getOriginalMimeType=kD.prototype.getOriginalMimeType;kD.prototype.convertCodecs=kD.prototype.convertCodecs;kD.prototype.isSupported=kD.prototype.isSupported;
|
|
1338
|
+
kD.prototype.destroy=kD.prototype.destroy;ge("audio/mpeg",function(){return new kD("audio/mpeg")},me);function lD(a){this.h=a;this.g=null}q=lD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Fe(a).split(","),c=Kc("audio",b);b=Kc("video",b);return!c||b||"mp3"!=ve(c)?!1:od(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1339
|
+
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Gb(a);a=this.g.parse(a);if("mp3"!=a.Od().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));c=new Uint8Array([]);e=t(a.fc());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=dD(a,b))?(b+d.ia<=a.length&&(c=Fc(c,a.subarray(b,b+d.ia))),b+=d.ia):b++;return Promise.resolve(c)};P("shaka.transmuxer.MpegTsTransmuxer",lD);lD.prototype.transmux=lD.prototype.transmux;
|
|
1340
|
+
lD.prototype.getOriginalMimeType=lD.prototype.getOriginalMimeType;lD.prototype.convertCodecs=lD.prototype.convertCodecs;lD.prototype.isSupported=lD.prototype.isSupported;lD.prototype.destroy=lD.prototype.destroy;ge("video/mp2t",function(){return new lD("video/mp2t")},le);/*
|
|
1341
1341
|
@license
|
|
1342
1342
|
MSS Transmuxer
|
|
1343
1343
|
Copyright 2015 Dash Industry Forum
|
|
1344
1344
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1345
1345
|
*/
|
|
1346
|
-
function
|
|
1347
|
-
function
|
|
1346
|
+
function mD(a){this.h=a;(this.g=bv.get("ISOBoxer")())&&nD(this)}
|
|
1347
|
+
function nD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1348
1348
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1349
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==
|
|
1349
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==oD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=mD.prototype;q.destroy=function(){};
|
|
1350
1350
|
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return od(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return od(b)||od(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
|
|
1351
1351
|
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Gb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.P()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1352
1352
|
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1353
|
-
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=
|
|
1354
|
-
|
|
1355
|
-
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Fe(c).split(",");c=Kc("audio",d);d=Kc("video",d);if(c&&(c=
|
|
1353
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=pD(u,"traf")+pD(h,"senc")+16);var w=Gb(e.write());return Promise.resolve(w)}catch(A){return A instanceof U?Promise.reject(A):Promise.reject(new U(2,3,3022,c?c.P()[0]:null))}};function pD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",mD);mD.prototype.transmux=mD.prototype.transmux;
|
|
1354
|
+
mD.prototype.getOriginalMimeType=mD.prototype.getOriginalMimeType;mD.prototype.convertCodecs=mD.prototype.convertCodecs;mD.prototype.isSupported=mD.prototype.isSupported;mD.prototype.destroy=mD.prototype.destroy;var oD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);ge("mss/audio/mp4",function(){return new mD("mss/audio/mp4")},me);ge("mss/video/mp4",function(){return new mD("mss/video/mp4")},me);function qD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=qD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1355
|
+
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Fe(c).split(",");c=Kc("audio",d);d=Kc("video",d);if(c&&(c=ve(c),!rD.includes(c))||d&&(c=ve(d),!sD.includes(c)))return!1;if(b)return od(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return od(b)||od(a)};
|
|
1356
1356
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Fe(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return hf(c,"audio/mp4")}).map(gf).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1357
|
-
q.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Cj(f)){for(var g=Xi(f),h=g.length;h<f.length;h++)if(
|
|
1358
|
-
if(!v.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var C=
|
|
1357
|
+
q.transmux=function(a,b,c,d,e){var f=Gb(a);if("audio"==e&&!Cj(f)){for(var g=Xi(f),h=g.length;h<f.length;h++)if(jD(f,h))return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));for(h=g.length;h<f.length;h++)if(OC(f,h))return this.h||(this.h=new QC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.P()[0]:null))}this.j?this.j.clearData():this.j=new vj;var k=this.j.parse(f),l=[],m=k.Od();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.cd();
|
|
1358
|
+
if(!v.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],z=A.nalus;u.push.apply(u,x(z));var C=YC(z);if(C){null==r&&(r=A.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:y,wb:Math.round((A.pts||0)-(A.dts||0)),flags:{xb:0,kb:0,jb:0,gb:0,hb:C.Yd?2:1,yb:C.Yd?0:1}})}}var B=WC(u);if(!B||null==r)throw new U(2,3,3018,c?c.P()[0]:null);b.height=B.height;
|
|
1359
1359
|
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ia:B.Ia,Pa:B.Pa,Ra:B.Ra,data:{Ib:this.g,baseMediaDecodeTime:r,rb:p},stream:b};break;case "hvc":var D=[],K=null,I=[],J=k.cd();if(!J.length)throw new U(2,3,3023,c?c.P()[0]:null);for(var H=0;H<J.length;H++){var G=J[H],N=G.nalus;I.push.apply(I,x(N));for(var L=!1,M=[],Q=!1,T=t(N),R=T.next();!R.done;R=T.next()){var ra=R.value;switch(ra.type){case 1:case 0:var sa=
|
|
1360
1360
|
Q=!0;break;case 19:case 20:case 21:L=sa=Q=!0;break;case 32:sa=!0;break;case 33:sa=!0;break;case 34:sa=!0;break;case 35:Q=sa=!0;break;case 39:case 40:sa=!0;break;default:sa=!1}if(Q&&sa){var Ca=ra.fullData.byteLength,Fa=new Uint8Array(4);Fa[0]=Ca>>24&255;Fa[1]=Ca>>16&255;Fa[2]=Ca>>8&255;Fa[3]=Ca&255;M.push(Fa);M.push(ra.fullData)}}var Ia=M.length?{data:Fc.apply(zc,x(M)),Yd:L}:null;if(Ia){null==K&&null!=G.dts&&(K=G.dts);var Pa=void 0;Pa=H+1<J.length?(J[H+1].dts||0)-(G.dts||0):1<J.length?(G.dts||0)-(J[H-
|
|
1361
|
-
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ia.data,size:Ia.data.byteLength,duration:Pa,wb:Math.round((G.pts||0)-(G.dts||0)),flags:{xb:0,kb:0,jb:0,gb:0,hb:Ia.Yd?2:1,yb:Ia.Yd?0:1}})}}var Ja=
|
|
1362
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Ga,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var
|
|
1363
|
-
kb:0,jb:0,gb:0,hb:2,yb:0}});Rc+=
|
|
1364
|
-
duration:1024,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}}),dh+=1024/Ga.sampleRate*9E4}var nj=Ga.sampleRate,oj=$a/9E4*nj;n={id:b.id,type:"audio",codecs:Ga.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:nj,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:oj,rb:db},stream:b};break;case "ac3":for(var eh=[],
|
|
1365
|
-
(Yj=On.pts);for(var Mf=0;Mf<Pn.length;){var
|
|
1366
|
-
Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:
|
|
1367
|
-
Nf++}}if(0==Zj||0==Qn.byteLength||null==ak)throw new U(2,3,3018,c?c.P()[0]:null);var
|
|
1368
|
-
Ee);Of?(bk||(bk=Of),Ee+Of.ia<=rh.length&&Tw.push({data:rh.subarray(Ee,Ee+Of.ia),size:Of.ia,duration:1152,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}}),Ee+=Of.ia):Ee++}}}if(!bk||null==ck)throw new U(2,3,3018,c?c.P()[0]:null);var Vw=bk.sampleRate,
|
|
1361
|
+
1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:Ia.data,size:Ia.data.byteLength,duration:Pa,wb:Math.round((G.pts||0)-(G.dts||0)),flags:{xb:0,kb:0,jb:0,gb:0,hb:Ia.Yd?2:1,yb:Ia.Yd?0:1}})}}var Ja=ZC(I);if(!Ja||null==K)throw new U(2,3,3018,c?c.P()[0]:null);b.height=Ja.height;b.width=Ja.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ub:[],wa:new Uint8Array([]),Ia:Ja.Ia,Pa:Ja.Pa,Ra:Ja.Ra,data:{Ib:this.g,baseMediaDecodeTime:K,rb:D},stream:b}}n&&
|
|
1362
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var db=[],Ga,$a=null,xb=t(k.fc()),ad=xb.next();!ad.done;ad=xb.next()){var xe=ad.value,Fd=xe.data;if(Fd){var Rc=0;Ga=NC(Fd,Rc);if(!Ga)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=Ga.sampleRate;b.channelsCount=Ga.channelCount;null==$a&&null!==xe.pts&&($a=xe.pts);for(;Rc<Fd.length;){var ye=MC(Fd,Rc);if(ye){var ze=ye.Oe+ye.ia;Rc+ze<=Fd.length&&db.push({data:Fd.subarray(Rc+ye.Oe,Rc+ze),size:ye.ia,duration:1024,wb:0,flags:{xb:0,
|
|
1363
|
+
kb:0,jb:0,gb:0,hb:2,yb:0}});Rc+=ze}else Rc++}}}if(!Ga||null==$a){if(!k.cd().length)throw new U(2,3,3018,c?c.P()[0]:null);$a=9E4*c.startTime;var Ae=Kc("audio",b.codecs.split(","));if(!Ae||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.P()[0]:null);Ga={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,cb:Ae};var Gd=PC(Ae,b.channelsCount);if(!Gd)throw new U(2,3,3018,c?c.P()[0]:null);for(var mj=$a+9E4*(c.endTime-c.startTime),dh=$a;dh<mj;)db.push({data:Gd,size:Gd.byteLength,
|
|
1364
|
+
duration:1024,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}}),dh+=1024/Ga.sampleRate*9E4}var nj=Ga.sampleRate,oj=$a/9E4*nj;n={id:b.id,type:"audio",codecs:Ga.cb,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:nj,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:oj,rb:db},stream:b};break;case "ac3":for(var eh=[],Be=0,pc=new Uint8Array([]),Yj=null,Qw=t(k.fc()),Nn=Qw.next();!Nn.done;Nn=Qw.next()){var On=Nn.value,Pn=On.data;null==Yj&&null!==On.pts&&
|
|
1365
|
+
(Yj=On.pts);for(var Mf=0;Mf<Pn.length;){var Zd=RC(Pn,Mf);Zd?(b.audioSamplingRate=Zd.sampleRate,b.channelsCount=Zd.channelCount,Be=Zd.sampleRate,pc=Zd.wa,eh.push({data:Pn.subarray(Mf,Mf+Zd.ia),size:Zd.ia,duration:1536,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}}),Mf+=Zd.ia):Mf++}}if(0==Be||0==pc.byteLength||null==Yj)throw new U(2,3,3018,c?c.P()[0]:null);var LG=Yj/9E4*Be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Be,duration:d,ub:[],wa:pc,Ia:new Uint8Array([]),
|
|
1366
|
+
Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:LG,rb:eh},stream:b};break;case "ec3":for(var Rw=[],Zj=0,Qn=new Uint8Array([]),ak=null,Sw=t(k.fc()),Rn=Sw.next();!Rn.done;Rn=Sw.next()){var Sn=Rn.value,Tn=Sn.data;null==ak&&null!==Sn.pts&&(ak=Sn.pts);for(var Nf=0;Nf<Tn.length;){var $d=UC(Tn,Nf);$d?(b.audioSamplingRate=$d.sampleRate,b.channelsCount=$d.channelCount,Zj=$d.sampleRate,Qn=$d.wa,Rw.push({data:Tn.subarray(Nf,Nf+$d.ia),size:$d.ia,duration:1536,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}}),Nf+=$d.ia):
|
|
1367
|
+
Nf++}}if(0==Zj||0==Qn.byteLength||null==ak)throw new U(2,3,3018,c?c.P()[0]:null);var MG=ak/9E4*Zj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Zj,duration:d,ub:[],wa:Qn,Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:MG,rb:Rw},stream:b};break;case "mp3":for(var Tw=[],bk,ck=null,Uw=t(k.fc()),Un=Uw.next();!Un.done;Un=Uw.next()){var Vn=Un.value,rh=Vn.data;if(rh){null==ck&&null!==Vn.pts&&(ck=Vn.pts);for(var Ee=0;Ee<rh.length;){var Of=dD(rh,
|
|
1368
|
+
Ee);Of?(bk||(bk=Of),Ee+Of.ia<=rh.length&&Tw.push({data:rh.subarray(Ee,Ee+Of.ia),size:Of.ia,duration:1152,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}}),Ee+=Of.ia):Ee++}}}if(!bk||null==ck)throw new U(2,3,3018,c?c.P()[0]:null);var Vw=bk.sampleRate,NG=ck/9E4*Vw;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Vw,duration:d,ub:[],wa:new Uint8Array([]),Ia:new Uint8Array([]),Pa:0,Ra:0,data:{Ib:this.g,baseMediaDecodeTime:NG,rb:Tw},stream:b};break;case "opus":var Ww=
|
|
1369
1369
|
[],dk=null,cd=k.H;if(!cd)throw new U(2,3,3018,c?c.P()[0]:null);var Hb=[];switch(cd.Ji){case 1:case 2:Hb=[0];break;case 0:Hb=[255,1,1,0,1];break;case 128:Hb=[255,2,0,0,1];break;case 3:Hb=[1,2,1,0,2,1];break;case 4:Hb=[1,2,2,0,1,2,3];break;case 5:Hb=[1,3,2,0,4,1,2,3];break;case 6:Hb=[1,4,2,0,4,1,2,3,5];break;case 7:Hb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Hb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Hb=[1,1,2,0,1];break;case 131:Hb=[1,1,3,0,1,2];break;case 132:Hb=[1,1,4,0,1,2,3];break;case 133:Hb=[1,1,5,
|
|
1370
|
-
0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var Xw=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var Yw=cd.sampleRate,Zw=t(k.fc()),Wn=Zw.next();!Wn.done;Wn=Zw.next()){var Xn=Wn.value,Pf=Xn.data;null==dk&&null!==Xn.pts&&(dk=Xn.pts);for(var sh=0;sh<Pf.length;){for(var
|
|
1371
|
-
|
|
1372
|
-
Ra:0,data:{Ib:this.g,baseMediaDecodeTime:
|
|
1373
|
-
|
|
1370
|
+
0,1,2,3,4];break;case 134:Hb=[1,1,6,0,1,2,3,4,5];break;case 135:Hb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Hb=[1,1,8,0,1,2,3,4,5,6,7]}var Xw=new Uint8Array([0,cd.channelCount,0,0,cd.sampleRate>>>24&255,cd.sampleRate>>>17&255,cd.sampleRate>>>8&255,cd.sampleRate>>>0&255,0,0].concat(x(Hb)));for(var Yw=cd.sampleRate,Zw=t(k.fc()),Wn=Zw.next();!Wn.done;Wn=Zw.next()){var Xn=Wn.value,Pf=Xn.data;null==dk&&null!==Xn.pts&&(dk=Xn.pts);for(var sh=0;sh<Pf.length;){for(var OG=0!==(Pf[sh+1]&16),PG=0!==(Pf[sh+1]&8),
|
|
1371
|
+
Id=sh+2,ek=0;255===Pf[Id];)ek+=255,Id+=1;ek+=Pf[Id];Id+=1;Id+=OG?2:0;Id+=PG?2:0;var $w=Pf.slice(Id,Id+ek);Ww.push({data:$w,size:$w.byteLength,duration:960,wb:0,flags:{xb:0,kb:0,jb:0,gb:0,hb:2,yb:0}});sh=Id+ek}}if(0==Xw.byteLength||null==dk)throw new U(2,3,3018,c?c.P()[0]:null);b.audioSamplingRate=cd.sampleRate;b.channelsCount=cd.channelCount;var QG=dk/9E4*Yw;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Yw,duration:d,ub:[],wa:Xw,Ia:new Uint8Array([]),Pa:0,
|
|
1372
|
+
Ra:0,data:{Ib:this.g,baseMediaDecodeTime:QG,rb:Ww},stream:b}}n&&(l.push(n),n=null)}}catch(Yn){return Yn&&3023==Yn.code?Promise.resolve(new Uint8Array([])):Promise.reject(Yn)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.P()[0]:null));var ax=new bx(l);if(this.i.has(b.id))var Zn=this.i.get(b.id);else Zn=hx(ax),this.i.set(b.id,Zn);var RG=yx(ax);this.g++;var SG=Fc(Zn,RG);return Promise.resolve(SG)};P("shaka.transmuxer.TsTransmuxer",qD);qD.prototype.transmux=qD.prototype.transmux;
|
|
1373
|
+
qD.prototype.getOriginalMimeType=qD.prototype.getOriginalMimeType;qD.prototype.convertCodecs=qD.prototype.convertCodecs;qD.prototype.isSupported=qD.prototype.isSupported;qD.prototype.destroy=qD.prototype.destroy;var rD=["aac","ac-3","ec-3","mp3","opus"],sD=["avc","hevc"];ge("video/mp2t",function(){return new qD("video/mp2t")},ke);/*
|
|
1374
1374
|
@license
|
|
1375
1375
|
EME Encryption Scheme Polyfill
|
|
1376
1376
|
Copyright 2019 Google LLC
|
|
1377
1377
|
SPDX-License-Identifier: Apache-2.0
|
|
1378
1378
|
*/
|
|
1379
|
-
function
|
|
1380
|
-
function
|
|
1381
|
-
function
|
|
1379
|
+
function tD(){}var uD;
|
|
1380
|
+
function vD(){uD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(uD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=wD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1381
|
+
function wD(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,uD.call(c,a,b),2);d=e.h;if(xD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=uD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=yD;return e.return(yD.call(c,
|
|
1382
1382
|
a,b))})}
|
|
1383
|
-
function
|
|
1384
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,
|
|
1385
|
-
function
|
|
1386
|
-
function
|
|
1387
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
1388
|
-
function
|
|
1389
|
-
new
|
|
1390
|
-
function
|
|
1391
|
-
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",
|
|
1392
|
-
|
|
1393
|
-
function
|
|
1394
|
-
function
|
|
1383
|
+
function yD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=zD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=AD(h.videoCapabilities,d),l=AD(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1384
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,uD.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new BD(p,r,u))})}function AD(a,b){return a?a.filter(function(c){return CD(c.encryptionScheme,b)}):a}P("EmeEncryptionSchemePolyfill",tD);tD.install=vD;function DD(){}var ED;
|
|
1385
|
+
function FD(){ED||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ED=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=GD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1386
|
+
function GD(a){var b=this,c,d,e;return O(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(f,ED.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&xD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ED,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1387
|
+
navigator.mediaCapabilities.decodingInfo=HD;if(d){f.B(3);break}e=c;return E(f,ID(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(HD.call(b,a))}})}
|
|
1388
|
+
function HD(a){var b=this,c,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=zD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},CD(d,g)&&CD(c,g))?E(m,ED.call(b,a),2):m.return(h);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1389
|
+
new BD(k.keySystemAccess,c,d);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return E(m,ID(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1390
|
+
function ID(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1391
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",DD);DD.install=FD;function BD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
|
|
1392
|
+
BD.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};BD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
|
|
1393
|
+
function zD(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function xD(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1394
|
+
function CD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(JD||KD)return!0;return!1}function LD(){}function Yz(){vD();FD()}P("EncryptionSchemePolyfills",LD);LD.install=Yz;var KD=navigator.userAgent.includes("CrKey"),JD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=LD);/*
|
|
1395
1395
|
@license
|
|
1396
1396
|
Copyright 2013 Ali Al Dallal
|
|
1397
1397
|
|
|
@@ -1415,7 +1415,7 @@ function BD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(ID||JD)retu
|
|
|
1415
1415
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1416
1416
|
SOFTWARE.
|
|
1417
1417
|
*/
|
|
1418
|
-
for(var
|
|
1418
|
+
for(var MD={ach:{C:"Lwo",D:"Acholi"},ady:{C:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",D:"Adyghe"},af:{C:"Afrikaans",D:"Afrikaans"},"af-NA":{C:"Afrikaans (Namibia)",D:"Afrikaans (Namibia)"},"af-ZA":{C:"Afrikaans (South Africa)",D:"Afrikaans (South Africa)"},ak:{C:"T\u0255\u0265i",D:"Akan"},ar:{C:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",D:"Arabic"},"ar-AR":{C:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",D:"Arabic"},"ar-MA":{C:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",D:"Arabic (Morocco)"},
|
|
1419
1419
|
"ar-SA":{C:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",D:"Arabic (Saudi Arabia)"},"ay-BO":{C:"Aymar aru",D:"Aymara"},az:{C:"Az\u0259rbaycan dili",D:"Azerbaijani"},"az-AZ":{C:"Az\u0259rbaycan dili",D:"Azerbaijani"},"be-BY":{C:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",D:"Belarusian"},bg:{C:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",D:"Bulgarian"},"bg-BG":{C:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
|
|
1420
1420
|
D:"Bulgarian"},bn:{C:"\u09ac\u09be\u0982\u09b2\u09be",D:"Bengali"},"bn-IN":{C:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",D:"Bengali (India)"},"bn-BD":{C:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",D:"Bengali (Bangladesh)"},"bs-BA":{C:"Bosanski",D:"Bosnian"},ca:{C:"Catal\u00e0",D:"Catalan"},"ca-ES":{C:"Catal\u00e0",D:"Catalan"},cak:{C:"Maya Kaqchikel",D:"Kaqchikel"},"ck-US":{C:"\u13e3\u13b3\u13a9 (tsalagi)",D:"Cherokee"},cs:{C:"\u010ce\u0161tina",
|
|
1421
1421
|
D:"Czech"},"cs-CZ":{C:"\u010ce\u0161tina",D:"Czech"},cy:{C:"Cymraeg",D:"Welsh"},"cy-GB":{C:"Cymraeg",D:"Welsh"},da:{C:"Dansk",D:"Danish"},"da-DK":{C:"Dansk",D:"Danish"},de:{C:"Deutsch",D:"German"},"de-AT":{C:"Deutsch (\u00d6sterreich)",D:"German (Austria)"},"de-DE":{C:"Deutsch (Deutschland)",D:"German (Germany)"},"de-CH":{C:"Deutsch (Schweiz)",D:"German (Switzerland)"},dsb:{C:"Dolnoserb\u0161\u0107ina",D:"Lower Sorbian"},el:{C:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",D:"Greek"},"el-GR":{C:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
|
|
@@ -1436,114 +1436,114 @@ D:"Slovak"},"sk-SK":{C:"Sloven\u010dina (Slovakia)",D:"Slovak (Slovakia)"},sl:{C
|
|
|
1436
1436
|
sw:{C:"Kiswahili",D:"Swahili"},"sw-KE":{C:"Kiswahili",D:"Swahili (Kenya)"},ta:{C:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",D:"Tamil"},"ta-IN":{C:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",D:"Tamil"},te:{C:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",D:"Telugu"},"te-IN":{C:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",D:"Telugu"},tg:{C:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",D:"Tajik"},"tg-TJ":{C:"\u0442\u043e\u04b7\u0438\u043a\u04e3",D:"Tajik"},th:{C:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
|
|
1437
1437
|
D:"Thai"},"th-TH":{C:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",D:"Thai (Thailand)"},tl:{C:"Filipino",D:"Filipino"},"tl-PH":{C:"Filipino",D:"Filipino"},tlh:{C:"tlhIngan-Hol",D:"Klingon"},tr:{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tr-TR":{C:"T\u00fcrk\u00e7e",D:"Turkish"},"tt-RU":{C:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",D:"Tatar"},uk:{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",D:"Ukrainian"},"uk-UA":{C:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
|
|
1438
1438
|
D:"Ukrainian"},ur:{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},"ur-PK":{C:"\u0627\u0631\u062f\u0648",D:"Urdu"},uz:{C:"O'zbek",D:"Uzbek"},"uz-UZ":{C:"O'zbek",D:"Uzbek"},vi:{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"vi-VN":{C:"Ti\u1ebfng Vi\u1ec7t",D:"Vietnamese"},"xh-ZA":{C:"isiXhosa",D:"Xhosa"},yi:{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",D:"Yiddish"},"yi-DE":{C:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",D:"Yiddish (German)"},zh:{C:"\u4e2d\u6587",D:"Chinese"},"zh-HANS":{C:"\u4e2d\u6587\u7b80\u4f53",
|
|
1439
|
-
D:"Chinese Simplified"},"zh-HANT":{C:"\u4e2d\u6587\u7e41\u9ad4",D:"Chinese Traditional"},"zh-CN":{C:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",D:"Chinese Simplified (China)"},"zh-HK":{C:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",D:"Chinese Traditional (Hong Kong)"},"zh-SG":{C:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",D:"Chinese Simplified (Singapore)"},"zh-TW":{C:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",D:"Chinese Traditional (Taiwan)"},"zu-ZA":{C:"isiZulu",D:"Zulu"}},
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
function
|
|
1443
|
-
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.La();c.g.xa(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.La(),this.g.xa(.5))}na(
|
|
1444
|
-
"ad-stopped",function(){c.h.textContent="";
|
|
1445
|
-
c.h()});this.eventManager.s(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.s(this.button,"click",function(){c.ad&&c.ad.isLinear()
|
|
1446
|
-
|
|
1447
|
-
!1)});this.eventManager.s(window,"click",function(){
|
|
1448
|
-
|
|
1449
|
-
c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.V(1)):(c.o=!0,c.m=Date.now(),c.j.V(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}na(
|
|
1450
|
-
this.parent.appendChild(this.container);this.eventManager.s(this.bar,"mousedown",function(f){e.controls.lc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.s(this.bar,"touchstart",function(f){e.controls.lc()&&(e.h=!0,
|
|
1451
|
-
(e.h=!1,
|
|
1452
|
-
q.release=function(){this.G&&(this.G.stop(),this.G=null);
|
|
1453
|
-
q.setValue=function(a){this.h||(this.bar.value=a)};function
|
|
1454
|
-
|
|
1455
|
-
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=W("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Qb(function(){
|
|
1456
|
-
function(){
|
|
1457
|
-
(parseFloat(c.bar.max)-f)/e.width*d))}else
|
|
1458
|
-
q.onChange=function(){if(this.video.duration)if(this.update(),this.o.V(.125),this.player.Ie().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());
|
|
1459
|
-
q.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Qa(),g=f.end-f.start;this.setRange(f.start,f.end);
|
|
1460
|
-
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):
|
|
1461
|
-
function
|
|
1462
|
-
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function
|
|
1463
|
-
function
|
|
1439
|
+
D:"Chinese Simplified"},"zh-HANT":{C:"\u4e2d\u6587\u7e41\u9ad4",D:"Chinese Traditional"},"zh-CN":{C:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",D:"Chinese Simplified (China)"},"zh-HK":{C:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",D:"Chinese Traditional (Hong Kong)"},"zh-SG":{C:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",D:"Chinese Simplified (Singapore)"},"zh-TW":{C:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",D:"Chinese Traditional (Taiwan)"},"zu-ZA":{C:"isiZulu",D:"Zulu"}},ND=t(Object.keys(MD)),OD=ND.next();!OD.done;OD=
|
|
1440
|
+
ND.next()){var PD=OD.value;MD[PD.toLowerCase()]=MD[PD]};function QD(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new jd;this.localization=this.controls.ra;this.player=this.controls.bd();this.video=this.controls.kc();this.adManager=this.player.He();this.ad=b.getAd();this.eventManager.s(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null})}
|
|
1441
|
+
QD.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};P("shaka.ui.Element",QD);QD.prototype.release=QD.prototype.release;function RD(a){return SD(a,"shaka-back-to-overflow-button")}function SD(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function TD(a){a&&(a=SD(a,"shaka-chosen-item"))&&a.parentElement.focus()}function UD(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function VD(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
|
|
1442
|
+
function WD(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function XD(a,b){QD.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Qb(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=WD(e-d,!1)+" / "+WD(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
|
|
1443
|
+
""))});this.eventManager.s(this.localization,"locale-updated",function(){});this.eventManager.s(this.localization,"locale-changed",function(){});this.eventManager.s(this.adManager,"ad-started",function(){c.g.La();c.g.xa(.5)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.La(),this.g.xa(.5))}na(XD,QD);XD.prototype.release=function(){this.g.stop();this.g=null;QD.prototype.release.call(this)};P("shaka.ui.AdCounter",XD);function YD(a,b){QD.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");VD(this.g,!1);this.parent.appendChild(this.g);this.h=W("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.s(this.localization,"locale-updated",function(){c.ad&&ZD(c)});this.eventManager.s(this.localization,"locale-changed",function(){c.ad&&ZD(c)});this.eventManager.s(this.adManager,"ad-started",function(){ZD(c)});this.eventManager.s(this.adManager,
|
|
1444
|
+
"ad-stopped",function(){c.h.textContent="";VD(c.g,!1)});this.ad&&ZD(this)}na(YD,QD);function ZD(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));VD(a.g,!0)}}P("shaka.ui.AdPosition",YD);function $D(a,b){QD.call(this,a,b);var c=this;this.button=dn();this.parent.appendChild(this.button);this.eventManager.s(this.localization,"locale-updated",function(){c.g()});this.eventManager.s(this.localization,"locale-changed",function(){c.g()});this.eventManager.s(this.video,"play",function(){c.g();c.h()});this.eventManager.s(this.video,"pause",function(){c.g();c.h()});this.eventManager.s(this.video,"seeking",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-paused",function(){c.g();
|
|
1445
|
+
c.h()});this.eventManager.s(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.s(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.s(this.button,"click",function(){c.ad&&c.ad.isLinear()?aE(c.controls):bE(c.controls)});this.ad&&(this.g(),this.h())}na($D,QD);$D.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};
|
|
1446
|
+
$D.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};$D.prototype.g=function(){};$D.prototype.h=function(){};P("shaka.ui.PlayButton",$D);function cE(a,b){$D.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}na(cE,$D);cE.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};cE.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};P("shaka.ui.BigPlayButton",cE);function dE(a,b){QD.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.s(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";VD(c.g,!0)}else VD(c.g,
|
|
1447
|
+
!1)});this.eventManager.s(window,"click",function(){VD(c.g,!1)});eE(this)}na(dE,QD);dE.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];QD.prototype.release.call(this)};function fE(a,b){gE.set(a,b)}function eE(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=gE.get(c);d?a.i.push(d.create(a.g,a.controls)):Ya("Unrecognized context menu element:",c)}}P("shaka.ui.ContextMenu",dE);
|
|
1448
|
+
dE.registerElement=fE;var gE=new Map;function hE(a,b){QD.call(this,a,b);var c=this;this.m=null;this.o=!1;this.j=new Qb(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.pg()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.o=!1;c.h.textContent="0s"});this.g=W("div");this.parent.appendChild(this.g);this.eventManager.s(this.g,"touchend",function(d){c.controls.lc()&&(c.controls.Jd()?(d.preventDefault(),c.controls.Bc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.o)?
|
|
1449
|
+
c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.V(1)):(c.o=!0,c.m=Date.now(),c.j.V(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}na(hE,QD);P("shaka.ui.HiddenSeekButton",hE);function iE(a,b){hE.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}na(iE,hE);P("shaka.ui.HiddenFastForwardButton",iE);function jE(a,b){hE.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}na(jE,hE);P("shaka.ui.HiddenRewindButton",jE);function kE(a,b,c,d){QD.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.G=new Qb(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
|
|
1450
|
+
this.parent.appendChild(this.container);this.eventManager.s(this.bar,"mousedown",function(f){e.controls.lc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.s(this.bar,"touchstart",function(f){e.controls.lc()&&(e.h=!0,lE(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.s(this.bar,"input",function(){e.onChange()});this.eventManager.s(this.bar,"touchmove",function(f){e.h&&(lE(e,f),e.onChange());f.stopPropagation()});this.eventManager.s(this.bar,"touchend",function(f){e.h&&
|
|
1451
|
+
(e.h=!1,lE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.s(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,lE(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.s(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.s(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.s(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}na(kE,QD);q=kE.prototype;
|
|
1452
|
+
q.release=function(){this.G&&(this.G.stop(),this.G=null);QD.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.G.V(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
|
|
1453
|
+
q.setValue=function(a){this.h||(this.bar.value=a)};function lE(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}P("shaka.ui.RangeElement",kE);kE.prototype.setValue=kE.prototype.setValue;kE.prototype.getValue=kE.prototype.getValue;kE.prototype.changeTo=kE.prototype.changeTo;kE.prototype.onChangeEnd=kE.prototype.onChangeEnd;
|
|
1454
|
+
kE.prototype.onChange=kE.prototype.onChange;kE.prototype.onChangeStart=kE.prototype.onChangeStart;kE.prototype.setRange=kE.prototype.setRange;function mE(a,b){kE.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.F=W("div");this.F.classList.add("shaka-ad-markers");this.container.insertBefore(this.F,this.container.childNodes[0]);this.H=this.controls.g;this.o=new Qb(function(){var d=c.getValue();c.player.U()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Qb(function(){nE(c)});this.K=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container";
|
|
1455
|
+
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=W("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Qb(function(){oE(c)});this.A=[];this.eventManager.s(this.localization,"locale-updated",function(){return pE(c)});this.eventManager.s(this.localization,"locale-changed",function(){return pE(c)});this.eventManager.s(this.adManager,"ad-started",
|
|
1456
|
+
function(){qE(c)||VD(c.container,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){qE(c)&&VD(c.container,!0)});this.eventManager.s(this.adManager,"ad-cue-points-changed",function(d){c.A=d.cuepoints;rE(c)});this.eventManager.s(this.player,"unloading",function(){c.A=[];rE(c);c.j&&(c.j.abort(),c.j=null);c.l=null;oE(c)});this.eventManager.s(this.bar,"mousemove",function(d){if(c.player.Ie().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;sE(c,d,Math.round(f+
|
|
1457
|
+
(parseFloat(c.bar.max)-f)/e.width*d))}else oE(c)});this.eventManager.s(this.container,"mouseleave",function(){c.m.stop();c.m.V(.25)});this.setValue(this.video.currentTime);this.update();pE(this);this.ad&&VD(this.container,!1)}na(mE,kE);q=mE.prototype;q.release=function(){this.o&&(this.o.stop(),this.o=null,this.I.stop(),this.I=null);kE.prototype.release.call(this)};q.onChangeStart=function(){this.K=!this.video.paused;this.controls.ah(!0);this.video.pause();this.m.stop();this.J=!0};
|
|
1458
|
+
q.onChange=function(){if(this.video.duration)if(this.update(),this.o.V(.125),this.player.Ie().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());sE(this,(d-a)/((b-a)/c.width),d)}else oE(this)};q.onChangeEnd=function(){this.o.La();this.controls.ah(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.V(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1459
|
+
q.update=function(){var a=this.H.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Qa(),g=f.end-f.start;this.setRange(f.start,f.end);qE(this)?(VD(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.H.showUnbufferedStart?
|
|
1460
|
+
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):VD(this.container,!1)};
|
|
1461
|
+
function nE(a){if(a.A.length){for(var b=a.player.Qa(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.A),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1462
|
+
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.F.style.background="linear-gradient("+d.join(",")+")"}else a.F.style.background="transparent"}function rE(a){nE(a);var b=a.player.Qa();b=b.end-b.start;a.player.U()&&5<b&&a.I.xa(1)}function qE(a){var b=a.player.Qa();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function pE(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1463
|
+
function sE(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y;O(function(B){switch(B.g){case 1:d=tE(a);if(!d)return oE(a),B.return();0>c&&(c=0);e=a.player.Qa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return E(B,a.player.ug(d.id,f),2);case 2:g=B.h;if(!g||!g.uris.length)return oE(a),B.return();a.player.U()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+uE(h)):a.u.textContent=uE(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1464
1464
|
-(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";p=g.uris[0].split("#xywh=")[0];if(a.l&&p===a.l.uris[0].split("#xywh=")[0]&&g.segment.Ob()==a.l.segment.Ob()&&g.segment.Mb()==a.l.segment.Mb()){B.B(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!p.startsWith("offline:")){B.B(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(B,5);r=Bg;u=Bl(g.segment.P(),g.segment.Ob(),g.segment.Mb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1465
1465
|
a.j=a.player.hc().request(r,u,{type:1});return E(B,a.j.promise,7);case 7:v=B.h;a.j=null;"mjpg"==d.codecs?(w=(new Kg).box("mdat",Ug(function(D){p=URL.createObjectURL(new Blob([D],{type:"image/jpeg"}))})),w.parse(v.data,!1)):(A=d.mimeType||"image/jpeg",z=new Blob([v.data],{type:A}),p=URL.createObjectURL(z));va(B,4);break;case 5:C=wa(B);if(7001==C.code)return B.return();throw C;case 4:try{a.i.removeChild(a.g)}catch(D){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=p;
|
|
1466
1466
|
a.g.onload=function(){p.startsWith("blob:")&&URL.revokeObjectURL(p)};a.i.insertBefore(a.g,a.i.firstChild);case 3:y=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+y*g.positionX+"px",a.g.style.top="-"+y*g.positionY+"px",a.g.style.transform="scale("+y+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1467
1467
|
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(B)}})}
|
|
1468
|
-
function
|
|
1469
|
-
"mjpg"==f.codecs})||b[0]}function
|
|
1470
|
-
d:(c.i.stop(),
|
|
1471
|
-
"click",function(){c.ad.skip()});this.ad&&
|
|
1468
|
+
function tE(a){var b=a.player.Ie();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Bf:c.Bf,zf:c.zf},e=d.next())if(c.Bf=e.value,c.zf=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Bf&&g.bandwidth<.01*f.zf}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
|
|
1469
|
+
"mjpg"==f.codecs})||b[0]}function oE(a){a.i.style.visibility="hidden";a.u.textContent=""}function uE(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}P("shaka.ui.SeekBar",mE);function vE(){}vE.prototype.create=function(a,b){return new mE(a,b)};mE.Factory=vE;function wE(a,b){QD.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");VD(this.h,!1);this.j.appendChild(this.h);this.g=dn();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;VD(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);xE(this);this.i=new Qb(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
|
|
1470
|
+
d:(c.i.stop(),VD(c.h,!1))});this.eventManager.s(this.localization,"locale-updated",function(){xE(c)});this.eventManager.s(this.localization,"locale-changed",function(){xE(c)});this.eventManager.s(this.adManager,"ad-started",function(){yE(c)});this.eventManager.s(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),VD(c.h,!1))});this.eventManager.s(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;VD(c.g,!1);VD(c.h,!1)});this.eventManager.s(this.g,
|
|
1471
|
+
"click",function(){c.ad.skip()});this.ad&&yE(this)}na(wE,QD);wE.prototype.release=function(){this.i.stop();this.i=null;QD.prototype.release.call(this)};function xE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function yE(a){a.ad.isSkippable()&&(VD(a.g,!0),VD(a.h,!0),a.h.textContent="",a.i.La(),a.i.xa(.5))}P("shaka.ui.SkipAdButton",wE);/*
|
|
1472
1472
|
@license
|
|
1473
1473
|
glMatrix: https://github.com/toji/gl-matrix/
|
|
1474
1474
|
Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
|
|
1475
1475
|
SPDX-License-Identifier: MIT
|
|
1476
1476
|
*/
|
|
1477
|
-
function
|
|
1478
|
-
function
|
|
1477
|
+
function zE(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function AE(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
|
|
1478
|
+
function BE(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],u=b[11],v=b[12],w=b[13],A=b[14];b=b[15];var z=c[0],C=c[1],y=c[2],B=c[3];a[0]=z*d+C*h+y*n+B*v;a[1]=z*e+C*k+y*p+B*w;a[2]=z*f+C*l+y*r+B*A;a[3]=z*g+C*m+y*u+B*b;z=c[4];C=c[5];y=c[6];B=c[7];a[4]=z*d+C*h+y*n+B*v;a[5]=z*e+C*k+y*p+B*w;a[6]=z*f+C*l+y*r+B*A;a[7]=z*g+C*m+y*u+B*b;z=c[8];C=c[9];y=c[10];B=c[11];a[8]=z*d+C*h+y*n+B*v;a[9]=z*e+C*k+y*p+B*w;a[10]=z*f+C*l+y*r+B*A;a[11]=z*g+C*m+y*u+B*b;z=c[12];C=c[13];
|
|
1479
1479
|
y=c[14];B=c[15];a[12]=z*d+C*h+y*n+B*v;a[13]=z*e+C*k+y*p+B*w;a[14]=z*f+C*l+y*r+B*A;a[15]=z*g+C*m+y*u+B*b}
|
|
1480
|
-
function
|
|
1481
|
-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function
|
|
1482
|
-
|
|
1483
|
-
function
|
|
1484
|
-
function
|
|
1485
|
-
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}
|
|
1486
|
-
function
|
|
1487
|
-
function
|
|
1488
|
-
function
|
|
1480
|
+
function CE(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
|
|
1481
|
+
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function DE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function EE(){var a=new Float32Array(4);a[3]=1;return a}function FE(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function GE(a,b,c,d,e){this.m=a;this.na=b;this.l=c;this.g=d;this.o=new jd;this.L=EE();this.h=EE();this.ha=this.ya=this.ea=this.j=null;this.G=zE();this.I=zE();this.N=zE();this.$=zE();this.A=null;this.O=!1;this.J=this.u=null;this.oa=this.ra=0;this.aa=this.R=this.S=this.K=null;this.H=0;this.i=75;this.Z=0;this.F=e;HE(this)}GE.prototype.release=function(){this.o&&(this.o.release(),this.o=null);this.u&&(this.u.stop(),this.u=null);this.J&&(this.J.stop(),this.J=null)};
|
|
1482
|
+
GE.prototype.qd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.l.width,this.l.height);IE(this,!1)};
|
|
1483
|
+
function HE(a){JE(a);KE(a);LE(a);ME(a);NE(a);a.o.ma(a.m,"loadeddata",function(){var b;a.o.s(a.m,"canplaythrough",function(){IE(a)});a.o.s(a.m,"playing",function(){a.u&&a.u.stop();if(!b){var c=a.na.Db();c=t(c);for(var d=c.next();!d.done;d=c.next())(d=d.value.frameRate)&&(!b||b<d)&&(b=d)}b||(b=60);IE(a);a.u=(new Qb(function(){IE(a)})).La().xa(1/b)});a.o.s(a.m,"pause",function(){a.u&&a.u.stop();a.u=null;IE(a)});a.o.s(a.m,"seeked",function(){IE(a)});a.o.s(document,"visibilitychange",function(){IE(a)})})}
|
|
1484
|
+
function JE(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var p=1/Math.sqrt(d*d+e*e+m*m);d*=p;e*=p;m*=p;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(p=Math.sqrt(n*n+l*l+h*h))?(p=1/p,n*=p,l*=p,h*=p):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(p=Math.sqrt(k*k+r*r+u*u))?(p=1/p,k*=p,r*=p,u*=p):u=r=k=0;b[0]=n;b[1]=k;b[2]=
|
|
1485
|
+
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}CE(a.L,a.G);a=b=a.$;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
|
|
1486
|
+
function KE(a){OE(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
|
|
1487
|
+
function LE(a){var b=PE(a,a.g.VERTEX_SHADER),c=PE(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.F?(a.S=a.g.getAttribLocation(a.j,"aVertexPosition"),a.R=a.g.getAttribLocation(a.j,"aTextureCoord")):(a.S=a.g.getAttribLocation(a.j,"a_vPosition"),a.g.enableVertexAttribArray(a.S),a.R=a.g.getAttribLocation(a.j,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.R))}
|
|
1488
|
+
function PE(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.F?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
|
|
1489
1489
|
break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.F?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n texture2D(uSampler, tc);\n gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
|
|
1490
1490
|
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
|
|
1491
|
-
function
|
|
1491
|
+
function ME(a){if("cubemap"==a.F)var b={si:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],oi:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]};else{b=[];for(var c=[],d=[],
|
|
1492
1492
|
e=0;100>=e;e++){var f=e/100,g=f*Math.PI,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=k/100,m=l*Math.PI*2;b.push(-1*Math.cos(m)*h,g,Math.sin(m)*h);c.push(l);c.push(f)}}for(e=0;100>e;e++)for(f=0;100>f;f++)h=101*e+f,g=h+1,k=101*(e+1)+f,l=k+1,d.push(h,k,g),d.push(g,k,l);b={si:b,oi:c,indices:d}}a.K=b;a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.si),a.g.STATIC_DRAW);a.ya=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,
|
|
1493
1493
|
a.ya);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.oi),a.g.STATIC_DRAW);a.ha=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)}
|
|
1494
|
-
function
|
|
1495
|
-
function
|
|
1496
|
-
a.G,a.$),
|
|
1494
|
+
function NE(a){a.aa=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.aa);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
|
|
1495
|
+
function IE(a,b){b=void 0===b?!0:b;var c=a.na.Qd()==So;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(AE(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.F?AE(a.I,a.i*Math.PI/180,2.5):AE(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),OE(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.aa),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.F&&(BE(a.N,
|
|
1496
|
+
a.G,a.$),BE(a.N,a.I,a.N)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea),a.g.vertexAttribPointer(a.S,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.S),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ya),a.g.vertexAttribPointer(a.R,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.R),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ha),"cubemap"==a.F?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.N)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,
|
|
1497
1497
|
"u_VPMatrix"),!1,a.N),a.g.uniform1i(a.g.getUniformLocation(a.j,"uSampler"),0),a.O&&a.g.viewport(0,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0),a.O&&(a.g.viewport(a.l.width/2,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0)))}
|
|
1498
|
-
function
|
|
1499
|
-
function
|
|
1500
|
-
e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,
|
|
1501
|
-
d-k*g;c[7]=r*d-l*g;
|
|
1502
|
-
"unloading",function(){f.l=null;
|
|
1503
|
-
q.wg=function(a){this.g?
|
|
1504
|
-
function
|
|
1505
|
-
function
|
|
1506
|
-
function
|
|
1507
|
-
a.h.s(a.i,"touchmove",function(d){a.j&&
|
|
1508
|
-
"click",c);a.h.Wa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Wa(a.i,"touchend",c);"granted"!==d?(a.h.ma(a.i,"click",c),a.h.ma(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.ma(a.i,"touchend",c)):(b=!0,
|
|
1509
|
-
function
|
|
1510
|
-
g.next())
|
|
1511
|
-
q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.o){b.B(2);break}return E(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.R&&(a.R.stop(),a.R=null);a.ea&&(a.ea.stop(),a.ea=null);a.L&&(a.L.stop(),a.L=null);a.Ja&&(a.Ja.stop(),a.Ja=null);a.u&&(a.u.release(),a.u=null);
|
|
1512
|
-
a.na.destroy(),7);case 7:a.na=null;case 6:a.H=null,a.o=null,a.A=null,a.ra=null,a.ha.clear(),gb.prototype.release.call(a),F(b)}})};function
|
|
1513
|
-
q.configure=function(a){this.g=a;this.F.vh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Xa&&(this.Xa=null);this.Ta&&(this.Ta=null);this.u&&this.u.configure(a);this.h?(en(this.h),
|
|
1514
|
-
|
|
1515
|
-
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.s(b,"click",c);this.i.s(b,"dblclick",c)}};q.Xg=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.o.tabIndex=-1,this.o.controls=!1):this.j.removeAttribute("shaka-controls")
|
|
1498
|
+
function OE(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.ra!==b||a.oa!==c){a.l.width=b;a.l.height=c;a.ra=b;a.oa=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}}
|
|
1499
|
+
function QE(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.F?a.N:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],p=f[9],r=f[10],u=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-p*g;f[2]=l*b-r*g;f[3]=m*b-u*g;f[8]=h*g+n*b;f[9]=k*g+p*b;f[10]=l*g+r*b;f[11]=m*g+u*b;a.H+=c;a.H<e&&a.H>-e?(e=zE(),g=zE(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],p=g[9],r=g[10],u=g[11],g!==
|
|
1500
|
+
e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+p*c,e[6]=l*b+r*c,e[7]=m*b+u*c,e[8]=n*b-h*c,e[9]=p*b-k*c,e[10]=r*b-l*c,e[11]=u*b-m*c,BE(f,e,f)):a.H-=c;c=zE();e=zE();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];p=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+p*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=p*
|
|
1501
|
+
d-k*g;c[7]=r*d-l*g;BE(f,c,f);IE(a,!1)}function RE(a,b){if(void 0===b||b)CE(a.h,a.G),a.Z=0,a.A=EE(),a.A[0]=(a.h[0]-a.L[0])/20,a.A[1]=(a.h[1]-a.L[1])/20,a.A[2]=(a.h[2]-a.L[2])/20,a.A[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.A[0];a.h[1]-=a.A[1];a.h[2]-=a.A[2];a.h[3]-=a.A[3];b=zE();FE(a.h,a.h);DE(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.Z?a.J=(new Qb(function(){RE(a,!1);a.H=0;a.Z++;IE(a,!1)})).V(.025):(DE(b,a.L),a.G=b)};function SE(a,b,c,d,e){gb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.o=new jd;this.h=new jd;this.G=TE(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.F=this.A=0;this.l=null;this.o.s(d,"loading",function(){f.g&&RE(f.g);UE(f)});this.o.s(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}UE(f)});this.o.s(d,"nospatialvideoinfo",function(){f.l=null;UE(f)});this.o.s(d,
|
|
1502
|
+
"unloading",function(){f.l=null;UE(f)});UE(this)}na(SE,gb);q=SE.prototype;q.release=function(){this.o&&(this.o.release(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);gb.prototype.release.call(this)};q.configure=function(a){this.u=a;UE(this)};q.Uf=function(){return!!this.G};q.Pb=function(){return!!this.g};q.qd=function(){this.g?this.g.qd():Ya("Not playing VR content")};q.yg=function(a){this.g?QE(this.g,a*VE,0,0):Ya("Not playing VR content")};
|
|
1503
|
+
q.wg=function(a){this.g?QE(this.g,0,a*VE,0):Ya("Not playing VR content")};q.xg=function(a){this.g?QE(this.g,0,0,a*VE):Ya("Not playing VR content")};
|
|
1504
|
+
function UE(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.F!=b&&(a.h.qb(),a.g.release(),WE(a,b)):(a.m.style.display="",WE(a,b),a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Pb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.qb(),a.g.release(),a.g=null,a.dispatchEvent(new S("vrstatuschanged",(new Map).set("newStatus",a.Pb()))))}function WE(a,b){a.G&&a.m&&(a.g=new GE(a.L,a.K,a.m,a.G,b),XE(a))}
|
|
1505
|
+
function TE(a){if(!a.m||kc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
|
|
1506
|
+
function XE(a){a.h.s(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.A=e;a.F=d}});0<navigator.maxTouchPoints&&a.h.s(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.A=e;a.F=d}});a.h.s(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.i&&100>=e.i&&(e.i+=f);20>e.i?e.i=20:100<e.i&&(e.i=100);IE(e,!1);d.preventDefault();d.stopPropagation()}});a.h.s(a.i,"mousemove",function(d){a.j&&YE(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
|
|
1507
|
+
a.h.s(a.i,"touchmove",function(d){a.j&&YE(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.s(a.i,"mouseleave",function(){a.j=!1});a.h.s(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.s(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,ZE(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Wa(a.i,
|
|
1508
|
+
"click",c);a.h.Wa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Wa(a.i,"touchend",c);"granted"!==d?(a.h.ma(a.i,"click",c),a.h.ma(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.ma(a.i,"touchend",c)):(b=!0,ZE(a))}).catch(function(){a.h.Wa(a.i,"click",c);a.h.Wa(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Wa(a.i,"touchend",c);a.h.ma(a.i,"click",c);a.h.ma(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.ma(a.i,"touchend",c)})}else b=!0,ZE(a)}
|
|
1509
|
+
function ZE(a){a.h.s(window,"deviceorientation",function(b){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?QE(a.g,c*VE*-1,e*VE*-1,0):QE(a.g,c*VE*-1,d*VE,0)})}function YE(a,b,c){var d=-.6*Math.PI/180;QE(a.g,(b-a.A)*d,-1*(c-a.F)*d,0);a.A=b;a.F=c}var VE=Math.PI/180;function Z(a,b,c,d,e){gb.call(this);var f=this;this.S=!0;this.g=e;this.F=new Gq(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.oa=!0;this.A=this.F.kc();this.o=c;this.H=this.F.bd();this.na=a;this.j=b;this.Gc=d;this.Ma=this.H.He();this.l=this.m=null;this.$=!1;this.J=[];this.ib=[];this.Za=!1;this.R=new Qb(function(){f.j.style.cursor="none";f.Za=!1;$E(f)});this.ea=new Qb(function(){f.h.removeAttribute("shown");f.L.V(2)});this.L=new Qb(function(){for(var g=t(f.J),h=g.next();!h.done;h=
|
|
1510
|
+
g.next())VD(h.value,!1)});this.Ja=new Qb(function(){f.lc()&&aF(f)});this.I=null;this.G=[];this.ra=bF();this.i=new jd;this.u=null;this.configure(this.g);cF(this);this.ha=new Set;dF(this);this.Ja.xa(this.g.refreshTickInSeconds);this.i.s(this.ra,"locale-changed",function(g){f.Ma.setLocale(g.locales[0])})}na(Z,gb);q=Z.prototype;
|
|
1511
|
+
q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.o){b.B(2);break}return E(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.R&&(a.R.stop(),a.R=null);a.ea&&(a.ea.stop(),a.ea=null);a.L&&(a.L.stop(),a.L=null);a.Ja&&(a.Ja.stop(),a.Ja=null);a.u&&(a.u.release(),a.u=null);eF(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.F){b.B(4);break}return E(b,a.F.destroy(),5);case 5:a.F=null;case 4:if(!a.na){b.B(6);break}return E(b,
|
|
1512
|
+
a.na.destroy(),7);case 7:a.na=null;case 6:a.H=null,a.o=null,a.A=null,a.ra=null,a.ha.clear(),gb.prototype.release.call(a),F(b)}})};function eF(a){for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.release();a.G=[]}function fF(a,b){gF.set(a,b)}q.Gi=function(a){this.oa=a;dF(this)};q.Mj=function(){$E(this)};
|
|
1513
|
+
q.configure=function(a){this.g=a;this.F.vh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Xa&&(this.Xa=null);this.Ta&&(this.Ta=null);this.u&&this.u.configure(a);this.h?(en(this.h),eF(this)):(hF(this),iF(this),this.u=new SE(this.h,this.Gc,this.o,this.H,this.g));this.j.classList.add("shaka-video-container");this.o.classList.add("shaka-video");jF(this);this.g.addBigPlayButton&&kF(this);this.g.customContextMenu&&(this.Ta=new dE(this.Z,this),this.G.push(this.Ta));this.aa||
|
|
1514
|
+
lF(this);this.g.seekOnTaps&&(mF(this),nF(this));this.Sa=W("div");this.Sa.classList.add("shaka-server-side-ad-container");this.h.appendChild(this.Sa);oF(this);this.J=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,x(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));pF(this);this.ib=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));$E(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=
|
|
1515
|
+
a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.s(b,"click",c);this.i.s(b,"dblclick",c)}};q.Xg=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.o.tabIndex=-1,this.o.controls=!1):this.j.removeAttribute("shaka-controls");$E(this)};q.ci=function(a){this.o.controls=a;this.o.tabIndex=a?0:-1;a&&this.Xg(!1)};q.getAd=function(){return this.m};q.Si=function(){return this.F};q.fj=function(){return this.ra};q.xj=function(){return this.j};q.kc=function(){return this.A};
|
|
1516
1516
|
q.ej=function(){return this.o};q.bd=function(){return this.H};q.dj=function(){return this.na};q.Xi=function(){return this.h};q.oj=function(){return this.Sa};q.Ui=function(){return this.O};q.Vi=function(){return this.g};q.Jj=function(){return this.$};q.ah=function(a){this.$=a};q.Dj=function(){return this.oa};q.pg=function(){return this.l?this.l.getValue():this.A.currentTime};q.ei=function(a){this.I=a};q.Jd=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};
|
|
1517
1517
|
q.Bc=function(){this.L.La()};q.Xd=function(){return document.fullscreenEnabled||this.o.webkitSupportsFullscreen?!0:!1};q.fd=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.o;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
|
|
1518
|
-
function
|
|
1519
|
-
4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new S("error",(new Map).set("detail",d))),F(e)}})}function
|
|
1518
|
+
function qF(a){var b,c,d;return O(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.o;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.B(4);break}if(!document.pictureInPictureElement){e.B(5);break}return E(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,E(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.B(4);break}ta(e,9);return E(e,screen.orientation.lock("landscape"),11);case 11:va(e,
|
|
1519
|
+
4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new S("error",(new Map).set("detail",d))),F(e)}})}function rF(a){var b;return O(function(c){if(!document.fullscreenEnabled)return b=a.o,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.B(0);screen.orientation&&screen.orientation.unlock();return E(c,document.exitFullscreen(),0)})}q.pf=function(){var a=this;return O(function(b){return a.fd()?E(b,rF(a),0):E(b,qF(a),0)})};
|
|
1520
1520
|
q.Qe=function(){return this.F.Ka()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.o.disablePictureInPicture:!1};q.Re=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
|
|
1521
|
-
q.me=function(){var a=this,b,c;return O(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?E(d,
|
|
1522
|
-
function
|
|
1521
|
+
q.me=function(){var a=this,b,c;return O(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?E(d,sF(a),5):document.pictureInPictureElement?E(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.o,E(d,b.requestPictureInPicture(),5));if(2!=d.g)return va(d,0);c=wa(d);a.dispatchEvent(new S("error",(new Map).set("detail",c)));F(d)})};
|
|
1522
|
+
function sF(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return E(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;tF(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
|
|
1523
1523
|
d.document.head.append(g);d.document.body.append(b);a.i.ma(d,"pagehide",function(){f.replaceWith(b)});F(h)})}
|
|
1524
|
-
function
|
|
1525
|
-
q.Jh=function(){
|
|
1526
|
-
function
|
|
1527
|
-
function
|
|
1528
|
-
function
|
|
1529
|
-
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function
|
|
1530
|
-
function
|
|
1531
|
-
(c=
|
|
1532
|
-
function
|
|
1533
|
-
a.i.s(a.F,"caststatuschanged",function(){
|
|
1534
|
-
|
|
1535
|
-
case " ":e&&
|
|
1536
|
-
function
|
|
1537
|
-
function
|
|
1538
|
-
function
|
|
1539
|
-
function
|
|
1540
|
-
function
|
|
1541
|
-
function
|
|
1542
|
-
function
|
|
1543
|
-
q.Ak=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});
|
|
1544
|
-
q.vj=function(){var a=this.u;if(a.g){a=a.g;
|
|
1545
|
-
q.zk=function(a){var b=this.u;b.g?(0>a?(Ya("Field of view should be greater than 0"),a=0):100<a&&(Ya("Field of view should be less than 100"),a=100),b=b.g,b.i=a,
|
|
1546
|
-
function
|
|
1524
|
+
function tF(a){var b=[].concat(x(document.styleSheets)).map(function(d){try{return[].concat(x(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}q.li=function(){VD(this.K,!0);VD(this.O,!0);this.h.setAttribute("ad-active","true")};
|
|
1525
|
+
q.Jh=function(){VD(this.K,!1);VD(this.O,!1);this.h.removeAttribute("ad-active")};function bE(a){a.S&&a.A.duration&&(a.H.Vc(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function aE(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
|
|
1526
|
+
function hF(a){a.h=W("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.s(a.h,"touchstart",function(b){a.A.duration&&(a.lc()?a.I=Date.now():(uF(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.s(a.h,"click",function(){vF(a)});a.i.s(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Xd()&&a.pf()})}
|
|
1527
|
+
function kF(a){var b=W("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Xa=new cE(b,a);a.G.push(a.Xa)}function jF(a){var b=W("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function wF(a){a.K=W("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();VD(a.K,b);a.N.appendChild(a.K);b=new YD(a.K,a);a.G.push(b);b=new XD(a.K,a);a.G.push(b);b=new wE(a.K,a);a.G.push(b)}
|
|
1528
|
+
function lF(a){a.aa=W("div");a.aa.classList.add("shaka-spinner-container");a.j.appendChild(a.aa);var b=W("div");b.classList.add("shaka-spinner");a.aa.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
|
|
1529
|
+
b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function mF(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.Ac=new iE(b,a);a.G.push(a.Ac)}function nF(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.Cc=new jE(b,a);a.G.push(a.Cc)}
|
|
1530
|
+
function oF(a){a.N=W("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.h.appendChild(a.N);a.i.s(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Bc()});wF(a);a.Z=W("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,gF.get(c)?
|
|
1531
|
+
(c=gF.get(c).create(a.Z,a),a.G.push(c)):Ya("Unrecognized control panel element requested:",c)}function pF(a){if(a.g.addSeekBar)a.l=xF.create(a.N,a),a.G.push(a.l);else{a=t(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function iF(a){a.O=W("div");a.O.classList.add("shaka-client-side-ad-container");VD(a.O,!1);a.i.s(a.O,"click",function(){vF(a)});a.j.appendChild(a.O)}
|
|
1532
|
+
function cF(a){a.i.s(a.H,"buffering",function(){a.S&&VD(a.aa,a.H.Wd())});a.S&&VD(a.aa,a.H.Wd());a.i.s(window,"keydown",function(b){yF(a,b)});a.i.s(window,"click",function(){return a.Bc()});a.i.s(a,"submenuopen",function(){a.Bc()});a.i.s(a.A,"play",function(){$E(a)});a.i.s(a.A,"pause",function(){$E(a)});a.i.s(a.j,"mousemove",function(b){uF(a,b)});a.i.s(a.j,"touchmove",function(b){uF(a,b)},{passive:!0});a.i.s(a.j,"touchend",function(b){uF(a,b)},{passive:!0});a.i.s(a.j,"mouseleave",function(){a.I||a.R.La()});
|
|
1533
|
+
a.i.s(a.F,"caststatuschanged",function(){dF(a)});a.i.s(a.u,"vrstatuschanged",function(){a.dispatchEvent(new S("vrstatuschanged"))});a.i.s(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&uF(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&e&&!d&&0<c&&(b.preventDefault(),
|
|
1534
|
+
zF(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&e&&!d&&0<c&&(b.preventDefault(),zF(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),zF(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),zF(a,a.l.getValue()+f));break;case "Home":a.l&&zF(a,a.H.Qa().start);break;case "End":a.l&&zF(a,a.H.Qa().end);break;case "f":a.Xd()&&a.pf();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.o.muted=!a.o.muted;break;case "p":a.Qe()&&a.me();break;
|
|
1535
|
+
case " ":e&&AF(a)}}});a.i.s(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.s(a.Ma,"ad-started",function(b){a.m=b.ad;a.li()});a.i.s(a.Ma,"ad-stopped",function(){a.m=null;a.Jh()});screen.orientation&&a.i.s(screen.orientation,"change",function(){return O(function(b){return E(b,BF(a),0)})})}
|
|
1536
|
+
function BF(a){return O(function(b){return a.A&&0!=a.A.readyState&&!a.F.Ka()&&a.g.enableFullscreenOnRotation&&a.Xd()?screen.orientation.type.includes("landscape")&&!a.fd()?E(b,qF(a),0):screen.orientation.type.includes("portrait")&&a.fd()?E(b,rF(a),0):b.B(0):b.return()})}
|
|
1537
|
+
function uF(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),$E(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.I=Date.now():a.I+1E3<Date.now()&&(a.I=null);a.I&&"mousemove"==b.type||(a.j.style.cursor="",a.Za=!0,a.L.stop(),a.lc()||(aF(a),$E(a)),a.R.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.I||a.R.V(3))}function CF(a){return window.matchMedia("hover: hover").matches?a.ib.some(function(b){return b.matches(":hover")}):!1}
|
|
1538
|
+
function $E(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.$,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Za||d||CF(a)?(aF(a),a.h.setAttribute("shown","true"),a.ea.stop()):a.ea.V(a.g.fadeDelay)}function vF(a){a.S&&!a.Pb()&&(a.Jd()?a.L.La():a.g.singleClickForPlayAndPause&&AF(a))}function AF(a){a.m&&a.m.isLinear()?aE(a):bE(a)}
|
|
1539
|
+
function dF(a){var b=a.F.Ka();a.dispatchEvent(new S("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}q.lc=function(){return this.S?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function zF(a,b){a.l.changeTo(b);a.lc()&&aF(a)}
|
|
1540
|
+
function aF(a){if(a.l)if(a.l.setValue(a.A.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new S("timeandseekrangeupdated"))}
|
|
1541
|
+
function yF(a,b){a.ha.add(b.key);var c=a.Jd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),$E(a),a.i.s(window,"mousedown",function(){a.i.Wa(window,"mousedown")}));"Escape"==b.key&&a.L.La();c&&a.ha.has("Tab")&&DF(a,b)}
|
|
1542
|
+
function DF(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ha.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
1543
|
+
q.Ak=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});uF(this,a)};q.Cj=function(){this.I||this.R.La()};q.Uf=function(){return this.u.Uf()};q.Pb=function(){return this.u.Pb()};
|
|
1544
|
+
q.vj=function(){var a=this.u;if(a.g){a=a.g;CE(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else Ya("Not playing VR content"),a=null;return a};q.uj=function(){var a=this.u;a.g?a=a.g.i:(Ya("Not playing VR content"),a=null);return a};
|
|
1545
|
+
q.zk=function(a){var b=this.u;b.g?(0>a?(Ya("Field of view should be greater than 0"),a=0):100<a&&(Ya("Field of view should be less than 100"),a=100),b=b.g,b.i=a,IE(b,!1)):Ya("Not playing VR content")};q.qd=function(){this.u.qd()};q.yg=function(a){this.u.yg(a)};q.wg=function(a){this.u.wg(a)};q.xg=function(a){this.u.xg(a)};
|
|
1546
|
+
function bF(){var a=new bd("en");a.Ga("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
|
|
1547
1547
|
["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
|
|
1548
1548
|
["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
|
|
1549
1549
|
["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
|
|
@@ -1607,87 +1607,87 @@ a.Ga("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
|
|
|
1607
1607
|
Z.prototype.incrementYaw=Z.prototype.yg;Z.prototype.toggleStereoscopicMode=Z.prototype.qd;Z.prototype.setVRFieldOfView=Z.prototype.zk;Z.prototype.getVRFieldOfView=Z.prototype.uj;Z.prototype.getVRNorth=Z.prototype.vj;Z.prototype.isPlayingVR=Z.prototype.Pb;Z.prototype.canPlayVR=Z.prototype.Uf;Z.prototype.hideUI=Z.prototype.Cj;Z.prototype.showUI=Z.prototype.Ak;Z.prototype.isOpaque=Z.prototype.lc;Z.prototype.hideAdUI=Z.prototype.Jh;Z.prototype.showAdUI=Z.prototype.li;Z.prototype.togglePiP=Z.prototype.me;
|
|
1608
1608
|
Z.prototype.isPiPEnabled=Z.prototype.Re;Z.prototype.isPiPAllowed=Z.prototype.Qe;Z.prototype.toggleFullScreen=Z.prototype.pf;Z.prototype.isFullScreenEnabled=Z.prototype.fd;Z.prototype.isFullScreenSupported=Z.prototype.Xd;Z.prototype.hideSettingsMenus=Z.prototype.Bc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Jd;Z.prototype.setLastTouchEventTime=Z.prototype.ei;Z.prototype.getDisplayTime=Z.prototype.pg;Z.prototype.isCastAllowed=Z.prototype.Dj;Z.prototype.setSeeking=Z.prototype.ah;
|
|
1609
1609
|
Z.prototype.isSeeking=Z.prototype.Jj;Z.prototype.getConfig=Z.prototype.Vi;Z.prototype.getClientSideAdContainer=Z.prototype.Ui;Z.prototype.getServerSideAdContainer=Z.prototype.oj;Z.prototype.getControlsContainer=Z.prototype.Xi;Z.prototype.getLocalPlayer=Z.prototype.dj;Z.prototype.getPlayer=Z.prototype.bd;Z.prototype.getLocalVideo=Z.prototype.ej;Z.prototype.getVideo=Z.prototype.kc;Z.prototype.getVideoContainer=Z.prototype.xj;Z.prototype.getLocalization=Z.prototype.fj;Z.prototype.getCastProxy=Z.prototype.Si;
|
|
1610
|
-
Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ci;Z.prototype.setEnabledShakaControls=Z.prototype.Xg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Mj;Z.prototype.allowCast=Z.prototype.Gi;Z.registerSeekBar=function(a){
|
|
1611
|
-
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);
|
|
1612
|
-
d.stopPropagation()});this.eventManager.s(this.g,"click",function(){
|
|
1613
|
-
function
|
|
1614
|
-
P("shaka.ui.OverflowMenu",
|
|
1615
|
-
this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1616
|
-
c.player.Qd()==ep;
|
|
1617
|
-
|
|
1618
|
-
q.Ag=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:dc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=
|
|
1610
|
+
Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ci;Z.prototype.setEnabledShakaControls=Z.prototype.Xg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Mj;Z.prototype.allowCast=Z.prototype.Gi;Z.registerSeekBar=function(a){xF=a};Z.registerElement=fF;Z.prototype.destroy=Z.prototype.destroy;var gF=new Map,xF=new vE;function EF(a,b){QD.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=dn();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=W("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
|
|
1611
|
+
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);FF(this);this.eventManager.s(this.localization,"locale-updated",function(){GF(c)});this.eventManager.s(this.localization,"locale-changed",function(){GF(c)});this.eventManager.s(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&VD(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){VD(c.g,!0)});this.eventManager.s(this.controls,"submenuopen",function(){VD(c.h,!1)});this.eventManager.s(this.h,"touchstart",function(d){c.controls.ei(Date.now());
|
|
1612
|
+
d.stopPropagation()});this.eventManager.s(this.g,"click",function(){HF(c)});GF(this);this.ad&&this.ad.isLinear()&&VD(this.g,!1)}na(EF,QD);EF.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];QD.prototype.release.call(this)};function IF(a,b){JF.set(a,b)}
|
|
1613
|
+
function FF(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,JF.get(c)?(c=JF.get(c),a.i.push(c.create(a.h,a.controls))):Ya("Unrecognized overflow menu element requested:",c)}function HF(a){if(a.controls.Jd())a.controls.Bc();else{VD(a.h,!0);$E(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};jb(a.h.childNodes,b)&&kb(a.h.childNodes,b)[0].focus()}}function GF(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
|
|
1614
|
+
P("shaka.ui.OverflowMenu",EF);EF.registerElement=IF;function KF(){}KF.prototype.create=function(a,b){return new EF(a,b)};fF("overflow_menu",new KF);var JF=new Map;function LF(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);
|
|
1615
|
+
this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);MF(this);NF(this);this.eventManager.s(this.localization,"locale-updated",function(){MF(c)});this.eventManager.s(this.localization,"locale-changed",function(){MF(c)});this.eventManager.s(this.g,"click",function(){c.controls.kc().webkitShowPlaybackTargetPicker()});a=this.controls.kc();this.eventManager.s(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
|
|
1616
|
+
c.player.Qd()==ep;VD(c.g,"available"==d.availability&&e)});this.eventManager.s(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){NF(c)})}na(LF,QD);function NF(a){var b=a.controls.kc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function MF(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}P("shaka.ui.AirPlayButton",LF);function OF(){}OF.prototype.create=function(a,b){return new LF(a,b)};IF("airplay",new OF);
|
|
1617
|
+
fF("airplay",new OF);function PF(a,b,c,d){d=void 0===d?null:d;this.i=a;this.j=b;this.h=QF(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ag()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);this.configure({});c.controls||a.bh(b);b.ui=this;c.ui=this}q=PF.prototype;q.destroy=function(){var a=this;return O(function(b){if(1==b.g)return a.g?E(b,a.g.destroy(),2):b.B(2);if(4!=b.g)return a.g=null,a.i?E(b,a.i.destroy(),4):b.B(4);a.i=null;F(b)})};
|
|
1618
|
+
q.Ag=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:dc()&&1<navigator.maxTouchPoints};q.getConfiguration=function(){var a=QF(this);lm(a,this.h,QF(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=mm(a,b));lm(this.h,a,QF(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new S("uiupdated"))};q.Wi=function(){return this.g};
|
|
1619
1619
|
q.wk=function(a){this.g.Xg(a)};
|
|
1620
|
-
function
|
|
1620
|
+
function QF(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent bytesDownloaded".split(" "),contextMenuElements:["loop",
|
|
1621
1621
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
|
|
1622
|
-
trackLabelFormat:
|
|
1622
|
+
trackLabelFormat:RF,textTrackLabelFormat:RF,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!0,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular"};"remote"in HTMLMediaElement.prototype?
|
|
1623
1623
|
b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Ag()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1624
|
-
function
|
|
1625
|
-
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=
|
|
1626
|
-
|
|
1627
|
-
function
|
|
1624
|
+
function SF(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,z,C,y;return O(function(B){switch(B.g){case 1:Nz();if(!qo())return TF("shaka-ui-load-failed",UF),B.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){B.B(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
|
|
1625
|
+
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=VF(h,c,d),m=l.Oh,n=l.wi,WF(h,g,m,n));B.B(2);break}p=t(a);r=p.next();case 4:if(r.done){B.B(2);break}u=r.value;if(u.ui){B.B(5);break}v=null;w=t(b);for(f=w.next();!f.done;f=w.next())if(A=f.value,A.parentElement==u){v=A;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));z=VF(u,c,d);C=z.Oh;y=z.wi;ta(B,7);return E(B,WF(u,v,C,y),9);case 9:va(B,5);break;case 7:return wa(B),
|
|
1626
|
+
TF("shaka-ui-load-failed",XF),B.return();case 5:r=p.next();B.B(4);break;case 2:TF("shaka-ui-loaded"),F(B)}})}function TF(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1627
|
+
function WF(a,b,c,d){var e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:e=new X;f=new PF(e,a,b,d);e.ph(c);g="";h=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(g=a.dataset.shakaPlayerCastReceiverId,h="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(g=b.dataset.shakaPlayerCastReceiverId,h="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);g.length&&f.configure({castReceiverAppId:g,castAndroidReceiverCompatible:h});
|
|
1628
1628
|
b.controls&&f.g.ci(!0);if(k=b.getAttribute("src"))l=document.createElement("source"),l.setAttribute("src",k),b.appendChild(l),b.removeAttribute("src");m=t(b.querySelectorAll("source"));n=m.next();case 2:if(n.done){r.B(4);break}p=n.value;ta(r,5);return E(r,f.g.bd().load(p.getAttribute("src")),7);case 7:r.B(4);break;case 5:wa(r);case 3:n=m.next();r.B(2);break;case 4:return E(r,e.tc(b),0)}})}
|
|
1629
|
-
function
|
|
1630
|
-
|
|
1631
|
-
"complete"==document.readyState?O(function(a){if(1==a.g)return E(a,Promise.resolve(),2);
|
|
1632
|
-
p=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";r={};a=t(a);for(u=a.next();!u.done;r={Jb:r.Jb},u=a.next()){r.Jb=u.value;u=r.Jb.language;var v=r.Jb.forced,w=f.resolve("SUBTITLE_FORCED"),A=m(r.Jb),z=r.Jb.label,C=r.Jb.channelsCount,y=l(u,A,z,C);if(!p.has(y)){p.add(y);var B=dn();B.addEventListener("click",function(K){return function(){c(K.Jb)}}(r));var D=W("span");B.appendChild(D);D.textContent=
|
|
1633
|
-
(D.textContent+=k(C));A?D.textContent=A:(Ya("Track #"+r.Jb.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");v&&(D.textContent+=" ("+w+")");break;case 2:h&&(D.textContent+=k(C));A&&(D.textContent+=": "+A);v&&(D.textContent+=" ("+w+")");break;case 3:z?D.textContent=z:(Ya("Track #"+r.Jb.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&y==n&&(B.appendChild(
|
|
1634
|
-
"true",e.textContent=D.textContent);b.appendChild(B)}}}function
|
|
1635
|
-
function
|
|
1636
|
-
function
|
|
1637
|
-
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function
|
|
1638
|
-
"variantchanged",function(){
|
|
1639
|
-
function
|
|
1640
|
-
function
|
|
1641
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1642
|
-
function
|
|
1643
|
-
function
|
|
1644
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Oa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(
|
|
1645
|
-
c.controls.pf(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.fd()?"fullscreen_exit":"fullscreen";
|
|
1646
|
-
P("shaka.ui.FullscreenButton",
|
|
1647
|
-
a.appendChild(this.l);this.g.appendChild(a);
|
|
1648
|
-
|
|
1649
|
-
this.eventManager.s(this.video,"volumechange",function(){
|
|
1650
|
-
function
|
|
1651
|
-
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);
|
|
1652
|
-
function(){
|
|
1653
|
-
function
|
|
1654
|
-
function
|
|
1655
|
-
function
|
|
1656
|
-
c.player.Oa())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));
|
|
1657
|
-
function
|
|
1658
|
-
"x")}function
|
|
1659
|
-
e)),g=3600<=g,1<=e||d?(
|
|
1660
|
-
function
|
|
1661
|
-
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1662
|
-
function
|
|
1663
|
-
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;
|
|
1664
|
-
"connect",function(){
|
|
1665
|
-
function
|
|
1666
|
-
case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),E(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),F(d)}})}function
|
|
1667
|
-
"trackschanged",function(){
|
|
1668
|
-
function
|
|
1669
|
-
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.ed()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=
|
|
1670
|
-
a.eventManager.s(g,"click",function(k){return function(){var l=k.Tb;a.player.configure({abr:{enabled:!1}});a.player.lf(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=W("span");h.textContent=a.player.ed()&&e.Tb.bandwidth?Math.round(e.Tb.bandwidth/1E3)+" kbits/s":e.Tb.height&&e.Tb.width?
|
|
1671
|
-
a.eventManager.s(e,"click",function(){a.player.configure({abr:{enabled:!0}});
|
|
1672
|
-
|
|
1673
|
-
function
|
|
1674
|
-
|
|
1675
|
-
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Oa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(
|
|
1676
|
-
|
|
1629
|
+
function VF(a,b,c){var d=null,e=t(b);for(b=e.next();!b.done;b=e.next())if(b=b.value,b.parentElement==a){d=b;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));e=null;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,b.parentElement==a){e=b;break}e||(e=document.createElement("canvas"),e.classList.add("shaka-vr-canvas-container"),a.appendChild(e));return{Oh:d,wi:e}}P("shaka.ui.Overlay",PF);PF.prototype.setEnabled=PF.prototype.wk;
|
|
1630
|
+
PF.prototype.getControls=PF.prototype.Wi;PF.prototype.configure=PF.prototype.configure;PF.prototype.getConfiguration=PF.prototype.getConfiguration;PF.prototype.isMobile=PF.prototype.Ag;PF.prototype.destroy=PF.prototype.destroy;var RF=0;PF.TrackLabelFormat={LANGUAGE:RF,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var UF=0,XF=1;PF.FailReasonCode={NO_BROWSER_SUPPORT:UF,PLAYER_FAILED_TO_LOAD:XF};
|
|
1631
|
+
"complete"==document.readyState?O(function(a){if(1==a.g)return E(a,Promise.resolve(),2);SF();F(a)}):window.addEventListener("load",SF);function YF(a,b,c,d,e,f,g,h){function k(K){var I="";5<=K&&(I=" "+f.resolve("SURROUND"));return I}function l(K,I,J,H){K=[K,I];h&&null!=H&&K.push(H);J&&3==g&&K.push(J);return K.join(": ")}function m(K){return"variant"==K.type?K.audioRoles?K.audioRoles.join(", "):void 0:K.roles.join(", ")}var n=a.find(function(K){return 1==K.active}),p=RD(b);en(b);b.appendChild(p);p=new Map;for(var r=t(a),u=r.next();!u.done;u=r.next())u=u.value,p.has(u.language)||p.set(u.language,new Set),p.get(u.language).add(m(u));
|
|
1632
|
+
p=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";r={};a=t(a);for(u=a.next();!u.done;r={Jb:r.Jb},u=a.next()){r.Jb=u.value;u=r.Jb.language;var v=r.Jb.forced,w=f.resolve("SUBTITLE_FORCED"),A=m(r.Jb),z=r.Jb.label,C=r.Jb.channelsCount,y=l(u,A,z,C);if(!p.has(y)){p.add(y);var B=dn();B.addEventListener("click",function(K){return function(){c(K.Jb)}}(r));var D=W("span");B.appendChild(D);D.textContent=ZF(u,f);switch(g){case RF:h&&(D.textContent+=k(C));v&&(D.textContent+=" ("+w+")");break;case 1:h&&
|
|
1633
|
+
(D.textContent+=k(C));A?D.textContent=A:(Ya("Track #"+r.Jb.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");v&&(D.textContent+=" ("+w+")");break;case 2:h&&(D.textContent+=k(C));A&&(D.textContent+=": "+A);v&&(D.textContent+=" ("+w+")");break;case 3:z?D.textContent=z:(Ya("Track #"+r.Jb.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&y==n&&(B.appendChild(UD()),D.classList.add("shaka-chosen-item"),B.ariaSelected=
|
|
1634
|
+
"true",e.textContent=D.textContent);b.appendChild(B)}}}function ZF(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Xc(a);return a in MD?MD[a].C:c in MD?MD[c].C+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function $F(a,b,c){QD.call(this,a,b);var d=this;aG(this,c);bG(this);cG(this);this.eventManager.s(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new S("submenuopen")),VD(d.menu,!0),TD(d.menu)):VD(d.menu,!1)})}na($F,QD);
|
|
1635
|
+
function aG(a,b){a.button=dn();a.button.classList.add("shaka-overflow-button");a.icon=W("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1636
|
+
function bG(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=dn();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.s(a.backButton,"click",function(){a.controls.Bc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1637
|
+
W("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function cG(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.s(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}VD(a.parent,!0);jb(a.parent.childNodes,b)&&kb(a.parent.childNodes,b)[0].focus();$E(a.controls)}))}P("shaka.ui.SettingsMenu",$F);function dG(a,b){$F.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.s(this.localization,"locale-updated",function(){eG(c)});this.eventManager.s(this.localization,"locale-changed",function(){eG(c)});this.eventManager.s(this.player,"loading",function(){fG(c)});this.eventManager.s(this.player,"trackschanged",function(){fG(c)});this.eventManager.s(this.player,
|
|
1638
|
+
"variantchanged",function(){gG(c)});eG(this);gG(this)}na(dG,$F);
|
|
1639
|
+
function gG(a){var b=a.player.Db();YF(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.kf(c.language,c.roles[0],c.channelsCount):a.player.kf(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);TD(a.menu);a.controls.dispatchEvent(new S("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);VD(a.button,2<a.menu.getElementsByTagName("button").length)}
|
|
1640
|
+
function fG(a){var b=0<a.player.Db().length;VD(a.button,b);gG(a)}function eG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}P("shaka.ui.AudioLanguageSelection",dG);function hG(){}hG.prototype.create=function(a,b){return new dG(a,b)};IF("language",new hG);fF("language",new hG);function iG(a,b){QD.call(this,a,b);var c=this;this.h=this.controls.F;this.g=dn();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
|
|
1641
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);jG(this);kG(this);this.eventManager.s(this.localization,"locale-updated",function(){jG(c)});this.eventManager.s(this.localization,"locale-changed",function(){jG(c)});this.eventManager.s(this.g,"click",function(){lG(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){kG(c)})}na(iG,QD);
|
|
1642
|
+
function lG(a){var b;O(function(c){if(1==c.g){if(a.h.Ka())return a.h.mi(),c.B(0);ta(c,3);a.g.disabled=!0;return E(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new S("error",(new Map).set("detail",b)));F(c)})}function kG(a){var b=a.h.Tf()&&a.controls.oa,c=a.h.Ka();VD(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");mG(a)}
|
|
1643
|
+
function mG(a){a.j.textContent=a.h.Ka()?a.h.gf():a.localization.resolve("OFF")}function jG(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");mG(a)}P("shaka.ui.CastButton",iG);function nG(){}nG.prototype.create=function(a,b){return new iG(a,b)};IF("cast",new nG);fF("cast",new nG);function oG(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);pG(this);this.h=this.controls.g.fastForwardRates;this.eventManager.s(this.localization,"locale-updated",function(){pG(c)});this.eventManager.s(this.localization,"locale-changed",function(){pG(c)});
|
|
1644
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Oa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(oG,QD);function pG(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}P("shaka.ui.FastForwardButton",oG);function qG(){}qG.prototype.create=function(a,b){return new oG(a,b)};fF("fast_forward",new qG);function rG(a,b){QD.call(this,a,b);var c=this;this.h=this.controls.o;this.g=dn();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");sG(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);tG(this);this.eventManager.s(this.localization,"locale-updated",function(){tG(c)});this.eventManager.s(this.localization,"locale-changed",function(){tG(c)});this.eventManager.s(this.g,"click",function(){return O(function(d){return E(d,
|
|
1645
|
+
c.controls.pf(),0)})});this.eventManager.s(document,"fullscreenchange",function(){c.g.textContent=c.controls.fd()?"fullscreen_exit":"fullscreen";tG(c)});this.eventManager.s(this.h,"loadedmetadata",function(){sG(c)});this.eventManager.s(this.h,"loadeddata",function(){sG(c)})}na(rG,QD);function sG(a){a.controls.Xd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function tG(a){a.g.ariaLabel=a.localization.resolve(a.controls.fd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1646
|
+
P("shaka.ui.FullscreenButton",rG);function uG(){}uG.prototype.create=function(a,b){return new rG(a,b)};fF("fullscreen",new uG);function vG(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=W("span");this.l.classList.add("shaka-current-selection-span");
|
|
1647
|
+
a.appendChild(this.l);this.g.appendChild(a);wG(this);this.parent.appendChild(this.g);this.eventManager.s(this.localization,"locale-updated",function(){wG(c)});this.eventManager.s(this.localization,"locale-changed",function(){wG(c)});this.eventManager.s(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.La();c.h.xa(1)});this.m=this.video.loop;this.h=new Qb(function(){c.m!=c.video.loop&&(wG(c),c.m=c.video.loop)});this.h.xa(1)}na(vG,QD);
|
|
1648
|
+
vG.prototype.release=function(){this.h.stop();this.h=null;QD.prototype.release.call(this)};function wG(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}P("shaka.ui.LoopButton",vG);function xG(){}xG.prototype.create=function(a,b){return new vG(a,b)};IF("loop",new xG);fF("loop",new xG);fE("loop",new xG);function yG(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);zG(this);AG(this);this.eventManager.s(this.localization,"locale-updated",function(){zG(c)});this.eventManager.s(this.localization,"locale-changed",function(){zG(c)});this.eventManager.s(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
|
|
1649
|
+
this.eventManager.s(this.video,"volumechange",function(){zG(c);AG(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){zG(c);AG(c)});this.eventManager.s(this.adManager,"ad-muted",function(){zG(c);AG(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){c.ad=null;zG(c);AG(c)})}na(yG,QD);function zG(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
|
|
1650
|
+
function AG(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}P("shaka.ui.MuteButton",yG);function BG(){}BG.prototype.create=function(a,b){return new yG(a,b)};fF("mute",new BG);function CG(a,b){QD.call(this,a,b);var c=this;this.l=this.controls.o;this.g=dn();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
|
|
1651
|
+
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);DG(this);this.parent.appendChild(this.g);this.controls.Qe()||VD(this.g,!1);this.eventManager.s(this.localization,"locale-updated",function(){DG(c)});this.eventManager.s(this.localization,"locale-changed",function(){DG(c)});this.eventManager.s(this.g,"click",function(){c.controls.me()});this.eventManager.s(this.l,"enterpictureinpicture",function(){EG(c)});this.eventManager.s(this.l,"leavepictureinpicture",
|
|
1652
|
+
function(){FG(c)});this.eventManager.s(this.controls,"caststatuschanged",function(){GG(c)});this.eventManager.s(this.player,"trackschanged",function(){GG(c)});"documentPictureInPicture"in window&&this.eventManager.s(window.documentPictureInPicture,"enter",function(d){EG(c);c.eventManager.ma(d.window,"pagehide",function(){FG(c)})})}na(CG,QD);
|
|
1653
|
+
function EG(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function FG(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
|
|
1654
|
+
function DG(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Re();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function GG(a){O(function(b){if(!a.controls.Qe())return VD(a.g,!1),a.controls.Re()?E(b,a.controls.me(),0):b.B(0);if(!a.player||!a.player.ed())return VD(a.g,!0),b.B(0);VD(a.g,!1);return a.controls.Re()?E(b,a.controls.me(),0):b.B(0)})}P("shaka.ui.PipButton",CG);
|
|
1655
|
+
function HG(){}HG.prototype.create=function(a,b){return new CG(a,b)};IF("picture_in_picture",new HG);fF("picture_in_picture",new HG);fE("picture_in_picture",new HG);function IG(a,b){$F.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.s(this.localization,"locale-updated",function(){JG(c)});this.eventManager.s(this.localization,"locale-changed",function(){JG(c)});this.eventManager.s(this.player,"loaded",function(){KG(c,c.player.Oa())});this.eventManager.s(this.player,"ratechange",function(){KG(c,
|
|
1656
|
+
c.player.Oa())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));JG(this);TG(this);KG(this,this.player.Oa())}na(IG,$F);function JG(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1657
|
+
function KG(a,b){var c=SD(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(UD()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1658
|
+
"x")}function TG(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={yd:b.yd},d=c.next()){b.yd=d.value;d=dn();var e=W("span");e.textContent=b.yd;d.appendChild(e);a.eventManager.s(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yd);a.video.defaultPlaybackRate=a.g.get(f.yd)}}(b));a.menu.appendChild(d)}TD(a.menu)}P("shaka.ui.PlaybackRateSelection",IG);function UG(){}UG.prototype.create=function(a,b){return new IG(a,b)};IF("playback_rate",new UG);fF("playback_rate",new UG);function VG(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-current-time");WG(this,"0:00");this.parent.appendChild(this.g);this.eventManager.s(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Qa().end)});this.eventManager.s(this.player,"loading",function(){VD(c.g,!0)});this.eventManager.s(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.pg(),f=c.player.Qa(),g=f.end-f.start;c.player.U()?(e=Math.max(0,Math.floor(f.end-
|
|
1659
|
+
e)),g=3600<=g,1<=e||d?(WG(c,"- "+WD(e,g)),c.g.disabled=!1):(WG(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=WD(Math.max(0,e-f.start),d),g&&(e+=" / "+WD(g,d)),WG(c,e),c.g.disabled=!0)});this.eventManager.s(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.s(this.adManager,"ad-started",function(){VD(c.g,!1)});this.eventManager.s(this.adManager,"ad-stopped",function(){VD(c.g,!0)})}na(VG,QD);
|
|
1660
|
+
function WG(a,b){b!=a.g.textContent&&(a.g.textContent=b)}P("shaka.ui.PresentationTimeTracker",VG);function XG(){}XG.prototype.create=function(a,b){return new VG(a,b)};fF("time_and_duration",new XG);function YG(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
|
|
1661
|
+
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);ZG(this);this.eventManager.s(this.localization,"locale-updated",function(){ZG(c)});this.eventManager.s(this.localization,"locale-changed",function(){ZG(c)});var d=this.controls.u;this.eventManager.s(this.g,"click",function(){d.g?RE(d.g):Ya("Not playing VR content")});this.eventManager.s(d,"vrstatuschanged",function(){VD(c.g,c.controls.Pb())});VD(this.g,this.controls.Pb())}na(YG,QD);
|
|
1662
|
+
function ZG(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}P("shaka.ui.RecenterVRButton",YG);function $G(){}$G.prototype.create=function(a,b){return new YG(a,b)};IF("recenter_vr",new $G);fF("recenter_vr",new $G);function aH(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");a="cast";(b=ic())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
|
|
1663
|
+
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;bH(this);VD(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.s(this.localization,"locale-updated",function(){bH(c)}),this.eventManager.s(this.localization,"locale-changed",function(){bH(c)}),this.eventManager.s(this.controls,"caststatuschanged",function(){cH(c)}),this.eventManager.s(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.s(this.video.remote,
|
|
1664
|
+
"connect",function(){cH(c)}),this.eventManager.s(this.video.remote,"connecting",function(){cH(c)}),this.eventManager.s(this.video.remote,"disconnect",function(){cH(c)}),this.eventManager.s(this.player,"loaded",function(){cH(c)}),cH(this))}na(aH,QD);aH.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});QD.prototype.release.call(this)};
|
|
1665
|
+
function cH(a){var b,c;O(function(d){switch(d.g){case 1:if(a.controls.F.Tf()&&a.controls.oa){VD(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.B(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?VD(a.g,a.player.Qd()==ep&&e):VD(a.g,!1)};ta(d,7);if(-1==a.h){d.B(9);break}return E(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.B(0);break}return E(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.B(0);break;case 10:a.h=-1;
|
|
1666
|
+
case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),E(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),F(d)}})}function bH(a){var b=a.localization.resolve("CAST"),c=ic();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}P("shaka.ui.RemoteButton",aH);function dH(){}dH.prototype.create=function(a,b){return new aH(a,b)};IF("remote",new dH);fF("remote",new dH);function eH(a,b){$F.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.s(this.localization,"locale-updated",function(){fH(c)});this.eventManager.s(this.localization,"locale-changed",function(){fH(c)});this.eventManager.s(this.player,"loading",function(){gH(c)});this.eventManager.s(this.player,"variantchanged",function(){gH(c)});this.eventManager.s(this.player,
|
|
1667
|
+
"trackschanged",function(){gH(c)});this.eventManager.s(this.player,"abrstatuschanged",function(){gH(c)});gH(this)}na(eH,$F);
|
|
1668
|
+
function gH(a){var b=[];a.player.Qd()!=ep&&(b=a.player.Db());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=b.filter(function(k,l){var m=-1;m=a.player.ed()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==
|
|
1669
|
+
k.height&&n.videoBandwidth==k.videoBandwidth&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.ed()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=RD(a.menu);en(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={Tb:e.Tb},g=f.next()){e.Tb=g.value;g=dn();g.classList.add("explicit-resolution");
|
|
1670
|
+
a.eventManager.s(g,"click",function(k){return function(){var l=k.Tb;a.player.configure({abr:{enabled:!1}});a.player.lf(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=W("span");h.textContent=a.player.ed()&&e.Tb.bandwidth?Math.round(e.Tb.bandwidth/1E3)+" kbits/s":e.Tb.height&&e.Tb.width?hH(e.Tb,b):"Unknown";g.appendChild(h);d||e.Tb!=c||(g.ariaSelected="true",g.appendChild(UD()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=dn();e.classList.add("shaka-enable-abr-button");
|
|
1671
|
+
a.eventManager.s(e,"click",function(){a.player.configure({abr:{enabled:!0}});gH(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(UD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);TD(a.menu);a.controls.dispatchEvent(new S("resolutionselectionupdated"));
|
|
1672
|
+
fH(a);VD(a.button,1<b.length)}function hH(a,b){var c=a.height||0,d=a.width||0,e=c;d/c>16/9&&(e=Math.round(9*d/16));c=e+"p";2160==e&&(c="4K");(e=a.frameRate)&&(50<=e||20>=e)&&(c+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)c+=" (HDR)";"CH-STEREO"==a.videoLayout&&(c+=" (3D)");a.videoBandwidth&&b.some(function(f){return f!=a&&f.height==a.height})&&(c+=" ("+Math.round(a.videoBandwidth/1E3)+" kbits/s)");return c}
|
|
1673
|
+
function fH(a){var b=a.player.ed()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}P("shaka.ui.ResolutionSelection",eH);function iH(){}
|
|
1674
|
+
iH.prototype.create=function(a,b){return new eH(a,b)};IF("quality",new iH);fF("quality",new iH);function jH(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);kH(this);this.h=this.controls.g.rewindRates;this.eventManager.s(this.localization,"locale-updated",function(){kH(c)});this.eventManager.s(this.localization,"locale-changed",function(){kH(c)});
|
|
1675
|
+
this.eventManager.s(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Oa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Nc(d);c.g.setAttribute("shaka-status",d+"x")}})}na(jH,QD);function kH(a){a.g.ariaLabel=a.localization.resolve("REWIND")}P("shaka.ui.RewindButton",jH);function lH(){}lH.prototype.create=function(a,b){return new jH(a,b)};fF("rewind",new lH);function mH(a,b){$D.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}na(mH,$D);mH.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
|
|
1676
|
+
mH.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};P("shaka.ui.SmallPlayButton",mH);function nH(){}nH.prototype.create=function(a,b){return new mH(a,b)};fF("play_pause",new nH);function oH(a,b){QD.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}na(oH,QD);P("shaka.ui.Spacer",oH);function pH(){}pH.prototype.create=function(a,b){return new oH(a,b)};fF("spacer",new pH);function qH(a,b){function c(k){return WD(h.g[k],!1)+" (m)"}function d(k){return Math.round(h.g[k]/1E3)+" (kbits/s)"}function e(k){return h.g[k].toFixed(2)+" (s)"}function f(k){return h.g[k]+" (frames)"}function g(k){return h.g[k]+" (px)"}QD.call(this,a,b);var h=this;this.i=dn();this.i.classList.add("shaka-statistics-button");this.j=W("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");
|
|
1677
1677
|
this.o=W("span");a.appendChild(this.o);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");this.h.classList.add("shaka-hidden");this.controls.h.appendChild(this.h);this.F=[];this.G=["stateHistory","switchHistory"];this.g=this.player.getStats();
|
|
1678
1678
|
this.u={};this.A={width:g,height:g,completionPercent:function(k){return h.g[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.g[k]+" (stalls)"},gapsJumped:function(k){return h.g[k]+" (gaps)"},bytesDownloaded:function(k){k=parseInt(h.g[k],10);return 1E6<k?(k/1E6).toFixed(2)+
|
|
1679
|
-
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Qb(function(){h.g=h.player.getStats();for(var k=t(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});
|
|
1680
|
-
(h.j.textContent="insert_chart_outlined",h.l.stop(),
|
|
1681
|
-
function
|
|
1682
|
-
|
|
1683
|
-
"loading",function(){
|
|
1684
|
-
function
|
|
1685
|
-
function
|
|
1686
|
-
a.button.setAttribute("shaka-status",a.currentSelection.textContent);
|
|
1687
|
-
function
|
|
1688
|
-
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);
|
|
1689
|
-
function
|
|
1690
|
-
this.eventManager.s(this.localization,"locale-changed",function(){return
|
|
1691
|
-
function
|
|
1679
|
+
"MB":1E3<k?(k/1E3).toFixed(2)+"KB":k+"B"}};this.l=new Qb(function(){h.g=h.player.getStats();for(var k=t(h.F),l=k.next();!l.done;l=k.next())l=l.value,h.u[l].textContent=h.A[l](l)});rH(this);sH(this);this.eventManager.s(this.localization,"locale-updated",function(){rH(h)});this.eventManager.s(this.localization,"locale-changed",function(){rH(h)});this.eventManager.s(this.i,"click",function(){VD(h.parent,!1);h.h.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.xa(.1),VD(h.h,!0)):
|
|
1680
|
+
(h.j.textContent="insert_chart_outlined",h.l.stop(),VD(h.h,!1));rH(h)})}na(qH,QD);function rH(a){a.o.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}
|
|
1681
|
+
function sH(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=a.h,e=d.appendChild,f=a,g=W("div"),h=W("label");h.textContent=c+":";g.appendChild(h);h=W("span");h.textContent=f.A[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.F.push(c)}else Ya("Unrecognized statistic element:",c)}qH.prototype.release=function(){this.l.stop();this.l=null;QD.prototype.release.call(this)};P("shaka.ui.StatisticsButton",qH);function tH(){}
|
|
1682
|
+
tH.prototype.create=function(a,b){return new qH(a,b)};IF("statistics",new tH);fE("statistics",new tH);function uH(a,b){$F.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Fc()?this.button.ariaPressed="true":this.button.ariaPressed="false";vH(this);this.eventManager.s(this.localization,"locale-updated",function(){wH(c);xH(c)});this.eventManager.s(this.localization,"locale-changed",function(){wH(c);xH(c)});this.eventManager.s(this.player,
|
|
1683
|
+
"loading",function(){yH(c)});this.eventManager.s(this.player,"texttrackvisibility",function(){zH(c);xH(c)});this.eventManager.s(this.player,"textchanged",function(){xH(c)});this.eventManager.s(this.player,"trackschanged",function(){yH(c)});zH(this);wH(this);xH(this);yH(this)}na(uH,$F);function vH(a){var b=dn();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(UD());a.g=W("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
|
|
1684
|
+
function zH(a){a.player.Fc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new S("captionselectionupdated"))}
|
|
1685
|
+
function xH(a){var b=a.player.jc();YF(b,a.menu,function(c){return AH(a,c)},a.player.Fc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=dn();b.classList.add("shaka-turn-captions-off-button");a.eventManager.s(b,"click",function(){a.player.nf(!1);xH(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Fc()||(b.ariaSelected="true",b.appendChild(UD()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1686
|
+
a.button.setAttribute("shaka-status",a.currentSelection.textContent);TD(a.menu);a.controls.dispatchEvent(new S("captionselectionupdated"))}function AH(a,b){return O(function(c){a.player.Ug(b);return E(c,a.player.nf(!0),0)})}
|
|
1687
|
+
function wH(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function yH(a){var b=0<a.player.jc().length;VD(a.button,b);xH(a)}P("shaka.ui.TextSelection",uH);function BH(){}BH.prototype.create=function(a,b){return new uH(a,b)};IF("captions",new BH);fF("captions",new BH);function CH(a,b){QD.call(this,a,b);var c=this;this.g=dn();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
|
|
1688
|
+
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);DH(this);this.eventManager.s(this.localization,"locale-updated",function(){DH(c)});this.eventManager.s(this.localization,"locale-changed",function(){DH(c)});var d=this.controls.u;this.eventManager.s(this.g,"click",function(){d.qd()});this.eventManager.s(d,"vrstatuschanged",function(){VD(c.g,c.controls.Pb())});VD(this.g,this.controls.Pb())}na(CH,QD);
|
|
1689
|
+
function DH(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}P("shaka.ui.ToggleStereoscopicButton",CH);function EH(){}EH.prototype.create=function(a,b){return new CH(a,b)};IF("toggle_stereoscopic",new EH);fF("toggle_stereoscopic",new EH);function FH(a,b){kE.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.s(this.video,"volumechange",function(){return GH(c)});this.eventManager.s(this.adManager,"ad-volume-changed",function(){return HH(c)});this.eventManager.s(this.adManager,"ad-muted",function(){return HH(c)});this.eventManager.s(this.adManager,"ad-stopped",function(){return GH(c)});this.eventManager.s(this.localization,"locale-updated",function(){return IH(c)});
|
|
1690
|
+
this.eventManager.s(this.localization,"locale-changed",function(){return IH(c)});GH(this);IH(this);if(this.ad)this.onChange()}na(FH,kE);FH.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function GH(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);JH(a)}function HH(a){var b=a.ad.getVolume();a.setValue(100*b);JH(a)}
|
|
1691
|
+
function JH(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function IH(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}P("shaka.ui.VolumeBar",FH);function KH(){}KH.prototype.create=function(a,b){return new FH(a,b)};fF("volume",new KH);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1692
1692
|
|
|
1693
1693
|
//# sourceMappingURL=shaka-player.ui.map
|