shaka-player 4.6.13 → 4.6.15

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.
Files changed (47) hide show
  1. package/.github/workflows/shaka-bot-commands/lib.sh +37 -12
  2. package/.github/workflows/shaka-bot-commands/main.sh +4 -2
  3. package/.github/workflows/talk-to-shaka-bot.yaml +1 -0
  4. package/AUTHORS +1 -0
  5. package/CHANGELOG.md +26 -0
  6. package/CONTRIBUTORS +1 -0
  7. package/dist/controls.css +1 -1
  8. package/dist/controls.css.map +1 -1
  9. package/dist/deps.js +1 -1
  10. package/dist/locales.js +29 -29
  11. package/dist/shaka-player.compiled.debug.js +91 -89
  12. package/dist/shaka-player.compiled.debug.map +3 -3
  13. package/dist/shaka-player.compiled.js +348 -349
  14. package/dist/shaka-player.compiled.map +3 -3
  15. package/dist/shaka-player.ui.debug.js +105 -103
  16. package/dist/shaka-player.ui.debug.map +3 -3
  17. package/dist/shaka-player.ui.js +433 -434
  18. package/dist/shaka-player.ui.map +3 -3
  19. package/lib/ads/ad_manager.js +1 -1
  20. package/lib/dash/segment_template.js +18 -13
  21. package/lib/deprecate/deprecate.js +1 -1
  22. package/lib/hls/hls_parser.js +24 -5
  23. package/lib/media/manifest_parser.js +3 -2
  24. package/lib/media/segment_reference.js +4 -1
  25. package/lib/media/streaming_engine.js +2 -2
  26. package/lib/player.js +3 -3
  27. package/lib/polyfill/mediasource.js +5 -36
  28. package/lib/text/vtt_text_parser.js +2 -1
  29. package/lib/util/error.js +1 -0
  30. package/lib/util/periods.js +23 -1
  31. package/lib/util/stream_utils.js +1 -1
  32. package/lib/util/ts_parser.js +2 -2
  33. package/package.json +3 -3
  34. package/test/dash/dash_parser_segment_template_unit.js +1 -1
  35. package/test/hls/hls_parser_unit.js +28 -0
  36. package/test/media/buffering_observer_unit.js +13 -0
  37. package/test/player_integration.js +9 -1
  38. package/test/player_load_graph_integration.js +13 -10
  39. package/test/player_src_equals_integration.js +2 -2
  40. package/test/player_unit.js +9 -3
  41. package/test/test/assets/hls-ts-h265/index.m3u8 +2 -0
  42. package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +5 -1
  43. package/test/test/util/waiter.js +5 -0
  44. package/test/text/vtt_text_parser_unit.js +31 -0
  45. package/test/transmuxer/transmuxer_integration.js +22 -53
  46. package/test/util/periods_unit.js +64 -0
  47. package/ui/less/containers.less +1 -0
@@ -59,7 +59,7 @@ function nb(a,b,c){c=void 0===c?Infinity:c;return pb(a,void 0===b?0:b,c,Uint8Arr
59
59
  N("shaka.util.BufferUtils",kb);kb.toDataView=rb;kb.toUint16=qb;kb.toUint8=nb;kb.toArrayBuffer=ob;kb.equal=lb;function sb(){}sb.prototype.init=function(){};sb.prototype.i=function(){};sb.prototype.h=function(){};sb.prototype.j=function(){};N("shaka.media.IClosedCaptionParser",sb);function tb(a){this.l=new ib;if(a=ub[a.toLowerCase()])this.l=a();this.g=new hb;if(a=vb)this.g=a()}tb.prototype.init=function(a){this.l.init(a)};tb.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=nb(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
60
60
  tb.prototype.h=function(){this.g.clear()};tb.prototype.j=function(){return this.g.getStreams()};N("shaka.media.ClosedCaptionParser",tb);tb.findDecoder=function(){return vb};tb.unregisterDecoder=function(){vb=null};tb.registerDecoder=function(a){vb=a};tb.findParser=function(a){return ub[a]};tb.unregisterParser=function(a){delete ub[a]};tb.registerParser=function(a,b){ub[a]=b};var ub={},vb=null;function wb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function zb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Ab(a,b,c){c||(c=wb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Wd:d.Wd},e=a.next()){d.Wd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Wd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
61
61
  function Bb(a,b,c){c||(c=wb);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 Cb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Db;this.position=null;this.positionAlign=Eb;this.size=0;this.textAlign=Fb;this.direction=Gb;this.writingMode=Hb;this.lineInterpretation=Ib;this.line=null;this.lineHeight="";this.lineAlign=Jb;this.displayAlign=Kb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Lb;this.fontStyle=Mb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
62
- "";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={Gb:32,rows:15}}function Nb(a,b){a=new Cb(a,b,"");a.lineBreak=!0;return a}Cb.prototype.clone=function(){var a=new Cb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
62
+ "";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={Hb:32,rows:15}}function Nb(a,b){a=new Cb(a,b,"");a.lineBreak=!0;return a}Cb.prototype.clone=function(){var a=new Cb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
63
63
  function Ob(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(!Bb(a.nestedCues,b.nestedCues,Ob))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(!Bb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",Cb);Cb.equal=Ob;Cb.prototype.clone=Cb.prototype.clone;var Eb="auto";
64
64
  Cb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Eb};var Fb="center",Pb={LEFT:"left",RIGHT:"right",CENTER:Fb,START:"start",END:"end"};Cb.textAlign=Pb;var Kb="after",Qb={BEFORE:"before",CENTER:"center",AFTER:Kb};Cb.displayAlign=Qb;var Gb="ltr";Cb.direction={HORIZONTAL_LEFT_TO_RIGHT:Gb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Hb="horizontal-tb";Cb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Hb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ib=0;
65
65
  Cb.lineInterpretation={LINE_NUMBER:Ib,PERCENTAGE:1};var Jb="start",Rb={CENTER:"center",START:Jb,END:"end"};Cb.lineAlign=Rb;var Sb={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Cb.defaultTextColor=Sb;var Ub={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Cb.defaultTextBackgroundColor=Ub;var Lb=400;Cb.fontWeight={NORMAL:Lb,BOLD:700};
@@ -74,14 +74,14 @@ var fc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
74
74
  Copyright 2006 The Closure Library Authors
75
75
  SPDX-License-Identifier: Apache-2.0
76
76
  */
77
- function gc(a){var b;a instanceof gc?(hc(this,a.Za),this.Tb=a.Tb,ic(this,a.lb),jc(this,a.ic),this.Ea=a.Ea,kc(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(fc))?(hc(this,b[1]||"",!0),this.Tb=lc(b[2]||""),ic(this,b[3]||"",!0),jc(this,b[4]),this.Ea=lc(b[5]||"",!0),kc(this,b[6]||"",!0),this.Hb=lc(b[7]||"")):this.g=new mc(null)}r=gc.prototype;r.Za="";r.Tb="";r.lb="";r.ic=null;r.Ea="";r.Hb="";
78
- r.toString=function(){var a=[],b=this.Za;b&&a.push(nc(b,oc,!0),":");if(b=this.lb){a.push("//");var c=this.Tb;c&&a.push(nc(c,oc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.ic;null!=b&&a.push(":",String(b))}if(b=this.Ea)this.lb&&"/"!=b.charAt(0)&&a.push("/"),a.push(nc(b,"/"==b.charAt(0)?pc:qc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",nc(b,rc));return a.join("")};
79
- r.resolve=function(a){var b=this.clone();"data"===b.Za&&(b=new gc);var c=!!a.Za;c?hc(b,a.Za):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.lb;c?ic(b,a.lb):c=null!=a.ic;var d=a.Ea;if(c)jc(b,a.ic);else if(c=!!a.Ea){if("/"!=d.charAt(0))if(this.lb&&!this.Ea)d="/"+d;else{var e=b.Ea.lastIndexOf("/");-1!=e&&(d=b.Ea.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
80
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ea=d:c=""!==a.g.toString();c?kc(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};r.clone=function(){return new gc(this)};function hc(a,b,c){a.Za=c?lc(b,!0):b;a.Za&&(a.Za=a.Za.replace(/:$/,""))}function ic(a,b,c){a.lb=c?lc(b,!0):b}function jc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ic=b}else a.ic=null}
77
+ function gc(a){var b;a instanceof gc?(hc(this,a.Za),this.Tb=a.Tb,ic(this,a.lb),jc(this,a.kc),this.Ea=a.Ea,kc(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(fc))?(hc(this,b[1]||"",!0),this.Tb=lc(b[2]||""),ic(this,b[3]||"",!0),jc(this,b[4]),this.Ea=lc(b[5]||"",!0),kc(this,b[6]||"",!0),this.Ib=lc(b[7]||"")):this.g=new mc(null)}r=gc.prototype;r.Za="";r.Tb="";r.lb="";r.kc=null;r.Ea="";r.Ib="";
78
+ r.toString=function(){var a=[],b=this.Za;b&&a.push(nc(b,oc,!0),":");if(b=this.lb){a.push("//");var c=this.Tb;c&&a.push(nc(c,oc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.Ea)this.lb&&"/"!=b.charAt(0)&&a.push("/"),a.push(nc(b,"/"==b.charAt(0)?pc:qc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",nc(b,rc));return a.join("")};
79
+ r.resolve=function(a){var b=this.clone();"data"===b.Za&&(b=new gc);var c=!!a.Za;c?hc(b,a.Za):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.lb;c?ic(b,a.lb):c=null!=a.kc;var d=a.Ea;if(c)jc(b,a.kc);else if(c=!!a.Ea){if("/"!=d.charAt(0))if(this.lb&&!this.Ea)d="/"+d;else{var e=b.Ea.lastIndexOf("/");-1!=e&&(d=b.Ea.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
80
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ea=d:c=""!==a.g.toString();c?kc(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};r.clone=function(){return new gc(this)};function hc(a,b,c){a.Za=c?lc(b,!0):b;a.Za&&(a.Za=a.Za.replace(/:$/,""))}function ic(a,b,c){a.lb=c?lc(b,!0):b}function jc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}
81
81
  function kc(a,b,c){b instanceof mc?a.g=b:(c||(b=nc(b,sc)),a.g=new mc(b))}function lc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function nc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,tc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function tc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var oc=/[#\/\?@]/g,qc=/[#\?:]/g,pc=/[#\?]/g,sc=/[#\?@]/g,rc=/#/g;function mc(a){this.g=a||null}
82
- function uc(a){if(!a.wa&&(a.wa={},a.Kc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=mc.prototype;r.wa=null;r.Kc=null;function vc(a){uc(a);return a.Kc}r.add=function(a,b){uc(this);this.g=null;var c=this.wa.hasOwnProperty(a)?this.wa[a]:null;c||(this.wa[a]=c=[]);c.push(b);this.Kc++;return this};
82
+ function uc(a){if(!a.wa&&(a.wa={},a.Mc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=mc.prototype;r.wa=null;r.Mc=null;function vc(a){uc(a);return a.Mc}r.add=function(a,b){uc(this);this.g=null;var c=this.wa.hasOwnProperty(a)?this.wa[a]:null;c||(this.wa[a]=c=[]);c.push(b);this.Mc++;return this};
83
83
  r.set=function(a,b){uc(this);this.g=null;this.wa.hasOwnProperty(a)?this.wa[a]=[b]:this.add(a,b);return this};r.get=function(a){uc(this);return this.wa[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.wa)return"";var a=[],b;for(b in this.wa)for(var c=encodeURIComponent(b),d=this.wa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
84
- r.clone=function(){var a=new mc;a.g=this.g;if(this.wa){var b={},c;for(c in this.wa)b[c]=this.wa[c].concat();a.wa=b;a.Kc=this.Kc}return a};function P(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(wc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);var wc=!0;P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
84
+ r.clone=function(){var a=new mc;a.g=this.g;if(this.wa){var b={},c;for(c in this.wa)b[c]=this.wa[c].concat();a.wa=b;a.Mc=this.Mc}return a};function P(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(wc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);var wc=!0;P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
85
85
  P.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
86
86
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
87
87
  WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
@@ -92,7 +92,7 @@ NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CE
92
92
  CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,
93
93
  CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function xc(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new gc(a[0]);b=new gc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new gc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new gc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
94
94
  function yc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function zc(a,b){if(1==b.length)return b[0];a=Ac(a,b);if(null!=a)return a;throw new P(2,4,4025,b);}
95
- function Ac(a,b){for(var c=t(Bc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Cc?"":null}var Cc="text",Dc={fa:"video",R:"audio",ja:Cc,Cc:"image",Uh:"application"},Bc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ec(){}function Fc(a,b){var c=a;b&&!Gc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Hc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Ic(a,b,c){var d=Fc(a,b);b=Hc(a,b);ac(b)?(a=ac(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}
95
+ function Ac(a,b){for(var c=t(Bc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Cc?"":null}var Cc="text",Dc={fa:"video",R:"audio",ja:Cc,Ec:"image",Uh:"application"},Bc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ec(){}function Fc(a,b){var c=a;b&&!Gc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Hc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Ic(a,b,c){var d=Fc(a,b);b=Hc(a,b);ac(b)?(a=ac(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}
96
96
  function Jc(a){var b=Kc(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"===
97
97
  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"}return a}function Lc(a){return a.split(";")[0]}function Mc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Kc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}N("shaka.util.MimeUtils",Ec);
98
98
  Ec.getFullTypeWithAllCodecs=Hc;Ec.getFullType=Fc;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Gc=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Nc(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function Oc(a){return Pc[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!vb:!1}Nc.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
@@ -110,11 +110,11 @@ var cd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
110
110
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
111
111
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
112
112
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
113
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function hd(){this.g={}}r=hd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function id(a){this.h=a;this.g=null}id.prototype.U=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};id.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function jd(a){this.h=a;this.g=null}jd.prototype.lc=function(){this.stop();this.h();return this};jd.prototype.U=function(a){var b=this;this.stop();this.g=(new id(function(){b.h()})).U(a);return this};jd.prototype.Ya=function(a){var b=this;this.stop();this.g=(new id(function(){b.g.U(a);b.h()})).U(a);return this};jd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",jd);jd.prototype.stop=jd.prototype.stop;jd.prototype.tickEvery=jd.prototype.Ya;
114
- jd.prototype.tickAfter=jd.prototype.U;jd.prototype.tickNow=jd.prototype.lc;function kd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function ld(a){return""!=md().canPlayType(a)}function nd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function od(){return pd("Xbox One")}function qd(){return pd("Tizen")}function rd(){return pd("Tizen 3")}function sd(){return pd("Tizen 2")}function td(){return pd("Web0S")&&pd("Chrome/38.0.2125.122 Safari/537.36")}function ud(){return pd("CrKey")}
113
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function hd(){this.g={}}r=hd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function id(a){this.h=a;this.g=null}id.prototype.U=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};id.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function jd(a){this.h=a;this.g=null}jd.prototype.nc=function(){this.stop();this.h();return this};jd.prototype.U=function(a){var b=this;this.stop();this.g=(new id(function(){b.h()})).U(a);return this};jd.prototype.Ya=function(a){var b=this;this.stop();this.g=(new id(function(){b.g.U(a);b.h()})).U(a);return this};jd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",jd);jd.prototype.stop=jd.prototype.stop;jd.prototype.tickEvery=jd.prototype.Ya;
114
+ jd.prototype.tickAfter=jd.prototype.U;jd.prototype.tickNow=jd.prototype.nc;function kd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function ld(a){return""!=md().canPlayType(a)}function nd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function od(){return pd("Xbox One")}function qd(){return pd("Tizen")}function rd(){return pd("Tizen 3")}function sd(){return pd("Tizen 2")}function td(){return pd("Web0S")&&pd("Chrome/38.0.2125.122 Safari/537.36")}function ud(){return pd("CrKey")}
115
115
  function vd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!qd()&&!pd("PC=EOS")&&!pd("PC=APL")&&!pd("VirginMedia")&&!pd("SOPOpenBrowser")&&!wd()&&!pd("AFT")&&!pd("WPE")}function wd(){return pd("PlayStation 4")}function yd(){if(!vd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function pd(a){return(navigator.userAgent||"").includes(a)}
116
116
  function md(){if(zd)return zd;Ad||(Ad=new jd(function(){zd=null}));(zd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(zd=document.createElement("video"));Ad.U(1);return zd}var Ad=null,zd=null;function Bd(){}
117
- function Cd(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Dd(e,b,c);if(d.length){b=new hd;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 y=[],z={};v=t(v);for(var x=v.next();!x.done;z={Bc:z.Bc},x=v.next())z.Bc=x.value,x=d.filter(function(A){return function(B){return A.Bc.decodingInfos[0][B]}}(z)).length,x>u?(u=x,y=[z.Bc]):x==u&&y.push(z.Bc);f.push.apply(f,w(y))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
117
+ function Cd(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Dd(e,b,c);if(d.length){b=new hd;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 y=[],z={};v=t(v);for(var x=v.next();!x.done;z={Dc:z.Dc},x=v.next())z.Dc=x.value,x=d.filter(function(A){return function(B){return A.Dc.decodingInfos[0][B]}}(z)).length,x>u?(u=x,y=[z.Dc]):x==u&&y.push(z.Dc);f.push.apply(f,w(y))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
118
118
  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=Jc(m.codecs),q=Jc(g.codecs);n==q&&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,
119
119
  v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=gb();var p=[];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=Jc(m.codecs),q=Jc(g.codecs),n!==q))continue;g.width>m.width||g.height>m.height?(l.push(g),p.push(g.id)):g.width==m.width&&g.height==m.height&&(n=Jc(m.codecs),q=Jc(g.codecs),n==q&&g.bandwidth>m.bandwidth&&(l.push(g),p.push(g.id)))}else l.push(g),
120
120
  p.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&&!p.includes(u.id)?!1:!0})}
@@ -128,10 +128,10 @@ function Qd(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:c=Pd(b);ta(f,
128
128
  function Ld(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return D.return();f={};g=t(d);h=g.next();case 2:if(h.done){D.B(4);break}f.Xd=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){D.B(7);break}n=m.value;q=Sd(n,b,c).filter(function(F){return function(J){return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.Xd}}(f));p=t(q);u=p.next();case 8:if(u.done){D.B(10);break}v=u.value;return C(D,
129
129
  Qd(n,v),9);case 9:u=p.next();D.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();D.B(5);break;case 7:if(k)return D.return();f={Xd:f.Xd};h=g.next();D.B(2);break;case 4:y=t(a),m=y.next();case 12:if(m.done){D.B(0);break}z=m.value;x=Sd(z,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});A=t(x);u=A.next();case 15:if(u.done){m=y.next();D.B(12);break}B=u.value;return C(D,Qd(z,B),16);case 16:u=A.next(),D.B(15)}})}
130
130
  function Sd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=zc("video",g);f=Nd(f);g=zc("audio",g);g=Od(g);g=Ic(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Nd(f);f=Ic(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction=
131
- "srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Ic(d.mimeType,Od(d.codecs),"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
131
+ "srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Od(d.codecs),f=Ic(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
132
132
  []);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var q=new Set,p=t(h.initData),u=p.next();!u.done;u=p.next())q.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
133
133
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
134
- function Od(a){return"fLaC"===a?"flac":"Opus"===a?"opus":a}function Nd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Jd(a){a.textStreams=a.textStreams.filter(function(b){b=Fc(b.mimeType,b.codecs);return Oc(b)})}
134
+ function Od(a){return"fLaC"!==a||yd()?"Opus"===a?"opus":a:"flac"}function Nd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Jd(a){a.textStreams=a.textStreams.filter(function(b){b=Fc(b.mimeType,b.codecs);return Oc(b)})}
135
135
  function Kd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(Td.has(f)){l.B(5);break}g=Ud.get(f);if(!g){Td.set(f,!1);l.B(5);break}return C(l,Vd(g),7);case 7:h=l.h,Td.set(f,h);case 5:(k=Td.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,E(l)}})}
136
136
  function Vd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
137
137
  function Wd(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
@@ -157,13 +157,13 @@ r.segmentDownloaded=function(a,b,c){this.i.sample(a,b);if(c&&null!=this.s&&this.
157
157
  r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.U(me)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function le(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
158
158
  function je(a,b,c,d){a&&(b=b.filter(function(e){return Fd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}function ke(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}N("shaka.abr.SimpleAbrManager",ie);ie.prototype.configure=ie.prototype.configure;ie.prototype.setMediaElement=ie.prototype.setMediaElement;
159
159
  ie.prototype.playbackRateChanged=ie.prototype.playbackRateChanged;ie.prototype.setVariants=ie.prototype.setVariants;ie.prototype.getBandwidthEstimate=ie.prototype.getBandwidthEstimate;ie.prototype.segmentDownloaded=ie.prototype.segmentDownloaded;ie.prototype.disable=ie.prototype.disable;ie.prototype.enable=ie.prototype.enable;ie.prototype.chooseVariant=ie.prototype.chooseVariant;ie.prototype.init=ie.prototype.init;ie.prototype.release=ie.prototype.release;ie.prototype.stop=ie.prototype.stop;
160
- var me=1;function ne(a,b){this.g=a;this.h=b}ne.prototype.toString=function(){return"v"+this.g+"."+this.h};function oe(a,b){var c=new ne(5,0),d=pe,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function qe(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function re(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var pe=null;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{vi:"reload",ng:"smooth"});function se(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}se.prototype.add=function(a,b,c){return ve(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
161
- function ve(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!we(e,f)||!xe(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||we(a,b))&&xe(a.roles,b.roles)));return d?!1:!0}se.prototype.values=function(){return this.g.values()};
162
- function we(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Kc(d)[0]});b=b.codecs.split(",").map(function(d){return Kc(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function xe(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function ye(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new ze(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","","",b,c)}ye.prototype.create=function(a){var b=this,c="smooth"==this.h&&gb(),d=a.filter(function(e){return ve(b.i,e,!c,b.g)});return d.length?new se(d[0],d,!c,this.g):this.j.create(a)};
160
+ var me=1;function ne(a,b){this.g=a;this.h=b}ne.prototype.toString=function(){return"v"+this.g+"."+this.h};function oe(a,b){var c=new ne(5,0),d=pe,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function qe(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function re(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var pe=null;N("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});N("shaka.config.CodecSwitchingStrategy",{vi:"reload",ng:"smooth"});function se(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}se.prototype.add=function(a,b,c){return te(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
161
+ function te(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!we(e,f)||!xe(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||we(a,b))&&xe(a.roles,b.roles)));return d?!1:!0}se.prototype.values=function(){return this.g.values()};
162
+ function we(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Kc(d)[0]});b=b.codecs.split(",").map(function(d){return Kc(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function xe(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function ye(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new ze(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","","",b,c)}ye.prototype.create=function(a){var b=this,c="smooth"==this.h&&gb(),d=a.filter(function(e){return te(b.i,e,!c,b.g)});return d.length?new se(d[0],d,!c,this.g):this.j.create(a)};
163
163
  function ze(a,b,c,d,e,f,g,h){this.o=a;this.s=b;this.g=c;this.h=d;this.j=e;this.i=void 0===f?"":f;this.l=void 0===g?"reload":g;this.m=void 0===h?!1:h}
164
- ze.prototype.create=function(a){var b=[];b=Ae(a,this.o);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Be(b,this.s);a.length&&(b=a);this.j&&(a=De(b,this.j),a.length&&(b=a));this.h&&(a=Ee(b,this.h),a.length&&(b=a));this.g&&(a=Fe(b,this.g),a.length&&(b=a));this.i&&(a=Ge(b,this.i),a.length&&(b=a));return new se(b[0],b,!("smooth"==this.l&&gb()),this.m)};function Ae(a,b){b=$c(b);var c=gd(b,a.map(function(d){return fd(d)}));return c?a.filter(function(d){return c==fd(d)}):[]}
164
+ ze.prototype.create=function(a){var b=[];b=Ae(a,this.o);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Be(b,this.s);a.length&&(b=a);this.j&&(a=Ce(b,this.j),a.length&&(b=a));this.h&&(a=Ee(b,this.h),a.length&&(b=a));this.g&&(a=Fe(b,this.g),a.length&&(b=a));this.i&&(a=Ge(b,this.i),a.length&&(b=a));return new se(b[0],b,!("smooth"==this.l&&gb()),this.m)};function Ae(a,b){b=$c(b);var c=gd(b,a.map(function(d){return fd(d)}));return c?a.filter(function(d){return c==fd(d)}):[]}
165
165
  function Be(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ge(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Fe(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}
166
- function Ee(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function De(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})};function He(){this.g=Ie;this.h=(new Map).set(Ie,2).set(Je,1)}function Ke(a,b,c){a.h.set(Ie,c).set(Je,b)}var Je=0,Ie=1;function Le(a,b){var c=Me();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
166
+ function Ee(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Ce(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})};function He(){this.g=Ie;this.h=(new Map).set(Ie,2).set(Je,1)}function Ke(a,b,c){a.h.set(Ie,c).set(Je,b)}var Je=0,Ie=1;function Le(a,b){var c=Me();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
167
167
  function Ne(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return C(d,new Promise(function(e){(new jd(e)).U(c/1E3)}),2)}a.h*=a.m;E(d)})}function Me(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Oe(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Oe.prototype.resolve=function(){};Oe.prototype.reject=function(){};function Pe(a,b){this.promise=a;this.i=b;this.g=!1}function Qe(a){return new Pe(Promise.reject(a),function(){return Promise.resolve()})}function Re(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new Pe(a,function(){return Promise.resolve()})}function Se(a){return new Pe(Promise.resolve(a),function(){return Promise.resolve()})}function Te(a){return new Pe(a,function(){return a.catch(function(){})})}Pe.prototype.abort=function(){this.g=!0;return this.i()};
168
168
  function Ue(a){return new Pe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Pe.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
169
169
  Pe.prototype.oa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ve(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Oe,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Pe(f,function(){return d()})};
@@ -189,12 +189,12 @@ function Df(a){if(!a)return"";a=nb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
189
189
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
190
190
  function Ef(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=rb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Ff.value()(d)}
191
191
  function Gf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=nb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Df(c);if(254==c[0]&&255==c[1])return Ef(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Ef(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Ef(a,!1);if(0==c[1]&&0==c[3])return Ef(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Df(a);throw new P(2,2,2003);}
192
- function Hf(a){if(window.TextEncoder&&!wd()){var b=new TextEncoder;return ob(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return ob(b)}function Jf(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",Cf);Cf.resetFromCharCode=function(){Ff.g=void 0};Cf.toUTF16=Jf;Cf.toUTF8=Hf;Cf.fromBytesAutoDetect=Gf;Cf.fromUTF16=Ef;
192
+ function Hf(a){if(window.TextEncoder&&!wd()){var b=new TextEncoder;return ob(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return ob(b)}function If(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",Cf);Cf.resetFromCharCode=function(){Ff.g=void 0};Cf.toUTF16=If;Cf.toUTF8=Hf;Cf.fromBytesAutoDetect=Gf;Cf.fromUTF16=Ef;
193
193
  Cf.fromUTF8=Df;var Ff=new yf(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={vb:65536};0<b.vb;b={vb:b.vb},b.vb/=2)if(a(b.vb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.vb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.vb));return e}}(b);return null});function Kf(a,b){this.h=rb(a);this.i=b==Lf;this.g=0}r=Kf.prototype;r.ha=function(){return this.g<this.h.byteLength};r.pa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.da=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Mf();}};r.Ca=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Mf();}};r.L=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Mf();}};
194
- r.Xf=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Mf();}};r.jc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Mf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.qb=function(a){if(this.g+a>this.h.byteLength)throw Mf();var b=nb(this.h,this.g,a);this.g+=a;return b};
194
+ r.Xf=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Mf();}};r.lc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Mf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.qb=function(a){if(this.g+a>this.h.byteLength)throw Mf();var b=nb(this.h,this.g,a);this.g+=a;return b};
195
195
  r.skip=function(a){if(this.g+a>this.h.byteLength)throw Mf();this.g+=a};r.Fh=function(a){if(this.g<a)throw Mf();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Mf();this.g=a};r.Yc=function(){for(var a=this.g;this.ha()&&0!=this.h.getUint8(this.g);)this.g+=1;a=nb(this.h,a,this.g-a);this.g+=1;return Df(a)};function Mf(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",Kf);Kf.prototype.readTerminatedString=Kf.prototype.Yc;Kf.prototype.seek=Kf.prototype.seek;Kf.prototype.rewind=Kf.prototype.Fh;
196
- Kf.prototype.skip=Kf.prototype.skip;Kf.prototype.readBytes=Kf.prototype.qb;Kf.prototype.readUint64=Kf.prototype.jc;Kf.prototype.readInt32=Kf.prototype.Xf;Kf.prototype.readUint32=Kf.prototype.L;Kf.prototype.readUint16=Kf.prototype.Ca;Kf.prototype.readUint8=Kf.prototype.da;Kf.prototype.getLength=Kf.prototype.getLength;Kf.prototype.getPosition=Kf.prototype.pa;Kf.prototype.hasMoreData=Kf.prototype.ha;var Lf=1;Kf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Lf};function Nf(){this.i=[];this.h=[];this.g=!1}r=Nf.prototype;r.box=function(a,b){a=Of(a);this.i[a]=Pf;this.h[a]=b;return this};r.N=function(a,b){a=Of(a);this.i[a]=Qf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Kf(a,0);for(this.g=!1;a.ha()&&!this.g;)this.Wc(0,a,b,c)};
197
- r.Wc=function(a,b,c,d){var e=b.pa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=Rf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.pa()+8>b.getLength()){this.g=!0;return}f=b.jc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Qf){if(d&&b.pa()+4>b.getLength()){this.g=!0;return}n=b.L();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.pa(),b=0<d?b.qb(d):new Uint8Array(0),b=new Kf(b,0),l({name:h,parser:this,
196
+ Kf.prototype.skip=Kf.prototype.skip;Kf.prototype.readBytes=Kf.prototype.qb;Kf.prototype.readUint64=Kf.prototype.lc;Kf.prototype.readInt32=Kf.prototype.Xf;Kf.prototype.readUint32=Kf.prototype.L;Kf.prototype.readUint16=Kf.prototype.Ca;Kf.prototype.readUint8=Kf.prototype.da;Kf.prototype.getLength=Kf.prototype.getLength;Kf.prototype.getPosition=Kf.prototype.pa;Kf.prototype.hasMoreData=Kf.prototype.ha;var Lf=1;Kf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Lf};function Nf(){this.i=[];this.h=[];this.g=!1}r=Nf.prototype;r.box=function(a,b){a=Of(a);this.i[a]=Pf;this.h[a]=b;return this};r.N=function(a,b){a=Of(a);this.i[a]=Qf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Kf(a,0);for(this.g=!1;a.ha()&&!this.g;)this.Wc(0,a,b,c)};
197
+ r.Wc=function(a,b,c,d){var e=b.pa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.L(),g=b.L(),h=Rf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.pa()+8>b.getLength()){this.g=!0;return}f=b.lc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Qf){if(d&&b.pa()+4>b.getLength()){this.g=!0;return}n=b.L();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.pa(),b=0<d?b.qb(d):new Uint8Array(0),b=new Kf(b,0),l({name:h,parser:this,
198
198
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.pa(),b.getLength()-b.pa()))}};function Sf(a){for(var b=Tf(a);a.reader.ha()&&!a.parser.g;)a.parser.Wc(a.start+b,a.reader,a.partialOkay)}function Uf(a){for(var b=Tf(a),c=a.reader.L(),d=0;d<c&&(a.parser.Wc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Vf(a){var b=Tf(a);for(a.reader.skip(78);a.reader.ha()&&!a.parser.g;)a.parser.Wc(a.start+b,a.reader,a.partialOkay)}
199
199
  function Wf(a){return function(b){a(b.reader.qb(b.reader.getLength()-b.reader.pa()))}}function Of(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Rf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Tf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",Nf);Nf.headerSize=Tf;Nf.typeToString=Rf;Nf.allData=Wf;Nf.visualSampleEntry=Vf;Nf.sampleDescription=Uf;Nf.children=Sf;Nf.prototype.parseNext=Nf.prototype.Wc;
200
200
  Nf.prototype.parse=Nf.prototype.parse;Nf.prototype.stop=Nf.prototype.stop;Nf.prototype.fullBox=Nf.prototype.N;Nf.prototype.box=Nf.prototype.box;var Pf=0,Qf=1;function Xf(){}function Yf(a){a=nb(a);a=Ff.value()(a);return btoa(a)}function Zf(a,b){b=void 0==b?!0:b;a=Yf(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function $f(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function ag(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
@@ -213,13 +213,13 @@ function Jg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:
213
213
  function Hg(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x;return K(function(A){if(1==A.g){if(c=Lg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=zf(a.h.servers),Mg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ng(m),q=t(n),p=q.next();!p.done;p=q.next())u=p.value,k.add(u);v=t(k);for(p=v.next();!p.done;p=
214
214
  v.next())y=p.value,Og(y,zf(a.h.servers),zf(a.h.advanced||{}),a.h.keySystemsMapping);return C(A,Ld(b,a.K,a.Z,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.ba=!0,A.return(Promise.resolve());x=Kg(a,void 0,b);return A.return(g?x:x.catch(function(){}))})}
215
215
  function Pg(a){var b;return K(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.B(2);break}return C(c,a.G,3);case 3:return qf(a.j),c.return();case 2:return ta(c,4),a.G=a.m.setMediaKeys(a.s),C(c,a.G,6);case 6:wa(c,5);break;case 4:b=xa(c),a.o(new P(2,6,6003,b.message));case 5:qf(a.j),E(c)}})}function Qg(a,b){return K(function(c){if(1==c.g)return C(c,Pg(a),2);Rg(a,b.initDataType,nb(b.initData));E(c)})}
216
- r.Fc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.s)return b.A.ia(a,"encrypted",function(){b.o(new P(2,6,6010))}),c.return();b.m=a;b.A.ia(b.m,"play",function(){for(var d=t(b.J),e=d.next();!e.done;e=d.next())Sg(b,e.value);b.O=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Fg(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
216
+ r.Hc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.s)return b.A.ia(a,"encrypted",function(){b.o(new P(2,6,6010))}),c.return();b.m=a;b.A.ia(b.m,"play",function(){for(var d=t(b.J),e=d.next();!e.done;e=d.next())Sg(b,e.value);b.O=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Fg(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
217
217
  b.u.size?C(c,Pg(b),2):c.B(2)}Tg(b).catch(function(){});b.F||b.u.size||b.h.parseInbandPsshEnabled||b.A.D(b.m,"encrypted",function(d){return Qg(b,d)});E(c)})};
218
218
  function Ug(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=gf([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.C.Qb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=nb(d.data);wa(g,4);break;case 3:throw e=xa(g),new P(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
219
219
  ta(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=xa(g),new P(2,6,6004,f.message);}})}function Vg(a,b){var c,d,e;return K(function(f){if(1==f.g)return C(f,Wg(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.gb=new Oe,d.push(e.gb);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);E(f)})}
220
220
  function Tg(a){var b,c,d,e,f;return K(function(g){if(1==g.g){if(!a.u.size)return g.B(2);a.u.forEach(function(h,k){Wg(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Xg(a))return g.return(a.l);a.l=new Oe;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Rg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
221
221
  function Rg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(lb(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&Yg(a)&&(a.l.resolve(),a.l=new Oe,a.l.catch(function(){}));Zg(a,b,c,a.g.sessionType)}}function $g(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function ah(a){a=a.i.keys();a=wf(a,function(b){return b.sessionId});return Array.from(a)}
222
- r.Ae=function(){var a=this,b=this.i.keys();b=wf(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Nc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.xd=function(){return Af(this.ea)};
222
+ r.Ae=function(){var a=this,b=this.i.keys();b=wf(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Oc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.xd=function(){return Af(this.ea)};
223
223
  function Kg(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=bh(a,c,d);x.B(2);break}return C(x,ch(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new P(2,6,6001);qf(a.j);ta(x,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());q=t(k);for(m=q.next();!m.done;m=q.next())p=m.value,a.H.add(p.contentType.toLowerCase());if(c.length){var A=
224
224
  f.keySystem;var B=d.get(f.keySystem);var D=[],F=[],J=[],G=[],H=new Set;dh(B,D,J,F,G,H);var I=a.K?"persistent-license":"temporary";A={keySystem:A,licenseServerUri:D[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||I,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:G,keyIds:H};B=t(B);for(D=B.next();!D.done;D=
225
225
  B.next())D=D.value,D.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(A.persistentStateRequired=D.persistentStateRequired);B=A}else B=f.keySystem,A=b.get(f.keySystem),D=[],F=[],J=[],G=[],H=new Set,dh(A.drmInfos,D,J,F,G,H),B={keySystem:B,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,sessionType:A.sessionTypes[0]||"temporary",audioRobustness:(A.audioCapabilities?
@@ -243,25 +243,25 @@ Yg(a)&&(a.l.resolve(),a.W.U(ih))}function Cg(a){var b=a.V,c=a.ea;c.clear();b.for
243
243
  function jh(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
244
244
  q;return K(function(p){switch(p.g){case 1:ta(p,2);if("org.w3.clearkey"===l&&yd())throw Error("Unsupported keySystem");return C(p,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=p.h,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,rd()&&(q=!1),f.set(l,{persistentState:q}),C(p,m.createMediaKeys(),5);case 5:wa(p,0);break;case 2:xa(p),f.set(l,null),E(p)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(Af(f))})}
245
245
  function kh(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new jd(e)).U(lh)}),ta(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);xa(c);E(c)})}
246
- function Fg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return ta(g,2),a.ma||a.u.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,kh(e),5):C(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);E(g)})})),0)})}function nh(a,b){return a.length&&b.length&&a!==b?0<oh(a,b).length:!0}
247
- function oh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(w(d.keyIds),w(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
246
+ function Fg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return ta(g,2),a.ma||a.u.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,kh(e),5):C(g,e.remove(),5);if(2!=g.g)return wa(g,0);xa(g);E(g)})})),0)})}function mh(a,b){return a.length&&b.length&&a!==b?0<nh(a,b).length:!0}
247
+ function nh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(w(d.keyIds),w(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
248
248
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
249
249
  function Ng(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Dg(a){a.i.forEach(function(b,c){var d=b.Ve,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Ve=e)})}function Yg(a){a=a.i.values();return xf(a,function(b){return b.loaded})}function Xg(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.V.get(c.value))return!1;return!0}
250
250
  function Mg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
251
251
  function dh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Da:g.Da},h=a.next()){g.Da=h.value;b.includes(g.Da.licenseServerUri)||b.push(g.Da.licenseServerUri);d.includes(g.Da.serverCertificateUri)||d.push(g.Da.serverCertificateUri);g.Da.serverCertificate&&(c.some(function(m){return function(n){return lb(n,m.Da.serverCertificate)}}(g))||c.push(g.Da.serverCertificate));if(g.Da.initData){h={};for(var k=t(g.Da.initData),l=k.next();!l.done;h={gd:h.gd},l=k.next())h.gd=l.value,e.some(function(m){return function(n){var q=
252
252
  m.gd;return n.keyId&&n.keyId==q.keyId?!0:n.initDataType==q.initDataType&&lb(n.initData,q.initData)}}(h))||e.push(h.gd)}if(g.Da.keyIds)for(h=t(g.Da.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
253
253
  function Og(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
254
- c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var lh=1,gh=5,ih=.5,ph=new yf(function(){return ob(new Uint8Array([0]))});function qh(){}function rh(a,b){if(b&&(b=sh[b.toLowerCase()]))return b;throw new P(2,4,4E3,a);}N("shaka.media.ManifestParser",qh);qh.unregisterParserByMime=function(a){delete sh[a]};qh.registerParserByMime=function(a,b){sh[a]=b};qh.registerParserByExtension=function(){oe("ManifestParser","Please use an ManifestParser with registerParserByMime function.")};qh.AccessibilityPurpose={Mi:"visually impaired",hi:"hard of hearing"};var sh={};function th(a){function b(){d=!0}function c(l){f.push(l);Sf(l)}a=nb(a);var d=!1,e,f=[],g=[];(new Nf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).N("stsd",function(l){e=l;f.push(l);Uf(l)}).N("encv",b).N("enca",b).N("dvav",function(l){g.push({box:l,Ka:1701733238})}).N("dva1",function(l){g.push({box:l,Ka:1701733238})}).N("dvh1",function(l){g.push({box:l,Ka:1701733238})}).N("dvhe",function(l){g.push({box:l,Ka:1701733238})}).N("hev1",function(l){g.push({box:l,Ka:1701733238})}).N("hvc1",
254
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var lh=1,gh=5,ih=.5,oh=new yf(function(){return ob(new Uint8Array([0]))});function qh(){}function rh(a,b){if(b){var c=sh[b.toLowerCase()];if(c)return c}throw new P(2,4,4E3,a,b);}N("shaka.media.ManifestParser",qh);qh.unregisterParserByMime=function(a){delete sh[a]};qh.registerParserByMime=function(a,b){sh[a]=b};qh.registerParserByExtension=function(){oe("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};qh.AccessibilityPurpose={Mi:"visually impaired",hi:"hard of hearing"};var sh={};function th(a){function b(){d=!0}function c(l){f.push(l);Sf(l)}a=nb(a);var d=!1,e,f=[],g=[];(new Nf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).N("stsd",function(l){e=l;f.push(l);Uf(l)}).N("encv",b).N("enca",b).N("dvav",function(l){g.push({box:l,Ka:1701733238})}).N("dva1",function(l){g.push({box:l,Ka:1701733238})}).N("dvh1",function(l){g.push({box:l,Ka:1701733238})}).N("dvhe",function(l){g.push({box:l,Ka:1701733238})}).N("hev1",function(l){g.push({box:l,Ka:1701733238})}).N("hvc1",
255
255
  function(l){g.push({box:l,Ka:1701733238})}).N("avc1",function(l){g.push({box:l,Ka:1701733238})}).N("avc3",function(l){g.push({box:l,Ka:1701733238})}).N("ac-3",function(l){g.push({box:l,Ka:1701733217})}).N("ec-3",function(l){g.push({box:l,Ka:1701733217})}).N("ac-4",function(l){g.push({box:l,Ka:1701733217})}).N("mp4a",function(l){g.push({box:l,Ka:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(bg(a)),new P(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
256
256
  a=uh(a,e,k.box,f,k.Ka);return a}
257
257
  function uh(a,b,c,d,e){var f=vh.value(),g=a.subarray(c.start,c.start+c.size),h=rb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=rb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);wh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=od()?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,wh(e,d.start,d.size+k.byteLength);k=rb(e,b.start);b=Tf(b);a=k.getUint32(b);
258
- k.setUint32(b,a+1);return e}function wh(a,b,c){a=rb(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 vh=new yf(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 xh(a,b,c,d,e,f,g){this.Y=a;this.Oa=b;this.va=c;this.Re=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g}xh.prototype.Pc=function(){return this.Oa};xh.prototype.Mc=function(){return this.va};function yh(a,b){return a&&b?a.Pc()==b.Pc()&&a.Mc()==b.Mc()&&Bb(a.Y().sort(),b.Y().sort())&&lb(a.g,b.g):a==b}N("shaka.media.InitSegmentReference",xh);xh.prototype.getEndByte=xh.prototype.Mc;xh.prototype.getStartByte=xh.prototype.Pc;
258
+ k.setUint32(b,a+1);return e}function wh(a,b,c){a=rb(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 vh=new yf(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 xh(a,b,c,d,e,f,g){this.Y=a;this.Oa=b;this.va=c;this.Re=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g}xh.prototype.dc=function(){return this.Oa};xh.prototype.bc=function(){return this.va};function yh(a,b){return a===b?!0:a&&b?a.dc()==b.dc()&&a.bc()==b.bc()&&Bb(a.Y().sort(),b.Y().sort())&&lb(a.g,b.g):a==b}N("shaka.media.InitSegmentReference",xh);xh.prototype.getEndByte=xh.prototype.bc;xh.prototype.getStartByte=xh.prototype.dc;
259
259
  function R(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?zh:p;this.startTime=a;this.i=this.endTime=b;this.G=c;this.Oa=d;this.va=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.F=void 0===n?null:n;this.aa=void 0===q?null:q;this.status=p;this.m=!1;this.l=!0;this.o=!1;this.aes128Key=void 0===u?null:u;this.C=null;this.j=0;this.s=void 0===v?!1:v;this.u=this.A=!1;a=t(this.h);for(b=a.next();!b.done;b=a.next())b.value.Sf();
260
- this.s&&this.h.length&&this.h[this.h.length-1].Rf()}r=R.prototype;r.Y=function(){return this.G()};r.getStartTime=function(){return this.startTime};r.Kg=function(){return this.endTime};r.Pc=function(){return this.Oa};r.Mc=function(){return this.va};r.Zg=function(){return this.tilesLayout};r.Yg=function(){return this.F};r.Mb=function(){return this.status};r.ph=function(){this.status=Ah};r.Qe=function(){this.m=!0};r.lh=function(){return this.m};r.Jd=function(){this.l=!1};r.ih=function(){return this.l};
260
+ this.s&&this.h.length&&this.h[this.h.length-1].Rf()}r=R.prototype;r.Y=function(){return this.G()};r.getStartTime=function(){return this.startTime};r.Kg=function(){return this.endTime};r.dc=function(){return this.Oa};r.bc=function(){return this.va};r.Zg=function(){return this.tilesLayout};r.Yg=function(){return this.F};r.Mb=function(){return this.status};r.ph=function(){this.status=Ah};r.Qe=function(){this.m=!0};r.lh=function(){return this.m};r.Jd=function(){this.l=!1};r.ih=function(){return this.l};
261
261
  r.Sf=function(){this.A=!0};r.kh=function(){return this.A};r.Rf=function(){this.u=!0};r.jh=function(){return this.u};r.Qf=function(){this.o=!0};r.fh=function(){return this.o};r.gg=function(a){this.C=a};r.Xg=function(){return this.C};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
262
262
  r.mf=function(a){null==this.aa?Ta("Sync attempted without sync time!"):(a=this.aa-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};N("shaka.media.SegmentReference",R);R.prototype.syncAgainst=R.prototype.mf;R.prototype.offset=R.prototype.offset;R.prototype.getThumbnailSprite=R.prototype.Xg;R.prototype.setThumbnailSprite=R.prototype.gg;R.prototype.hasByterangeOptimization=R.prototype.fh;R.prototype.markAsByterangeOptimization=R.prototype.Qf;R.prototype.isLastPartial=R.prototype.jh;
263
- R.prototype.markAsLastPartial=R.prototype.Rf;R.prototype.isPartial=R.prototype.kh;R.prototype.markAsPartial=R.prototype.Sf;R.prototype.isIndependent=R.prototype.ih;R.prototype.markAsNonIndependent=R.prototype.Jd;R.prototype.isPreload=R.prototype.lh;R.prototype.markAsPreload=R.prototype.Qe;R.prototype.markAsUnavailable=R.prototype.ph;R.prototype.getStatus=R.prototype.Mb;R.prototype.getTileDuration=R.prototype.Yg;R.prototype.getTilesLayout=R.prototype.Zg;R.prototype.getEndByte=R.prototype.Mc;
264
- R.prototype.getStartByte=R.prototype.Pc;R.prototype.getEndTime=R.prototype.Kg;R.prototype.getStartTime=R.prototype.getStartTime;R.prototype.getUris=R.prototype.Y;var zh=0,Ah=1;R.Status={Vh:zh,Ki:Ah,ni:2};function Bh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ch(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Dh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Eh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
263
+ R.prototype.markAsLastPartial=R.prototype.Rf;R.prototype.isPartial=R.prototype.kh;R.prototype.markAsPartial=R.prototype.Sf;R.prototype.isIndependent=R.prototype.ih;R.prototype.markAsNonIndependent=R.prototype.Jd;R.prototype.isPreload=R.prototype.lh;R.prototype.markAsPreload=R.prototype.Qe;R.prototype.markAsUnavailable=R.prototype.ph;R.prototype.getStatus=R.prototype.Mb;R.prototype.getTileDuration=R.prototype.Yg;R.prototype.getTilesLayout=R.prototype.Zg;R.prototype.getEndByte=R.prototype.bc;
264
+ R.prototype.getStartByte=R.prototype.dc;R.prototype.getEndTime=R.prototype.Kg;R.prototype.getStartTime=R.prototype.getStartTime;R.prototype.getUris=R.prototype.Y;var zh=0,Ah=1;R.Status={Vh:zh,Ki:Ah,ni:2};function Bh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ch(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Dh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Eh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
265
265
  function Fh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Eh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Eh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
266
266
  @license
267
267
  Shaka Player
@@ -273,7 +273,7 @@ function Kh(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
273
273
  d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Df(nb(a.data,1,d));a=Df(nb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Df(nb(a.data,1,d));a=Df(nb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Df(nb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
274
274
  c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=ob(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Df(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Df(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=ob(a.data),b):null}
275
275
  function Lh(a){for(var b=0,c=[];Hh(a,b);){var d=Jh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Jh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Kh(e))&&c.push(f);b+=e.size+10}Ih(a,b)&&(b+=10)}return c}function Mh(a,b){for(var c=b=void 0===b?0:b,d=0;Hh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Jh(a,b+6),Ih(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}N("shaka.util.Id3Utils",Gh);Gh.getID3Data=Mh;
276
- Gh.getID3Frames=Lh;function Nh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.jc());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,Ef:c,Cg:d,Oi:e}}function Oh(a,b){return 1==b?(b=a.L(),a=a.L(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.L()}}function Ph(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.L();a.skip(4);a=a.Ca();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
276
+ Gh.getID3Frames=Lh;function Nh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.lc());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,Ef:c,Cg:d,Oi:e}}function Oh(a,b){return 1==b?(b=a.L(),a=a.L(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.L()}}function Ph(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.L();a.skip(4);a=a.Ca();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
277
277
  function Qh(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={cf:null,sampleSize:null,Rd:null};c&256&&(h.cf=a.L());c&512&&(h.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(h.Rd=0==b?a.L():a.Xf());e.push(h)}return{Si:d,$f:e,Bg:f}}
278
278
  function Rh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.L();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ca()+a.Ca()/16;a=a.Ca()+a.Ca()/16;return{trackId:c,width:b,height:a}}
279
279
  function Sh(a){for(var b="mp4a",c,d;a.ha();){c=a.da();for(var e=a.da();e&128;)e=a.da();if(3==c)a.Ca(),e=a.da(),e&128&&a.Ca(),e&64&&a.skip(a.da()),e&32&&a.Ca();else if(4==c)d=a.da(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.ha()&&(c=a.da(),d=(c&248)>>3,31===d&&a.ha()&&(d=32+((c&7)<<3)+((a.da()&224)>>5)),b+="."+d));return{ga:b}}function Th(a,b){a.skip(87);return{ga:b+"."+this.g(a.da())+this.g(a.da())+this.g(a.da())}}function Uh(a){a=a.L();return{ga:Rf(a)}};/*
@@ -292,27 +292,27 @@ function Sh(a){for(var b="mp4a",c,d;a.ha();){c=a.da();for(var e=a.da();e&128;)e=
292
292
  See the License for the specific language governing permissions and
293
293
  limitations under the License.
294
294
  */
295
- function Vh(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=nb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Xh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Kf(c,0)).L(),a.g=8*d,a.i-=d)}function Yh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Xh(a)}a.h<<=b;a.g-=b}
296
- function Zh(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Xh(a);c=b-c;return 0<c?d<<c|Zh(a,c):d}function $h(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Xh(a);return b+$h(a)}function ai(a){Yh(a,1+$h(a))}function T(a){var b=$h(a);return Zh(a,b+1)-1}function bi(a){a=T(a);return 1&a?1+a>>>1:-1*(a>>>1)}function U(a){return 1===Zh(a,1)}function ci(a){return Zh(a,8)}
295
+ function Vh(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=nb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Wh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Kf(c,0)).L(),a.g=8*d,a.i-=d)}function Xh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Wh(a)}a.h<<=b;a.g-=b}
296
+ function Zh(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Wh(a);c=b-c;return 0<c?d<<c|Zh(a,c):d}function $h(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Wh(a);return b+$h(a)}function ai(a){Xh(a,1+$h(a))}function T(a){var b=$h(a);return Zh(a,b+1)-1}function bi(a){a=T(a);return 1&a?1+a>>>1:-1*(a>>>1)}function U(a){return 1===Zh(a,1)}function ci(a){return Zh(a,8)}
297
297
  function di(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=bi(a),d=(c+d+256)%256),c=0===d?c:d}function ei(a){ci(a);T(a);return T(a)}N("shaka.util.ExpGolomb",Vh);function fi(){this.A=null;this.C=!1;this.m=this.F=null;this.j=[];this.g=[];this.o=this.s=null;this.i=[];this.h=[];this.u=null;this.l=[]}r=fi.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
298
298
  r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,gi(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.A=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.A:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Gd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
299
299
  k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,q=m;2<q;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var p=f[n+1]+2;n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.Gd&&(g.Gd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec=
300
300
  "hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.F=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.s=f.audio,this.o=f.audioCodec);-1!=f.Gd&&(this.u=f.Gd);d&&!this.C&&(d=!1,e=b-188);this.C=!0;break;case this.F:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.s:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&
301
301
  this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);break;case this.u:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
302
302
  function hi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),packetLength:a[4]<<8|a[5],pts:null,dts:null,nalus:[]};if(b.packetLength&&b.packetLength>a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b}
303
- r.vh=function(a){oe("TsParser","Please use parseNalus function instead.");return this.Ye(a)};
303
+ r.vh=function(a){oe("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Ye(a)};
304
304
  r.Ye=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=cg(b.data,q),b.fullData=cg(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=cg(b.data,k),b.fullData=cg(b.fullData,k)));if(n>=e-f)return h;
305
305
  n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=cg(b.data,a),b.fullData=cg(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=cg.apply(Xf,w(c.value)),(c=hi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Lh(c.data),dts:c.dts,pts:c.pts});return a};
306
- r.Ib=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=cg.apply(Xf,w(c.value)),e=hi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=cg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
307
- r.dc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=cg.apply(Xf,w(d.value)),f=hi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=cg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Ye(d,g,void 0),
308
- d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Ib();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.dc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Lc=function(){return{audio:this.o,video:this.m}};
309
- r.Cd=function(){for(var a=[],b=t(this.dc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};r.bh=function(){oe("TsParser","Please use getVideoInfo function instead.");var a=this.Ee();return{height:a.height,width:a.width}};r.Ee=function(){return"hvc"==this.m?ii(this):ji(this)};
310
- function ji(a){var b={height:null,width:null,ga:null};a=a.Cd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new Vh(a.data);var c=ci(a),d=ci(a),e=ci(a);ai(a);if(ki.includes(c)){var f=T(a);3===f&&Yh(a,1);ai(a);ai(a);Yh(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?di(a,16):di(a,64))}}ai(a);f=T(a);if(0===f)T(a);else if(1===f)for(Yh(a,1),ai(a),ai(a),f=T(a),g=0;g<f;g++)ai(a);ai(a);Yh(a,1);f=T(a);g=T(a);var h=Zh(a,1);0===h&&Yh(a,1);Yh(a,1);var k=0,l=0,m=0,n=
306
+ r.Jb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=cg.apply(Xf,w(c.value)),e=hi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=cg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
307
+ r.fc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=cg.apply(Xf,w(d.value)),f=hi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=cg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.Ye(d,g,void 0),
308
+ d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Jb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.fc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Nc=function(){return{audio:this.o,video:this.m}};
309
+ r.Cd=function(){for(var a=[],b=t(this.fc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};r.bh=function(){oe("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ee();return{height:a.height,width:a.width}};r.Ee=function(){return"hvc"==this.m?ii(this):ji(this)};
310
+ function ji(a){var b={height:null,width:null,ga:null};a=a.Cd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new Vh(a.data);var c=ci(a),d=ci(a),e=ci(a);ai(a);if(ki.includes(c)){var f=T(a);3===f&&Xh(a,1);ai(a);ai(a);Xh(a,1);if(U(a)){f=3!==f?8:12;for(var g=0;g<f;g++)U(a)&&(6>g?di(a,16):di(a,64))}}ai(a);f=T(a);if(0===f)T(a);else if(1===f)for(Xh(a,1),ai(a),ai(a),f=T(a),g=0;g<f;g++)ai(a);ai(a);Xh(a,1);f=T(a);g=T(a);var h=Zh(a,1);0===h&&Xh(a,1);Xh(a,1);var k=0,l=0,m=0,n=
311
311
  0;U(a)&&(k=T(a),l=T(a),m=T(a),n=T(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.ga="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
312
312
  function ii(a){var b={height:null,width:null,ga:null};a=a.Cd();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new Vh(a.fullData,!0);ci(c);ci(c);Zh(c,4);var d=Zh(c,3);U(c);var e=Zh(c,2),f=Zh(c,1),g=Zh(c,5),h=Zh(c,32);a=ci(c);for(var k=ci(c),l=ci(c),m=ci(c),n=ci(c),q=ci(c),p=ci(c),u=[],v=[],y=0;y<d;y++)u.push(U(c)),v.push(U(c));if(0<d)for(y=d;8>y;y++)Zh(c,2);for(y=0;y<d;y++)u[y]&&Zh(c,88),v[y]&&ci(c);T(c);d=T(c);3==d&&Zh(c,1);u=T(c);v=T(c);var z=y=0,x=0,A=0;U(c)&&
313
313
  (y+=T(c),z+=T(c),x+=T(c),A+=T(c));b.width=String(u-(y+z)*(1===d||2===d?2:1));b.height=String(v-(x+A)*(1===d?2:1));c=function(B){for(var D=0,F=0;32>F;F++)D|=(B>>F&1)<<31-F;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
314
- a.toString(16).toUpperCase());b.ga=e;return b}function li(a){return 0>gi(a)?!1:!0}function gi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",fi);fi.syncOffset=gi;fi.probe=li;fi.prototype.getVideoInfo=fi.prototype.Ee;fi.prototype.getVideoResolution=fi.prototype.bh;fi.prototype.getVideoNalus=fi.prototype.Cd;fi.prototype.getCodecs=fi.prototype.Lc;fi.prototype.getStartTime=fi.prototype.getStartTime;
315
- fi.prototype.getVideoData=fi.prototype.dc;fi.prototype.getAudioData=fi.prototype.Ib;fi.prototype.getMetadata=fi.prototype.getMetadata;fi.prototype.parseNalus=fi.prototype.Ye;fi.prototype.parseAvcNalus=fi.prototype.vh;fi.prototype.parse=fi.prototype.parse;fi.prototype.clearData=fi.prototype.clearData;fi.Timescale=9E4;var ki=[100,110,122,244,44,83,86,118,128,138,139,134];function mi(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ua("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,oe("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ua("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ua("Could not find LCEVC Library on this page"),
314
+ a.toString(16).toUpperCase());b.ga=e;return b}function li(a){return 0>gi(a)?!1:!0}function gi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}N("shaka.util.TsParser",fi);fi.syncOffset=gi;fi.probe=li;fi.prototype.getVideoInfo=fi.prototype.Ee;fi.prototype.getVideoResolution=fi.prototype.bh;fi.prototype.getVideoNalus=fi.prototype.Cd;fi.prototype.getCodecs=fi.prototype.Nc;fi.prototype.getStartTime=fi.prototype.getStartTime;
315
+ fi.prototype.getVideoData=fi.prototype.fc;fi.prototype.getAudioData=fi.prototype.Jb;fi.prototype.getMetadata=fi.prototype.getMetadata;fi.prototype.parseNalus=fi.prototype.Ye;fi.prototype.parseAvcNalus=fi.prototype.vh;fi.prototype.parse=fi.prototype.parse;fi.prototype.clearData=fi.prototype.clearData;fi.Timescale=9E4;var ki=[100,110,122,244,44,83,86,118,128,138,139,134];function mi(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ua("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,oe("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ua("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ua("Could not find LCEVC Library on this page"),
316
316
  a=!1):(this.h.SupportObject.SupportStatus||Ua(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function ni(a){a.g&&a.i.classList.add("shaka-hidden")}
317
317
  mi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function oi(a,b,c){var d=pi,e=qi;switch(b.mimeType){case "video/webm":d=ri;break;case "video/mp4":d=si}switch(c){case "DASH":e=ti;break;case "HLS":e=ui}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}N("shaka.lcevc.Dec",mi);mi.prototype.release=mi.prototype.release;var pi=0,ri=1,si=2,ui=0,ti=1,qi=-1;function vi(a,b,c,d){var e=this;this.i=a;this.C=null;this.F=b;this.g={};this.G={};this.la={};this.h=null;this.W=!1;this.ya=c||function(){};this.O=d||null;this.j={};this.s=new rf;this.m={};this.H=null;this.J=new Oe;this.K="";this.Z=!1;this.l=wi(this,this.J);this.A=!1;this.I=new pf(function(){return xi(e)});this.u=!1;this.V="UNKNOWN";this.ea=this.ma=!1;this.za=new Oe;this.o=!1;this.ba=!0}
318
318
  function wi(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ba=!0});a.s.D(c,"endstreaming",function(){a.ba=!1});a.s.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ia(a.i,"playing",function(){a.Z=!0});a.K=yi(c);a.i.src=a.K;return c}c=new MediaSource;a.s.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.K);b.resolve()});a.s.ia(a.i,"playing",function(){a.Z=!0});a.K=yi(c);a.i.src=a.K;return c}
@@ -335,20 +335,20 @@ function Si(a,b,c,d,e,f,g,h){var k,l,m;return K(function(n){if(1==n.g){k=Dc;if(b
335
335
  k.R,function(){var q=k.R;a.g[q].appendWindowStart=0;a.g[q].appendWindowEnd=e;a.g[q].appendWindowStart=d;Ci(a,q)}));return C(n,Promise.all(l),0)})}function Ui(a,b,c){var d;return K(function(e){if(1==e.g){d=Dc;if(b==d.ja)return e.return();Ki(a,b,function(){return Li(a,b)});a.o&&Ki(a,d.R,function(){return Li(a,d.R)});return C(e,Ki(a,b,function(){return Mi(a,b,c)}),2)}return a.o?C(e,Ki(a,d.R,function(){return Mi(a,d.R,c)}),0):e.B(0)})}
336
336
  r.endOfStream=function(a){var b=this;return K(function(c){return C(c,Vi(b,function(){Di(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Na=function(a){var b=this;return K(function(c){return C(c,Vi(b,function(){if(a<b.l.duration)for(var d in b.g){var e={start:function(){},p:new Oe};b.j[d].unshift(e)}b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function Qi(a,b,c,d){d<=c?Ci(a,b):a.g[b].remove(c,d)}
337
337
  function Li(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].abort();a.g[b].appendWindowStart=c;a.g[b].appendWindowEnd=d;Ci(a,b)}function Mi(a,b,c){0>c&&(c+=.001);a.g[b].timestampOffset=c;Ci(a,b)}function Ci(a,b){if(!a.A){var c=a.j[b][0];c&&(c.p.resolve(),Wi(a,b))}}function Ki(a,b,c){qf(a.I);c={start:c,p:new Oe};a.j[b].push(c);1==a.j[b].length&&Xi(a,b);return c.p}
338
- function Vi(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:qf(a.I);c=[];d={};for(e in a.g)d.tc=new Oe,f={start:function(m){return function(){return m.tc.resolve()}}(d),p:d.tc},a.j[e].push(f),c.push(d.tc),1==a.j[e].length&&f.start(),d={tc:d.tc};ta(l,2);return C(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=xa(l),g;case 3:return ta(l,5,6),C(l,b(),6);case 6:ya(l);for(h in a.g)Wi(a,h);za(l,0);break;case 5:throw k=xa(l),new P(2,3,3015,k,a.i.error||"No error in the media element");
338
+ function Vi(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:qf(a.I);c=[];d={};for(e in a.g)d.vc=new Oe,f={start:function(m){return function(){return m.vc.resolve()}}(d),p:d.vc},a.j[e].push(f),c.push(d.vc),1==a.j[e].length&&f.start(),d={vc:d.vc};ta(l,2);return C(l,Promise.all(c),4);case 4:wa(l,3);break;case 2:throw g=xa(l),g;case 3:return ta(l,5,6),C(l,b(),6);case 6:ya(l);for(h in a.g)Wi(a,h);za(l,0);break;case 5:throw k=xa(l),new P(2,3,3015,k,a.i.error||"No error in the media element");
339
339
  }})}function Wi(a,b){a.j[b].shift();Xi(a,b)}function Xi(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d,a.i.error||"No error in the media element")),Wi(a,b)}}function Ni(a,b,c,d){var e=a.la[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(qd()||od()||pd("SOPOpenBrowser"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=th(b));return b}
340
340
  function Yi(a,b,c,d){return Ki(a,b,function(){b!==Cc&&(gb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.g[b].changeType(c+a.C.sourceBufferExtraFeatures),a.G[b]=c),Ci(a,b))})}
341
341
  function Zi(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G;return K(function(H){switch(H.g){case 1:c=Dc;a.A=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.Z&&(a.i.autoplay=!1);va(H,2);a.s.Xa();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(Wc)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new P(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(I){}}return C(H,Promise.all(g),
342
342
  4);case 4:return a.m={},a.g={},y=a.l.duration,a.J=new Oe,a.l=wi(a,a.J),C(H,a.J,5);case 5:a.l.duration=y;z=new Oe;x=a.l.sourceBuffers;A=b.size;B=0;a.s.D(x,"addsourcebuffer",function(){B++;B===A&&z.resolve()});D=t(b.keys());for(F=D.next();!F.done;F=D.next())J=F.value,G=b.get(J),zi(a,J,G,G.codecs),a.o?(a.j[c.R]=[],a.j[c.fa]=[]):a.j[J]=[];a.i.currentTime=d;return C(H,z,2);case 2:ya(H),a.A=!1,qf(a.I),a.s.ia(a.i,"canplaythrough",function(){qf(a.I);a.i.autoplay=e;f||a.i.play()}),za(H,0)}})}
343
343
  function $i(a,b){return Vi(a,function(){return Zi(a,b)})}
344
344
  function Ti(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u;return K(function(v){if(1==v.g){if(b==Cc)return v.return(!1);e=Kc(Mc(a.G[b]))[0];f=Lc(a.G[b]);h=Fc(c.mimeType,c.codecs);k=a.C.forceTransmux;if(!cb(h)||!a.u&&Gc.includes(h))k=!0;l=Hc(c.mimeType,c.codecs);k&&(m=ac(l))&&(g=m(),h=g.convertCodecs(b,l));n=Mc(h);q=Kc(n)[0];p=Lc(h);if(e===q&&f===p)return v.return(!1);u=!0;if(a.o||n.split(",").length&&g&&!a.m[b])u=!1;if(u&&"smooth"===a.C.codecSwitchingStrategy&&gb())return C(v,Yi(a,b,h,g),3);g&&g.destroy();return C(v,
345
- $i(a,d),3)}return v.return(!0)})}function aj(a,b,c){if(b==Cc)var d=!1;else{d=Kc(Mc(a.G[b]))[0];var e=Lc(a.G[b]),f=Fc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!cb(f)||!a.u&&Gc.includes(f))g=!0;c=Hc(c.mimeType,c.codecs);g&&(g=ac(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Kc(Mc(f))[0];f=Lc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!gb()||a.o:!1}var yi=window.URL.createObjectURL,Bi="sequence";function bj(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=bj.prototype;r.getDuration=function(){return this.j};r.Qg=function(){return this.g};r.kf=function(a){this.i=a};r.Na=function(a){this.j=a};r.Ug=function(){return this.i};r.dg=function(a){this.s=a};r.kc=function(a){this.C=a};r.Sd=function(a){this.u=a};r.eg=function(a){this.o=a};r.Jg=function(){return this.o};
345
+ $i(a,d),3)}return v.return(!0)})}function aj(a,b,c){if(b==Cc)var d=!1;else{d=Kc(Mc(a.G[b]))[0];var e=Lc(a.G[b]),f=Fc(c.mimeType,c.codecs),g=a.C.forceTransmux;if(!cb(f)||!a.u&&Gc.includes(f))g=!0;c=Hc(c.mimeType,c.codecs);g&&(g=ac(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=Kc(Mc(f))[0];f=Lc(f);d=d!==b||e!==f}return d?"smooth"!==a.C.codecSwitchingStrategy||!gb()||a.o:!1}var yi=window.URL.createObjectURL,Bi="sequence";function bj(a,b,c){this.i=a;this.o=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.C=!0;this.F=0;this.A=void 0===c?!0:c;this.G=0;this.m=!1}r=bj.prototype;r.getDuration=function(){return this.j};r.Qg=function(){return this.g};r.kf=function(a){this.i=a};r.Na=function(a){this.j=a};r.Ug=function(){return this.i};r.dg=function(a){this.s=a};r.mc=function(a){this.C=a};r.Sd=function(a){this.u=a};r.eg=function(a){this.o=a};r.Jg=function(){return this.o};
346
346
  r.Wf=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Nd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};
347
347
  r.Vc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Nd(b);this.h=Math.max(this.h,c);null!=this.i&&this.A&&!this.m&&(this.i=d-this.h-this.g)}};r.Id=function(){this.m=!0};r.mh=function(){return this.m};r.Nd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
348
- r.Te=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.P=function(){return Infinity==this.j&&!this.C};r.Ob=function(){return Infinity!=this.j&&!this.C};r.cb=function(){return Math.max(this.F,this.zb()-this.u)};r.hg=function(a){this.F=a};r.zb=function(){return this.P()||this.Ob()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
349
- r.Oc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.zb()-this.u+a,this.nb()))};r.bc=function(){return this.Oc(0)};r.nb=function(){return Math.max(0,this.zb()-(this.P()||this.Ob()?this.o:0))};r.kg=function(){return null==this.i||null!=this.h&&this.A?!1:!0};r.cg=function(a){this.G=a};N("shaka.media.PresentationTimeline",bj);bj.prototype.setAvailabilityTimeOffset=bj.prototype.cg;bj.prototype.usingPresentationStartTime=bj.prototype.kg;
350
- bj.prototype.getSeekRangeEnd=bj.prototype.nb;bj.prototype.getSeekRangeStart=bj.prototype.bc;bj.prototype.getSafeSeekRangeStart=bj.prototype.Oc;bj.prototype.getSegmentAvailabilityEnd=bj.prototype.zb;bj.prototype.setUserSeekStart=bj.prototype.hg;bj.prototype.getSegmentAvailabilityStart=bj.prototype.cb;bj.prototype.isInProgress=bj.prototype.Ob;bj.prototype.isLive=bj.prototype.P;bj.prototype.offset=bj.prototype.offset;bj.prototype.notifyMaxSegmentDuration=bj.prototype.Te;
351
- bj.prototype.notifyMinSegmentStartTime=bj.prototype.Nd;bj.prototype.isStartTimeLocked=bj.prototype.mh;bj.prototype.lockStartTime=bj.prototype.Id;bj.prototype.notifySegments=bj.prototype.Vc;bj.prototype.notifyTimeRange=bj.prototype.Wf;bj.prototype.getDelay=bj.prototype.Jg;bj.prototype.setDelay=bj.prototype.eg;bj.prototype.setSegmentAvailabilityDuration=bj.prototype.Sd;bj.prototype.setStatic=bj.prototype.kc;bj.prototype.setClockOffset=bj.prototype.dg;bj.prototype.getPresentationStartTime=bj.prototype.Ug;
348
+ r.Te=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.P=function(){return Infinity==this.j&&!this.C};r.Ob=function(){return Infinity!=this.j&&!this.C};r.cb=function(){return Math.max(this.F,this.Ab()-this.u)};r.hg=function(a){this.F=a};r.Ab=function(){return this.P()||this.Ob()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
349
+ r.Pc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.u?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ab()-this.u+a,this.nb()))};r.cc=function(){return this.Pc(0)};r.nb=function(){return Math.max(0,this.Ab()-(this.P()||this.Ob()?this.o:0))};r.kg=function(){return null==this.i||null!=this.h&&this.A?!1:!0};r.cg=function(a){this.G=a};N("shaka.media.PresentationTimeline",bj);bj.prototype.setAvailabilityTimeOffset=bj.prototype.cg;bj.prototype.usingPresentationStartTime=bj.prototype.kg;
350
+ bj.prototype.getSeekRangeEnd=bj.prototype.nb;bj.prototype.getSeekRangeStart=bj.prototype.cc;bj.prototype.getSafeSeekRangeStart=bj.prototype.Pc;bj.prototype.getSegmentAvailabilityEnd=bj.prototype.Ab;bj.prototype.setUserSeekStart=bj.prototype.hg;bj.prototype.getSegmentAvailabilityStart=bj.prototype.cb;bj.prototype.isInProgress=bj.prototype.Ob;bj.prototype.isLive=bj.prototype.P;bj.prototype.offset=bj.prototype.offset;bj.prototype.notifyMaxSegmentDuration=bj.prototype.Te;
351
+ bj.prototype.notifyMinSegmentStartTime=bj.prototype.Nd;bj.prototype.isStartTimeLocked=bj.prototype.mh;bj.prototype.lockStartTime=bj.prototype.Id;bj.prototype.notifySegments=bj.prototype.Vc;bj.prototype.notifyTimeRange=bj.prototype.Wf;bj.prototype.getDelay=bj.prototype.Jg;bj.prototype.setDelay=bj.prototype.eg;bj.prototype.setSegmentAvailabilityDuration=bj.prototype.Sd;bj.prototype.setStatic=bj.prototype.mc;bj.prototype.setClockOffset=bj.prototype.dg;bj.prototype.getPresentationStartTime=bj.prototype.Ug;
352
352
  bj.prototype.setDuration=bj.prototype.Na;bj.prototype.setPresentationStartTime=bj.prototype.kf;bj.prototype.getMaxSegmentDuration=bj.prototype.Qg;bj.prototype.getDuration=bj.prototype.getDuration;function cj(a,b,c){this.j=c;this.l=a;this.s=dj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}cj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function ej(a,b){a.i=b}function fj(a){this.g=a}function dj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Eh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function gj(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new rf;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return hj(f)});this.m=(new jd(function(){hj(f)})).Ya(this.s.gapJumpTimerTime)}gj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};gj.prototype.We=function(){this.o=!0;hj(this)};
353
353
  function hj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=dj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Fh(c,b,a.s.gapDetectionThreshold),null==
354
354
  d||0==d&&!a.o||(e=c.start(d),e>=a.A.nb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new Q("gapjumped")))))}}};function ij(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=jj.value().get(b),c.ia(a,b,d))}var jj=new yf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function kj(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new rf;this.i=new lj(a);ij(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){mj(e,e.j())})}kj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function nj(a){return a.o?a.g.currentTime:a.j()}
@@ -356,59 +356,59 @@ function oj(a,b){0<a.g.readyState?pj(a.i,b):ij(a.g,HTMLMediaElement.HAVE_METADAT
356
356
  function lj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new jd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}lj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function pj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ya(.1)};function rj(a){this.g=a;this.j=!1;this.h=null;this.i=new rf}r=rj.prototype;r.ce=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ia(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;ij(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.de=function(a){this.h=this.j?this.h:a};r.nd=function(){return(this.j?this.g.currentTime:this.h)||0};r.wf=function(){return 0};
357
357
  r.vf=function(){return 0};r.Vf=function(){};
358
358
  function sj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=tj(a,c,f);this.j=new gj(a,b.presentationTimeline,c,this.o,f);this.h=new kj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=nj(g.h);h=uj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;oj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
359
- g.g.bc():g.g.nb():0>h&&(h=g.g.nb()+h);return vj(g,wj(g,h))});this.m=new jd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=nj(g.h),k=g.g.bc(),l=g.g.nb();3>l-k&&(k=l-3);h<k&&(h=uj(g,h),g.i.currentTime=h)}})}r=sj.prototype;r.ce=function(){this.m.Ya(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.de=function(a){oj(this.h,a)};
359
+ g.g.cc():g.g.nb():0>h&&(h=g.g.nb()+h);return vj(g,wj(g,h))});this.m=new jd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=nj(g.h),k=g.g.cc(),l=g.g.nb();3>l-k&&(k=l-3);h<k&&(h=uj(g,h),g.i.currentTime=h)}})}r=sj.prototype;r.ce=function(){this.m.Ya(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.de=function(a){oj(this.h,a)};
360
360
  r.nd=function(){var a=nj(this.h);return 0<this.i.readyState&&!this.i.paused?wj(this,a):a};r.wf=function(){return this.o?this.o.o:0};r.vf=function(){return this.j.C};r.Vf=function(){this.j.We()};function vj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
361
- function uj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.nb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Oc(c),k=a.g.Oc(d);c=a.g.Oc(c+d);return b>=g?vj(a,b):b>f?f:b<e?Ch(a.i.buffered,k)?k:c:b>=h||Ch(a.i.buffered,b)?b:c}function wj(a,b){var c=a.g.bc();if(b<c)return c;a=a.g.nb();return b>a?a:b}
362
- function tj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new cj(new fj(a),b.stallThreshold,c);ej(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function xj(a){this.g=a;this.l=null;this.j=0;this.o=!1}r=xj.prototype;r.Lb=function(){return this.g.length};r.release=function(){this.o||(this.g=[],this.l&&this.l.stop(),this.l=null)};r.qh=function(){this.o=!0};function yj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
361
+ function uj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.nb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Pc(c),k=a.g.Pc(d);c=a.g.Pc(c+d);return b>=g?vj(a,b):b>f?f:b<e?Ch(a.i.buffered,k)?k:c:b>=h||Ch(a.i.buffered,b)?b:c}function wj(a,b){var c=a.g.cc();if(b<c)return c;a=a.g.nb();return b>a?a:b}
362
+ function tj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new cj(new fj(a),b.stallThreshold,c);ej(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function xj(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=xj.prototype;r.zb=function(){return this.g.length};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.qh=function(){this.o=!0};function yj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
363
363
  r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.Ld=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
364
364
  r.Uc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ld(a);this.ab(b)};r.ab=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
365
365
  r.Yb=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new R(a.startTime,b,a.G,a.Oa,a.va,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.F,a.aa,a.status,a.aes128Key),this.g[this.g.length-1].j=a.j)}};
366
- r.Td=function(a,b){var c=this;this.o||(this.l&&this.l.stop(),this.l=new jd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.l.stop(),c.l=null)}),this.l.Ya(a))};xj.prototype[Symbol.iterator]=function(){return this.Jb(0)};
367
- xj.prototype.Jb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.l;)e--,f=c.h[e];if(!f.l)return Ta("No independent partial segment found!"),null;b++;d=e-1;break}}return new zj(this,b,d)};function Aj(a,b,c){a=new R(a,a+b,function(){return c},0,null,null,a,a,a+b);return new xj([a])}N("shaka.media.SegmentIndex",xj);xj.forSingleSegment=Aj;
368
- xj.prototype.getIteratorForTime=xj.prototype.Jb;xj.prototype.updateEvery=xj.prototype.Td;xj.prototype.fit=xj.prototype.Yb;xj.prototype.evict=xj.prototype.ab;xj.prototype.mergeAndEvict=xj.prototype.Uc;xj.prototype.offset=xj.prototype.offset;xj.prototype.get=xj.prototype.get;xj.prototype.find=xj.prototype.find;xj.prototype.markImmutable=xj.prototype.qh;xj.prototype.release=xj.prototype.release;function zj(a,b,c){this.i=a;this.g=b;this.h=c}zj.prototype.Ag=function(){return this.g};
366
+ r.Td=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new jd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.m.stop(),c.m=null)}),this.m.Ya(a))};xj.prototype[Symbol.iterator]=function(){return this.Kb(0)};
367
+ xj.prototype.Kb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.l;)e--,f=c.h[e];if(!f.l)return Ta("No independent partial segment found!"),null;b++;d=e-1;break}}return new zj(this,b,d)};function Aj(a,b,c){a=new R(a,a+b,function(){return c},0,null,null,a,a,a+b);return new xj([a])}N("shaka.media.SegmentIndex",xj);xj.forSingleSegment=Aj;
368
+ xj.prototype.getIteratorForTime=xj.prototype.Kb;xj.prototype.updateEvery=xj.prototype.Td;xj.prototype.fit=xj.prototype.Yb;xj.prototype.evict=xj.prototype.ab;xj.prototype.mergeAndEvict=xj.prototype.Uc;xj.prototype.offset=xj.prototype.offset;xj.prototype.get=xj.prototype.get;xj.prototype.find=xj.prototype.find;xj.prototype.markImmutable=xj.prototype.qh;xj.prototype.release=xj.prototype.release;function zj(a,b,c){this.i=a;this.g=b;this.h=c}zj.prototype.Ag=function(){return this.g};
369
369
  zj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.s&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};zj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.s&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",zj);zj.prototype.next=zj.prototype.next;zj.prototype.current=zj.prototype.current;
370
- zj.prototype.currentPosition=zj.prototype.Ag;function Bj(){xj.call(this,[]);this.h=[]}pa(Bj,xj);r=Bj.prototype;r.clone=function(){var a=new Bj;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.Lb()}return null};
371
- r.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.Lb()}return null};r.offset=function(){};r.Ld=function(){};r.ab=function(){};r.Uc=function(){};r.Yb=function(){};r.Td=function(){};N("shaka.media.MetaSegmentIndex",Bj);Bj.prototype.updateEvery=Bj.prototype.Td;Bj.prototype.fit=Bj.prototype.Yb;Bj.prototype.mergeAndEvict=Bj.prototype.Uc;Bj.prototype.evict=Bj.prototype.ab;Bj.prototype.merge=Bj.prototype.Ld;Bj.prototype.offset=Bj.prototype.offset;
370
+ zj.prototype.currentPosition=zj.prototype.Ag;function Bj(){xj.call(this,[]);this.h=[]}pa(Bj,xj);r=Bj.prototype;r.clone=function(){var a=new Bj;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.zb()}return null};
371
+ r.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.zb()}return null};r.offset=function(){};r.Ld=function(){};r.ab=function(){};r.Uc=function(){};r.Yb=function(){};r.Td=function(){};N("shaka.media.MetaSegmentIndex",Bj);Bj.prototype.updateEvery=Bj.prototype.Td;Bj.prototype.fit=Bj.prototype.Yb;Bj.prototype.mergeAndEvict=Bj.prototype.Uc;Bj.prototype.evict=Bj.prototype.ab;Bj.prototype.merge=Bj.prototype.Ld;Bj.prototype.offset=Bj.prototype.offset;
372
372
  Bj.prototype.get=Bj.prototype.get;Bj.prototype.find=Bj.prototype.find;Bj.prototype.release=Bj.prototype.release;function Cj(a){var b=this;this.g=a;this.h=this.g.Bd();this.i=new jd(function(){b.g.Tf(.25*b.h)})}Cj.prototype.release=function(){this.set(this.ac());this.i&&(this.i.stop(),this.i=null);this.g=null};Cj.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.Bd()!=b&&this.g.lf(b);break a}catch(c){}this.i.Ya(.25);0!=this.g.Bd()&&this.g.lf(0)}};Cj.prototype.ac=function(){return this.g.ac()};function Dj(a){var b=this;this.h=a;this.g=new Set;this.i=(new jd(function(){Ej(b,!1)})).Ya(.25)}Dj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ej(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Fj(a){Ye.call(this);this.g=new Map;this.h=a}pa(Fj,Ye);Fj.prototype.release=function(){this.g.clear();Ye.prototype.release.call(this)};function Gj(a,b){var c=a.g.get(b);c||(c={Xc:[],Cf:null,contentType:b},a.g.set(b,c));return c}function Hj(a,b,c){var d=Gj(a,b.contentType);Ij(a,d);a={Re:b,position:c};d=d.Xc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
373
373
  Fj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Xc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Re;break a}}d=null}if(e=d)e=c.Cf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
374
374
  if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Cf=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ij(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Xc;b.Xc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Xc=[]};function Jj(a){Ye.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new jd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ya(2)}pa(Jj,Ye);Jj.prototype.release=function(){this.g.clear();this.h.stop();Ye.prototype.release.call(this)};function Kj(a,b){Ye.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Vb:null,Ub:Lj,Nb:function(d,e){return Mj(c,"enter",d,e)}},{Vb:Nj,Ub:Lj,Nb:function(d,e){return Mj(c,"enter",d,e)}},{Vb:Oj,Ub:Lj,Nb:function(d,e){return Mj(c,"enter",d,e)}},{Vb:Lj,Ub:Nj,Nb:function(d,e){return Mj(c,"exit",d,e)}},{Vb:Lj,Ub:Oj,Nb:function(d,e){return Mj(c,"exit",d,e)}},{Vb:Nj,Ub:Oj,Nb:function(d,e){return Mj(c,"skip",d,e)}},{Vb:Oj,Ub:Nj,Nb:function(d,e){return Mj(c,"skip",d,e)}}];this.h=new rf;this.h.D(this.i,
375
375
  "regionremove",function(d){c.g.delete(d.region)})}pa(Kj,Ye);Kj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ye.prototype.release.call(this)};Kj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Nj:a>d.endTime?Oj:Lj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Nb(d,b)}}};
376
- function Mj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Nj=1,Lj=2,Oj=3;function Pj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Qj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.Jb(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;)b=!0,e.m&&null!=e.va&&(b=!1),2==e.Mb()&&(b=!1),b&&!a.g.has(e)&&(b=new Rj(a.l),Sj(b,e,a.h),a.g.set(e,b)),a.j=e.startTime,e=d.next().value}}}
376
+ function Mj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Nj=1,Lj=2,Oj=3;function Pj(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function Qj(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.Kb(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;)b=!0,e.m&&null!=e.va&&(b=!1),2==e.Mb()&&(b=!1),b&&!a.g.has(e)&&(b=new Rj(a.l),Sj(b,e,a.h),a.g.set(e,b)),a.j=e.startTime,e=d.next().value}}}
377
377
  function Tj(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new Rj(a.l);Sj(c,b,a.h);a.g.set(b,c)}}function Uj(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&Vj(a,c);a.j=0}}function Wj(a,b){b&&b!==a.h&&(Uj(a),a.h=b)}function Vj(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Rj(a){this.i=a;this.g=this.h=null}
378
378
  function Sj(a,b,c){var d=new Uint8Array(0);a.g=a.i(b,c,function(e){return K(function(f){if(1==f.g)return 0<d.byteLength?d=cg(d,e):d=e,a.h?C(f,a.h(d),3):f.B(0);d=new Uint8Array(0);E(f)})})}Rj.prototype.abort=function(){this.g&&this.g.abort()};function Xj(a,b,c,d,e){a=gf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Yj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.j=null;this.F=0;this.C=!1;this.h=new Map;this.A=!1;this.G=null;this.s=!1;this.l=new pf(function(){return Zj(c)})}r=Yj.prototype;r.destroy=function(){return this.l.destroy()};function Zj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,ak(e),b.push(bk(e));return C(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;E(f)})}
379
379
  r.configure=function(a){this.i=a;this.G=new Le({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=this.h.get(c.value),c.qa){var d=c.qa,e=a.segmentPrefetchLimit;d.i=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&Vj(d,g)}0<a.segmentPrefetchLimit||
380
380
  (c.qa=null)}else 0<a.segmentPrefetchLimit&&(c.qa=ck(this,c.stream))};r.start=function(){var a=this;return K(function(b){if(1==b.g)return C(b,dk(a),2);qf(a.l);a.A=!0;E(b)})};
381
381
  function ek(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Dc,a.F++,d=a.F,ta(l,2),C(l,Ri(a.g.T,c.ja),4);case 4:wa(l,3);break;case 2:if(e=xa(l),a.g)a.g.onError(e);case 3:f=Fc(b.mimeType,b.codecs),Ai(a.g.T,f,a.m.sequenceMode,b.external),g=a.g.T.F,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.F==d&&(k=fk(a,b),a.h.set(c.ja,k),gk(a,k,0)),E(l)}})}function hk(a){var b=a.h.get(Cc);b&&(ak(b),bk(b).catch(function(){}),a.h.delete(Cc));a.o=null}
382
382
  function ik(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Rb&&(jk(a,b,!1,0,!1),c.Rb=d);else if(d=c.Rb)c.Rb=null,jk(a,d,!0,0,!1)}}function kk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.A&&(b.video&&jk(a,b.video,c,d,e,f),b.audio&&jk(a,b.audio,c,d,e,f))}function lk(a,b){K(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):C(c,b.createSegmentIndex(),2):c.return();jk(a,b,!0,0,!1);E(c)})}
383
- function jk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Cc?g&&(g.Rb&&(b.trickModeVideo?(g.Rb=b,b=b.trickModeVideo):g.Rb=null),g.stream!=b||e)&&(g.qa&&Wj(g.qa,b),b.type==Cc&&(e=Fc(b.mimeType,b.codecs),Ai(a.g.T,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.X=null,g.xf=!!f,c&&(g.Ic?g.Ud=!0:g.Ba?(g.sb=!0,g.sd=d,g.Ud=!0):(ak(g),mk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),nk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):ek(a,b)}
383
+ function jk(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=Cc?g&&(g.Rb&&(b.trickModeVideo?(g.Rb=b,b=b.trickModeVideo):g.Rb=null),g.stream!=b||e)&&(g.qa&&Wj(g.qa,b),b.type==Cc&&(e=Fc(b.mimeType,b.codecs),Ai(a.g.T,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.X=null,g.xf=!!f,c&&(g.Kc?g.Ud=!0:g.Ba?(g.sb=!0,g.sd=d,g.Ud=!0):(ak(g),mk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),nk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):ek(a,b)}
384
384
  function nk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.La)return e.return();c=b.stream;d=b.La;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.La!=d||b.stream!=c)return e.return();var f=a.g.zd();var g=Gi(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Aa?b.Aa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.va?k.va-k.Oa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.va?k.va-k.Oa:null)||0),k=a.g.getBandwidthEstimate(),
385
385
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.La.h.g>h?!0:!1):f=!1;f&&b.La.abort();E(e)})}
386
386
  r.ad=function(){if(this.g)for(var a=this.g.zd(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime<a)c.X=null;e=this.g.T;e.A?e=!1:d==Cc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=Ch(e,a));e||((null!=Gi(this.g.T,d)||c.Ba)&&ok(this,c),c.La&&(c.La.abort(),c.La=null),d===Cc&&(d=this.g.T,d.H&&d.H.h()),c.ad=!0)}};
387
- function ok(a,b){b.Ic||b.sb||(b.Ba?(b.sb=!0,b.sd=0):null==Ei(a.g.T,b.type)?null==b.hb&&gk(a,b,0):(ak(b),mk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
387
+ function ok(a,b){b.Kc||b.sb||(b.Ba?(b.sb=!0,b.sd=0):null==Ei(a.g.T,b.type)?null==b.hb&&gk(a,b,0):(ak(b),mk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
388
388
  function dk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Dc;if(!a.j)throw new P(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.R,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.fa,a.j.video),d.add(a.j.video));a.o&&(c.set(b.ja,a.o),d.add(a.o));e=a.g.T;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}qf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=fk(a,k),a.h.set(h,l),gk(a,l,
389
- 0));E(m)})}function fk(a,b){return{stream:b,type:b.type,X:null,qa:ck(a,b),Aa:null,ec:null,Ne:null,Le:null,Ke:null,Rb:null,endOfStream:!1,Ba:!1,hb:null,sb:!1,sd:0,Ud:!1,Ic:!1,ad:!0,Se:!1,af:!1,Rc:!1,La:null}}function ck(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Pj(a.i.segmentPrefetchLimit,b,function(c,d,e){return pk(a,c,d,e)}):null}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Na(a):this.g.T.Na(Math.pow(2,32))};
390
- function qk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:qf(a.l);if(b.Ba||null==b.hb||b.Ic)return h.return();b.hb=null;if(!b.sb){h.B(2);break}return C(h,mk(a,b,b.Ud,b.sd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ba||b.hb||gk(a,b,0),h.return();case 4:ta(h,6);d=rk(a,b);null!=d&&(gk(a,b,d),b.Rc=!1);wa(h,7);break;case 6:return e=
389
+ 0));E(m)})}function fk(a,b){return{stream:b,type:b.type,X:null,qa:ck(a,b),Aa:null,hc:null,Ne:null,Le:null,Ke:null,Rb:null,endOfStream:!1,Ba:!1,hb:null,sb:!1,sd:0,Ud:!1,Kc:!1,ad:!0,Se:!1,af:!1,Rc:!1,La:null}}function ck(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Pj(a.i.segmentPrefetchLimit,b,function(c,d,e){return pk(a,c,d,e)}):null}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Na(a):this.g.T.Na(Math.pow(2,32))};
390
+ function qk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:qf(a.l);if(b.Ba||null==b.hb||b.Kc)return h.return();b.hb=null;if(!b.sb){h.B(2);break}return C(h,mk(a,b,b.Ud,b.sd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ba||b.hb||gk(a,b,0),h.return();case 4:ta(h,6);d=rk(a,b);null!=d&&(gk(a,b,d),b.Rc=!1);wa(h,7);break;case 6:return e=
391
391
  xa(h),C(h,sk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.T.endOfStream(),10);case 10:qf(a.l),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Na(g),E(h)}})}
392
392
  function rk(a,b){if(tk(b))return Oi(a.g.T,b.stream.originalId||""),null;b.type==Cc&&Pi(a.g.T);if(!a.g.T.ba&&b.type!=Cc)return a.i.updateIntervalSeconds/2;var c=a.g.zd(),d=b.Aa?b.Aa.endTime:c,e=Hi(a.g.T,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Gi(a.g.T,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Cc))&&tk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/
393
- 2;e=uk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,tk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Aa?h.Aa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.qa&&b.X&&(d=e.g,!d||b.Aa&&yh(d,b.ec)||Tj(b.qa,d),Qj(b.qa,e));vk(a,b,c,e).catch(function(){});return null}
394
- function uk(a,b,c,d){if(b.X)return b.X.current();if(b.Aa||d)return c=b.Aa?b.Aa.endTime:d,b.Se=!0,b.X=b.stream.segmentIndex.Jb(c),b.X&&b.X.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.Jb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.Jb(c),e=b.X&&b.X.next().value);return e}
393
+ 2;e=uk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,tk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.Aa?h.Aa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.qa&&b.X&&(d=e.g,!d||b.Aa&&yh(d,b.hc)||Tj(b.qa,d),Qj(b.qa,e));vk(a,b,c,e).catch(function(){});return null}
394
+ function uk(a,b,c,d){if(b.X)return b.X.current();if(b.Aa||d)return c=b.Aa?b.Aa.endTime:d,b.Se=!0,b.X=b.stream.segmentIndex.Kb(c),b.X&&b.X.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.Kb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.Kb(c),e=b.X&&b.X.next().value);return e}
395
395
  function vk(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:e=Dc;f=b.stream;g=b.X;b.Ba=!0;ta(B,2);if(2==d.Mb())throw new P(1,1,1011);return C(B,wk(a,b,d),4);case 4:qf(a.l);if(a.s)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.o))return n=new Uint8Array(0),p=q=!1,v=function(D){var F,J,G,H;return K(function(I){switch(I.g){case 1:if(q)return I.return();p=!0;qf(a.l);if(a.s)return I.return();
396
396
  ta(I,2);n=xk(n,D);F=!1;J=0;(new Nf).box("mdat",function(L){J=L.size+L.start;F=!0}).parse(n,!1,!0);if(!F){I.B(4);break}G=n.subarray(0,J);n=n.subarray(J);return C(I,yk(a,b,c,f,d,G,!0),5);case 5:b.qa&&b.X&&Qj(b.qa,d,!0);case 4:wa(I,0);break;case 2:u=H=xa(I),E(I)}})},C(B,zk(a,b,d,v),9);l=zk(a,b,d);return C(B,l,7);case 7:m=B.h;qf(a.l);if(a.s)return B.return();qf(a.l);return b.sb?(b.Ba=!1,gk(a,b,0),B.return()):C(B,yk(a,b,c,f,d,m),6);case 9:y=B.h;if(u)throw u;if(p){B.B(10);break}q=!0;qf(a.l);return a.s?
397
397
  B.return():b.sb?(b.Ba=!1,gk(a,b,0),B.return()):C(B,yk(a,b,c,f,d,y),10);case 10:b.qa&&b.X&&Qj(b.qa,d,!0);case 6:qf(a.l);if(a.s)return B.return();b.Aa=d;g.next();b.Ba=!1;b.af=!1;z=a.g.T.mb();x=z[b.type];Za(JSON.stringify(x));b.sb||a.g.We(d.startTime,d.endTime,b.type);gk(a,b,0);wa(B,0);break;case 2:A=xa(B);qf(a.l,A);if(a.s)return B.return();b.Ba=!1;if(7001==A.code)b.Ba=!1,ak(b),gk(a,b,0),B.B(0);else if(b.type==e.ja&&a.i.ignoreTextStreamFailures)a.h.delete(e.ja),B.B(0);else if(3017==A.code)Ak(a,b,A),
398
398
  B.B(0);else return b.Rc=!0,A.severity=2,C(B,sk(a,b,A),0)}})}function Bk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=nb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function xk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
399
399
  function Ak(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.af})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Rc=!0;a.s=!0;a.g.onError(c);return}b.af=!0}gk(a,b,4)}
400
- function wk(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(y){if(1==y.g){d=Dc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Kc(b.stream.codecs)[0];k=Lc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Ne&&f==b.Le&&g==b.Ke&&h==b.Me&&k==b.Pf)return y.B(2);if(m=b.Me&&b.Pf&&aj(a.g.T,b.type,b.stream))n=null,b.type===d.fa?n=a.h.get(d.R):b.type===d.R&&(n=a.h.get(d.fa)),n&&(n.ec=null,ok(a,n),bk(n).catch(function(){}));q=function(){var z,x,A,B;return K(function(D){if(1==D.g)return z=
401
- new Map,a.j.audio&&z.set(d.R,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ta(D,2),b.Le=f,b.Ke=g,b.Me=h,b.Pf=k,b.Ne=l,x=a.m.sequenceMode||"HLS"==a.m.type,C(D,Si(a.g.T,b.type,l,f,g,x,b.stream,z),4);if(2!=D.g)return m&&(A=null,b.type===d.fa?A=a.h.get(d.R):b.type===d.R&&(A=a.h.get(d.fa)),A&&(A.sb=!1,A.Ba=!1,ok(a,A))),wa(D,0);B=xa(D);b.Le=null;b.Ke=null;b.Me=null;b.Ne=null;throw B;})};return C(y,q(),2)}yh(c.g,b.ec)||(b.ec=c.g,c.l&&c.g&&(p=zk(a,b,c.g),u=function(){var z,x,A,B,D,F;return K(function(J){switch(J.g){case 1:return ta(J,
400
+ function wk(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v;return K(function(y){if(1==y.g){d=Dc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Kc(b.stream.codecs)[0];k=Lc(b.stream.mimeType);l=c.timestampOffset;if(l==b.Ne&&f==b.Le&&g==b.Ke&&h==b.Me&&k==b.Pf)return y.B(2);if(m=b.Me&&b.Pf&&aj(a.g.T,b.type,b.stream))n=null,b.type===d.fa?n=a.h.get(d.R):b.type===d.R&&(n=a.h.get(d.fa)),n&&(n.hc=null,ok(a,n),bk(n).catch(function(){}));q=function(){var z,x,A,B;return K(function(D){if(1==D.g)return z=
401
+ new Map,a.j.audio&&z.set(d.R,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ta(D,2),b.Le=f,b.Ke=g,b.Me=h,b.Pf=k,b.Ne=l,x=a.m.sequenceMode||"HLS"==a.m.type,C(D,Si(a.g.T,b.type,l,f,g,x,b.stream,z),4);if(2!=D.g)return m&&(A=null,b.type===d.fa?A=a.h.get(d.R):b.type===d.R&&(A=a.h.get(d.fa)),A&&(A.sb=!1,A.Ba=!1,ok(a,A))),wa(D,0);B=xa(D);b.Le=null;b.Ke=null;b.Me=null;b.Ne=null;throw B;})};return C(y,q(),2)}yh(c.g,b.hc)||(b.hc=c.g,c.l&&c.g&&(p=zk(a,b,c.g),u=function(){var z,x,A,B,D,F;return K(function(J){switch(J.g){case 1:return ta(J,
402
402
  2),C(J,p,4);case 4:return z=J.h,qf(a.l),x=null,A=new Map,B=new Nf,B.box("moov",Sf).box("trak",Sf).box("mdia",Sf).N("mdhd",function(G){x=Ph(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.qb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":A.set(d.R,x);break;case "vide":A.set(d.fa,x)}x=null}).parse(z),A.has(b.type)?c.g.timescale=A.get(b.type):null!=x&&(c.g.timescale=x),D=b.stream.closedCaptions&&
403
- 0<b.stream.closedCaptions.size,C(J,a.g.yf(b.type,z),5);case 5:return C(J,Ji(a.g.T,b.type,z,null,b.stream,D),6);case 6:wa(J,0);break;case 2:throw F=xa(J),b.ec=null,F;}})},a.g.sh(c.startTime,c.g),e.push(u())));a.m.sequenceMode&&(v=b.Aa?b.Aa.j:null,c.j!=v||b.Se)&&(b.Se=!1,e.push(Ui(a.g.T,b.type,c.startTime)));return C(y,Promise.all(e),0)})}
404
- function yk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.C;if(l||m)k=new Nf;l&&k.N("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var y=u.reader.Yc();var z=u.reader.Yc();var x=u.reader.L();var A=u.reader.L();var B=u.reader.L();var D=u.reader.L();var F=e.startTime+A/x}else x=u.reader.L(),F=u.reader.jc()/
403
+ 0<b.stream.closedCaptions.size,C(J,a.g.yf(b.type,z),5);case 5:return C(J,Ji(a.g.T,b.type,z,null,b.stream,D),6);case 6:wa(J,0);break;case 2:throw F=xa(J),b.hc=null,F;}})},a.g.sh(c.startTime,c.g),e.push(u())));a.m.sequenceMode&&(v=b.Aa?b.Aa.j:null,c.j!=v||b.Se)&&(b.Se=!1,e.push(Ui(a.g.T,b.type,c.startTime)));return C(y,Promise.all(e),0)})}
404
+ function yk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return K(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.C;if(l||m)k=new Nf;l&&k.N("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var y=u.reader.Yc();var z=u.reader.Yc();var x=u.reader.L();var A=u.reader.L();var B=u.reader.L();var D=u.reader.L();var F=e.startTime+A/x}else x=u.reader.L(),F=u.reader.lc()/
405
405
  x+e.timestampOffset,A=F-e.startTime,B=u.reader.L(),D=u.reader.L(),y=u.reader.Yc(),z=u.reader.Yc();u=u.reader.qb(u.reader.getLength()-u.reader.pa());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.th():(v=(new Map).set("detail",{startTime:F,endTime:F+B/x,schemeIdUri:y,value:z,timescale:x,presentationTimeDelta:A,eventDuration:B,id:D,messageData:u}),v=new Q("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=y&&"https://developer.apple.com/streaming/emsg-id3"!=
406
406
  y||(y=Lh(u),y.length&&e&&a.g.uh([{cueTime:e.startTime,data:u,frames:y,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.N("prft",function(u){if(!a.C&&e.g.timescale){var v=u.reader,y=u.version;v.L();u=v.L();var z=v.L();u=1E3*u+z/Math.pow(2,32)*1E3;0===y?v=v.L():(y=v.L(),v=v.L(),v=y*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.g.timescale*1E3)});v=new Q("prft",v);a.g.onEvent(v);
407
- a.C=!0}});(l||m)&&k.parse(f);return C(p,Ck(a,b,c),2);case 2:return qf(a.l),n=b.ad,b.ad=!1,q=b.xf,b.xf=!1,C(p,a.g.yf(b.type,f),3);case 3:return C(p,Ji(a.g.T,b.type,f,e,d,h,n,q,g),4);case 4:qf(a.l),E(p)}})}function Ck(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Ei(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():C(h,a.g.T.remove(b.type,e,e+g),2)}qf(a.l);E(h)})}
407
+ a.C=!0}});(l||m)&&k.parse(f);return C(p,Ck(a,b,c),2);case 2:return qf(a.l),n=b.ad,b.ad=!1,q=b.xf,b.xf=!1,C(p,a.g.yf(b.type,f),3);case 3:return C(p,Ji(a.g.T,b.type,f,e,d,h,n,q,g),4);case 4:qf(a.l),E(p)}})}function Ck(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Ei(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():C(h,a.g.T.remove(b.type,e,e+g),2)}qf(a.l);E(h)})}
408
408
  function tk(a){return a&&a.type==Cc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
409
409
  function zk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof xh&&(e=c.g))return l.return(e);f=null;if(b.qa){var m=b.qa;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=pk(a,c,b.stream,d));g=0;b.X&&(g=b.X.g);b.La=f;return C(l,f.promise,2);case 2:h=l.h;b.La=null;k=h.data;if(!c.aes128Key){l.B(3);break}return C(l,Bk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
410
410
  function pk(a,b,c,d){var e=b instanceof R?b:void 0,f=e?1:0;b=Xj(b.Y(),b.Oa,b.va,a.i.retryParameters,d);return a.g.Qb.request(nf,b,{type:f,stream:c,segment:e})}
411
- function mk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.sb=!1,b.Ud=!1,b.sd=0,b.Ic=!0,b.Aa=null,b.ec=null,b.X=null,b.qa&&Uj(b.qa),d?(e=a.g.zd(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Ri(a.g.T,b.type),4);if(3!=g.g)return qf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);qf(a.l);b.Ic=!1;b.endOfStream=!1;b.Ba||b.hb||gk(a,b,0);E(g)})}
411
+ function mk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.sb=!1,b.Ud=!1,b.sd=0,b.Kc=!0,b.Aa=null,b.hc=null,b.X=null,b.qa&&Uj(b.qa),d?(e=a.g.zd(),f=a.g.T.getDuration(),C(g,a.g.T.remove(b.type,e+d,f),3)):C(g,Ri(a.g.T,b.type),4);if(3!=g.g)return qf(a.l),c?C(g,a.g.T.flush(b.type),3):g.B(3);qf(a.l);b.Kc=!1;b.endOfStream=!1;b.Ba||b.hb||gk(a,b,0);E(g)})}
412
412
  function gk(a,b,c){var d=b.type;if(d!=Cc||a.h.has(d))b.hb=(new id(function(){var e;return K(function(f){if(1==f.g)return ta(f,2),C(f,qk(a,b),4);if(2!=f.g)return wa(f,0);e=xa(f);if(a.g)a.g.onError(e);E(f)})})).U(c)}function ak(a){null!=a.hb&&(a.hb.stop(),a.hb=null)}function bk(a){return K(function(b){return a.La?C(b,a.La.abort(),0):b.B(0)})}
413
413
  function sk(a,b,c){var d;return K(function(e){if(1==e.g)return C(e,Ne(a.G),2);qf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.ke(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);E(e)})};function Dk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new gc(a)).Ea.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Ek[d])return m.return(e);f=0;g=gf([a],c);ta(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=xa(m);if(!k||1002!=k.code&&1001!=k.code){m.B(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
414
414
  e.toLowerCase().split(";").shift():"")}})}
@@ -447,12 +447,12 @@ function Zk(a,b,c){try{if(!a.g.enabled)return b;var d=$k(a);a:{switch(c.toLowerC
447
447
  !0;var f=dl(d);return el(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function $k(a){a.i||(a.i=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.i,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
448
448
  function fl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,$k(a));c.pr=a.h.yd();var e=c.ot===gl||c.ot===bl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=hl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=dl(c);f&&(b.uris=b.uris.map(function(g){return el(g,f)}))}}}
449
449
  function il(a){if(0===a.type)return jl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?bl:gl;if("audio"==b)return al;if("text"==b)return"application/mp4"===a.mimeType?kl:ol}}function pl(a,b){b=a.h.mb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
450
- function ql(a,b){var c=a.h.Ab();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case gl:return a.videoBandwidth||NaN;case al:return a.audioBandwidth||NaN;default:return a.bandwidth}}
450
+ function ql(a,b){var c=a.h.Bb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case gl:return a.videoBandwidth||NaN;case al:return a.audioBandwidth||NaN;default:return a.bandwidth}}
451
451
  function dl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
452
452
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function hl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=dl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
453
453
  function el(a,b){if(!b||a.includes("offline:"))return a;a=new gc(a);a.g.set("CMCD",b);return a.toString()}var cl="m",al="a",gl="v",bl="av",jl="i",ol="c",kl="tt";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",ng:"s",OTHER:"o"});function rl(){}
454
454
  function sl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ze(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ze(l)),k=sl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
455
- k),g=!1)}return g}function tl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function ul(a,b){return a&&b}N("shaka.util.ConfigUtils",rl);rl.convertToConfigObject=tl;rl.mergeConfigObjects=sl;function vl(){this.g=null;this.h=[]}function wl(a,b){return K(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;E(c)})}vl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function xl(){}function yl(a){a=Gf(a);return(new gc(a)).lb}function zl(a,b,c){function d(h){rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(nb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=Jf(b,!0):e=b;a=Gf(a);a=Jf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Al(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gf(a).split("skd://").pop();return zl(a,c,b)}
455
+ k),g=!1)}return g}function tl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function ul(a,b){return a&&b}N("shaka.util.ConfigUtils",rl);rl.convertToConfigObject=tl;rl.mergeConfigObjects=sl;function vl(){this.g=null;this.h=[]}function wl(a,b){return K(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.B(2);a.g=b;E(c)})}vl.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function xl(){}function yl(a){a=Gf(a);return(new gc(a)).lb}function zl(a,b,c){function d(h){rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(nb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=If(b,!0):e=b;a=Gf(a);a=If(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Al(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gf(a).split("skd://").pop();return zl(a,c,b)}
456
456
  function Bl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}N("shaka.util.FairPlayUtils",xl);xl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Df(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=ob($f(c)))}};xl.expressplayFairPlayRequest=function(a,b){Bl(a,b)};
457
457
  xl.conaxFairPlayRequest=function(a,b){Bl(a,b)};xl.ezdrmFairPlayRequest=function(a,b){Bl(a,b)};xl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=nb(b.body),a=Zf(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Hf("spc="+a))};xl.expressplayInitDataTransform=function(a,b,c){return Al(a,b,c)};
458
458
  xl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gf(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=qb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return zl(a,d,b)};xl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Gf(a).split(";").pop();return zl(a,c,b)};xl.verimatrixInitDataTransform=function(a,b,c){return Al(a,b,c)};xl.initDataTransform=zl;
@@ -469,92 +469,92 @@ forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:e,abrFactory:function(){
469
469
  maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(h){return K(function(k){return k.return(El(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return g}
470
470
  function Fl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return sl(a,b,c||Dl(),d,"")}
471
471
  function El(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=gd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return $c(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
472
- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Cc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",Cl);Cl.mergeConfigObjects=Fl;Cl.createDefault=Dl;function Gl(){this.g=null;this.h=[]}function Hl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Il(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Jl(){this.i=this.h=null;this.g=[]}function Kl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Ll(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.O=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Gl;this.h=new Jl};function V(a,b){Ye.call(this);var c=this;this.l=Ml;this.td=this.g=null;this.Z=!1;this.wd=new rf;this.xb=new rf;this.o=new rf;this.za=new rf;this.C=this.G=this.m=this.H=null;this.Fd=0;this.W=new vl;this.la=this.ba=this.i=this.Hd=this.F=this.j=this.ma=this.J=this.Uf=this.V=this.ya=this.K=this.I=this.jb=null;this.Hc=!1;this.Ie=this.s=null;this.Pe=1E9;this.Gc=[];this.O=NaN;this.h=Nl(this);this.Dd={width:Infinity,height:Infinity};this.u=null;this.$a=new ze(this.h.preferredAudioLanguage,this.h.preferredVariantRole,
473
- this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.ib=this.h.preferredTextLanguage;this.Ec=this.h.preferredTextRole;this.nc=this.h.preferForcedSubs;this.Dc=[];b&&b(this);this.V=Ol(this);this.H=Pl(this);this.H.hf(this.h.streaming.forceHTTPS);this.A=null;Ql&&(this.A=Ql(),this.A.configure(this.h.ads));this.wd.D(window,"online",function(){Rl(c);c.bf()});
474
- this.ud=new jd(function(){return Sl(c)});a&&(oe("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Fc(a,!0))}pa(V,Ye);function Tl(a){null!=a.J&&(ni(a.J),a.J.release(),a.J=null)}
475
- function Ul(a,b){if(b.lcevc.enabled){var c=a.Ab();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(nd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Tl(a);null==a.J&&(a.J=new mi(a.g,a.Uf,b.lcevc),a.G&&(a.G.O=a.J))}else Tl(a)}function Vl(a,b){return new Q(a,b)}r=V.prototype;
472
+ h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Cc&&"image"!=c.type||b.push(c);return b}N("shaka.util.PlayerConfiguration",Cl);Cl.mergeConfigObjects=Fl;Cl.createDefault=Dl;function Gl(){this.g=null;this.h=[]}function Hl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Il(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Jl(){this.i=this.h=null;this.g=[]}function Kl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Ll(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.O=this.H=this.I=this.J=this.l=this.o=NaN;this.g=new Gl;this.h=new Jl};function V(a,b){Ye.call(this);var c=this;this.l=Ml;this.td=this.g=null;this.Z=!1;this.wd=new rf;this.xb=new rf;this.o=new rf;this.za=new rf;this.C=this.G=this.m=this.H=null;this.Fd=0;this.W=new vl;this.la=this.ba=this.i=this.Hd=this.F=this.j=this.ma=this.J=this.Uf=this.V=this.ya=this.K=this.I=this.jb=null;this.Jc=!1;this.Ie=this.s=null;this.Pe=1E9;this.Ic=[];this.O=NaN;this.h=Nl(this);this.Dd={width:Infinity,height:Infinity};this.u=null;this.$a=new ze(this.h.preferredAudioLanguage,this.h.preferredVariantRole,
473
+ this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.ib=this.h.preferredTextLanguage;this.Gc=this.h.preferredTextRole;this.pc=this.h.preferForcedSubs;this.Fc=[];b&&b(this);this.V=Ol(this);this.H=Pl(this);this.H.hf(this.h.streaming.forceHTTPS);this.A=null;Ql&&(this.A=Ql(),this.A.configure(this.h.ads));this.wd.D(window,"online",function(){Rl(c);c.bf()});
474
+ this.ud=new jd(function(){return Sl(c)});a&&(oe("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Hc(a,!0))}pa(V,Ye);function Tl(a){null!=a.J&&(ni(a.J),a.J.release(),a.J=null)}
475
+ function Ul(a,b){if(b.lcevc.enabled){var c=a.Bb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(nd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Tl(a);null==a.J&&(a.J=new mi(a.g,a.Uf,b.lcevc),a.G&&(a.G.O=a.J))}else Tl(a)}function Vl(a,b){return new Q(a,b)}r=V.prototype;
476
476
  r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Wl)return c.return();Tl(a);b=a.detach();a.l=Wl;return C(c,b,2);case 2:a.wd&&(a.wd.release(),a.wd=null);a.xb&&(a.xb.release(),a.xb=null);a.o&&(a.o.release(),a.o=null);a.za&&(a.za.release(),a.za=null);a.Ie=null;a.h=null;a.u=null;a.td=null;a.V=null;if(!a.H){c.B(3);break}return C(c,a.H.destroy(),4);case 4:a.H=null;case 3:a.s&&(a.s.release(),a.s=null),Ye.prototype.release.call(a),E(c)}})};
477
477
  function Xl(a,b){a.dispatchEvent(Vl("onstatechange",(new Map).set("state",b)))}
478
- r.Fc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==Wl)throw new P(2,7,7E3);if(!c.g||c.g==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,Yl(c,"attach"),4);case 4:if(f.h)return f.return();ta(f,5,6);Xl(c,"attach");d=function(){var g=Zl(c);g&&$l(c,g)};c.xb.D(a,"error",d);c.g=a;if(!b||!kd()||c.G){f.B(6);break}return C(f,am(c),6);case 6:ya(f);c.W.release();za(f,0);break;case 5:return e=xa(f),C(f,c.detach(),10);case 10:throw e;}})};
479
- r.tg=function(a){this.Uf=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==Wl)throw new P(2,7,7E3);return C(c,b.mc(!1,a),2)}if(3!=c.g)return C(c,Yl(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.xb.Xa(),b.g=null),Xl(b,"detach"),b.A&&!a&&b.A.release()}finally{b.W.release()}E(c)})};function Yl(a,b){var c;return K(function(d){return 1==d.g?(c=++a.Fd,C(d,wl(a.W,b),2)):c!=a.Fd?(a.W.release(),d.return(!0)):d.return(!1)})}
480
- r.mc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:return c.l!=Wl&&(c.l=Ml),C(q,Yl(c,"unload"),2);case 2:if(q.h)return q.return();va(q,3);c.Hc=!1;Xl(c,"unload");a&&!kd()&&(a=!1);Tl(c);d=c.Dc.map(function(p){return p()});c.Dc=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(Vl("unloading"));c.ya&&(c.ya.release(),c.ya=null);c.g&&(c.o.Xa(),c.za.Xa());c.ud.stop();c.jb&&(c.jb.release(),c.jb=null);if(!c.F){q.B(6);break}return C(q,
478
+ r.Hc=function(a,b){b=void 0===b?!0:b;var c=this,d,e;return K(function(f){switch(f.g){case 1:if(c.l==Wl)throw new P(2,7,7E3);if(!c.g||c.g==a){f.B(2);break}return C(f,c.detach(),2);case 2:return C(f,Yl(c,"attach"),4);case 4:if(f.h)return f.return();ta(f,5,6);Xl(c,"attach");d=function(){var g=Zl(c);g&&$l(c,g)};c.xb.D(a,"error",d);c.g=a;if(!b||!kd()||c.G){f.B(6);break}return C(f,am(c),6);case 6:ya(f);c.W.release();za(f,0);break;case 5:return e=xa(f),C(f,c.detach(),10);case 10:throw e;}})};
479
+ r.tg=function(a){this.Uf=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return K(function(c){if(1==c.g){if(b.l==Wl)throw new P(2,7,7E3);return C(c,b.oc(!1,a),2)}if(3!=c.g)return C(c,Yl(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.xb.Xa(),b.g=null),Xl(b,"detach"),b.A&&!a&&b.A.release()}finally{b.W.release()}E(c)})};function Yl(a,b){var c;return K(function(d){return 1==d.g?(c=++a.Fd,C(d,wl(a.W,b),2)):c!=a.Fd?(a.W.release(),d.return(!0)):d.return(!1)})}
480
+ r.oc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return K(function(q){switch(q.g){case 1:return c.l!=Wl&&(c.l=Ml),C(q,Yl(c,"unload"),2);case 2:if(q.h)return q.return();va(q,3);c.Jc=!1;Xl(c,"unload");a&&!kd()&&(a=!1);Tl(c);d=c.Fc.map(function(p){return p()});c.Fc=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(Vl("unloading"));c.ya&&(c.ya.release(),c.ya=null);c.g&&(c.o.Xa(),c.za.Xa());c.ud.stop();c.jb&&(c.jb.release(),c.jb=null);if(!c.F){q.B(6);break}return C(q,
481
481
  c.F.stop(),7);case 7:c.F=null,c.Hd=null;case 6:if(!c.s){q.B(8);break}return C(q,c.s.stop(),8);case 8:if(!c.j){q.B(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.I&&(c.I.release(),c.I=null);c.C&&(c.C.release(),c.C=null);if(!c.G){q.B(12);break}return C(q,c.G.destroy(),13);case 13:c.G=null;case 12:if(c.A&&!b)c.A.onAssetUnload();c.g&&Nk(c.g);if(!c.g||!c.g.src){q.B(14);break}return C(q,new Promise(function(p){return(new jd(p)).U(.1)}),15);case 15:c.g.removeAttribute("src"),c.g.load();
482
- case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ba=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Ll;c.Je=null;c.Gc=[];c.O=NaN;bm(c);case 3:ya(q);c.W.release();za(q,4);break;case 4:if(a&&kd()&&
482
+ case 14:if(!c.m){q.B(16);break}return C(q,c.m.destroy(),17);case 17:c.m=null;case 16:c.ba=null;c.K=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.u=new Ll;c.Je=null;c.Ic=[];c.O=NaN;bm(c);case 3:ya(q);c.W.release();za(q,4);break;case 4:if(a&&kd()&&
483
483
  !c.G)return C(q,am(c),0);q.B(0)}})};r.Th=function(a){this.la=a};
484
- r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==Wl)throw new P(2,7,7E3);return C(m,wl(d.W,"load"),2);case 2:d.W.release();if(!d.g)throw new P(2,7,7002);if(!d.ba){m.B(3);break}return C(m,d.mc(!1),3);case 3:e=++d.Fd;f=function(){if(d.Fd!=e)throw new P(2,7,7E3);};g=function(n,q){return K(function(p){switch(p.g){case 1:return va(p,2),C(p,wl(d.W,q),4);case 4:return f(),C(p,n(),5);case 5:f();case 2:ya(p),d.W.release(),za(p,0)}})};ta(m,5);
485
- d.la=b;d.Hc=!1;d.dispatchEvent(Vl("loading"));h=Date.now()/1E3;d.u=new Ll;d.ba=a;if(c){m.B(7);break}return C(m,g(function(){return K(function(n){if(1==n.g)return C(n,cm(d),2);c=n.h;E(n)})},"guessMimeType_"),7);case 7:if(k=dm(d,c))return C(m,g(function(){return K(function(n){return C(n,em(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.G){m.B(11);break}return C(m,g(function(){return K(function(n){return C(n,am(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return C(m,g(function(){return K(function(n){return C(n,
486
- fm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,gm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,hm(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,im(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(Vl("loaded"));wa(m,0);break;case 5:l=xa(m);if(7E3==l.code){m.B(18);break}return C(m,d.mc(!1),18);case 18:throw l;}})};
484
+ r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:if(d.l==Wl)throw new P(2,7,7E3);return C(m,wl(d.W,"load"),2);case 2:d.W.release();if(!d.g)throw new P(2,7,7002);if(!d.ba){m.B(3);break}return C(m,d.oc(!1),3);case 3:e=++d.Fd;f=function(){if(d.Fd!=e)throw new P(2,7,7E3);};g=function(n,q){return K(function(p){switch(p.g){case 1:return va(p,2),C(p,wl(d.W,q),4);case 4:return f(),C(p,n(),5);case 5:f();case 2:ya(p),d.W.release(),za(p,0)}})};ta(m,5);
485
+ d.la=b;d.Jc=!1;d.dispatchEvent(Vl("loading"));h=Date.now()/1E3;d.u=new Ll;d.ba=a;if(c){m.B(7);break}return C(m,g(function(){return K(function(n){if(1==n.g)return C(n,cm(d),2);c=n.h;E(n)})},"guessMimeType_"),7);case 7:if(k=dm(d,c))return C(m,g(function(){return K(function(n){return C(n,em(d,c),0)})},"initializeSrcEqualsDrmInner_"),16);if(d.G){m.B(11);break}return C(m,g(function(){return K(function(n){return C(n,am(d),0)})},"initializeMediaSourceEngineInner_"),11);case 11:return C(m,g(function(){return K(function(n){return C(n,
486
+ fm(d,c),0)})},"parseManifestInner_"),13);case 13:return C(m,g(function(){return K(function(n){return C(n,gm(d),0)})},"initializeDrmInner_"),14);case 14:return C(m,g(function(){return K(function(n){return C(n,hm(d,h),0)})},"loadInner_"),10);case 16:return C(m,g(function(){return K(function(n){return C(n,im(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(Vl("loaded"));wa(m,0);break;case 5:l=xa(m);if(7E3==l.code){m.B(18);break}return C(m,d.oc(!1),18);case 18:throw l;}})};
487
487
  function cm(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,C(d,Dk(a.ba,a.H,b),2);c=d.h;"application/x-mpegurl"==c&&vd()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function dm(a,b){if(!kd())return!0;if(b){if(""==(a.g||md()).canPlayType(b))return!1;if(!(kd()&&b in sh))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(vd())return a.h.streaming.useNativeHlsOnSafari}}return!1}
488
488
  function am(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return Xl(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Je=b,d=jm(a.g,c,function(h,k,l){km(a,h,k,l)},a.J),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.W=f,C(g,d.J,2);a.G=d;E(g)})}
489
- function fm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,Xl(a,"manifest-parser"),a.Hd=rh(a.ba,b||null),a.F=a.Hd(),d=Ze(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.ya=new Jj(function(){return a.Bb()}),a.ya.addEventListener("regionadd",function(n){n=n.region;lm(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.ma=null,a.h.streaming.observeQualityChanges&&(a.ma=new Fj(function(){return a.mb()}),a.ma.addEventListener("qualitychange",
489
+ function fm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.H,Xl(a,"manifest-parser"),a.Hd=rh(a.ba,b||null),a.F=a.Hd(),d=Ze(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.F.configure(d),a.ya=new Jj(function(){return a.Cb()}),a.ya.addEventListener("regionadd",function(n){n=n.region;lm(a,"timelineregionadded",n);if(a.A)a.A.onDashTimedMetadata(n)}),a.ma=null,a.h.streaming.observeQualityChanges&&(a.ma=new Fj(function(){return a.mb()}),a.ma.addEventListener("qualitychange",
490
490
  function(n){var q=n.quality;n=n.position;q=(new Map).set("mediaQuality",{bandwidth:q.bandwidth,audioSamplingRate:q.audioSamplingRate,codecs:q.codecs,contentType:q.contentType,frameRate:q.frameRate,height:q.height,mimeType:q.mimeType,channelsCount:q.channelsCount,pixelAspectRatio:q.pixelAspectRatio,width:q.width}).set("position",n);a.dispatchEvent(Vl("mediaqualitychanged",q))})),e={networkingEngine:c,filter:function(n){return mm(a,n)},makeTextStreamsForClosedCaptions:function(n){return nm(a,n)},onTimelineRegionAdded:function(n){var q=
491
491
  a.ya;a:{var p=t(q.g);for(var u=p.next();!u.done;u=p.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){p=u;break a}p=null}null==p&&(q.g.add(n),n=new Q("regionadd",new Map([["region",n]])),q.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return $l(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
492
492
  !0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var q=a.m?a.m.g:null;q&&a.m.s&&om(a,q.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.P());a.dispatchEvent(Vl("manifestupdated",n));if(a.A)a.A.onManifestUpdated(a.P())},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}},f=Date.now()/1E3,Xl(a,"manifest"),g=a,C(m,a.F.start(a.ba,e),2);g.i=m.h;h=Vl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);
493
493
  pm(a.i);k=Date.now()/1E3;l=k-f;a.u.F=l;E(m)})}
494
- function gm(a){var b,c,d,e;return K(function(f){return 1==f.g?(Xl(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=qm(a,{Qb:a.H,onError:function(g){$l(a,g)},Pd:function(g){rm(a,g)},onExpirationUpdated:function(g,h){sm(a,g,h)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&c&&(c=!1,a.u.j=Date.now()/1E3-b,a.J&&ni(a.J))}}),a.m.configure(a.h.drm),(d=Gd(a.i.variants,a.h.restrictions,a.Dd))&&a.j&&tm(a),e=ee(a.i.variants),C(f,Ig(a.m,e,a.i.offlineSessionIds),2)):3!=f.g?C(f,a.m.Fc(a.g),3):C(f,
494
+ function gm(a){var b,c,d,e;return K(function(f){return 1==f.g?(Xl(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=qm(a,{Qb:a.H,onError:function(g){$l(a,g)},Pd:function(g){rm(a,g)},onExpirationUpdated:function(g,h){sm(a,g,h)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&c&&(c=!1,a.u.j=Date.now()/1E3-b,a.J&&ni(a.J))}}),a.m.configure(a.h.drm),(d=Gd(a.i.variants,a.h.restrictions,a.Dd))&&a.j&&tm(a),e=ee(a.i.variants),C(f,Ig(a.m,e,a.i.offlineSessionIds),2)):3!=f.g?C(f,a.m.Hc(a.g),3):C(f,
495
495
  mm(a,a.i),0)})}
496
- function hm(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:Xl(a,"load");c=a.g;a.I=new Cj({Bd:function(){return c.playbackRate},ac:function(){return c.defaultPlaybackRate},lf:function(F){c.playbackRate=F},Tf:function(F){c.currentTime+=F}});d=function(){return um(a)};e=function(){return vm(a)};a.o.D(c,"playing",d);a.o.D(c,"pause",d);a.o.D(c,"ended",d);a.o.D(c,"ratechange",e);Ul(a,a.h);f=a.h.abrFactory;a.s&&a.Ie==f||(a.Ie=f,a.s=f(),"function"!=typeof a.s.setMediaElement&&(oe("AbrManager",
497
- "Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.$a=new ze(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.ib=a.h.preferredTextLanguage;a.Ec=a.h.preferredTextRole;a.nc=a.h.preferForcedSubs;wm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);
496
+ function hm(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:Xl(a,"load");c=a.g;a.I=new Cj({Bd:function(){return c.playbackRate},ac:function(){return c.defaultPlaybackRate},lf:function(F){c.playbackRate=F},Tf:function(F){c.currentTime+=F}});d=function(){return um(a)};e=function(){return vm(a)};a.o.D(c,"playing",d);a.o.D(c,"pause",d);a.o.D(c,"ended",d);a.o.D(c,"ratechange",e);Ul(a,a.h);f=a.h.abrFactory;a.s&&a.Ie==f||(a.Ie=f,a.s=f(),"function"!=typeof a.s.setMediaElement&&(oe("AbrManager w/o setMediaElement",
497
+ "Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.$a=new ze(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.ib=a.h.preferredTextLanguage;a.Gc=a.h.preferredTextRole;a.pc=a.h.preferForcedSubs;wm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);
498
498
  a.s.init(function(F,J,G){a.j&&F!=a.j.j&&xm(a,F,!0,void 0===J?!1:J,void 0===G?0:G)});a.s.setMediaElement(c);Cd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=ym(a);a.j.configure(a.h.streaming);a.l=zm;c.textTracks&&a.o.D(c.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":Am(a,F)}});a.dispatchEvent(Vl("streaming"));g=null;(h=a.j.j)||(g=Bm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(q=n.value)&&
499
499
  !q.segmentIndex&&k.push(q.createSegmentIndex());if(!(0<k.length)){D.B(2);break}return C(D,Promise.all(k),2);case 2:if(a.F&&a.F.onInitialVariantChosen)a.F.onInitialVariantChosen(l);wm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C=Cm(a,a.la);a.jb=Dm(a,b);p=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Em(a,c,p);if(h){D.B(4);break}xm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){D.B(4);break}u=a.C;v=u.de;return C(D,Fm(g,a.C.nd()),6);case 6:v.call(u,D.h);case 4:return a.C.ce(),
500
- y=a.cc().find(function(F){return F.active}),y||((z=fe(a.i.textStreams,a.ib,a.Ec,a.nc)[0]||null)&&Kl(a.u.h,z,!0),g&&(z?(g.audio&&Gm(a,g.audio,z)&&(a.Z=!0),a.Z&&a.G.F.setTextVisibility(!0),Hm(a)):a.Z=!1),z&&(a.h.streaming.alwaysStreamText||a.He())&&lk(a.j,z)),C(D,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Im(a));tm(a);Jm(a);a.i.variants.some(function(F){return F.primary});(x=a.P())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(A=function(){return Km(a)},a.o.D(c,"timeupdate",A)):x||(B=
501
- function(){return Lm(a)},a.o.D(c,"timeupdate",B),Lm(a));if(a.A)a.A.onManifestUpdated(x);a.Hc=!0;a.o.ia(c,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});E(D)}})}
500
+ y=a.ec().find(function(F){return F.active}),y||((z=fe(a.i.textStreams,a.ib,a.Gc,a.pc)[0]||null)&&Kl(a.u.h,z,!0),g&&(z?(g.audio&&Gm(a,g.audio,z)&&(a.Z=!0),a.Z&&a.G.F.setTextVisibility(!0),Hm(a)):a.Z=!1),z&&(a.h.streaming.alwaysStreamText||a.He())&&lk(a.j,z)),C(D,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Im(a));tm(a);Jm(a);a.i.variants.some(function(F){return F.primary});(x=a.P())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(A=function(){return Km(a)},a.o.D(c,"timeupdate",A)):x||(B=
501
+ function(){return Lm(a)},a.o.D(c,"timeupdate",B),Lm(a));if(a.A)a.A.onManifestUpdated(x);a.Jc=!0;a.o.ia(c,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b});E(D)}})}
502
502
  function em(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Dc,d=Date.now()/1E3,e=!0,a.m=qm(a,{Qb:a.H,onError:function(h){$l(a,h)},Pd:function(h){rm(a,h)},onExpirationUpdated:function(h,k){sm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.u.j=Date.now()/1E3-d)}}),a.m.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
503
- mimeType:b?Lc(b):"",codecs:b?Mc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Z=!0,C(g,Ig(a.m,[f],[]),2)):C(g,a.m.Fc(a.g),0)})}
504
- function im(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return Xl(a,"src-equals"),d=a.g,a.C=new rj(d),e=!1,a.Dc.push(function(){e=!0}),null!=a.la&&a.C.de(a.la),a.I=new Cj({Bd:function(){return d.playbackRate},ac:function(){return d.defaultPlaybackRate},lf:function(u){d.playbackRate=u},Tf:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Em(a,d,f),g=function(){return um(a)},h=function(){return vm(a)},a.o.D(d,"playing",g),a.o.D(d,"pause",g),a.o.D(d,"ended",g),a.o.D(d,
503
+ mimeType:b?Lc(b):"",codecs:b?Mc(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Z=!0,C(g,Ig(a.m,[f],[]),2)):C(g,a.m.Hc(a.g),0)})}
504
+ function im(a,b,c){var d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g)return Xl(a,"src-equals"),d=a.g,a.C=new rj(d),e=!1,a.Fc.push(function(){e=!0}),null!=a.la&&a.C.de(a.la),a.I=new Cj({Bd:function(){return d.playbackRate},ac:function(){return d.defaultPlaybackRate},lf:function(u){d.playbackRate=u},Tf:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Em(a,d,f),g=function(){return um(a)},h=function(){return vm(a)},a.o.D(d,"playing",g),a.o.D(d,"pause",g),a.o.D(d,"ended",g),a.o.D(d,
505
505
  "ratechange",h),"none"!=d.preload&&a.o.ia(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-b}),d.audioTracks&&(a.o.D(d.audioTracks,"addtrack",function(){return tm(a)}),a.o.D(d.audioTracks,"removetrack",function(){return tm(a)}),a.o.D(d.audioTracks,"change",function(){return tm(a)})),d.textTracks&&(a.o.D(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Mm(a,u);break;case "chapters":Am(a,u);break;default:tm(a)}}),a.o.D(d.textTracks,"removetrack",function(){return tm(a)}),
506
506
  a.o.D(d.textTracks,"change",function(){return tm(a)})),d.src=Zk(a.V,a.ba,c),(qd()||pd("Web0S"))&&d.load(),a.l=Nm,a.dispatchEvent(Vl("streaming")),k=new Oe,ij(d,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.C.ce();k.resolve()}),ij(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var u;return K(function(v){if(1==v.g)return Om(a),u=Pm(a),u.find(function(y){return"disabled"!=y.mode})?(0<u.length&&(a.Z=!0),v.B(2)):C(v,new Promise(function(y){a.o.ia(d.textTracks,"change",y);(new jd(y)).U(1)}),2);if(e)return v.return();
507
507
  Qm(a);E(v)})}),d.error?k.reject(Zl(a)):"none"==d.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.o.ia(d,"error",function(){k.reject(Zl(a))}),C(p,k,2);(l=a.P())&&a.h.streaming.liveSync?(m=function(){return Km(a)},a.o.D(d,"timeupdate",m)):l||(n=function(){return Lm(a)},a.o.D(d,"timeupdate",
508
- n),Lm(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Bb().end,a.o.D(d,"progress",function(){var u=a.Bb().end;q!=u&&(a.A.onManifestUpdated(a.P()),q=u)})));a.Hc=!0;E(p)})}function Om(a){var b=a.h.preferredAudioLanguage;""!=b&&a.ag(b,a.h.preferredVariantRole)}function Qm(a){var b=a.h.preferredTextLanguage;""!=b&&a.ef(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
509
- function Mm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Rm(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new jd(function(){var d=Sm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).lc().U(.5);a.Dc.push(function(){c.stop()})}}
508
+ n),Lm(a));a.A&&(a.A.onManifestUpdated(l),l&&(q=a.Cb().end,a.o.D(d,"progress",function(){var u=a.Cb().end;q!=u&&(a.A.onManifestUpdated(a.P()),q=u)})));a.Jc=!0;E(p)})}function Om(a){var b=a.h.preferredAudioLanguage;""!=b&&a.ag(b,a.h.preferredVariantRole)}function Qm(a){var b=a.h.preferredTextLanguage;""!=b&&a.ef(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
509
+ function Mm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Rm(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value)});var c=(new jd(function(){var d=Sm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).nc().U(.5);a.Fc.push(function(){c.stop()})}}
510
510
  function km(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Rm(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function Rm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Vl("metadata",b))}
511
- function Am(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new jd(function(){b.mode="hidden"})).lc().U(.5);a.Dc.push(function(){c.stop()})}}function pm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}r.Ah=function(){for(var a=this.W;a.g;)a.release()};function qm(a,b){return new Bg(b,a.h.drm.updateExpirationTime)}
511
+ function Am(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new jd(function(){b.mode="hidden"})).nc().U(.5);a.Fc.push(function(){c.stop()})}}function pm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}r.Ah=function(){for(var a=this.W;a.g;)a.release()};function qm(a,b){return new Bg(b,a.h.drm.updateExpirationTime)}
512
512
  function Pl(a){return new cf(function(b,c,d){a.s&&a.s.segmentDownloaded(b,c,d)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Vl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Vl("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)fl(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
513
513
  "d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.o=f}fl(e,c,{ot:cl,su:!e.j})}}catch(m){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case nf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.P()?"l":"v"};h.ot=il(b);var k=h.ot===gl||h.ot===al||h.ot===bl||h.ot===kl,l=b.stream;l&&(k&&(h.bl=pl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==kl&&(h.tb=ql(e,h.ot)/1E3);fl(e,c,h)}}catch(m){Va("CMCD_SEGMENT_ERROR",
514
514
  "Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:fl(e,c,{ot:"k"});break;case 4:fl(e,c,{ot:"o"})}},function(b,c,d,e){a.F&&a.F.banLocation&&a.F.banLocation(e)})}function Cm(a,b){return new sj(a.g,a.i,a.h.streaming,b,function(){a.jb&&Ej(a.jb,!0);a.j&&a.j.ad();a.K&&Tm(a)},function(c){return a.dispatchEvent(c)})}
515
515
  function Dm(a,b){b=new Kj(a.ya,a.P()||0<b);b.addEventListener("enter",function(d){lm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){lm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(lm(a,"timelineregionenter",e),lm(a,"timelineregionexit",e))});var c=new Dj(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}
516
516
  function Em(a,b,c){a.K=new He;a.K.g=Je;Ke(a.K,c,Math.min(.5,c/2));bm(a);a.o.D(b,"waiting",function(){return Tm(a)});a.o.D(b,"stalled",function(){return Tm(a)});a.o.D(b,"canplaythrough",function(){return Tm(a)});a.o.D(b,"progress",function(){return Tm(a)})}
517
- function Tm(a){switch(a.l){case Nm:if(a.g.ended)var b=!0;else{var c=Bh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case zm:a:if(a.g.ended||Di(a.G))b=!0;else{if(a.i.presentationTimeline.P()){c=a.i.presentationTimeline.zb();var d=Bh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Dh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ie:Je;c.g=d;b!=d&&bm(a)}function jm(a,b,c,d){return new vi(a,b,c,d)}
518
- function Ol(a){return new Yk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},mb:function(){return a.mb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},yd:function(){return a.yd()},Kb:function(){return a.Kb()},Ab:function(){return a.Ab()},P:function(){return a.P()}},a.h.cmcd)}
517
+ function Tm(a){switch(a.l){case Nm:if(a.g.ended)var b=!0;else{var c=Bh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case zm:a:if(a.g.ended||Di(a.G))b=!0;else{if(a.i.presentationTimeline.P()){c=a.i.presentationTimeline.Ab();var d=Bh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Dh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ie:Je;c.g=d;b!=d&&bm(a)}function jm(a,b,c,d){return new vi(a,b,c,d)}
518
+ function Ol(a){return new Yk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},mb:function(){return a.mb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},yd:function(){return a.yd()},Lb:function(){return a.Lb()},Bb:function(){return a.Bb()},P:function(){return a.P()}},a.h.cmcd)}
519
519
  function ym(a){return new Yj(a.i,{zd:function(){return a.C?a.C.nd():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},T:a.G,Qb:a.H,onError:function(b){return $l(a,b)},onEvent:function(b){return a.dispatchEvent(b)},th:function(){a.F&&a.F.update&&a.F.update()},We:function(b,c,d){a.C&&a.C.Vf();Tm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Vl("segmentappended",b))},sh:function(b,c){(c=c.Re)&&a.ma&&Hj(a.ma,c,b)},yf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&
520
520
  !d.F&&["audio","video"].includes(b)){c=new dg(nb(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,f),f+=b.length;Rg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},uh:function(b,c,d){km(a,b,c,d)},ke:function(b,c){return a.ke(b,c)}})}
521
521
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=tl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(oe("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(oe("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
522
522
  a.streaming&&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));var c=Fl(this.h,a,Nl(this));Um(this);return c};
523
523
  function Um(a){if(a.F){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.F.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Vm(a,a.i)}catch(f){$l(a,f)}a.s&&Jm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Wm(a)}a.H&&a.H.hf(a.h.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.h.mediaSource),a.G.W=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Je!=b)){var c=b(),d=a.G,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),
524
524
  e.destroy());d.h&&(d.h.j=c);a.Je=b;a.j&&(b=a.j,(c=b.h.get(Cc))&&jk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Im(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ke(a.K,b,Math.min(.5,b/2)));a.i&&wm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A&&a.A.configure(a.h.ads);a.V&&a.V.configure(a.h.cmcd)}r.getConfiguration=function(){var a=Nl(this);Fl(a,this.h,Nl(this));return a};
525
- r.Gg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Bb().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Eh=function(){for(var a in this.h)delete this.h[a];Fl(this.h,Nl(this),Nl(this));Um(this)};r.Ng=function(){return this.l};r.Ce=function(){return this.i?this.i.type:null};r.Rg=function(){return this.g};
526
- r.Kb=function(){return this.H};r.Be=function(){return this.ba};r.If=function(){return this.A?this.A:null};r.P=function(){return this.i?this.i.presentationTimeline.P():this.g&&this.g.src?Infinity==this.g.duration:!1};r.Ob=function(){return this.i?this.i.presentationTimeline.Ob():!1};r.gh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
527
- r.Bb=function(){if(this.i){if(!this.Hc&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.bc(),end:a.nb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.dh=function(){this.P()&&(this.g.currentTime=this.Bb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Nc=function(){return this.m?this.m.Nc():Infinity};
525
+ r.Gg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Cb().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Eh=function(){for(var a in this.h)delete this.h[a];Fl(this.h,Nl(this),Nl(this));Um(this)};r.Ng=function(){return this.l};r.Ce=function(){return this.i?this.i.type:null};r.Rg=function(){return this.g};
526
+ r.Lb=function(){return this.H};r.Be=function(){return this.ba};r.If=function(){return this.A?this.A:null};r.P=function(){return this.i?this.i.presentationTimeline.P():this.g&&this.g.src?Infinity==this.g.duration:!1};r.Ob=function(){return this.i?this.i.presentationTimeline.Ob():!1};r.gh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
527
+ r.Cb=function(){if(this.i){if(!this.Jc&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.cc(),end:a.nb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.dh=function(){this.P()&&(this.g.currentTime=this.Cb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Oc=function(){return this.m?this.m.Oc():Infinity};
528
528
  r.Ae=function(){return this.m?this.m.Ae():[]};r.xd=function(){return this.m?this.m.xd():{}};r.Fe=function(){return this.K?this.K.g==Je:!1};r.yd=function(){return this.g?this.I?this.I.h:1:0};
529
- r.rf=function(a){var b=this;0==a?Ua("A trick play rate of 0 is unsupported!"):(this.za.Xa(),this.g.paused&&this.g.play(),this.I.set(a),this.l==zm&&(this.s.playbackRateChanged(a),ik(this.j,1<Math.abs(a))),this.P()&&this.za.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Bb(),e=b.h.streaming.safeSeekOffset;0<a?c>=d.end&&b.rd():c<=d.start+e&&b.rd()}))};r.rd=function(){var a=this.I.ac();this.l==Nm&&this.I.set(a);this.l==zm&&(this.I.set(a),this.s.playbackRateChanged(a),ik(this.j,!1));this.za.Xa()};
530
- r.Ab=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,de(e)){var f=Wd(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ce(g)}):[]};
531
- r.cc=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Xd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Pm(this).map(function(f){return ae(f)}):[]};r.Mg=function(){var a=this.Gc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Yd(b)})};
532
- r.Dg=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=zm&&b.l!=Nm)return g.return(null);c=b.Gc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],yj(d.segmentIndex,function(h){var k=Xm(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Gb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Lf(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
533
- function Xm(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Gb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
534
- r.Lf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){if(1==D.g){if(c.l!=zm&&c.l!=Nm)return D.return(null);d=c.Gc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.B(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Xm(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Gb;n=l/h.rows;q=h.Gb*h.rows;p=g.i-g.startTime;
535
- u=g.F||p/q;v=g.startTime;z=y=0;1<q&&(x=Math.floor((b-g.startTime)/u),v=g.startTime+x*u,y=x%h.Gb*m,z=Math.floor(x/h.Gb)*n);A=!1;if(B=g.C)A=!0,n=B.height,y=B.positionX,z=B.positionY,m=B.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:y,positionY:z,startTime:v,duration:u,uris:g.Y(),width:m,sprite:A})})};
529
+ r.rf=function(a){var b=this;0==a?Ua("A trick play rate of 0 is unsupported!"):(this.za.Xa(),this.g.paused&&this.g.play(),this.I.set(a),this.l==zm&&(this.s.playbackRateChanged(a),ik(this.j,1<Math.abs(a))),this.P()&&this.za.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Cb(),e=b.h.streaming.safeSeekOffset;0<a?c>=d.end&&b.rd():c<=d.start+e&&b.rd()}))};r.rd=function(){var a=this.I.ac();this.l==Nm&&this.I.set(a);this.l==zm&&(this.I.set(a),this.s.playbackRateChanged(a),ik(this.j,!1));this.za.Xa()};
530
+ r.Bb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,de(e)){var f=Wd(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ce(g)}):[]};
531
+ r.ec=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Xd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Pm(this).map(function(f){return ae(f)}):[]};r.Mg=function(){var a=this.Ic;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Yd(b)})};
532
+ r.Dg=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=zm&&b.l!=Nm)return g.return(null);c=b.Ic;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.B(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],yj(d.segmentIndex,function(h){var k=Xm(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Hb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.Lf(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
533
+ function Xm(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Hb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
534
+ r.Lf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){if(1==D.g){if(c.l!=zm&&c.l!=Nm)return D.return(null);d=c.Ic;c.i&&(d=c.i.imageStreams);return(e=d.find(function(F){return F.id==a}))?e.segmentIndex?D.B(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Xm(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Hb;n=l/h.rows;q=h.Hb*h.rows;p=g.i-g.startTime;
535
+ u=g.F||p/q;v=g.startTime;z=y=0;1<q&&(x=Math.floor((b-g.startTime)/u),v=g.startTime+x*u,y=x%h.Hb*m,z=Math.floor(x/h.Hb)*n);A=!1;if(B=g.C)A=!0,n=B.height,y=B.positionX,z=B.positionY,m=B.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:y,positionY:z,startTime:v,duration:u,uris:g.Y(),width:m,sprite:A})})};
536
536
  r.bg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Kl(this.u.h,b,!1),lk(this.j,b),Ym(this),this.ib=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Pm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Zd(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";Ym(this)}};
537
537
  r.ff=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&de(d)&&(xm(this,d,!1,b,c),this.$a=new ye(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Jm(this))}else if(this.g&&this.g.audioTracks)for(b=
538
- Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,Zd(c)==a.id){Zm(this,c);break}};r.Fg=function(){return $m(this.Ab())};r.Wg=function(){return $m(this.cc())};r.Eg=function(){return Array.from(an(this.Ab()))};r.Vg=function(){return Array.from(an(this.cc()))};
538
+ Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,Zd(c)==a.id){Zm(this,c);break}};r.Fg=function(){return $m(this.Bb())};r.Wg=function(){return $m(this.ec())};r.Eg=function(){return Array.from(an(this.Bb()))};r.Vg=function(){return Array.from(an(this.ec()))};
539
539
  r.ag=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.$a=new ze(a,b||"",c,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.$a.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,b))c=
540
- f;c?(a=Wd(c),this.ff(a,!0,d)):Wm(this)}else this.g&&this.g.audioTracks&&(d=fe(this.Ab(),a,b||"",!1)[0])&&this.ff(d)};r.ef=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.ib=a,this.Ec=b||"",this.nc=c,(a=fe(this.i.textStreams,this.ib,this.Ec,this.nc)[0]||null)&&a!=this.j.o&&(Kl(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.He()))lk(this.j,a),Ym(this)}else(a=fe(this.cc(),a,b||"",c)[0])&&this.bg(a)};
540
+ f;c?(a=Wd(c),this.ff(a,!0,d)):Wm(this)}else this.g&&this.g.audioTracks&&(d=fe(this.Bb(),a,b||"",!1)[0])&&this.ff(d)};r.ef=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.ib=a,this.Gc=b||"",this.pc=c,(a=fe(this.i.textStreams,this.ib,this.Gc,this.pc)[0]||null)&&a!=this.j.o&&(Kl(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.He()))lk(this.j,a),Ym(this)}else(a=fe(this.ec(),a,b||"",c)[0])&&this.bg(a)};
541
541
  r.Kh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.$a=new ze(d.language,"",0,"","",a,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Wm(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Zm(this,b)}};
542
542
  r.He=function(){var a=this.Z;return this.G&&this.l==zm?this.G.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Pm(this).some(function(b){return"showing"==b.mode}):a};r.Jf=function(){return this.g&&this.g.src&&this.g.textTracks?bn(this).map(function(a){return ae(a)}):[]};
543
543
  r.Hg=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=$c(a),c=bn(this).filter(function(h){return $c(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
544
544
  function Pm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Sm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function bn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
545
- r.fg=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==zm)this.G.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=fe(this.i.textStreams,this.ib,this.Ec,this.nc),0<a.length&&(lk(this.j,a[0]),Ym(this))):hk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Pm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Hm(this)}};
545
+ r.fg=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==zm)this.G.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=fe(this.i.textStreams,this.ib,this.Gc,this.pc),0<a.length&&(lk(this.j,a[0]),Ym(this))):hk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Pm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Hm(this)}};
546
546
  r.Tg=function(){if(!this.P())return null;if(this.C)var a=this.C.nd();else{if(null==this.la)return new Date;a=this.la}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.g&&this.g.getStartDate){var b=this.g.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
547
547
  r.Kf=function(){if(!this.P())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.mb=function(){if(this.l==zm)return this.G.mb();var a={total:[],audio:[],video:[],text:[]};this.l==Nm&&(a.total=Eh(this.g.buffered));return a};
548
548
  r.getStats=function(){if(this.l!=zm&&this.l!=Nm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};um(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=
549
549
  Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.u.K=this.C.vf(),this.u.O=this.C.wf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.J=Number(c.droppedVideoFrames);b.I=d;this.u.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.u.s=c;if(this.l==zm){c=this.j.j;b=this.j.o;if(c){d=this.I?this.I.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.u.A=e}c&&c.video&&(b=this.u,d=c.video.height||
550
550
  NaN,b.o=c.video.width||NaN,b.l=d);this.P()&&(c=this.Kf().valueOf()+1E3*a.currentTime,this.u.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.u=c}this.l==Nm&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.u;a=f.o;c=f.l;b=f.A;d=f.I;e=f.J;var g=f.H,h=f.O,k=f.K,l=f.u,m=f.i,n=f.m,q=f.F,p=f.j,u=Hl(f.g,"playing"),v=Hl(f.g,"paused"),y=Hl(f.g,"buffering"),z=f.s,x=f.C,A=f.G,B=Il(f.g),D=[];f=t(f.h.g);
551
551
  for(var F=f.next();!F.done;F=f.next())F=F.value,D.push({timestamp:F.timestamp,id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:u,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:x,maxSegmentDuration:A,stateHistory:B,switchHistory:D}};
552
- r.qg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:if(h.l!=zm&&h.l!=Nm)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ua("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.B(2);break}return C(B,cn(h,a),3);case 3:d=B.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Nm){B.B(4);break}g&&(c="forced");return C(B,dn(h,a,b,c,d,f||"",k),5);case 5:l=$c(b);m=h.cc();if(n=m.find(function(D){return $c(D.language)==
552
+ r.qg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:if(h.l!=zm&&h.l!=Nm)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ua("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){B.B(2);break}return C(B,cn(h,a),3);case 3:d=B.h;case 2:k=[];h.A&&(k=h.A.getCuePoints());if(h.l!=Nm){B.B(4);break}g&&(c="forced");return C(B,dn(h,a,b,c,d,f||"",k),5);case 5:l=$c(b);m=h.ec();if(n=m.find(function(D){return $c(D.language)==
553
553
  l&&D.label==(f||"")&&D.kind==c}))return tm(h),B.return(n);throw new P(1,2,2012);case 4:q=Dc;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new P(1,4,4033);if(!k.length){B.B(6);break}return C(B,en(h,a,h.H,h.h.streaming.retryParameters),7);case 7:u=B.h,v=fn(h,u,d,k),y=new Blob([v],{type:"text/vtt"}),a=yi(y),d="text/vtt";case 6:z={id:h.Pe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Aj(0,p,[a]),mimeType:d||"",
554
554
  codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ja,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};x=Fc(z.mimeType,z.codecs);A=Oc(x);if(!A)throw new P(2,2,2014,d);h.i.textStreams.push(z);tm(h);return B.return(Xd(z))}})};
555
555
  r.rg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:if(c.l!=zm&&c.l!=Nm)throw new P(1,7,7004);if(b){A.B(2);break}return C(A,cn(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Dc;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return C(A,en(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=A.h;g=Pc[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
556
- vttOffset:0};l=nb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={yc:q.yc,Db:q.Db},u=p.next())q.Db=u.value,q.yc=null,v=function(B){return function(){null==B.yc&&(B.yc=xc([a],[B.Db.payload]));return B.yc||[]}}(q),y=new R(q.Db.startTime,q.Db.endTime,v,0,null,null,0,0,Infinity),q.Db.payload.includes("#xywh")&&(z=q.Db.payload.split("#xywh=")[1].split(","),4===z.length&&y.gg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
557
- n.push(y);x={id:c.Pe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new xj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Cc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==Nm?c.Gc.push(x):
556
+ vttOffset:0};l=nb(f);m=h.parseMedia(l,k,a);n=[];q={};p=t(m);for(u=p.next();!u.done;q={Ac:q.Ac,Eb:q.Eb},u=p.next())q.Eb=u.value,q.Ac=null,v=function(B){return function(){null==B.Ac&&(B.Ac=xc([a],[B.Eb.payload]));return B.Ac||[]}}(q),y=new R(q.Eb.startTime,q.Eb.endTime,v,0,null,null,0,0,Infinity),q.Eb.payload.includes("#xywh")&&(z=q.Eb.payload.split("#xywh=")[1].split(","),4===z.length&&y.gg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
557
+ n.push(y);x={id:c.Pe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new xj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Ec,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==Nm?c.Ic.push(x):
558
558
  c.i.imageStreams.push(x);tm(c);return A.return(Yd(x))}})};
559
559
  r.pg=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=zm&&d.l!=Nm)throw new P(1,7,7004);if(c){k.B(2);break}return C(k,cn(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),C(k,dn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Jf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.o.ia(f,"load",l);d.o.ia(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return tm(d),k.return(h);case 5:throw new P(1,
560
560
  2,2012);}})};function cn(a,b){var c;return K(function(d){switch(d.g){case 1:return ta(d,2),C(d,Dk(b,a.H,a.h.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:xa(d);case 3:if(c)return d.return(c);throw new P(1,2,2011,b);}})}
@@ -567,10 +567,10 @@ function nm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.nex
567
567
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Cc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1};b.textStreams.push(h);c.add(g)}}
568
568
  function mm(a,b){return K(function(c){if(1==c.g)return C(c,gn(a,b),2);Vm(a,b);E(c)})}function gn(a,b){return K(function(c){if(1==c.g)return C(c,Hd(a.m,b),2);if(!b.variants.some(de))throw new P(2,4,4032);E(c)})}function Vm(a,b){if(a.l!=Wl){Gd(b.variants,a.h.restrictions,a.Dd)&&a.j&&tm(a);var c=a.m?a.m.g:null;if(c&&a.m.s)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,om(a,c.keySystem,e.video),om(a,c.keySystem,e.audio);hn(a,b)}}
569
569
  function om(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Rg(a.m,e.initDataType,e.initData)}}}
570
- function Fm(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return K(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.Jb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
570
+ function Fm(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return K(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.Kb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
571
571
  function bm(a){var b=a.Fe();if(a.u&&a.K&&a.C){if(a.V){var c=a.V;b||c.j||(c.j=!0);c.j&&b&&(c.l=!0);c.m=b}um(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Vl("buffering",b))}function vm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Vl("ratechange"),a.dispatchEvent(b))}
572
572
  function um(a){if(a.u&&a.K){var b=a.u.g,c="playing";a.K.g==Je?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Vl("statechanged",c)))}}
573
- function Km(a){if(a.P()){var b=a.Bb();if(Number.isFinite(b.end)&&!(a.g.currentTime<b.start)){if(a.h.streaming.liveSync){var c=a.h.streaming.liveSyncMaxLatency;var d=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var e=a.h.streaming.liveSyncMinLatency;var f=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&
573
+ function Km(a){if(a.P()){var b=a.Cb();if(Number.isFinite(b.end)&&!(a.g.currentTime<b.start)){if(a.h.streaming.liveSync){var c=a.h.streaming.liveSyncMaxLatency;var d=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var e=a.h.streaming.liveSyncMinLatency;var f=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&
574
574
  a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);var g=a.g.playbackRate,h=b.end-a.g.currentTime,k=0;if(a.l==Nm){var l=a.g.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.rf(d):e&&f&&h-k<e?g!=f&&a.rf(f):g!==a.I.ac()&&a.rd()}}}
575
575
  function Lm(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.O)?(a.O=c,b=!0):(c=Math.max(a.O,c),a.O!=c&&(a.O=c,b=!0)));if(b){var d;0==a.O?d=Vl("started"):25==a.O?d=Vl("firstquartile"):50==a.O?d=Vl("midpoint"):75==a.O?d=Vl("thirdquartile"):100==a.O&&(d=Vl("complete"));d&&a.dispatchEvent(d)}}}function Jm(a){try{hn(a,a.i)}catch(c){return $l(a,c),!1}var b=ee(a.i.variants);b=a.$a.create(b);a.s.setVariants(Array.from(b.values()));return!0}
576
576
  function Bm(a,b){b=void 0===b?!1:b;return Jm(a)?a.s.chooseVariant(b):null}
@@ -588,21 +588,21 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a)
588
588
  function $m(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=$c(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
589
589
  h.push({language:l,role:m,label:n})}});return h}N("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.ig;V.prototype.getManifestParserFactory=V.prototype.Pg;V.prototype.getManifest=V.prototype.Og;V.prototype.retryStreaming=V.prototype.bf;V.prototype.setMaxHardwareResolution=V.prototype.jf;V.prototype.addChaptersTrack=V.prototype.pg;V.prototype.addThumbnailsTrack=V.prototype.rg;V.prototype.addTextTrackAsync=V.prototype.qg;V.prototype.getStats=V.prototype.getStats;
590
590
  V.prototype.getBufferedInfo=V.prototype.mb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Kf;V.prototype.getPlayheadTimeAsDate=V.prototype.Tg;V.prototype.setTextTrackVisibility=V.prototype.fg;V.prototype.getChapters=V.prototype.Hg;V.prototype.getChaptersTracks=V.prototype.Jf;V.prototype.isTextTrackVisible=V.prototype.He;V.prototype.selectVariantsByLabel=V.prototype.Kh;V.prototype.selectTextLanguage=V.prototype.ef;V.prototype.selectAudioLanguage=V.prototype.ag;
591
- V.prototype.getTextLanguages=V.prototype.Vg;V.prototype.getAudioLanguages=V.prototype.Eg;V.prototype.getTextLanguagesAndRoles=V.prototype.Wg;V.prototype.getAudioLanguagesAndRoles=V.prototype.Fg;V.prototype.selectVariantTrack=V.prototype.ff;V.prototype.selectTextTrack=V.prototype.bg;V.prototype.getThumbnails=V.prototype.Lf;V.prototype.getAllThumbnails=V.prototype.Dg;V.prototype.getImageTracks=V.prototype.Mg;V.prototype.getTextTracks=V.prototype.cc;V.prototype.getVariantTracks=V.prototype.Ab;
592
- V.prototype.cancelTrickPlay=V.prototype.rd;V.prototype.trickPlay=V.prototype.rf;V.prototype.getPlaybackRate=V.prototype.yd;V.prototype.isBuffering=V.prototype.Fe;V.prototype.getKeyStatuses=V.prototype.xd;V.prototype.getActiveSessionsMetadata=V.prototype.Ae;V.prototype.getExpiration=V.prototype.Nc;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.dh;V.prototype.seekRange=V.prototype.Bb;V.prototype.isAudioOnly=V.prototype.gh;
593
- V.prototype.isInProgress=V.prototype.Ob;V.prototype.isLive=V.prototype.P;V.prototype.getAdManager=V.prototype.If;V.prototype.getAssetUri=V.prototype.Be;V.prototype.getNetworkingEngine=V.prototype.Kb;V.prototype.getMediaElement=V.prototype.Rg;V.prototype.getManifestType=V.prototype.Ce;V.prototype.getLoadMode=V.prototype.Ng;V.prototype.resetConfiguration=V.prototype.Eh;V.prototype.getBufferFullness=V.prototype.Gg;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
594
- V.prototype.releaseAllMutexes=V.prototype.Ah;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.Th;V.prototype.unload=V.prototype.mc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.tg;V.prototype.attach=V.prototype.Fc;
591
+ V.prototype.getTextLanguages=V.prototype.Vg;V.prototype.getAudioLanguages=V.prototype.Eg;V.prototype.getTextLanguagesAndRoles=V.prototype.Wg;V.prototype.getAudioLanguagesAndRoles=V.prototype.Fg;V.prototype.selectVariantTrack=V.prototype.ff;V.prototype.selectTextTrack=V.prototype.bg;V.prototype.getThumbnails=V.prototype.Lf;V.prototype.getAllThumbnails=V.prototype.Dg;V.prototype.getImageTracks=V.prototype.Mg;V.prototype.getTextTracks=V.prototype.ec;V.prototype.getVariantTracks=V.prototype.Bb;
592
+ V.prototype.cancelTrickPlay=V.prototype.rd;V.prototype.trickPlay=V.prototype.rf;V.prototype.getPlaybackRate=V.prototype.yd;V.prototype.isBuffering=V.prototype.Fe;V.prototype.getKeyStatuses=V.prototype.xd;V.prototype.getActiveSessionsMetadata=V.prototype.Ae;V.prototype.getExpiration=V.prototype.Oc;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.dh;V.prototype.seekRange=V.prototype.Cb;V.prototype.isAudioOnly=V.prototype.gh;
593
+ V.prototype.isInProgress=V.prototype.Ob;V.prototype.isLive=V.prototype.P;V.prototype.getAdManager=V.prototype.If;V.prototype.getAssetUri=V.prototype.Be;V.prototype.getNetworkingEngine=V.prototype.Lb;V.prototype.getMediaElement=V.prototype.Rg;V.prototype.getManifestType=V.prototype.Ce;V.prototype.getLoadMode=V.prototype.Ng;V.prototype.resetConfiguration=V.prototype.Eh;V.prototype.getBufferFullness=V.prototype.Gg;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
594
+ V.prototype.releaseAllMutexes=V.prototype.Ah;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.Th;V.prototype.unload=V.prototype.oc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.tg;V.prototype.attach=V.prototype.Hc;
595
595
  V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?C(h,jh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(kd())for(var l in sh)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=kd()?!!sh[m]:ld(m);c=k;l='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",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(w(Gc));
596
596
  k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=kd()?Oc(m)?!0:cb(m)||(ac(m)?!0:!1):ld(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=mn;for(g in f)e[g]=f[g]();return h.return(e)})};
597
597
  V.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||pd("Trident/"))return!1;var a=yd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:kd()?!0:ld("application/x-mpegurl")};V.setAdManagerFactory=function(a){Ql=a};
598
- V.registerSupportPlugin=function(a,b){mn[a]=b};V.prototype.destroy=V.prototype.destroy;var Wl=0,Ml=1,zm=2,Nm=3;V.LoadMode={DESTROYED:Wl,NOT_LOADED:Ml,MEDIA_SOURCE:zm,SRC_EQUALS:Nm};V.version="v4.6.13";var nn=["4","6"];pe=new function(a){this.g=a;this.i=qe;this.h=re}(new ne(Number(nn[0]),Number(nn[1])));var ln=["output-restricted","internal-error"],mn={},Ql=null;function on(){this.h=[];this.j=this.i=this.g=0};function pn(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 rf;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=pn.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
598
+ V.registerSupportPlugin=function(a,b){mn[a]=b};V.prototype.destroy=V.prototype.destroy;var Wl=0,Ml=1,zm=2,Nm=3;V.LoadMode={DESTROYED:Wl,NOT_LOADED:Ml,MEDIA_SOURCE:zm,SRC_EQUALS:Nm};V.version="v4.6.15";var nn=["4","6"];pe=new function(a){this.g=a;this.i=qe;this.h=re}(new ne(Number(nn[0]),Number(nn[1])));var ln=["output-restricted","internal-error"],mn={},Ql=null;function on(){this.h=[];this.j=this.i=this.g=0};function pn(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 rf;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=pn.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
599
599
  r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
600
600
  r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.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)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
601
601
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
602
602
  r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};N("shaka.ads.ClientSideAd",pn);pn.prototype.release=pn.prototype.release;
603
603
  pn.prototype.getPodIndex=pn.prototype.getPodIndex;pn.prototype.getTimeOffset=pn.prototype.getTimeOffset;pn.prototype.getMediaUrl=pn.prototype.getMediaUrl;pn.prototype.getAdvertiserName=pn.prototype.getAdvertiserName;pn.prototype.getCreativeAdId=pn.prototype.getCreativeAdId;pn.prototype.getAdId=pn.prototype.getAdId;pn.prototype.getVastMediaWidth=pn.prototype.getVastMediaWidth;pn.prototype.getVastMediaHeight=pn.prototype.getVastMediaHeight;pn.prototype.getVastMediaBitrate=pn.prototype.getVastMediaBitrate;
604
604
  pn.prototype.getDescription=pn.prototype.getDescription;pn.prototype.getTitle=pn.prototype.getTitle;pn.prototype.getPositionInSequence=pn.prototype.getPositionInSequence;pn.prototype.getSequenceLength=pn.prototype.getSequenceLength;pn.prototype.setMuted=pn.prototype.setMuted;pn.prototype.resize=pn.prototype.resize;pn.prototype.isLinear=pn.prototype.isLinear;pn.prototype.isMuted=pn.prototype.isMuted;pn.prototype.setVolume=pn.prototype.setVolume;pn.prototype.getVolume=pn.prototype.getVolume;
605
- pn.prototype.play=pn.prototype.play;pn.prototype.pause=pn.prototype.pause;pn.prototype.skip=pn.prototype.skip;pn.prototype.canSkipNow=pn.prototype.canSkipNow;pn.prototype.getTimeUntilSkippable=pn.prototype.getTimeUntilSkippable;pn.prototype.isSkippable=pn.prototype.isSkippable;pn.prototype.isPaused=pn.prototype.isPaused;pn.prototype.getRemainingTime=pn.prototype.getRemainingTime;pn.prototype.getMinSuggestedDuration=pn.prototype.getMinSuggestedDuration;pn.prototype.getDuration=pn.prototype.getDuration;function qn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new rf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.13");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
605
+ pn.prototype.play=pn.prototype.play;pn.prototype.pause=pn.prototype.pause;pn.prototype.skip=pn.prototype.skip;pn.prototype.canSkipNow=pn.prototype.canSkipNow;pn.prototype.getTimeUntilSkippable=pn.prototype.getTimeUntilSkippable;pn.prototype.isSkippable=pn.prototype.isSkippable;pn.prototype.isPaused=pn.prototype.isPaused;pn.prototype.getRemainingTime=pn.prototype.getRemainingTime;pn.prototype.getMinSuggestedDuration=pn.prototype.getMinSuggestedDuration;pn.prototype.getDuration=pn.prototype.getDuration;function qn(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new rf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.15");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
606
606
  function(g){rn(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){sn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.ia(this.i,"play",function(){f.A=!0})}qn.prototype.configure=function(a){this.C=a};qn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Nk(this.o)};qn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
607
607
  function sn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new Q("ad-error",b));tn(a,null);a.m(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
608
608
  function rn(a,b){a.m(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(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.u);a.m(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -652,9 +652,9 @@ function Kn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
652
652
  r.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ye.prototype.release.call(this)};r.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new on};r.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};
653
653
  r.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};r.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new xn(a,b,c,function(e){return Ln(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new P(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new P(1,10,10004)):(d.l=new Oe,An(d,a,b),d.G=c||"",d.W=Date.now()/1E3,a=d.l);return a};
654
654
  r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Jn(a,b,this.m,function(d){return Ln(c,d)});this.g.configure(this.l)};
655
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.6.13";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
656
- (c.G=!0),c.j=new Oe,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ua('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.6.13";this.g.g.replaceAdTagParameters(a)};
657
- r.getServerSideCuePoints=function(){oe("AdManager","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
655
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.6.15";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
656
+ (c.G=!0),c.j=new Oe,c.g.requestStream(a),c.A=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ua('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.6.15";this.g.g.replaceAdTagParameters(a)};
657
+ r.getServerSideCuePoints=function(){oe("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
658
658
  r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
659
659
  function Ln(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)}N("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
660
660
  Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;
@@ -668,18 +668,18 @@ var Pn="ended play playing pause pausing ratechange seeked seeking timeupdate vo
668
668
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Un={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Vn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Wn=[["getConfiguration","configure"]],Xn=[["isTextTrackVisible","setTextTrackVisibility"]],Yn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
669
669
  Zn=["attach","attachCanvas","detach","load","unload"];function $n(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.j=new jd(b);this.O=c;this.u=!1;this.s=d;this.F=e;this.I=f;this.h=this.m=!1;this.J="";this.o=null;this.A=function(){return ao(h)};this.C=function(k,l){k=Nn(l);switch(k.type){case "event":var m=k.targetName,n=We(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.O(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new P(q.severity,q.category,
670
670
  q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;bo.add(this)}r=$n.prototype;r.destroy=function(){bo.delete(this);co(this);eo&&fo(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.Ia=function(){return this.h};r.$e=function(){return this.J};
671
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.lc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(bo),d=c.next();!d.done;d=c.next())go(d.value,b)},function(b){for(var c=t(bo),d=c.next();!d.done;d=c.next())d=d.value,ho="available"==b,d.j.lc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ho&&this.j.U(io);(a=eo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
671
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.nc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(bo),d=c.next();!d.done;d=c.next())go(d.value,b)},function(b){for(var c=t(bo),d=c.next();!d.done;d=c.next())d=d.value,ho="available"==b,d.j.nc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ho&&this.j.U(io);(a=eo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
672
672
  go(this,a):eo=null}else window.__onGCastApiAvailable!==jo&&(ko=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=jo)};r.gf=function(a){this.o=a;this.h&&lo(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new P(1,8,8E3);if(!ho)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Oe;chrome.cast.requestSession(function(d){return mo(b,a,d)},function(d){return no(b,d)});return C(c,b.l,0)})};
673
673
  function oo(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return mo(a,b,c)},function(c){return no(a,c)})}}r.Zb=function(){if(this.h){co(this);if(eo){fo(this);try{eo.stop(function(){},function(){})}catch(a){}eo=null}ao(this)}};
674
674
  r.get=function(a,b){var c=this;if("video"==a){if(Sn.includes(b))return function(){return c.Zf.apply(c,[a,b].concat(w(Ha.apply(0,arguments))))}}else if("player"==a){if(Vn[b]&&!this.get("player","isLive")())return function(){};if(Yn.includes(b))return function(){return c.Zf.apply(c,[a,b].concat(w(Ha.apply(0,arguments))))};if(Zn.includes(b))return function(){return c.Bh.apply(c,[a,b].concat(w(Ha.apply(0,arguments))))};if(Tn[b]||Un[b])return function(){return c.g[a][b]}}return this.g[a][b]};
675
675
  r.set=function(a,b,c){this.g[a][b]=c;lo(this,{type:"set",targetName:a,property:b,value:c})};function mo(a,b,c){eo=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);ao(a);lo(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function no(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}
676
676
  r.Zf=function(a,b){lo(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Bh=function(a,b){var c=Ha.apply(2,arguments),d=new Oe,e=this.H.toString();this.H++;this.i[e]=d;try{lo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function go(a,b){var c=a.I();a.l=new Oe;a.u=!0;mo(a,c,b)}function fo(a){var b=eo;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
677
- function ao(a){var b=eo?"connected"==eo.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};co(a)}a.h=b;a.J=b?eo.receiver.friendlyName:"";a.j.lc()}function co(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function lo(a,b){b=Mn(b);var c=eo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)}catch(d){throw b=new P(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.Zb(),b;}}var io=.02,ho=!1,eo=null,ko=null,bo=new Set;
677
+ function ao(a){var b=eo?"connected"==eo.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};co(a)}a.h=b;a.J=b?eo.receiver.friendlyName:"";a.j.nc()}function co(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function lo(a,b){b=Mn(b);var c=eo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)}catch(d){throw b=new P(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.Zb(),b;}}var io=.02,ho=!1,eo=null,ko=null,bo=new Set;
678
678
  function jo(a){ko?window.__onGCastApiAvailable=ko:delete window.__onGCastApiAvailable;ko=null;if(a)for(var b=t(bo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function po(a,b,c,d){d=void 0===d?!1:d;Ye.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.A=d;this.u=new Map;this.g=new $n(c,function(){return qo(e)},function(){return ro(e)},function(f,g){return so(e,f,g)},function(){return to(e)},function(){return uo(e)},d);vo(this)}pa(po,Ye);r=po.prototype;
679
679
  r.destroy=function(a){a&&this.g.Zb();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.s=this.l=this.i=null;Ye.prototype.release.call(this);return Promise.all(a)};r.ah=function(){return this.l};r.Sg=function(){return this.s};r.vg=function(){return this.g.m&&ho};r.Ia=function(){return this.g.Ia()};r.$e=function(){return this.g.$e()};
680
- r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=uo(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.mc(),0):c.return()})};r.gf=function(a){this.g.gf(a)};r.Ph=function(){oo(this.g)};r.Zb=function(){this.g.Zb()};
680
+ r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=uo(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.oc(),0):c.return()})};r.gf=function(a){this.g.gf(a)};r.Ph=function(){oo(this.g)};r.Zb=function(){this.g.Zb()};
681
681
  r.wg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.C&&b==c.A)return d.return();c.C=a;c.A=b;c.g.Zb();return C(d,c.g.destroy(),2)}c.g=null;c.g=new $n(a,function(){return qo(c)},function(){return ro(c)},function(e,f){return so(c,e,f)},function(){return to(c)},function(){return uo(c)},b);c.g.init();E(d)})};
682
- function vo(a){a.g.init();a.m=new rf;for(var b=t(Pn),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ia()||(f=We(f),a.j.dispatchEvent(f))});for(var d in Xe)a.m.D(a.h,Xe[d],function(f){a.g.Ia()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.rc=e,Object.defineProperty(a.l,b.rc,{configurable:!1,enumerable:!0,get:function(f){return function(){return wo(a,f.rc)}}(b),set:function(f){return function(g){var h=f.rc;a.g.Ia()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={rc:b.rc};a.s={};xo(a,
682
+ function vo(a){a.g.init();a.m=new rf;for(var b=t(Pn),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Ia()||(f=We(f),a.j.dispatchEvent(f))});for(var d in Xe)a.m.D(a.h,Xe[d],function(f){a.g.Ia()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.tc=e,Object.defineProperty(a.l,b.tc,{configurable:!1,enumerable:!0,get:function(f){return function(){return wo(a,f.tc)}}(b),set:function(f){return function(g){var h=f.tc;a.g.Ia()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={tc:b.tc};a.s={};xo(a,
683
683
  function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yo(a,f)}})});zo(a);a.j=new Ye;a.j.vd=a.l;a.o=new Ye;a.o.vd=a.s}function zo(a){var b=new Map;xo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
684
684
  function xo(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)}}
685
685
  function uo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Be(),startTime:null};a.i.pause();for(var c=t(Rn),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(Wn);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(Xn);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 qo(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
@@ -687,7 +687,7 @@ function ro(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
687
687
  function to(a){for(var b=t(Wn),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(Rn);for(d=c.next();!d.done;d=c.next())d=
688
688
  d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Rn),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Xn);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.fg(h);g&&a.h.ef(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new Q("error",l);a.h.dispatchEvent(l)})}
689
689
  function wo(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.Ia()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ia()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
690
- function yo(a,b){a.u.has(b)&&(b=a.u.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.Kb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.If()};
690
+ function yo(a,b){a.u.has(b)&&(b=a.u.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.Lb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.If()};
691
691
  if("setVideoContainer"==b)return function(c){return a.h.ig(c)};if(a.g.Ia()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ia()&&0==Object.keys(a.g.g.video).length&&(Tn[b]||Un[b])||!a.g.Ia()?a.h[b].bind(a.h):a.g.get("player",b)}
692
692
  function so(a,b,c){a.g.Ia()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}N("shaka.cast.CastProxy",po);po.prototype.changeReceiverId=po.prototype.wg;po.prototype.forceDisconnect=po.prototype.Zb;po.prototype.suggestDisconnect=po.prototype.Ph;po.prototype.setAppData=po.prototype.gf;po.prototype.cast=po.prototype.cast;po.prototype.receiverName=po.prototype.$e;po.prototype.isCasting=po.prototype.Ia;po.prototype.canCast=po.prototype.vg;po.prototype.getPlayer=po.prototype.Sg;
693
693
  po.prototype.getVideo=po.prototype.ah;po.prototype.destroy=po.prototype.destroy;function Ao(a,b,c,d){Ye.call(this);var e=this;this.g=a;this.h=b;this.j=new rf;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new jd(function(){Bo(e)});Co(this)}pa(Ao,Ye);r=Ao.prototype;r.isConnected=function(){return this.F};r.hh=function(){return this.o};r.Nh=function(a){this.i=a};r.zg=function(){this.i=null};
@@ -703,7 +703,7 @@ function Bo(a){a.G.U(No);for(var b={video:{},player:{}},c=t(Qn),d=c.next();!d.do
703
703
  1);Ko(a)}function Ko(a){return a.u&&(a.g.duration||a.h.P())?(Oo(a),a.u=!1,!0):!1}function Oo(a,b){var c={contentId:a.h.Be(),streamType:a.h.P()?"LIVE":"BUFFERED",contentType:""};a.h.P()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Lo(a,void 0===b?0:b,c)}
704
704
  function Go(a,b){var c=Nn(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;Mo(a,c.initState,c.appData);Bo(a);break;case "appData":a.C(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.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
705
705
  "player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Po(a,g,f,null)},function(h){return Po(a,g,f,h)})}}
706
- function Fo(a,b){var c=Nn(b.data);switch(c.type){case "PLAY":a.g.play();Lo(a);break;case "PAUSE":a.g.pause();Lo(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(),Lo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Lo(a));break;case "STOP":a.h.mc().then(function(){a.h&&Lo(a)});break;case "GET_STATUS":Oo(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));
706
+ function Fo(a,b){var c=Nn(b.data);switch(c.type){case "PLAY":a.g.play();Lo(a);break;case "PAUSE":a.g.pause();Lo(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(),Lo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Lo(a));break;case "STOP":a.h.oc().then(function(){a.h&&Lo(a)});break;case "GET_STATUS":Oo(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));
707
707
  null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Lo(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Oo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Eo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Eo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
708
708
  function Po(a,b,c,d){a.h&&Eo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Eo(a,b,c,d){a.F&&(a=Mn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Lo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Qo:a.h.Fe()?Ro:a.g.paused?So:To,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Eo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
709
709
  N("shaka.cast.CastReceiver",Ao);Ao.prototype.destroy=Ao.prototype.destroy;Ao.prototype.setContentArtist=Ao.prototype.Lh;Ao.prototype.setContentImage=Ao.prototype.Mh;Ao.prototype.setContentTitle=Ao.prototype.Oh;Ao.prototype.clearContentMetadata=Ao.prototype.zg;Ao.prototype.setContentMetadata=Ao.prototype.Nh;Ao.prototype.isIdle=Ao.prototype.hh;Ao.prototype.isConnected=Ao.prototype.isConnected;var No=.5,Jo=5,Qo="IDLE",To="PLAYING",Ro="BUFFERING",So="PAUSED";function Uo(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(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Vo(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){p=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
@@ -736,7 +736,7 @@ b).box("encv",Vf).box("sinf",Sf).box("frma",function(f){f=Uh(f.reader).ga;f in Z
736
736
  Xp.prototype.parse=function(a){var b=this;if(this.g==Yp)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Nf).box("moof",function(l){f=l.start;g=[];Sf(l)}).box("traf",Sf).N("trun",function(l){l=Qh(l.reader,l.version,l.flags);g.push(l)}).N("tfhd",function(l){l=Nh(l.reader,l.flags);d=l.Ef||b.h;e=l.Cg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).N("tfdt",function(l){h=Oh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Ua("Unable to find base media decode time for CEA captions!"),
737
737
  new P(2,2,2010);$p(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
738
738
  function $p(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.$f});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Bg);b.ha();){g=b.L();var q=b.da(),p=null;p=!1;h=1;switch(a.g){case aq:p=q&31;p=6==p;break;case bq:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].Rd||0),q=(c+q)/d,h=t(Wp(b.qb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
739
- c+(n[l].cf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",Xp);var Yp=0,aq=1,bq=2,Zp={avc1:aq,avc3:aq,hev1:bq,hvc1:bq,dvh1:bq,dvhe:bq};ub["video/mp4"]=function(){return new Xp};function cq(){}cq.prototype.init=function(){};cq.prototype.parse=function(a){var b=[];a=nb(a);if(!li(a))return b;a=(new fi).parse(a);var c=a.Lc(),d=a.Cd();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(Wp(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};N("shaka.cea.TsCeaParser",cq);ub["video/mp2t"]=function(){return new cq};function dq(a,b,c){var d=eq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new P(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.$c});if(1<f.length)throw new P(2,4,4050);f.length&&(g=fq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.$c?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.$c});f.length&&(a=gq(e,f,c,h),0==a.length&&(a=[yc("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
739
+ c+(n[l].cf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}N("shaka.cea.Mp4CeaParser",Xp);var Yp=0,aq=1,bq=2,Zp={avc1:aq,avc3:aq,hev1:bq,hvc1:bq,dvh1:bq,dvhe:bq};ub["video/mp4"]=function(){return new Xp};function cq(){}cq.prototype.init=function(){};cq.prototype.parse=function(a){var b=[];a=nb(a);if(!li(a))return b;a=(new fi).parse(a);var c=a.Nc(),d=a.Cd();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(Wp(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};N("shaka.cea.TsCeaParser",cq);ub["video/mp2t"]=function(){return new cq};function dq(a,b,c){var d=eq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new P(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.$c});if(1<f.length)throw new P(2,4,4050);f.length&&(g=fq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.$c?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.$c});f.length&&(a=gq(e,f,c,h),0==a.length&&(a=[yc("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
740
740
  c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(yc(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Df:h,Pi:e,drmInfos:a,ee:g,Hf:!0}}
741
741
  function hq(a,b,c,d){var e=dq(a,c,d);if(b.Hf){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.Hf=!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 P(2,4,4008);return e.Df||b.Df}
742
742
  function iq(a){var b=0,c=rb(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=nb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
@@ -756,7 +756,7 @@ function qq(a,b,c){b=sq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.val
756
756
  function tq(a,b,c,d,e,f){for(var g=kg(a,"http://www.w3.org/1999/xlink","href"),h=kg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Qe(new P(2,4,4028));if("onLoad"!=h)return Qe(new P(2,4,4027));var m=xc([d],[g]);return e.request(0,gf(m,b)).oa(function(n){n=Ag(n.data,a.tagName);if(!n)return Qe(new P(2,4,4001,g));
757
757
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var q=n.childNodes[0];n.removeChild(q);a.appendChild(q)}n=t(Array.from(n.attributes));for(q=n.next();!q.done;q=n.next())a.setAttributeNode(q.value.cloneNode(!1));return uq(a,b,c,m[0],e,f+1)})}
758
758
  function uq(a,b,c,d,e,f){f=void 0===f?0:f;if(kg(a,"http://www.w3.org/1999/xlink","href")){var g=tq(a,b,c,d,e,f);c&&(g=g.oa(void 0,function(){return uq(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==kg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(uq(k,b,c,d,e,f)));return Ue(g).oa(function(){return a})};function vq(a,b,c,d,e,f,g){var h,k=(new Nf).N("sidx",function(l){h=wq(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
759
- function wq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.jc(),m=g.reader.jc();g.reader.skip(2);var n=g.reader.Ca();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.L(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new P(2,3,3006);h.push(new R(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function xq(a){this.h=rb(a);this.g=new Kf(this.h,0)}xq.prototype.ha=function(){return this.g.ha()};
759
+ function wq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.Ca();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.L(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.L();g.reader.skip(4);if(1==p)throw new P(2,3,3006);h.push(new R(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function xq(a){this.h=rb(a);this.g=new Kf(this.h,0)}xq.prototype.ha=function(){return this.g.ha()};
760
760
  function yq(a){var b=zq(a);if(7<b.length)throw new P(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=zq(a);a:{d=t(Aq);for(var e=d.next();!e.done;e=d.next())if(lb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.pa();else{if(8==b.length&&b[1]&224)throw new P(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.pa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.pa();d=rb(a.h,a.g.pa(),b);a.g.skip(b);return new Bq(c,
761
761
  d)}function zq(a){var b=a.g.pa(),c=a.g.da();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return nb(a.h,b,c)}var Aq=[[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 Bq(a,b){this.id=a;this.g=b}
762
762
  function Cq(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(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 Dq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new xq(a.g);for(var n=null,q=null;a.ha();){var p=yq(a);if(187==p.id){var u=Eq(p);u&&(p=c*u.Sh,u=b+u.zh,null!=n&&m.push(new R(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new R(n+g,d+g,l,q,null,f,g,h,k));return m}
@@ -765,65 +765,64 @@ function Hq(a,b,c){var d=Number(qq(a,Iq,"presentationTimeOffset"))||0,e=qq(a,Iq,
765
765
  function Lq(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,y,z,x,A,B,D;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.yb||!a.$.Ge,l=a.$.start,m=a.$.duration,n=a.M.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.Y(),c.Oa,c.va,!0):null],q=null,C(F,Promise.all(u),2);v=F.h;y=v[0];z=v[1]||null;x=null;A=l-g;B=l;D=m?l+m:Infinity;if("mp4"==n)var J=vq(y,e,d,c,A,B,D);else{J=new xq(z);if(440786851!=yq(J).id)throw new P(2,3,3008);var G=yq(J);if(408125543!=G.id)throw new P(2,3,3009);
766
766
  J=G.g.byteOffset;G=new xq(G.g);for(var H=null;G.ha();){var I=yq(G);if(357149030==I.id){H=I;break}}if(!H)throw new P(2,3,3010);H=new xq(H.g);I=1E6;for(G=null;H.ha();){var L=yq(H);if(2807729==L.id)I=Cq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);H=I/1E9;G*=H;I=yq(new xq(y));if(475249515!=I.id)throw new P(2,3,3007);J=Dq(I,J,H,G,d,c,A,B,D)}x=J;h.Vc(x);p=new xj(x);k&&p.Yb(B,D,
767
767
  !0);return F.return(p)})}function Iq(a){return a.bd}function Kq(a){var b=rq(a,Iq,"RepresentationIndex");a=qq(a,Iq,"indexRange");a=rg(a||"");b&&(a=og(b,"range",rg,a));return a}function Jq(a,b){Mq(a,b);if(!Kq(a))throw new P(2,4,4002);}function Mq(a,b){var c=a.M.mimeType.split("/")[1];if(a.M.contentType!=Cc&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
768
- function Gq(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.Od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Nq(a,b,c){var d=Fq(a,Oq,c),e=Pq(a);if(!e.xa&&!e.timeline&&1<e.fc.length)throw new P(2,4,4002);if(!e.xa&&!a.$.duration&&!e.timeline&&1==e.fc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.sa.id&&a.M.id&&(g=b[a.sa.id+","+a.M.id])&&(f=g.segmentIndex);var h=Qq(a.$.start,a.$.duration,a.M.bb,e,d,c);b=!f;f?f.Uc(h,a.presentationTimeline.cb()):f=new xj(h);a.presentationTimeline.Vc(h);a.yb&&a.$.Ge||f.Yb(a.$.start,a.$.duration?a.$.start+a.$.duration:
769
- Infinity,b);g&&(g.segmentIndex=f);return{$b:function(){f&&0!=f.Lb()||f.Ld(h);return Promise.resolve(f)}}}function Oq(a){return a.Cb}function Pq(a){var b=Rq(a);a=pq(a,Oq);var c=a.dd;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,dd:c,rb:a.rb,timeline:a.timeline,fc:b}}
770
- function Qq(a,b,c,d,e,f){var g=d.fc.length;d.timeline&&d.timeline.length!=d.fc.length&&(g=Math.min(d.timeline.length,d.fc.length));for(var h=a-d.rb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={zc:n.zc,vc:n.vc},q++){n.vc=d.fc[q];var p=void 0;p=null!=d.xa?m+d.xa:d.timeline?d.timeline[q].end:m+b;n.zc=null;l.push(new R(a+m,a+p,function(u){return function(){null==u.zc&&(u.zc=xc(c(),[u.vc.rh]));return u.zc}}(n),n.vc.start,n.vc.end,e,h,a,k,[],"",null,null,zh,f));m=p}return l}
771
- function Rq(a){return[a.M.Cb,a.na.Cb,a.sa.Cb].filter(Xc).map(function(b){return gg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Nf&&(a.Nf=!0);var c=b.getAttribute("media");b=og(b,"mediaRange",rg,{start:0,end:null});return{rh:c,start:b.start,end:b.end}})};function Sq(a,b,c,d,e,f,g){var h=Tq(a,g),k=Uq(a);Vq(k);var l=$e(a);if(k.Sc)return Mq(a,h),{$b:function(){var u=oq(k.Sc,l.M.id,null,null,l.bandwidth||null,null);u=xc(l.M.bb(),[u]);return Lq(l,b,h,u,0,null,k.rb)}};if(k.xa)return d||"image"===a.na.contentType||(a.presentationTimeline.Te(k.xa),a.presentationTimeline.Nd(a.$.start)),{$b:function(){return Wq(l,k,e,h,f,g)}};var m=null;d=d=null;a.sa.id&&a.M.id&&(d=a.sa.id+","+a.M.id,d=c[d])&&(m=d.segmentIndex);var n=a.$.start,q=a.$.duration?n+a.$.duration:
772
- Infinity,p=!(a.yb&&a.$.Ge);m?(c=m,Xq(c,k,n,q,p,h),c.ab(a.presentationTimeline.cb())):m=new Yq(k,a.M.id,a.bandwidth,a.M.bb,n,q,h,p,g,a.M.df);k.timeline&&"image"!==a.na.contentType&&a.presentationTimeline.Wf(k.timeline,n);d&&a.yb&&(d.segmentIndex=m);return{$b:function(){m instanceof Yq&&0==m.Lb()&&Xq(m,k,n,q,p,h);return Promise.resolve(m)}}}function Zq(a){return a.cd}
773
- function Uq(a){var b=pq(a,Zq),c=qq(a,Zq,"media");a=qq(a,Zq,"index");return{xa:b.xa,timescale:b.timescale,dd:b.dd,rb:b.rb,tf:b.tf,timeline:b.timeline,hc:c,Sc:a}}function Vq(a){var b=a.Sc?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Sc&&(a.timeline=null),a.xa=null);if(!a.Sc&&!a.hc)throw new P(2,4,4002);}
774
- function Wq(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.rb,O=L+m;L=O+p;var S=Math.min(L,k());O=new R(O,S,function(){var ca=M*v;"BigInt"in window&&ca>Number.MAX_SAFE_INTEGER&&(ca=BigInt(M)*BigInt(v));ca=oq(y,x,I,null,z,ca);return xc(A(),[ca])},0,null,d,B,m,k(),[],"",null,null,zh,f);O.i=L;return O}function h(){var I=[Math.max(l.cb(),m),Math.min(l.zb(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||q;
775
- return I?m+I:Infinity}var l=a.presentationTimeline,m=a.$.start,n=a.sa.id,q=a.$.duration,p=b.xa,u=b.dd,v=b.timescale,y=b.hc,z=a.bandwidth||null,x=a.M.id,A=a.M.bb,B=m-b.rb,D=h();a=a.yb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new xj(c);c=l.zb()<k();F=l.P();if(c||F){var H=Math.max(a,D+1);G.Td(p,function(){var I=l.cb();G.ab(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var O=g(H);M.push(O);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
776
- function Tq(a,b){var c=qq(a,Zq,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.bb;return new xh(function(){var g=oq(c,d,null,null,e,null);return xc(f(),[g])},0,null,Gq(a),null,null,b)}function Yq(a,b,c,d,e,f,g,h,k,l){xj.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.m=f;this.s=g;this.u=k;this.G=l;h&&$q(this)}pa(Yq,xj);r=Yq.prototype;r.Lb=function(){return this.h?this.h.timeline.length:0};r.release=function(){xj.prototype.release.call(this);this.h=null};
777
- r.ab=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.Lb()&&this.release())}};function Xq(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.hc=b.hc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.m!==d&&(a.m=d)}else a.h=b,a.i=c,a.m=d;e&&$q(a)}
778
- function $q(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.ab(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}}
779
- r.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.m)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=e.end+this.i;d<c&&(e=b[d+1].start+this.i);if(a>=f&&a<e)return d+this.j}return null};
780
- r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.Lb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.hc,e=this.h.timeline[a],f=e.Jh,g=this.h.tf+e.uf;c=this.i-this.h.rb;for(var h=[],k=(e.end-e.start)/e.eb,l={},m=0;m<e.eb;l={Ac:l.Ac,ae:l.ae},m++){var n=e.start+k*m,q=n+k;l.ae=m+1;l.Ac=null;n=new R(this.i+n,this.i+q,function(p){return function(){if(!b.h)return[];null==p.Ac&&(p.Ac=ar(b.h.hc,b.F,f,b.A,g,p.ae,b.C));return p.Ac}}(l),0,null,this.s,c,this.i,this.m,[],"",null,null,zh,this.u);
781
- 0==this.G?0<m&&n.Jd():0!=m%this.G&&n.Jd();h.push(n)}c=new R(this.i+e.start,this.i+e.end,function(){return 0<e.eb?[]:ar(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.m,h,"",null,null,zh,this.u,0<e.eb);this.g[a]=c}return c};function ar(a,b,c,d,e,f,g){a=oq(a,b,c,f,d||null,e);return xc(g(),[a]).map(function(h){return h.toString()})};function br(a){this.o=null;this.u=a;this.G=new af;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}br.prototype.configure=function(a){this.o=a};br.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};br.prototype.setManifestType=function(a){this.s=a};
768
+ function Gq(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.Od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Nq(a,b,c){var d=Fq(a,Oq,c),e=Pq(a);if(!e.xa&&!e.timeline&&1<e.ic.length)throw new P(2,4,4002);if(!e.xa&&!a.$.duration&&!e.timeline&&1==e.ic.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.sa.id&&a.M.id&&(g=b[a.sa.id+","+a.M.id])&&(f=g.segmentIndex);var h=Qq(a.$.start,a.$.duration,a.M.bb,e,d,c);b=!f;f?f.Uc(h,a.presentationTimeline.cb()):f=new xj(h);a.presentationTimeline.Vc(h);a.yb&&a.$.Ge||f.Yb(a.$.start,a.$.duration?a.$.start+a.$.duration:
769
+ Infinity,b);g&&(g.segmentIndex=f);return{$b:function(){f&&0!=f.zb()||f.Ld(h);return Promise.resolve(f)}}}function Oq(a){return a.Db}function Pq(a){var b=Rq(a);a=pq(a,Oq);var c=a.dd;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,dd:c,rb:a.rb,timeline:a.timeline,ic:b}}
770
+ function Qq(a,b,c,d,e,f){var g=d.ic.length;d.timeline&&d.timeline.length!=d.ic.length&&(g=Math.min(d.timeline.length,d.ic.length));for(var h=a-d.rb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},q=0;q<g;n={Bc:n.Bc,xc:n.xc},q++){n.xc=d.ic[q];var p=void 0;p=null!=d.xa?m+d.xa:d.timeline?d.timeline[q].end:m+b;n.Bc=null;l.push(new R(a+m,a+p,function(u){return function(){null==u.Bc&&(u.Bc=xc(c(),[u.xc.rh]));return u.Bc}}(n),n.xc.start,n.xc.end,e,h,a,k,[],"",null,null,zh,f));m=p}return l}
771
+ function Rq(a){return[a.M.Db,a.na.Db,a.sa.Db].filter(Xc).map(function(b){return gg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Nf&&(a.Nf=!0);var c=b.getAttribute("media");b=og(b,"mediaRange",rg,{start:0,end:null});return{rh:c,start:b.start,end:b.end}})};function Sq(a,b,c,d,e,f,g){var h=Tq(a,g),k=Uq(a);Vq(k);var l=$e(a);if(k.Sc)return Mq(a,h),{$b:function(){var u=oq(k.Sc,l.M.id,null,null,l.bandwidth||null,null);u=xc(l.M.bb(),[u]);return Lq(l,b,h,u,0,null,k.rb)}};if(k.xa)return d||"image"===a.na.contentType||(a.presentationTimeline.Te(k.xa),a.presentationTimeline.Nd(a.$.start)),{$b:function(){return Wq(l,k,e,h,f,g)}};var m=null;d=d=null;a.sa.id&&a.M.id&&(d=a.sa.id+","+a.M.id,d=c[d])&&(m=d.segmentIndex);var n=a.$.start,q=a.$.duration?n+a.$.duration:
772
+ Infinity,p=!(a.yb&&a.$.Ge);m?(c=m,Xq(c,k,n,q,p,h),c.ab(a.presentationTimeline.cb())):m=new Yq(k,a.M.id,a.bandwidth,a.M.bb,n,q,h,p,g,a.M.df);k.timeline&&"image"!==a.na.contentType&&a.presentationTimeline.Wf(k.timeline,n);d&&a.yb&&(d.segmentIndex=m);return{$b:function(){m instanceof Yq&&0==m.zb()&&Xq(m,k,n,q,p,h);return Promise.resolve(m)}}}function Zq(a){return a.cd}
773
+ function Uq(a){var b=pq(a,Zq),c=qq(a,Zq,"media");a=qq(a,Zq,"index");return{xa:b.xa,timescale:b.timescale,dd:b.dd,rb:b.rb,tf:b.tf,timeline:b.timeline,jc:c,Sc:a}}function Vq(a){var b=a.Sc?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Sc&&(a.timeline=null),a.xa=null);if(!a.Sc&&!a.jc)throw new P(2,4,4002);}
774
+ function Wq(a,b,c,d,e,f){function g(I){var L=(I-u)*p,M=L+b.rb,O=L+m;L=O+p;var S=Math.min(L,k());O=new R(O,S,function(){var ca=M*v;"BigInt"in window&&ca>Number.MAX_SAFE_INTEGER&&(ca=BigInt(M)*BigInt(v));ca=oq(y,x,I,null,z,ca);return xc(A(),[ca])},0,null,d,B,m,k(),[],"",null,null,zh,f);O.i=L;return O}function h(){var I=[Math.max(l.cb(),m),Math.min(l.Ab(),k())].map(function(L){return L-m});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(L){return L+u})}function k(){var I=null!=n&&e[n]||q;
775
+ return I?m+I:Infinity}var l=a.presentationTimeline,m=a.$.start,n=a.sa.id,q=a.$.duration,p=b.xa,u=b.dd,v=b.timescale,y=b.jc,z=a.bandwidth||null,x=a.M.id,A=a.M.bb,B=m-b.rb,D=h();a=a.yb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var F=a;F<=D;++F){var J=g(F);c.push(J)}var G=new xj(c);c=l.Ab()<k();F=l.P();if(c||F){var H=Math.max(a,D+1);G.Td(p,function(){var I=l.cb();G.ab(I);var L=t(h());L.next();L=L.next().value;for(var M=[];H<=L;){var O=g(H);M.push(O);H++}return I>k()&&!M.length?null:M})}return Promise.resolve(G)}
776
+ function Tq(a,b){var c=qq(a,Zq,"initialization");if(!c)return null;var d=a.M.id,e=a.bandwidth||null,f=a.M.bb;return new xh(function(){var g=oq(c,d,null,null,e,null);return xc(f(),[g])},0,null,Gq(a),null,null,b)}function Yq(a,b,c,d,e,f,g,h,k,l){xj.call(this,[]);this.h=a;this.F=b;this.A=c;this.C=d;this.i=e;this.l=f;this.s=g;this.u=k;this.G=l;h&&$q(this)}pa(Yq,xj);r=Yq.prototype;r.zb=function(){return this.h?this.h.timeline.length:0};r.release=function(){xj.prototype.release.call(this);this.h=null};
777
+ r.ab=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.zb()&&this.release())}};function Xq(a,b,c,d,e,f){a.s=f;if(a.h){c=a.h.timeline;a.h.jc=b.jc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&$q(a)}
778
+ function $q(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.ab(a.i)}}r.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};
779
+ r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.zb()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.jc,e=this.h.timeline[a],f=e.Jh,g=this.h.tf+e.uf;c=this.i-this.h.rb;var h=this.i+e.end,k=h;a===this.zb()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.eb,n={},q=0;q<e.eb;n={Cc:n.Cc,ae:n.ae},q++){var p=e.start+m*q,u=p+m;n.ae=q+1;n.Cc=null;p=new R(this.i+p,this.i+u,function(v){return function(){if(!b.h)return[];null==v.Cc&&(v.Cc=ar(b.h.jc,b.F,f,b.A,g,v.ae,b.C));return v.Cc}}(n),
780
+ 0,null,this.s,c,this.i,this.l,[],"",null,null,zh,this.u);0==this.G?0<q&&p.Jd():0!=q%this.G&&p.Jd();l.push(p)}c=new R(this.i+e.start,k,function(){return 0<e.eb?[]:ar(d,b.F,f,b.A,g,null,b.C)},0,null,this.s,c,this.i,this.l,l,"",null,null,zh,this.u,0<e.eb);c.i=h;this.g[a]=c}return c};function ar(a,b,c,d,e,f,g){a=oq(a,b,c,f,d||null,e);return xc(g(),[a]).map(function(h){return h.toString()})};function br(a){this.o=null;this.u=a;this.G=new af;this.j=[];this.h=null;this.m=[];this.A=null;this.F=[];this.C=300;this.l=new Map;this.i=new Map;this.g=null;this.s="UNKNOWN"}br.prototype.configure=function(a){this.o=a};br.prototype.destroy=function(){this.u=this.o=null;this.j=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};br.prototype.setManifestType=function(a){this.s=a};
782
781
  function cr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=xc(a.j,[dr(a,b)]),d=gf(c,a.o.retryParameters),e=a.u.networkingEngine.request(8,d),bf(a.G,e),ta(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=Df(f.data),h=JSON.parse(g),1==h.VERSION&&er(a,h,f.uri),wa(l,0);if((k=xa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new jd(function(){cr(a,b)});a.g.U(a.C);E(l)})}
783
782
  function dr(a,b){if(!a.m.length)return b;b=new gc(b);var c=a.A||a.m[0],d=Math.round(a.u.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));vc(e)&&kc(b,e);return b.toString()}function er(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new jd(function(){cr(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
784
783
  function fr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
785
- function gr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={Fb:d.Fb},f=e.next())if(d.Fb=f.value,f=b.get(d.Fb))c.push({Ze:d.Fb,location:f});else if(f=a.F.find(function(h){return function(k){return k.ii==h.Fb}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].mg?(g=new gc(g),ic(g,f["URI-REPLACEMENT"].mg),c.push({Ze:d.Fb,location:g.toString()})):c.push({Ze:d.Fb,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
784
+ function gr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={Gb:d.Gb},f=e.next())if(d.Gb=f.value,f=b.get(d.Gb))c.push({Ze:d.Gb,location:f});else if(f=a.F.find(function(h){return function(k){return k.ii==h.Gb}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].mg?(g=new gc(g),ic(g,f["URI-REPLACEMENT"].mg),c.push({Ze:d.Gb,location:g.toString()})):c.push({Ze:d.Gb,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
786
785
  a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new gc(h.location)).lb))return!1;return!0});c.length&&(a.A=c[0].Ze);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.A=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return xc(a.j,c)};function hr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}r=hr.prototype;r.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=[]};r.$g=function(){return this.j};r.De=function(){return this.l.slice()};r.Lg=function(){return this.i};
787
786
  r.Af=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,O,S,ca,W,da,Ba,Sa,xb;return K(function(db){if(1==db.g){h=Dc;ir(a);if(!b&&1==a.length)return k=a[0],g.h=k.audioStreams,g.g=k.videoStreams,g.l=k.textStreams,g.i=k.imageStreams,db.B(2);l=-1;for(m=0;m<a.length;m++)n=a[m],g.m.has(n.id)||(g.m.add(n.id),-1==l&&(l=m));if(-1==l)return db.return();for(var Tb=[],ua=[],eb=[],$a=[],yb=t(a),ab=yb.next();!ab.done;ab=yb.next())ab=ab.value,Tb.push(ab.audioStreams),ua.push(ab.videoStreams),
788
- eb.push(ab.textStreams),$a.push(ab.imageStreams);c=Tb;d=ua;e=eb;f=$a;q=c;p=d;u=e;v=f;y=t(u);for(z=y.next();!z.done;z=y.next())x=z.value,x.push(jr(h.ja));A=t(v);for(B=A.next();!B.done;B=A.next())D=B.value,D.push(jr(h.Cc));return C(db,Promise.all([kr(g.h,q,l,lr,mr),kr(g.g,p,l,lr,mr),kr(g.l,u,l,lr,mr),kr(g.i,v,l,lr,mr)]),2)}F=0;J=[];if(g.g.length&&g.h.length)for(O=t(g.h),S=O.next();!S.done;S=O.next())for(ca=S.value,W=t(g.g),da=W.next();!da.done;da=W.next())Ba=da.value,Sa=oh(ca.drmInfos,Ba.drmInfos),
787
+ eb.push(ab.textStreams),$a.push(ab.imageStreams);c=Tb;d=ua;e=eb;f=$a;q=c;p=d;u=e;v=f;y=t(u);for(z=y.next();!z.done;z=y.next())x=z.value,x.push(jr(h.ja));A=t(v);for(B=A.next();!B.done;B=A.next())D=B.value,D.push(jr(h.Ec));return C(db,Promise.all([kr(g.h,q,l,lr,mr),kr(g.g,p,l,lr,mr),kr(g.l,u,l,lr,mr),kr(g.i,v,l,lr,mr)]),2)}F=0;J=[];if(g.g.length&&g.h.length)for(O=t(g.h),S=O.next();!S.done;S=O.next())for(ca=S.value,W=t(g.g),da=W.next();!da.done;da=W.next())Ba=da.value,Sa=nh(ca.drmInfos,Ba.drmInfos),
789
788
  ca.drmInfos.length&&Ba.drmInfos.length&&!Sa.length||(xb=F++,J.push({id:xb,language:ca.language,disabledUntilTime:0,primary:ca.primary,audio:ca,video:Ba,bandwidth:(ca.bandwidth||0)+(Ba.bandwidth||0),drmInfos:Sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=g.g.length?g.g:g.h,H=t(G),I=H.next();!I.done;I=H.next())L=I.value,M=F++,J.push({id:M,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L.type==h.R?L:null,video:L.type==h.fa?L:null,bandwidth:L.bandwidth||
790
789
  0,drmInfos:L.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});g.j=J;E(db)})};
791
790
  function ir(a){a=t(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.videoStreams=nr(b.videoStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.width===d.width&&c.frameRate===d.frameRate&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.label===d.label&&Ab(c.roles,d.roles)&&Bf(c.closedCaptions,d.closedCaptions)&&c.bandwidth===d.bandwidth}),b.audioStreams=nr(b.audioStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.channelsCount===d.channelsCount&&
792
791
  c.language===d.language&&c.bandwidth===d.bandwidth&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&Ab(c.roles,d.roles)&&c.audioSamplingRate===d.audioSamplingRate&&c.primary===d.primary}),b.textStreams=nr(b.textStreams,function(c,d){return c.id!==d.id&&c.language===d.language&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.bandwidth===d.bandwidth&&Ab(c.roles,d.roles)}),b.imageStreams=nr(b.imageStreams,function(c,d){return c.id!==d.id&&c.width===d.width&&c.codecs===
793
792
  d.codecs&&c.mimeType===d.mimeType})}function nr(a,b){var c=[],d={};a=t(a);for(var e=a.next();!e.done;d={ld:d.ld},e=a.next())d.ld=e.value,c.some(function(f){return function(g){return b(f.ld,g)}}(d))||c.push(d.ld);return c}
794
- function or(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L;return K(function(M){switch(M.g){case 1:b=Dc;if(1==a.length)return M.return(a[0]);c=a.map(function(O){return O.filter(function(S){return S.type==b.R})});d=a.map(function(O){return O.filter(function(S){return S.type==b.fa})});e=a.map(function(O){return O.filter(function(S){return S.type==b.ja})});f=a.map(function(O){return O.filter(function(S){return S.type==b.Cc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(pr(b.ja));
795
- l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(pr(b.Cc));return C(M,kr([],c,0,qr,rr),2);case 2:return q=M.h,C(M,kr([],d,0,qr,rr),3);case 3:return p=M.h,C(M,kr([],e,0,qr,rr),4);case 4:return u=M.h,C(M,kr([],f,0,qr,rr),5);case 5:v=M.h;y=0;if(p.length&&q.length)for(D=t(q),F=D.next();!F.done;F=D.next())for(J=F.value,G=t(p),H=G.next();!H.done;H=G.next())I=H.value,L=y++,I.variantIds.push(L),J.variantIds.push(L);else for(z=p.concat(q),x=t(z),A=x.next();!A.done;A=x.next())B=A.value,B.variantIds=
793
+ function or(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L;return K(function(M){switch(M.g){case 1:b=Dc;if(1==a.length)return M.return(a[0]);c=a.map(function(O){return O.filter(function(S){return S.type==b.R})});d=a.map(function(O){return O.filter(function(S){return S.type==b.fa})});e=a.map(function(O){return O.filter(function(S){return S.type==b.ja})});f=a.map(function(O){return O.filter(function(S){return S.type==b.Ec})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(pr(b.ja));
794
+ l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(pr(b.Ec));return C(M,kr([],c,0,qr,rr),2);case 2:return q=M.h,C(M,kr([],d,0,qr,rr),3);case 3:return p=M.h,C(M,kr([],e,0,qr,rr),4);case 4:return u=M.h,C(M,kr([],f,0,qr,rr),5);case 5:v=M.h;y=0;if(p.length&&q.length)for(D=t(q),F=D.next();!F.done;F=D.next())for(J=F.value,G=t(p),H=G.next();!H.done;H=G.next())I=H.value,L=y++,I.variantIds.push(L),J.variantIds.push(L);else for(z=p.concat(q),x=t(z),A=x.next();!A.done;A=x.next())B=A.value,B.variantIds=
796
795
  [y++];return M.return(p.concat(q).concat(u).concat(v))}})}
797
796
  function kr(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H;return K(function(I){switch(I.g){case 1:f=Dc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){I.B(4);break}m=l.value;return C(I,sr(m,b,c,e,g),5);case 5:n=I.h;if(!n)throw new P(2,4,4037);l=k.next();I.B(2);break;case 4:q=t(g);for(p=q.next();!p.done;p=q.next())for(u=p.value,v=t(u),y=v.next();!y.done;y=v.next())z=y.value,(x=tr(z,b,d,e,g))&&a.push(x);A=t(g);for(p=A.next();!p.done;p=
798
- A.next())for(B=p.value,D={},F=t(B),y=F.next();!y.done;D={wb:D.wb},y=F.next())if(D.wb=y.value,J=D.wb.type==f.ja&&!D.wb.language,G=D.wb.type==f.Cc&&!D.wb.tilesLayout,!J&&!G&&(H=a.some(function(L){return function(M){return M.mimeType==L.wb.mimeType&&Jc(M.codecs)==Jc(L.wb.codecs)}}(D))))throw new P(2,4,4037);return I.return(a)}})}function sr(a,b,c,d,e){return K(function(f){if(1==f.g)return ur(b,a),a.matchedStreams?a.segmentIndex?C(f,vr(a,c),2):f.B(2):f.return(!1);wr(a,c,d,e);return f.return(!0)})}
797
+ A.next())for(B=p.value,D={},F=t(B),y=F.next();!y.done;D={wb:D.wb},y=F.next())if(D.wb=y.value,J=D.wb.type==f.ja&&!D.wb.language,G=D.wb.type==f.Ec&&!D.wb.tilesLayout,!J&&!G&&(H=a.some(function(L){return function(M){return M.mimeType==L.wb.mimeType&&Jc(M.codecs)==Jc(L.wb.codecs)}}(D))))throw new P(2,4,4037);return I.return(a)}})}function sr(a,b,c,d,e){return K(function(f){if(1==f.g)return ur(b,a),a.matchedStreams?a.segmentIndex?C(f,vr(a,c),2):f.B(2):f.return(!1);wr(a,c,d,e);return f.return(!0)})}
799
798
  function vr(a,b){var c,d,e,f,g,h,k;return K(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 C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Bj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);E(l)})}
800
799
  function tr(a,b,c,d,e){var f=c(a);ur(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new Bj;return C(g,vr(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;wr(f,0,d,e);return f}function wr(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==dd(a.language,f.language)&&(g=!1);g&&d[b].delete(f)}}
801
800
  function lr(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.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
802
801
  function qr(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
803
- function mr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(w(f),w(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=oh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
802
+ function mr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(w(f),w(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=nh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
804
803
  (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=lr(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),mr(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&mr(a.trickModeVideo,b)}
805
804
  function rr(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(w(a.keyIds),w(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,w(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
806
805
  function ur(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:xr,video:xr,text:yr,image:zr}[e.type],g={audio:Ar,video:Br,text:Cr,image:Dr}[e.type],h=null;d=t(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}
807
- function xr(a,b){function c(d){if(!Er.has(d)){var e=Jc(d);Er.set(d,e)}return Er.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!nh(a.drmInfos,b.drmInfos)?!1:!0}function yr(a,b){return a.language?b.language?a.forced!==b.forced||0==dd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function zr(a){return a.tilesLayout?!0:!1}
808
- function Ar(a,b,c){if(a.id==c.id)return!0;var d=dd(a.language,b.language),e=dd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;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;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
809
- d=Fr(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Gr)return!0;if(d==Hr)return!1;d=Fr(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Gr?!0:d==Hr?!1:a.bandwidth&&Ir(a.bandwidth,b.bandwidth,c.bandwidth)==Gr?!0:!1}
806
+ function xr(a,b){function c(d){if(!Er.has(d)){var e=Jc(d);Er.set(d,e)}return Er.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!mh(a.drmInfos,b.drmInfos)?!1:!0}function yr(a,b){return a.language?b.language?a.forced!==b.forced||0==dd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function zr(a){return a.tilesLayout?!0:!1}
807
+ function Ar(a,b,c){if(a.id==c.id)return!0;var d=dd(a.language,b.language),e=dd(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;if(c.roles.length&&!b.roles.length)return!1;
808
+ if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Fr(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Gr)return!0;if(d==Hr)return!1;d=Fr(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Gr?!0:d==Hr?!1:a.bandwidth&&Ir(a.bandwidth,b.bandwidth,c.bandwidth)==Gr?!0:!1}
810
809
  function Br(a,b,c){if(a.id==c.id)return!0;var d=Fr(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Gr)return!0;if(d==Hr)return!1;if(a.frameRate){d=Fr(a.frameRate,b.frameRate,c.frameRate);if(d==Gr)return!0;if(d==Hr)return!1}return a.bandwidth&&Ir(a.bandwidth,b.bandwidth,c.bandwidth)==Gr?!0:!1}
811
- function Cr(a,b,c){if(a.id==c.id)return!0;var d=dd(a.language,b.language),e=dd(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(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;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
812
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Dr(a,b,c){return a.id==c.id?!0:Fr(a.width*a.height,b.width*b.height,c.width*c.height)==Gr?!0:!1}
810
+ function Cr(a,b,c){if(a.id==c.id)return!0;var d=dd(a.language,b.language),e=dd(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&&
811
+ b.roles.length)return!0;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 Dr(a,b,c){return a.id==c.id?!0:Fr(a.width*a.height,b.width*b.height,c.width*c.height)==Gr?!0:!1}
813
812
  function pr(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}}
814
813
  function jr(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new xj([]),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}}
815
814
  function Fr(a,b,c){if(b==a&&a!=c)return Hr;if(c==a&&a!=b)return Gr;if(b>a){if(c<=a||c-a<b-a)return Gr;if(c-a>b-a)return Hr}else{if(c>a)return Hr;if(a-c<a-b)return Gr;if(a-c>a-b)return Hr}return Jr}function Ir(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Gr:b<a?Hr:Jr}N("shaka.util.PeriodCombiner",hr);hr.prototype.combinePeriods=hr.prototype.Af;hr.prototype.getImageStreams=hr.prototype.Lg;hr.prototype.getTextStreams=hr.prototype.De;hr.prototype.getVariants=hr.prototype.$g;
816
815
  var Gr=1,Jr=0,Hr=-1,Er=new Map;function Kr(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.K={};this.l=new hr;this.F=0;this.H=new Oa(5);this.G=new jd(function(){Lr(a)});this.C=new af;this.u=null;this.J=[];this.A=Infinity;this.s=!1;this.h=null}r=Kr.prototype;r.configure=function(a){this.g=a;this.h&&this.h.configure(this.g)};r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,Mr(c),2);d=e.h;c.i&&Nr(c,d);if(!c.i)throw new P(2,7,7001);return e.return(c.j)})};
817
816
  r.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.C.destroy()};r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),C(c,Mr(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.i||!b)return c.return();a.i.onError(b);E(c)})};
818
- r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.P()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,Nr(this,0))}}};r.banLocation=function(a){this.h&&this.h.i.set(a,Date.now()+6E4)};
817
+ r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.P()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Ab();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,Nr(this,0))}}};r.banLocation=function(a){this.h&&this.h.i.set(a,Date.now()+6E4)};
819
818
  function Mr(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return b=gf(a.o,a.g.retryParameters),c=Date.now(),C(g,Or(a,b,0,{type:4}),2);if(3!=g.g){d=g.h;if(!a.i)return g.return(0);d.uri&&d.uri!=d.originalUri&&!a.o.includes(d.uri)&&a.o.unshift(d.uri);return C(g,Pr(a,d.data,d.uri),3)}e=Date.now();f=(e-c)/1E3;a.H.sample(1,f);return g.return(f)})}
820
819
  function Pr(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Ag(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Qr(a,d,c));f=a.g.dash.xlinkFailGracefully;g=uq(d,a.g.retryParameters,f,c,a.i.networkingEngine);bf(a.C,g);return C(k,g.promise,2)}h=k.h;return k.return(Qr(a,h,c))})}
821
- function Qr(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,O,S,ca,W,da,Ba,Sa,xb,db,Tb,ua,eb,$a,yb,ab,mh,xd,te,ue;return K(function(jb){switch(jb.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=gg(b,"Location").map(mg).filter(Xc);0<f.length&&(g=xc(e,f),e=a.o=g);h=Promise.resolve();if((k=fg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new br(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=mg(k))(n=
820
+ function Qr(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,O,S,ca,W,da,Ba,Sa,xb,db,Tb,ua,eb,$a,yb,ab,ph,xd,ue,ve;return K(function(jb){switch(jb.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=gg(b,"Location").map(mg).filter(Xc);0<f.length&&(g=xc(e,f),e=a.o=g);h=Promise.resolve();if((k=fg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new br(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=mg(k))(n=
822
821
  og(k,"queryBeforeStart",wg,!1))?h=cr(a.h,m):cr(a.h,m);q=gg(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(q),y=v.next();!y.done;y=v.next())z=y.value,x=z.getAttribute("serviceLocation"),A=mg(z),x&&A&&(fr(a.h,"BaseURL",x,A),u=!0);u&&a.h||(B=q.map(mg),p=xc(e,B));D=function(){return a.h&&u?gr(a.h,"BaseURL"):p?p:[]};F=0;q&&q.length&&(F=og(q[0],"availabilityTimeOffset",vg)||0);J=a.g.dash.ignoreMinBufferTime;G=0;J||(G=og(b,"minBufferTime",qg)||0);a.F=og(b,"minimumUpdatePeriod",qg,-1);H=og(b,"availabilityStartTime",
823
822
  pg);I=og(b,"timeShiftBufferDepth",qg);L=a.g.dash.ignoreSuggestedPresentationDelay;M=null;L||(M=og(b,"suggestedPresentationDelay",qg));O=a.g.dash.ignoreMaxSegmentDuration;S=null;O||(S=og(b,"maxSegmentDuration",qg));ca=b.getAttribute("type")||"static";if(a.j)for(W=a.j.presentationTimeline,da=t(Object.values(a.m)),Ba=da.next();!Ba.done;Ba=da.next())Sa=Ba.value,Sa.segmentIndex&&Sa.segmentIndex.ab(W.cb());else xb=a.g.defaultPresentationDelay||1.5*G,db=null!=M?M:xb,W=new bj(H,db,a.g.dash.autoCorrectDrift);
824
- W.kc("static"==ca);(Tb=W.P())&&!isNaN(a.g.availabilityWindowOverride)&&(I=a.g.availabilityWindowOverride);null==I&&(I=Infinity);W.Sd(I);ua=b.getAttribute("profiles")||"";eb={yb:"static"!=ca,presentationTimeline:W,sa:null,$:null,na:null,M:null,bandwidth:0,Nf:!1,Xb:F,profiles:ua.split(",")};$a=Rr(a,eb,D,b);yb=$a.duration;ab=$a.periods;"static"!=ca&&$a.Ff||W.Na(yb||Infinity);a.A&&!a.s&&(mh=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?W.cg(a.A):a.A&&Ua("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.");
825
- W.Te(S||1);return C(jb,a.l.Af(ab,eb.yb),2);case 2:return C(jb,h,3);case 3:a.s&&(G=0);if(a.j){a.j.variants=a.l.j;xd=a.l.De();0<xd.length&&(a.j.textStreams=xd);a.j.imageStreams=a.l.i;a.i.filter(a.j);jb.B(4);break}a.j={presentationTimeline:W,variants:a.l.j,textStreams:a.l.De(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Sr(b)};if(!W.kg()){jb.B(5);break}te=gg(b,"UTCTiming");return C(jb,
826
- Tr(a,D,te),6);case 6:ue=jb.h;if(!a.i)return jb.return();W.dg(ue);case 5:W.Id();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(jb)}})}
823
+ W.mc("static"==ca);(Tb=W.P())&&!isNaN(a.g.availabilityWindowOverride)&&(I=a.g.availabilityWindowOverride);null==I&&(I=Infinity);W.Sd(I);ua=b.getAttribute("profiles")||"";eb={yb:"static"!=ca,presentationTimeline:W,sa:null,$:null,na:null,M:null,bandwidth:0,Nf:!1,Xb:F,profiles:ua.split(",")};$a=Rr(a,eb,D,b);yb=$a.duration;ab=$a.periods;"static"!=ca&&$a.Ff||W.Na(yb||Infinity);a.A&&!a.s&&(ph=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?W.cg(a.A):a.A&&Ua("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.");
824
+ W.Te(S||1);return C(jb,a.l.Af(ab,eb.yb),2);case 2:return C(jb,h,3);case 3:a.s&&(G=0);if(a.j){a.j.variants=a.l.j;xd=a.l.De();0<xd.length&&(a.j.textStreams=xd);a.j.imageStreams=a.l.i;a.i.filter(a.j);jb.B(4);break}a.j={presentationTimeline:W,variants:a.l.j,textStreams:a.l.De(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Sr(b)};if(!W.kg()){jb.B(5);break}ue=gg(b,"UTCTiming");return C(jb,
825
+ Tr(a,D,ue),6);case 6:ve=jb.h;if(!a.i)return jb.return();W.dg(ve);case 5:W.Id();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),E(jb)}})}
827
826
  function Sr(a){a=fg(a,"ServiceDescription");if(!a)return null;var b=fg(a,"Latency"),c=fg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
828
827
  function Rr(a,b,c,d){var e=og(d,"mediaPresentationDuration",qg),f=[],g=0;d=gg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=og(k,"start",qg,g),n=k.id,q=og(k,"duration",qg),p=null;if(l){var u=og(l,"start",qg);null!=u&&(p=u-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.u&&null!==n&&null!==m&&m<a.u)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.u||m>a.u)&&(a.u=m);g=Ur(a,b,c,{start:m,duration:p,node:k,Ge:null==p||!l});f.push(g);b.sa.id&&p&&(a.K[b.sa.id]=p);if(null==p){g=
829
828
  null;break}g=m+p}}a.J=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Ff:!1}:{periods:f,duration:g,Ff:!0}}
@@ -838,7 +837,7 @@ u?y="visually impaired":"2"==u&&(y="hard of hearing"));if(l)return null;l=gg(c,"
838
837
  k||f)return null;throw new P(2,4,4003);}if(!b.na.contentType||"application"==b.na.contentType)for(b.na.contentType=$r(c[0].mimeType,c[0].codecs),k=t(c),p=k.next();!p.done;p=k.next())p.value.type=b.na.contentType;k=b.na.id||"__fake__"+a.I++;m=t(c);for(p=m.next();!p.done;p=m.next()){p=p.value;u=t(D.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&p.keyIds?new Set([].concat(w(z.keyIds),w(p.keyIds))):z.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&(p.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(Xc);
839
838
  return{id:k,contentType:b.na.contentType,language:F,Qi:e,streams:c,drmInfos:D.drmInfos,qf:f,Dh:l}}
840
839
  function Zr(a,b,c,d,e,f,g,h,k,l,m){b.M=Vr(a,l,b.na,null);a.A=Math.min(a.A,b.M.Xb);if(!as(b.M))return null;var n=b.$.start;b.bandwidth=og(l,"bandwidth",tg)||0;var q=b.M.contentType,p=q==Cc||"application"==q;q="image"==q;try{var u=void 0;if(c.ee){var v=b.M.bb,y=xc(v(),[c.ee.nh]),z=gf(y,a.g.retryParameters);u={method:"AES-128",iv:c.ee.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,I,L;return K(function(M){if(1==M.g)return C(M,Or(a,z,6),2);if(3!=M.g){H=M.h;if(!H.data||16!=H.data.byteLength)throw new P(2,
841
- 4,4049);I={name:"AES-CBC"};L=u;return C(M,window.crypto.subtle.importKey("raw",H.data,I,!0,["decrypt"]),3)}L.cryptoKey=M.h;u.fetchKey=void 0;E(M)})}}}v=function(H,I,L,M){return bs(a,H,I,L,M)};if(b.M.bd)var x=Hq(b,v,u);else if(b.M.Cb)x=Nq(b,a.m,u);else if(b.M.cd)x=Sq(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.K,u);else{var A=b.$.duration||0,B=b.M.bb;x={$b:function(){return Promise.resolve(Aj(n,A,B()))}}}}catch(H){if((p||q)&&4002==H.code)return null;throw H;}v=gg(l,"ContentProtection");v=hq(v,c,a.g.dash.ignoreDrmInfo,
840
+ 4,4049);I={name:"AES-CBC"};L=u;return C(M,window.crypto.subtle.importKey("raw",H.data,I,!0,["decrypt"]),3)}L.cryptoKey=M.h;u.fetchKey=void 0;E(M)})}}}v=function(H,I,L,M){return bs(a,H,I,L,M)};if(b.M.bd)var x=Hq(b,v,u);else if(b.M.Db)x=Nq(b,a.m,u);else if(b.M.cd)x=Sq(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.K,u);else{var A=b.$.duration||0,B=b.M.bb;x={$b:function(){return Promise.resolve(Aj(n,A,B()))}}}}catch(H){if((p||q)&&4002==H.code)return null;throw H;}v=gg(l,"ContentProtection");v=hq(v,c,a.g.dash.ignoreDrmInfo,
842
841
  a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);y=!1;gg(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(y=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var F;if(q&&((l=gg(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&(F=l.getAttribute("value")),
843
842
  !F))return null;var J;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"))&&(J="PQ");l=b.M.id?b.sa.id+","+b.M.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.I++,originalId:b.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.M.mimeType,codecs:b.M.codecs,frameRate:b.M.frameRate,
844
843
  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:v,language:e,originalLanguage:b.na.language,label:f,type:b.na.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.M.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.M.Od,audioSamplingRate:b.M.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:F,matchedStreams:[],accessibilityPurpose:m,external:!1,
@@ -846,18 +845,18 @@ fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(function(I){if(
846
845
  function Lr(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),C(d,Mr(a),4);case 4:b=d.h;wa(d,3);break;case 2:if(c=xa(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();Nr(a,b);E(d)}})}function Nr(a,b){0>a.F||a.G.U(Math.max(a.F-b,Pa(a.H)))}
847
846
  function Vr(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Od:null,audioSamplingRate:null,Xb:0,df:0};d=d||c.bb;var e=b.getAttribute("id"),f=gg(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.getAttribute("serviceLocation");m=mg(m);l&&m&&(fr(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(mg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
848
847
  c.codecs;var n=og(b,"frameRate",xg)||c.frameRate,q=b.getAttribute("sar")||c.pixelAspectRatio,p=cs(gg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=gg(b,"AudioChannelConfiguration");u=ds(u)||c.Od;var v=og(b,"audioSamplingRate",ug)||c.audioSamplingRate;k||(k=$r(l,m));var y=fg(b,"SegmentBase"),z=fg(b,"SegmentTemplate"),x=y?og(y,"availabilityTimeOffset",vg)||0:0,A=z?og(z,"availabilityTimeOffset",vg)||0:0,B=f&&f.length?og(f[0],"availabilityTimeOffset",vg)||0:0;x=c.Xb+B+x+A;A=null;(B=fg(b,"SegmentSequenceProperties"))&&
849
- (B=fg(B,"SAP"))&&(A=og(B,"cadence",sg));return{bb:function(){return xc(d(),f.length?a.h&&h?gr(a.h,e):g?g:[]:[])},bd:y||c.bd,Cb:fg(b,"SegmentList")||c.Cb,cd:z||c.cd,width:og(b,"width",ug)||c.width,height:og(b,"height",ug)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.getAttribute("lang"),Od:u,audioSamplingRate:v,Xb:x,df:A||c.df}}
848
+ (B=fg(B,"SAP"))&&(A=og(B,"cadence",sg));return{bb:function(){return xc(d(),f.length?a.h&&h?gr(a.h,e):g?g:[]:[])},bd:y||c.bd,Db:fg(b,"SegmentList")||c.Db,cd:z||c.cd,width:og(b,"width",ug)||c.width,height:og(b,"height",ug)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.getAttribute("lang"),Od:u,audioSamplingRate:v,Xb:x,df:A||c.df}}
850
849
  function cs(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
851
850
  function ds(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("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=
852
- 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 as(a){var b=a.bd?1:0;b+=a.Cb?1:0;b+=a.cd?1:0;if(0==b)return a.contentType==Cc||"application"==a.contentType?!0:!1;1!=b&&(a.bd&&(a.Cb=null),a.cd=null);return!0}
851
+ 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 as(a){var b=a.bd?1:0;b+=a.Db?1:0;b+=a.cd?1:0;if(0==b)return a.contentType==Cc||"application"==a.contentType?!0:!1;1!=b&&(a.bd&&(a.Db=null),a.cd=null);return!0}
853
852
  function es(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=xc(b(),[c]),f=gf(e,a.g.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),bf(a.C,g),C(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Df(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
854
853
  function Tr(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.getAttribute("schemeIdUri"),value:q.getAttribute("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);
855
854
  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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return C(n,es(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,es(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:wa(n,
856
855
  3);break;case 5:xa(n);case 3:g=f.next();n.B(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
857
856
  function Wr(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=og(d,"timescale",ug)||1;d=t(gg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=og(k,"presentationTime",ug)||0,m=og(k,"duration",ug)||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.getAttribute("id")||"",eventElement:k},a.i.onTimelineRegionAdded(k))}}
858
857
  function bs(a,b,c,d,e){var f,g,h,k;return K(function(l){if(1==l.g)return f=nf,g=e?0:1,h=Xj(b,c,d,a.g.retryParameters),C(l,Or(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function $r(a,b){b=Fc(a,b);return Oc(b)?Cc:a.split("/")[0]}function Or(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);bf(a.C,b);return b.promise}N("shaka.dash.DashParser",Kr);sh["application/dash+xml"]=function(){return new Kr};sh["video/vnd.mpeg.dash.mpd"]=function(){return new Kr};function fs(){}N("shaka.dependencies",fs);fs.has=function(a){return gs.has(a)};fs.add=function(a,b){if(!hs[a])throw Error(a+" is not supported");a==is?oe("mux.js","mux.js is no longer used in Shaka Player."):gs.set(a,function(){return b})};var is="muxjs",hs={Ri:is,ISOBoxer:"ISOBoxer"};fs.Allowed=hs;var gs=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function js(a,b,c){this.type=a;this.g=b;this.segments=c||null}function ks(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}ks.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.g?this.g.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};
859
- function ls(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}ks.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function os(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function ps(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.eb=c}
860
- function qs(a,b){this.name=a;this.value=b};function rs(a,b){return a.filter(function(c){return c.name==b})}function ss(a,b){return a.filter(function(c){return os(c,"TYPE")==b})}function ts(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 us(a,b,c){c=void 0===c?0:c;return(a=ts(a,b))?Number(a.value):c}function vs(a,b,c){return b?ws(a,[b],c):[]}
858
+ function ls(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}ks.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function ms(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function ps(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.eb=c}
859
+ function qs(a,b){this.name=a;this.value=b};function rs(a,b){return a.filter(function(c){return c.name==b})}function ss(a,b){return a.filter(function(c){return ms(c,"TYPE")==b})}function ts(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 us(a,b,c){c=void 0===c?0:c;return(a=ts(a,b))?Number(a.value):c}function vs(a,b,c){return b?ws(a,[b],c):[]}
861
860
  function ws(a,b,c){if(!b.length)return[];b=xc(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 P(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function xs(a){this.h=a||"";this.g=0}function ys(a){zs(a,/[ \t]+/gm)}function zs(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 As(a){return a.g==a.h.length?null:(a=zs(a,/[^ \t\n]*/gm))?a[0]:null};function Bs(){this.g=0}
862
861
  function Cs(a,b){b=Df(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 P(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=Ds(a,f),--a.g,Es.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=Ds(a,g);if(Fs.includes(g.name)){if(1!=b)throw new P(2,4,4017);g=
863
862
  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=Ds(a,k),Es.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"==Z(k,"TYPE")?f.push(k):"MAP"==Z(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 ps(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new ps("",d,f)));return new js(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
@@ -880,10 +879,10 @@ function et(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next())
880
879
  function dt(a,b,c){b.Pb+=c;b.ob+=c;a=Xs(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.Y()}
881
880
  function Qs(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,O,S,ca,W;return K(function(da){switch(da.g){case 1:d=Cs(a.ya,b);e=rs(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},C(da,ft(a,d,v),6);gt(a,e);k=rs(d.g,"EXT-X-MEDIA");l=rs(d.g,"EXT-X-STREAM-INF");m=rs(d.g,"EXT-X-IMAGE-STREAM-INF");n=rs(d.g,"EXT-X-I-FRAME-STREAM-INF");q=rs(d.g,"EXT-X-SESSION-KEY");p=rs(d.g,"EXT-X-SESSION-DATA");u=rs(d.g,"EXT-X-CONTENT-STEERING");ht(a,p);return C(da,it(a,u),4);
882
881
  case 4:return jt(a,l),kt(a,k),f=lt(a,l,q,k),g=mt(a,k),C(da,nt(a,m,n),5);case 5:h=da.h;da.B(3);break;case 6:return y=da.h,z=y.type,x=y.mimeType,A=y.codecs,B=y.language,D=y.height,F=y.width,J=y.channelCount,G=y.sampleRate,H=y.closedCaptions,C(da,ot(a,a.u++,d,v,c,A,z,B,!0,"Media Playlist",J,H,null,!1,G,!1,x),7);case 7:I=da.h,a.h.set(c,I),"video"==z&&pt(I.stream,F,D,null,null,null),f.push({id:0,language:$c(B||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?I.stream:null,video:"video"==z?I.stream:
883
- null,bandwidth:I.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new P(2,7,7001);a.l=new bj(null,0);a.l.kc(!0);1==d.type&&(Rs(a)&&(qt(a,d),L=a.m,a.s.U(L)),M=Array.from(a.h.values()),rt(a,M),Ws(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};
882
+ null,bandwidth:I.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new P(2,7,7001);a.l=new bj(null,0);a.l.mc(!0);1==d.type&&(Rs(a)&&(qt(a,d),L=a.m,a.s.U(L)),M=Array.from(a.h.values()),rt(a,M),Ws(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};
884
883
  if(a.ba||!a.g.hls.disableCodecGuessing){da.B(8);break}O=[];S=t(a.C.variants);for(ca=S.next();!ca.done;ca=S.next())W=ca.value,W.audio&&""===W.audio.codecs&&O.push(W.audio.createSegmentIndex()),W.video&&""===W.video.codecs&&O.push(W.video.createSegmentIndex());return C(da,Promise.all(O),8);case 8:a.i.makeTextStreamsForClosedCaptions(a.C),E(da)}})}
885
- function ft(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:d=Js(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=vs(c(),b.segments[0].h);h=g[0];k=new gc(h);l=k.Ea.split(".").pop();if(m=st[l])return D.return(Js(m));n=nf;q=null;p=tt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=gf(p.Y(),a.g.retryParameters);return C(D,ut(a,u,n,{type:0}),3);case 3:v=D.h,q=v.data;case 2:return y=gf(g,
886
- a.g.retryParameters),C(D,ut(a,y,n,{type:1}),4);case 4:z=D.h;(x=z.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var F=z.data;var J=nb(F);J=(new fi).parse(J);var G=J.Lc();J=J.Ee();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.ga?H.push(J.ga):H.push("avc1.42E01E");L=!0;break;case "hvc":J.ga?
884
+ function ft(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B;return K(function(D){switch(D.g){case 1:d=Js(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return D.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=vs(c(),b.segments[0].h);h=g[0];k=new gc(h);l=k.Ea.split(".").pop();if(m=st[l])return D.return(Js(m));n=nf;q=null;p=tt(a,b,f.g,c);a.W.clear();if(!p){D.B(2);break}u=Xj(p.Y(),p.dc(),p.bc(),a.g.retryParameters);return C(D,ut(a,u,n,{type:0}),3);case 3:v=D.h,q=v.data;case 2:return y=
885
+ gf(g,a.g.retryParameters),C(D,ut(a,y,n,{type:1}),4);case 4:z=D.h;(x=z.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var F=z.data;var J=nb(F);J=(new fi).parse(J);var G=J.Nc();J=J.Ee();var H=[],I=!1,L=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");I=!0;break;case "mp3":H.push("mp4a.40.34");I=!0;break;case "ac3":H.push("ac-3");I=!0;break;case "ec3":H.push("ec-3"),I=!0}switch(G.video){case "avc":J.ga?H.push(J.ga):H.push("avc1.42E01E");L=!0;break;case "hvc":J.ga?
887
886
  H.push(J.ga):H.push("hvc1.1.6.L93.90"),L=!0}if(H.length){G=I&&!L;I=new Map;if(L){L=new tb("video/mp2t");L.i(F);F=t(L.j());for(var M=F.next();!M.done;M=F.next())M=M.value,I.set(M,M);L.h()}J={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:I}}else J=null;if(A=J)return D.return(A)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==x||"audio/mp4"==x||"video/iso.segment"==x)if(B=Ks(q,z.data))return D.return(B);
888
887
  return D.return(d)}})}function Ws(a){if(Rs(a)){if(a.ea==vt){var b=wt(a);a.g.hls.useSafariBehaviorForLive&&(b=a.l.o);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Sd(b)}if(!a.l.m){b=Array.from(a.h.values()).filter(function(d){return d.stream.segmentIndex});b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,("audio"==c.type||"video"==c.type)&&(c=c.stream.segmentIndex.get(0))&&c.aa&&a.l.kf(c.aa)}}else a.l.Na(xt(a));a.l.Id()}
889
888
  function gt(a,b){var c=(new gc(a.Z)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
@@ -891,25 +890,25 @@ function Ys(a,b,c){c=(new gc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.do
891
890
  function jt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=yt(a,d);if(f){var g=Ac(Cc,d);a.G.set(f,g);zb(d,g)}e&&(f=Ac("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Ac("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
892
891
  function ht(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",vs([a.Z],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new Q("sessiondata",e);if(a.i)a.i.onEvent(c)}}
893
892
  function it(a,b){var c,d,e,f,g,h;return K(function(k){if(!a.i||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new br(a.i);a.j.configure(a.g);a.j.j=[a.Z];a.j.setManifestType("HLS");a.j.h=g;c=cr(a.j,h);break}return C(k,c,0)})}
894
- function mt(a,b){var c=ss(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return zt(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=os(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.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=At(Cc,d)||Bt(Cc)}}return b.filter(function(g){return g})}
895
- function nt(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return C(m,Ct(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=xa(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=os(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
893
+ function mt(a,b){var c=ss(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return zt(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=ms(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.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=At(Cc,d)||Bt(Cc)}}return b.filter(function(g){return g})}
894
+ function nt(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return C(m,Ct(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=xa(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=ms(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
896
895
  q=Z(g,"CHARACTERISTICS"),p=Dt(a,a.u++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),y=v.next().value,z=v.next().value;p.stream.width=Number(y)||void 0;p.stream.height=Number(z)||void 0;var x=Z(g,"BANDWIDTH");x&&(p.stream.bandwidth=Number(x));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(A){if(a.g.hls.ignoreImageStreamFailures)return null;throw A;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
897
896
  function Et(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=ls(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)zt(a,d[g],c)}
898
- function lt(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=os(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ft[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=ls(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=Z(m,"FRAME-RATE");h=Number(Z(m,"AVERAGE-BANDWIDTH"))||Number(os(m,
897
+ function lt(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=ms(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ft[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=ls(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=Z(m,"FRAME-RATE");h=Number(Z(m,"AVERAGE-BANDWIDTH"))||Number(ms(m,
899
898
  "BANDWIDTH"));var n=Z(m,"RESOLUTION"),q=t(n?n.split("x"):[null,null]);n=q.next().value;q=q.next().value;var p=Z(m,"VIDEO-RANGE");(m=Z(m,"REQ-VIDEO-LAYOUT"))&&m.includes(",")&&(m=m.split(",").filter(function(u){return"CH-STEREO"==u||"CH-MONO"==u})[0]);m=m||"CH-MONO";k=Gt(a,k,d);b.push.apply(b,w(Ht(a,k.audio,k.video,h,n,q,g,p,m,e,f)))}return b.filter(function(u){return null!=u})}
900
- function Gt(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Z(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(os(v,"GROUP-ID"))}),Et(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,w(k)):h&&d.video.push.apply(d.video,w(k));l=!1;var p=b.map(function(v){return os(v,
901
- "URI")});h=d.audio.find(function(v){return v&&v.Y().find(function(y){return p.includes(y)})});g=yt(a,b[0]);n=Ac("video",g);(q=Ac("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&q&&n?(h="video",g=[[n,q].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=q=n=l=null;!k.length&&(c=c.find(function(v){var y=Z(v,"URI")||"",z=Z(v,"TYPE");v=os(v,"GROUP-ID");return"SUBTITLES"!=z&&""==y&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
899
+ function Gt(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Z(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(ms(v,"GROUP-ID"))}),Et(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,w(k)):h&&d.video.push.apply(d.video,w(k));l=!1;var p=b.map(function(v){return ms(v,
900
+ "URI")});h=d.audio.find(function(v){return v&&v.Y().find(function(y){return p.includes(y)})});g=yt(a,b[0]);n=Ac("video",g);(q=Ac("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&q&&n?(h="video",g=[[n,q].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=q=n=l=null;!k.length&&(c=c.find(function(v){var y=Z(v,"URI")||"",z=Z(v,"TYPE");v=ms(v,"GROUP-ID");return"SUBTITLES"!=z&&""==y&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
902
901
  n=Z(c,"NAME"),q=It(c),Jt(c),m=Z(c,"CHARACTERISTICS"),u=Kt(c));a=Lt(a,b,g,h,l,n,q,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
903
902
  function yt(a,b){var c=Z(b,"CODECS")||"";a.ba=0<c.length;a.ba||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),c=b.join(","));a=new Set;b=[];c=t(c.split(/\s*,\s*/));for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=Kc(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function It(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}function Kt(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}
904
903
  function Jt(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
905
904
  function Ht(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),q=n.next();!q.done;q=n.next())pt(q.value.stream,e,f,g,h,k);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 p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.Y().sort().join(","):"";var u=f?f.Y().sort().join(","):
906
- "";p=p+" - "+u;h&&k&&!nh(n,q)||a.$a.has(p)||(h={id:a.u++,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.$a.add(p))}return e}
907
- function kt(a,b){b=ss(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=$c(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=os(d,"GROUP-ID");d=os(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
908
- function zt(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=os(k,"URI");k=os(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=os(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Cc);if(k==Cc)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.u++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
905
+ "";p=p+" - "+u;h&&k&&!mh(n,q)||a.$a.has(p)||(h={id:a.u++,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.$a.add(p))}return e}
906
+ function kt(a,b){b=ss(b,"CLOSED-CAPTIONS");b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=$c(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=ms(d,"GROUP-ID");d=ms(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
907
+ function zt(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=ms(k,"URI");k=ms(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=ms(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Cc);if(k==Cc)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.u++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
909
908
  m=n.next().value;n=n.next().value;(m=c.get(m))&&fr(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?It(h):null;var q="audio"==k?Jt(h):!1,p=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?Kt(h):null;d=Dt(a,l,d,b,k,c,m,f,n,null,p,u,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
910
- function Ct(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(q){if(1==q.g){c=os(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Dt(a,a.u++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.B(2)}2!=q.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])*
909
+ function Ct(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(q){if(1==q.g){c=ms(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Dt(a,a.u++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.B(2)}2!=q.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])*
911
910
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
912
- function Lt(a,b,c,d,e,f,g,h,k){for(var l=a.u++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=os(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&fr(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=zc(d,c);d=Dt(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
911
+ function Lt(a,b,c,d,e,f,g,h,k){for(var l=a.u++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=ms(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&fr(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=zc(d,c);d=Dt(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
913
912
  function Dt(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(D){var F,J,G,H,I,L,M,O,S,ca,W,da,Ba,Sa,xb,db,Tb;return K(function(ua){switch(ua.g){case 1:return F=x.Y(),C(ua,Ps(a,x.Y(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();G=J.uri;G==J.originalUri||F.includes(G)||z.push(G);H=Cs(a.ya,J.data);I=void 0;if(a.ba||!a.g.hls.disableCodecGuessing){ua.B(3);break}return C(ua,ft(a,H,v),4);case 4:L=ua.h,I=L.mimeType,d=L.codecs;case 3:return M=Rs(a),C(ua,ot(a,0,H,v,G,d,e,f,g,h,k,l,m,n,q,p,I),5);case 5:O=ua.h;
914
913
  if(D.aborted)return ua.return();S=O.stream;Rs(a)&&!M&&qt(a,H);x.Pb=O.Pb;x.ob=O.ob;x.qd=O.qd;x.pd=O.pd;x.Qc=O.Qc;x.Kd=O.Kd;x.Va=O.Va;x.Wa=O.Wa;x.Oe=!0;y.segmentIndex=S.segmentIndex;y.encrypted=S.encrypted;y.drmInfos=S.drmInfos;y.keyIds=S.keyIds;y.mimeType=S.mimeType;y.bandwidth=S.bandwidth;y.codecs=S.codecs||y.codecs;y.drmInfos.length&&a.i.newDrmInfo(y);ca=Dc;if(e==ca.fa||e==ca.R)for(W=t(a.h.values()),da=W.next();!da.done;da=W.next())Ba=da.value,Ba.Oe||Ba.type!=e||(Ba.stream.mimeType=S.mimeType);e==
915
914
  ca.ja&&(Sa=S.segmentIndex.get(0))&&Sa.g&&(y.mimeType="application/mp4");Mt(a)&&(a.xb?rt(a,[x]):(a.xb=!0,xb=Array.from(a.h.values()),db=xb.filter(function(eb){return eb.stream.segmentIndex}),rt(a,db),Ws(a),Tb=a.m,0<Tb&&a.s.U(Tb)));E(ua)}})}function v(){return a.j&&1<c.length?gr(a.j,b):z.concat(ws([a.Z],c,a.o))}var y=Nt(a,d,e,f,g,h,k,l,m,n,q,p),z=[],x={stream:y,type:e,Yf:z,Y:v,Pb:0,ob:0,Kd:new Map,qd:!1,pd:!1,Qc:!1,le:-1,Va:-1,Wa:-1,Oe:!1},A=null,B=new AbortController;y.createSegmentIndex=function(){if(A)return A;
@@ -921,31 +920,31 @@ A.sg;if(F&&!B.length&&!J)throw new P(2,4,4026);G=Nt(a,f,g,h,k,l,m,n,q,p,u,v);G.e
921
920
  return eb.return({stream:G,type:g,Yf:[],Y:d,Pb:O,ob:ca,qd:Ba,pd:Sa,Qc:!1,le:-1,Va:Tb,Wa:ua,Kd:H,Oe:!1})})}function at(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Va:a,Wa:c};b=b[b.length-1];var d=b.h;if(!b.h.length)return a++,b.o&&(c=0),{Va:a,Wa:c};c=d.length-1;d[d.length-1].m||(a++,c=0);return{Va:a,Wa:c}}
922
921
  function Nt(a,b,c,d,e,f,g,h,k,l,m,n){var q=At(c,b)||Bt(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Cc?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");return{id:a.u++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
923
922
  segmentIndex:null,mimeType:q,codecs:b,kind:c==Cc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:$c(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:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
924
- function Zs(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=rs(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=os(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ft[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,sg:d}}
925
- function Qt(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=ag(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=us(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,p;return K(function(u){if(1==u.g)return l=vs(d(),os(b,"URI"),e),m=gf([l],a.g.retryParameters),
923
+ function Zs(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=rs(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=ms(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Ft[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,sg:d}}
924
+ function Qt(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=ag(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=us(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,q,p;return K(function(u){if(1==u.g)return l=vs(d(),ms(b,"URI"),e),m=gf(l,a.g.retryParameters),
926
925
  C(u,ut(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new P(2,4,4049);q={name:"AES-CBC"};p=k;return C(u,window.crypto.subtle.importKey("raw",n.data,q,!0,["decrypt"]),3)}p.cryptoKey=u.h;k.fetchKey=void 0;E(u)})}};return k}
927
- function bt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=ts(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=ts(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=ts(b.g,"EXT-X-PART-INF"))a.K=Number(os(e,"PART-TARGET"));b=ts(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.jb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.ma=b?Number(os(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
928
- b.getAttribute("HOLD-BACK"):null,a.la=c?Number(c.value):0);a.za=Math.max(d,a.za)}function qt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ma)b=a.ma;else if(a.la)b=a.la;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.za*c}a.l.kf(0);a.l.eg(b);a.l.kc(!1)}
929
- function tt(a,b,c,d,e){var f=ts(c,"EXT-X-MAP");if(!f)return null;var g=os(f,"URI"),h=vs(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.W.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?"AES-128"==os(m,"METHOD")&&m.id<f.id&&(k=Qt(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Rt(h,f,l,k);a.W.set(g,b)}return a.W.get(g)}
926
+ function bt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=ts(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=ts(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=ts(b.g,"EXT-X-PART-INF"))a.K=Number(ms(e,"PART-TARGET"));b=ts(b.g,"EXT-X-SERVER-CONTROL");a.A&&a.K?(a.m=a.jb?5*a.K<=c?Math.min(a.K,a.m):Math.min(c,a.m):Math.min(a.K,a.m),a.ma=b?Number(ms(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
927
+ b.getAttribute("HOLD-BACK"):null,a.la=c?Number(c.value):0);a.za=Math.max(d,a.za)}function qt(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ma)b=a.ma;else if(a.la)b=a.la;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.za*c}a.l.kf(0);a.l.eg(b);a.l.mc(!1)}
928
+ function tt(a,b,c,d,e){var f=ts(c,"EXT-X-MAP");if(!f)return null;var g=ms(f,"URI"),h=vs(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.W.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?"AES-128"==ms(m,"METHOD")&&m.id<f.id&&(k=Qt(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Rt(h,f,l,k);a.W.set(g,b)}return a.W.get(g)}
930
929
  function Rt(a,b,c,d){var e=0,f=null;b=Z(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 xh(function(){return a},e,f,null,null,null,d)}
931
930
  function St(a,b,c,d,e,f,g,h,k){var l=d.g,m=ts(l,"EXTINF"),n=0,q=0,p=null;d.eb.length&&!a.A&&Ua("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=ts(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=pg(v.value))}var y=zh;ts(l,"EXT-X-GAP")&&(y=2);if(!m){if(0==d.eb.length)throw new P(2,4,4024,"EXTINF");
932
- if(!a.A)return null}var z=[];v=!1;var x=null,A=!1,B=!1;if(a.A&&d.eb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.eb.length;F={xc:F.xc,jd:F.jd},J++){var G=d.eb[J],H=0==J?c:z[z.length-1],I=0==J?e:H.endTime,L=Number(Z(G,"DURATION"))||a.K;if(L){var M=I+L,O=0,S=null;"EXT-X-PRELOAD-HINT"==G.name?(O=(O=Z(G,"BYTERANGE-START"))?Number(O):0,(H=Z(G,"BYTERANGE-LENGTH"))?S=O+Number(H)-1:O&&(S=Number.MAX_SAFE_INTEGER)):
933
- (O=Z(G,"BYTERANGE"),S=t(Tt(H,O)),O=S.next().value,S=S.next().value);F.jd=Z(G,"URI");if(F.jd){H=zh;"YES"==Z(G,"GAP")&&(H=2,A=!0);F.xc=null;var ca=function(da){return function(){null==da.xc&&(da.xc=vs(h(),da.jd,f));return da.xc}}(F);n&&0<=O&&null!=S&&(x=ca,v=!0);I=new R(I,M,ca,O,S,b,0,0,Infinity,[],"",null,D,H,k);"EXT-X-PRELOAD-HINT"==G.name&&(I.Qe(),B=!0);"YES"!=Z(G,"INDEPENDENT")&&0<J&&I.Jd();z.push(I);D&&(D+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=
934
- z[z.length-1].endTime;else return null;v&&(A||0!=z[0].Oa?(v=!1,x=null):z=[]);(m=ts(l,"EXT-X-BYTERANGE"))?(p=t(Tt(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Oa,p=z[z.length-1].va);c="";m=null;"image"==g.type&&(c="1x1",g=ts(l,"EXT-X-TILES"))&&(c=os(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var W=null;b=new R(e,n,function(){if(x)return x();null==W&&(W=vs(h(),d.h,f));return W||[]},q,p,b,0,0,Infinity,z,c,m,u,y,k,0<z.length&&!!d.h);v&&(a.jb=!0,b.Qf(),B&&b.Qe());return b}
931
+ if(!a.A)return null}var z=[];v=!1;var x=null,A=!1,B=!1;if(a.A&&d.eb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=u,F={},J=0;J<d.eb.length;F={zc:F.zc,jd:F.jd},J++){var G=d.eb[J],H=0==J?c:z[z.length-1],I=0==J?e:H.endTime,L=Number(Z(G,"DURATION"))||a.K;if(L){var M=I+L,O=0,S=null;"EXT-X-PRELOAD-HINT"==G.name?(O=(O=Z(G,"BYTERANGE-START"))?Number(O):0,(H=Z(G,"BYTERANGE-LENGTH"))?S=O+Number(H)-1:O&&(S=Number.MAX_SAFE_INTEGER)):
932
+ (O=Z(G,"BYTERANGE"),S=t(Tt(H,O)),O=S.next().value,S=S.next().value);F.jd=Z(G,"URI");if(F.jd){H=zh;"YES"==Z(G,"GAP")&&(H=2,A=!0);F.zc=null;var ca=function(da){return function(){null==da.zc&&(da.zc=vs(h(),da.jd,f));return da.zc}}(F);n&&0<=O&&null!=S&&(x=ca,v=!0);I=new R(I,M,ca,O,S,b,0,0,Infinity,[],"",null,D,H,k);"EXT-X-PRELOAD-HINT"==G.name&&(I.Qe(),B=!0);"YES"!=Z(G,"INDEPENDENT")&&0<J&&I.Jd();z.push(I);D&&(D+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=
933
+ z[z.length-1].endTime;else return null;v&&(A||0!=z[0].Oa?(v=!1,x=null):z=[]);(m=ts(l,"EXT-X-BYTERANGE"))?(p=t(Tt(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Oa,p=z[z.length-1].va);c="";m=null;"image"==g.type&&(c="1x1",g=ts(l,"EXT-X-TILES"))&&(c=ms(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var W=null;b=new R(e,n,function(){if(x)return x();null==W&&(W=vs(h(),d.h,f));return W||[]},q,p,b,0,0,Infinity,z,c,m,u,y,k,0<z.length&&!!d.h);v&&(a.jb=!0,b.Qf(),B&&b.Qe());return b}
935
934
  function Tt(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.va+1,d=c+b-1);return[c,d]}
936
- function $s(a,b,c,d,e,f){var g=b.segments,h=void 0,k=us(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=us(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=ts(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;Rs(a)&&d.has(q)&&(p=d.get(q));0===p&&a.ea==vt&&0<d.size&&!d.has(q)&&(p=a.l.cb());var u=[],v=null;m=[];for(var y=0;y<g.length;y++){var z=g[y],x=0==y?p:v.endTime;q=l+n+y;ts(z.g,"EXT-X-DISCONTINUITY")&&k++;var A=t(z.g);for(var B=A.next();!B.done;B=A.next())B=B.value,"EXT-X-KEY"==B.name&&("AES-128"==os(B,
935
+ function $s(a,b,c,d,e,f){var g=b.segments,h=void 0,k=us(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=us(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=ts(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;Rs(a)&&d.has(q)&&(p=d.get(q));0===p&&a.ea==vt&&0<d.size&&!d.has(q)&&(p=a.l.cb());var u=[],v=null;m=[];for(var y=0;y<g.length;y++){var z=g[y],x=0==y?p:v.endTime;q=l+n+y;ts(z.g,"EXT-X-DISCONTINUITY")&&k++;var A=t(z.g);for(var B=A.next();!B.done;B=A.next())B=B.value,"EXT-X-KEY"==B.name&&("AES-128"==ms(B,
937
936
  "METHOD")?h=Qt(a,B,b,f,e):h=void 0);d.set(q,x);A=tt(a,b,z.g,f,e);!a.A&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.A=a.i.isLowLatencyMode());if(x=St(a,A,v,z,x,e,c,f,h))(v=us(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:x.endTime-x.startTime}):m.length&&(v=m.pop(),v.duration+=x.endTime-x.startTime,m.push(v)),v=x,x.j=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.I&&q<a.I||u.push(x)}b=void 0;m.length&&(b=m.reduce(function(D,F){return D+F.duration},0),b=Math.round(m.reduce(function(D,
938
- F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.aa}))for(c={},d=0;d<u.length;c={qc:c.qc,pc:c.pc,ed:c.ed,ub:c.ub,oc:c.oc},d++)if(c.ub=u[d],null==c.ub.aa)for(c.pc=0,c.qc=d,e=function(D){return function(){var F=u[D.qc];if(F){if(null!=F.aa)return F.aa+D.pc;D.pc-=F.endTime-F.startTime;D.qc+=1}return null}}(c),c.oc=0,c.ed=d,f=function(D){return function(){var F=u[D.ed];if(F){F!=D.ub&&(D.oc+=F.endTime-F.startTime);if(null!=F.aa)return F.aa+D.oc;--D.ed}return null}}(c);null==
937
+ F){return D+F.bitrate*F.duration},0)/b*1E3));if(m=u.some(function(D){return null!=D.aa}))for(c={},d=0;d<u.length;c={sc:c.sc,rc:c.rc,ed:c.ed,ub:c.ub,qc:c.qc},d++)if(c.ub=u[d],null==c.ub.aa)for(c.rc=0,c.sc=d,e=function(D){return function(){var F=u[D.sc];if(F){if(null!=F.aa)return F.aa+D.rc;D.rc-=F.endTime-F.startTime;D.sc+=1}return null}}(c),c.qc=0,c.ed=d,f=function(D){return function(){var F=u[D.ed];if(F){F!=D.ub&&(D.qc+=F.endTime-F.startTime);if(null!=F.aa)return F.aa+D.qc;--D.ed}return null}}(c);null==
939
938
  c.ub.aa;)c.ub.aa=f(),null==c.ub.aa&&(c.ub.aa=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.aa,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.aa=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.mf(a);return{segments:u,bandwidth:b}}
940
939
  function At(a,b){if(a==Cc){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"}function Bt(a){return a==Cc?"text/vtt":Ut[a].mp4}
941
940
  function Pt(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:g=nf;h=Math.trunc((d.segments.length-1)/2);k=vs(f(),d.segments[h].h,e);l=new gc(k[0]);m=l.Ea.split(".").pop();n=Ut[b];if((q=n[m])||(q=st[m])||(q=At(b,c)))return A.return(q);u=1;v=gf(k,a.g.retryParameters);ta(A,2);v.method="HEAD";return C(A,ut(a,v,g,{type:u}),4);case 4:y=A.h;p=y.headers["content-type"];wa(A,3);break;case 2:z=xa(A);if(!z||1002!=z.code&&1001!=z.code){A.B(3);break}v.method="GET";return C(A,
942
941
  ut(a,v,g,{type:u}),6);case 6:x=A.h,p=x.headers["content-type"];case 3:return p?A.return(p.split(";")[0]):A.return(Bt(b))}})}function pt(a,b,c,d,e,f){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)}function Ps(a,b,c){return ut(a,gf(b,a.g.retryParameters),0,{type:c?2:3})}
943
942
  function Ns(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.i)return h.return();ta(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();Rs(a)&&(d=(c-b)/1E3,a.ib.sample(1,d),e=a.m,f=Math.max(0,e-Pa(a.ib)),a.s.U(f));wa(h,3);break;case 2:g=xa(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();E(h)}})}
944
- function Rs(a){return a.ea!=Os}function Vs(a,b){a.ea=b;a.l&&a.l.kc(!Rs(a));Rs(a)||a.s.stop()}function ut(a,b,c,d){if(!a.O)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b,d);bf(a.O,b);return b.promise}N("shaka.hls.HlsParser",Ms);
943
+ function Rs(a){return a.ea!=Os}function Vs(a,b){a.ea=b;a.l&&a.l.mc(!Rs(a));Rs(a)||a.s.stop()}function ut(a,b,c,d){if(!a.O)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b,d);bf(a.O,b);return b.promise}N("shaka.hls.HlsParser",Ms);
945
944
  var st={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Ut={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",
946
- 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"}},Ft={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return yc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=os(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
947
- b=os(a,"URI");b=Is(b);b=nb(b.data);b=yc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=os(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=os(a,"URI");a=Is(a);a=nb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=eg(a,b,new Set,0);return yc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
948
- os(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?yc("org.w3.clearkey",null):null}},Os="VOD",Ot="EVENT",vt="LIVE",Us={og:Os,ci:Ot,ki:vt};sh["application/x-mpegurl"]=function(){return new Ms};sh["application/vnd.apple.mpegurl"]=function(){return new Ms};function Vt(a){var b=0,c=rb(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=nb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Wt(a){if(a=Xt(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=fg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
945
+ 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"}},Ft={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return yc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=ms(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
946
+ b=ms(a,"URI");b=Is(b);b=nb(b.data);b=yc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=ms(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=ms(a,"URI");a=Is(a);a=nb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=eg(a,b,new Set,0);return yc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a,
947
+ b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);a=ms(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?yc("org.w3.clearkey",null):null}},Os="VOD",Ot="EVENT",vt="LIVE",Us={og:Os,ci:Ot,ki:vt};sh["application/x-mpegurl"]=function(){return new Ms};sh["application/vnd.apple.mpegurl"]=function(){return new Ms};function Vt(a){var b=0,c=rb(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=nb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Wt(a){if(a=Xt(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=fg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
949
948
  function Xt(a){a=$f(a.textContent);a=Vt(a).filter(function(b){return b.type===Yt})[0];if(!a)return null;a=Ef(a.value,!0);return(a=yg(a,"WRMHEADER"))?a:null}var Yt=1,Zt=(new Map).set("com.microsoft.playready",Wt).set("com.microsoft.playready.recommendation",Wt).set("com.microsoft.playready.software",Wt).set("com.microsoft.playready.hardware",Wt);function $t(a){if(!au){au=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);bu=cu("ftyp",b,d,b,c);b=cu("dref",du);eu=cu("dinf",b)}this.g=a}
950
949
  function fu(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=cu;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/(gu+1));m=Math.floor(m%(gu+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(w(hu(h,4)),[0,0,0,0],w(hu(n,4)),w(hu(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],w(hu(k,2)),[0,0],w(hu(l,
951
950
  2)),[0,0]));h=cu("tkhd",h);k=cu;n=g.duration*g.timescale;l=Math.floor(n/(gu+1));n=Math.floor(n%(gu+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(w(hu(g.timescale,4)),w(hu(l,4)),w(hu(n,4)),w(hu(m,2)),[0,0]));l=cu("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=iu;break;case "audio":m=ju}n=cu("hdlr",m);a:{switch(g.type){case "video":g=cu("minf",cu("vmhd",ku),eu,lu(g));break a;
@@ -968,7 +967,7 @@ var au=!1,gu=Math.pow(2,32)-1,yu={},iu=new Uint8Array([0,0,0,0,0,0,0,0,118,105,1
968
967
  0,0,0,0,0,0,0]),ru=new Uint8Array([0,0,0,0,0,0,0,1]),bu=new Uint8Array([]),du=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),eu=new Uint8Array([]);function zu(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.A=new Oa(5);this.o=new jd(function(){Au(a)});this.u=new af;this.m=new Map}r=zu.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return K(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Bu(c),2);if(!c.h)throw new P(2,7,7001);return d.return(c.j)})};
969
968
  function Au(a){var b;K(function(c){switch(c.g){case 1:return ta(c,2),C(c,Bu(a),4);case 4:wa(c,3);break;case 2:b=xa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();E(c)}})}r.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.u.destroy()};
970
969
  r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),C(c,Bu(a),4);if(2!=c.g)return wa(c,0);b=xa(c);if(!a.h||!b)return c.return();a.h.onError(b);E(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
971
- function Bu(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=gf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),bf(a.u,e),C(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=Ag(f.data,"SmoothStreamingMedia");if(!m)throw new P(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new bj(null,0));if(l=og(m,"IsLive",wg,!1))throw new P(2,4,4047);a.i.kc(!l);var n=og(m,"TimeScale",ug,1E7),
970
+ function Bu(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=gf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),bf(a.u,e),C(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=Ag(f.data,"SmoothStreamingMedia");if(!m)throw new P(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new bj(null,0));if(l=og(m,"IsLive",wg,!1))throw new P(2,4,4047);a.i.mc(!l);var n=og(m,"TimeScale",ug,1E7),
972
971
  q=og(m,"DVRWindowLength",ug);l&&(0===q||isNaN(q))&&(q=Infinity);var p=og(m,"CanSeek",wg,!1);0===q&&p&&(q=Infinity);p=null;q&&0<q&&(p=q/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.Sd(p);q=og(m,"Duration",ug,Infinity);l||a.i.Na(q/n);l={variants:[],textStreams:[],timescale:n,duration:q/n};p=gg(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;q=[];p=t(p);for(u=p.next();!u.done;u=p.next())q=q.concat(gg(u.value,"ProtectionHeader"));if(q.length){p=
973
972
  [];for(u=0;u<q.length;u++){var v=q[u],y=v.getAttribute("SystemID").toLowerCase(),z=n[y];if(z){var x=Xt(v);if(x)a:{x=t(x.getElementsByTagName("DATA"));for(var A=x.next();!A.done;A=x.next())if(A=fg(A.value,"KID")){x=$f(A.textContent);x=new Uint8Array([x[3],x[2],x[1],x[0],x[5],x[4],x[7],x[6]].concat(w(x.slice(8))));x=bg(x);break a}x=null}else x=null;A=$f(v.textContent);y=ag(y.replace(/-/g,""));y=[{initData:eg(A,y,new Set,0),initDataType:"cenc",keyId:x}];y=yc(z,y);x&&y.keyIds.add(x);if(z=Zt.get(z))y.licenseServerUri=
974
973
  z(v);p.push(y)}}n=p}else n=[];u=n;p=[];n=[];q=[];m=gg(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=gg(v,"QualityLevel");y=l.timescale;x=l.duration;A=gg(v,"c");for(var B=[],D=0,F=0;F<A.length;++F){var J=A[F],G=A[F+1],H=og(J,"t",ug),I=og(J,"d",ug);J=og(J,"r",sg);if(!I)break;H=null!=H?H:D;J=J||0;if(0>J)if(G){G=og(G,"t",ug);if(null==G)break;else if(H>=G)break;J=Math.ceil((G-H)/I)-1}else{if(Infinity==x)break;else if(H/y>=x)break;J=Math.ceil((x*y-H)/I)-1}for(G=0;G<=J;++G)D=H+I,
@@ -983,7 +982,7 @@ if(a.m.has(y.id))var z=a.m.get(y.id);else z=[],"video"==y.type&&(z=y.mssPrivateD
983
982
  function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)};return y}
984
983
  function Fu(a,b,c,d){if(a=a.getAttribute("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|
985
984
  b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Gu(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 Hu(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
986
- function Iu(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={wc:g.wc},h=e.next())g.wc=h.value,d.push(new R(g.wc.start,g.wc.end,function(k){return function(){return xc(a.l,[f.replace("{start time}",String(k.wc.uf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",zu);var Eu="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Du={CAPT:"main",SUBT:"alternate",DESC:"main"};
985
+ function Iu(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={yc:g.yc},h=e.next())g.yc=h.value,d.push(new R(g.yc.start,g.yc.end,function(k){return function(){return xc(a.l,[f.replace("{start time}",String(k.yc.uf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}N("shaka.mss.MssParser",zu);var Eu="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Du={CAPT:"main",SUBT:"alternate",DESC:"main"};
987
986
  sh["application/vnd.ms-sstr+xml"]=function(){return new zu};function Ju(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"]};e=null;try{e=Gf(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ku(){}function Lu(a,b,c,d,e){var f=new Mu;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Nu,h={zf:!1,jg:!1};a=Ou(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 Pe(a,function(){h.zf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new jd(function(){h.jg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
988
987
  function Ou(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:return h=Pu,k=Qu,q=n=0,p=Date.now(),ta(B,2),C(B,h(a,c),4);case 4:l=B.h;f(Ru(l.headers));if("HEAD"==c.method){B.B(5);break}u=l.clone().body.getReader();y=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(D){function F(){var J,G;return K(function(H){switch(H.g){case 1:return ta(H,2),C(H,u.read(),4);case 4:J=H.h;wa(H,3);break;case 2:return xa(H),H.return();case 3:if(J.done){H.B(5);break}n+=
989
988
  J.value.byteLength;if(!g){H.B(5);break}return C(H,g(J.value),5);case 5:G=Date.now();if(100<G-p||J.done)e(G-p,n-q,y-n),q=n,p=G;J.done?D.close():(D.enqueue(J.value),F());E(H)}})}F()};new k({start:z});return C(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:wa(B,3);break;case 2:x=xa(B);if(d.zf)throw new P(1,1,7001,a,b);if(d.jg)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,x,b);case 3:return A=Ru(l.headers),B.return(Ju(A,m,l.status,a,l.url,b))}})}
@@ -996,25 +995,25 @@ function ev(a,b,c,d,e,f){qf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(func
996
995
  function fv(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=nf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;zb(a.h,e);return g.return(f.data)})};function hv(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Oe;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}hv.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return C(b,a.g,4)}if(2!=b.g)return wa(b,0);xa(b);E(b)})};
997
996
  function iv(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();E(g)})}})}hv.prototype.store=function(){return this.h};hv.prototype.promise=function(){return this.g};function jv(a){this.h=a;this.g=[]}jv.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function kv(a,b){return lv(a,b,"readwrite")}function lv(a,b,c){c=a.h.transaction([b],c);var d=new hv(c,b);a.g.push(d);d.promise().then(function(){zb(a.g,d)},function(){zb(a.g,d)});return d};function mv(a,b,c){this.h=new jv(a);this.i=b;this.g=c}r=mv.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return nv(this.i)};r.removeSegments=function(a,b){return ov(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,pv(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bf(e)}))})};r.addManifests=function(){return nv(this.g)};
998
997
  r.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function qv(a,b,c){a=kv(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=kv(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()};r.removeManifests=function(a,b){return ov(this,this.g,a,b)};
999
- r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,pv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Jc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=lv(a.h,a.g,"readonly"),c=new Map,C(d,iv(b,function(e,f){var g;return K(function(h){if(1==h.g)return C(h,a.Jc(f),2);g=h.h;c.set(e,g);E(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Bf=function(a){return a};r.Jc=function(a){return Promise.resolve(a)};
998
+ r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return C(d,pv(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Lc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=lv(a.h,a.g,"readonly"),c=new Map,C(d,iv(b,function(e,f){var g;return K(function(h){if(1==h.g)return C(h,a.Lc(f),2);g=h.h;c.set(e,g);E(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Bf=function(a){return a};r.Lc=function(a){return Promise.resolve(a)};
1000
999
  function nv(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=kv(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={kd:g.kd},k=h.next())l=k.value,g.kd=e.add(l),g.kd.onsuccess=function(n){return function(){f.push(n.kd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
1001
1000
  function ov(a,b,c,d){a=kv(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={hd:e.hd},f=c.next())e.hd=f.value,b.delete(e.hd).onsuccess=function(g){return function(){return d(g.hd)}}(e);return a.promise()}
1002
- function pv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=lv(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={uc:h.uc,sc:h.sc},l=k.next())h.sc=l.value,h.uc=e.get(h.sc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.sc);f[n.sc]=n.uc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function rv(a){this.g=new jv(a)}rv.prototype.destroy=function(){return this.g.destroy()};rv.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=lv(a.g,"session-ids","readonly"),c=[],C(d,iv(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};rv.prototype.add=function(a){var b=kv(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()};
1001
+ function pv(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=lv(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={wc:h.wc,uc:h.uc},l=k.next())h.uc=l.value,h.wc=e.get(h.uc),h.wc.onsuccess=function(n){return function(){void 0==n.wc.result&&g.push(n.uc);f[n.uc]=n.wc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function rv(a){this.g=new jv(a)}rv.prototype.destroy=function(){return this.g.destroy()};rv.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=lv(a.g,"session-ids","readonly"),c=[],C(d,iv(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};rv.prototype.add=function(a){var b=kv(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()};
1003
1002
  rv.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=kv(b.g,"session-ids"),C(d,iv(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function sv(){this.g=new Map}sv.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)};sv.prototype.init=function(){var a=this;tv.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)};
1004
1003
  function uv(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ua:d,ua:f},ua:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function vv(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ua:d,ua:f},e)})})}
1005
1004
  function wv(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function xv(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function yv(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1006
1005
  function zv(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=tv,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Av(a,b){tv.set(a,b)}N("shaka.offline.StorageMuxer",sv);sv.unregister=function(a){tv.delete(a)};sv.register=Av;sv.prototype.destroy=sv.prototype.destroy;var tv=new Map;function Bv(){mv.apply(this,arguments)}pa(Bv,mv);Bv.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=kv(c.h,c.g);e=d.store();f=new Oe;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
1007
- Bv.prototype.Jc=function(a){var b,c,d,e,f,g;return K(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=Cv(a.periods[c],e),b.push(f);return C(h,or(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})})};
1006
+ Bv.prototype.Lc=function(a){var b,c,d,e,f,g;return K(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=Cv(a.periods[c],e),b.push(f);return C(h,or(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})})};
1008
1007
  function Cv(a,b){Dv(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ev(e,a.startTime,b)})}
1009
1008
  function Ev(a,b,c){var d=a.initSegmentUri?Fv(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,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=
1010
1009
  Fv(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Bv.prototype.Bf=function(a){return{data:a.data}};
1011
1010
  function Fv(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 P(2,9,9004,"Could not parse uri "+a);}
1012
1011
  function Dv(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++,
1013
1012
  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 Gv(){mv.apply(this,arguments)}pa(Gv,mv);
1014
- Gv.prototype.Jc=function(a){var b,c,d,e,f,g;return K(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(Hv(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,or(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1013
+ Gv.prototype.Lc=function(a){var b,c,d,e,f,g;return K(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(Hv(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,or(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1015
1014
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1016
1015
  function Hv(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,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,
1017
- appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Iv(){mv.apply(this,arguments)}pa(Iv,mv);r=Iv.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return qv(this,a,b)};r.Jc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Jv(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Jv.prototype;
1016
+ appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function Iv(){mv.apply(this,arguments)}pa(Iv,mv);r=Iv.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return qv(this,a,b)};r.Lc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Jv(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Jv.prototype;
1018
1017
  r.init=function(){var a=this,b=new Oe,c=!1,d=new jd(function(){c=!0;b.reject(new P(2,9,9017))});d.U(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 Bv(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Gv(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1019
1018
  new Gv(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Iv(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new rv(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 P(2,
1020
1019
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),E(b)}})};
@@ -1036,13 +1035,13 @@ r.onInitialVariantChosen=function(){};r.banLocation=function(){};sh["application
1036
1035
  function Wv(a,b){var c=new sv;return Se(void 0).oa(function(){return c.init()}).oa(function(){return wv(c,b.Ua(),b.ua())}).oa(function(d){return d.getSegments([b.key()])}).oa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}N("shaka.offline.OfflineScheme",Uv);Uv.plugin=Vv;df("offline",Vv);function Xv(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Yv(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Zv(a,b,g);return C(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)}})}
1037
1036
  function Zv(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Bg({Qb:b,onError:function(){},Pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),C(f,Jg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return xa(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==
1038
1037
  h.g)return ta(h,2),C(h,Vg(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);xa(h);E(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function Yv(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ab(a.audioCapabilities,b.audioCapabilities,c)&&Ab(a.videoCapabilities,b.videoCapabilities,c)};function $v(a,b,c){var d=b.presentationTimeline.getDuration();b=aw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function bw(a,b){var c=Ov(new Nv(a.Ua(),a.ua()),b),d=b.appMetadata||{};c=aw(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}}
1039
- function aw(a){var b=[],c=ee(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Wd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Xd(c.value));return b};function cw(){this.g={}}function dw(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 ew(a,b){a.g[b.id]=b.bandwidth||2048}function fw(a,b){a=a.g[b];null==a&&(a=0);return a};function gw(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Kb()):(this.h=Dl(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new pf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return cv(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 C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
1040
- case 4:b.h=null,b.g=null,E(k)}})})}function hw(){if(kd())a:{var a=t(tv.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}r=gw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=tl(a,b));return Fl(this.h,a)};r.getConfiguration=function(){var a=Dl();Fl(a,this.h,Dl());return a};r.Kb=function(){return this.g};
1038
+ function aw(a){var b=[],c=ee(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Wd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Xd(c.value));return b};function cw(){this.g={}}function dw(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 ew(a,b){a.g[b.id]=b.bandwidth||2048}function fw(a,b){a=a.g[b];null==a&&(a=0);return a};function gw(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Lb()):(this.h=Dl(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new pf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return cv(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 C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
1039
+ case 4:b.h=null,b.g=null,E(k)}})})}function hw(){if(kd())a:{var a=t(tv.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}r=gw.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=tl(a,b));return Fl(this.h,a)};r.getConfiguration=function(){var a=Dl();Fl(a,this.h,Dl());return a};r.Lb=function(){return this.g};
1041
1040
  r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new bv(this.g);this.j.push(f);b=iw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.B(2):C(h,Dk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=rh(a,c||null);return h.return(g())})},e,f);b=new Pe(b,function(){return cv(f)});b.finally(function(){zb(d.j,f)});return jw(this,b)};
1042
1041
  function iw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,y,z,x,A;return K(function(B){switch(B.g){case 1:return kw(),h=g=null,k=new sv,n=m=l=null,ta(B,2,3),C(B,d(),5);case 5:return g=B.h,C(B,lw(a,b,g,e),6);case 6:q=B.h;mw(a);p=!q.presentationTimeline.P()&&!q.presentationTimeline.Ob();if(!p)throw new P(2,9,9005,b);return C(B,nw(a,q,function(D){n=n||D},e),7);case 7:h=B.h;mw(a);if(n)throw n;return C(B,ow(q,h,e),8);case 8:return C(B,k.init(),9);case 9:return mw(a),C(B,uv(k),10);case 10:return l=B.h,mw(a),u=pw(h,
1043
1042
  q,b,c,e,f),v=u.oh,y=u.pf,C(B,l.ua.addManifests([v]),11);case 11:z=B.h;mw(a);m=z[0];mw(a);if(n)throw n;return C(B,qw(a,y,m,v,f,e,l.ua,q,h),12);case 12:return mw(a),rw(q,v,h,e),C(B,l.ua.updateManifest(m,v),13);case 13:return mw(a),x=new Lv("manifest",l.path.Ua,l.path.ua,m),B.return(bw(x,v));case 3:return ya(B),C(B,k.destroy(),14);case 14:if(!g){B.B(15);break}return C(B,g.stop(),15);case 15:if(!h){B.B(17);break}return C(B,h.destroy(),17);case 17:za(B,0);break;case 2:A=xa(B);if(null==m){B.B(19);break}return C(B,
1044
1043
  sw(m),19);case 19:throw n||A;}})}
1045
- function qw(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:l={};m=0;n=function(B,D){var F,J,G,H,I,L,M;return K(function(O){if(1==O.g){F={};J=t(B);for(G=J.next();!G.done;F={Eb:F.Eb},G=J.next())F.Eb=G.value,H=Zu(F.Eb,f),I=F.Eb.i,L=F.Eb.h,M=function(S){return function(ca){var W,da,Ba;return K(function(Sa){if(1==Sa.g)return C(Sa,g.addSegments([{data:ca}]),2);W=Sa.h;mw(a);da=S.Eb.g;Ba=Yu(da);l[Ba]=W[0];m+=ca.byteLength;E(Sa)})}}(F),ev(e,F.Eb.groupId,H,I,L,M);return C(O,
1044
+ function qw(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,y,z,x;return K(function(A){switch(A.g){case 1:l={};m=0;n=function(B,D){var F,J,G,H,I,L,M;return K(function(O){if(1==O.g){F={};J=t(B);for(G=J.next();!G.done;F={Fb:F.Fb},G=J.next())F.Fb=G.value,H=Zu(F.Fb,f),I=F.Fb.i,L=F.Fb.h,M=function(S){return function(ca){var W,da,Ba;return K(function(Sa){if(1==Sa.g)return C(Sa,g.addSegments([{data:ca}]),2);W=Sa.h;mw(a);da=S.Fb.g;Ba=Yu(da);l[Ba]=W[0];m+=ca.byteLength;E(Sa)})}}(F),ev(e,F.Fb.groupId,H,I,L,M);return C(O,
1046
1045
  gv(e),2)}if(!D)return O.B(0);mw(a);rw(h,d,k,f);return C(O,g.updateManifest(c,d),0)})};q=!1;ta(A,2);if(!tw(h)||!q||uw(h)){A.B(4);break}return C(A,n(b.filter(function(B){return B.h}),!0),5);case 5:return mw(a),b=b.filter(function(B){return!B.h}),p=l,u=m,l={},m=0,C(A,vw(g,c,d,p,u,function(){return mw(a)}),6);case 6:mw(a);case 4:if(q){A.B(7);break}return C(A,n(b,!1),8);case 8:return mw(a),v=l,y=m,l={},m=0,C(A,vw(g,c,d,v,y,function(){return mw(a)}),9);case 9:mw(a);case 7:wa(A,0);break;case 2:return z=
1047
1046
  xa(A),x=Object.values(l),C(A,g.removeSegments(x,function(){}),10);case 10:throw z;}})}function sw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new sv,C(f,b.init(),2);case 2:return C(f,uv(b),3);case 3:return c=f.h,d=new Lv("manifest",c.path.Ua,c.path.ua,a),C(f,b.destroy(),4);case 4:return e=new gw,C(f,e.remove(d.toString()),0)}})}
1048
1047
  function vw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,y;return K(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
@@ -1051,8 +1050,8 @@ function ow(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A,B,D,F,J,G,H,I,L,M,O,S;r
1051
1050
  for(v=u.next();!v.done;v=u.next())y=v.value,e.push(Yd(y));return C(ca,c.offline.trackSelectionCallback(e),3);case 3:z=ca.h;x=a.presentationTimeline.getDuration();A=0;B=t(z);for(D=B.next();!D.done;D=B.next())F=D.value,J=F.bandwidth*x/8,A+=J;ta(ca,4);return C(ca,c.offline.downloadSizeCallback(A),6);case 6:G=ca.h;if(!G)throw new P(2,9,9014);wa(ca,5);break;case 4:H=xa(ca);if(H instanceof P)throw H;throw new P(2,9,9015);case 5:I=new Set;L=new Set;M=new Set;O=t(z);for(D=O.next();!D.done;D=O.next())S=D.value,
1052
1051
  "variant"==S.type&&I.add(S.id),"text"==S.type&&L.add(S.id),"image"==S.type&&M.add(S.id);a.variants=a.variants.filter(function(W){return I.has(W.id)});a.textStreams=a.textStreams.filter(function(W){return L.has(W.id)});a.imageStreams=a.imageStreams.filter(function(W){return M.has(W.id)});ww(a);E(ca)}})}
1053
1052
  function pw(a,b,c,d,e,f){var g=$v(c,b,d),h=e.offline.progressCallback;dv(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Rg(a,"cenc",p)});var k=tw(b)&&!uw(b),l=null;k&&(l=xw.get(a.g.keySystem));for(var m=new cw,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())ew(m,q.value);q=t(b.variants);for(n=q.next();!n.done;n=q.next())dw(m,n.value);m=yw(f,m,b,e);f=m.streams;m=m.pf;q=a.g;n=e.offline.usePersistentLicense;
1054
- q&&n&&(q.initData=[]);return{oh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Nc(),streams:f,sessionIds:n?ah(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},pf:m}}function tw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1055
- function uw(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 rw(a,b,c,d){b.expiration=c.Nc();c=ah(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(tw(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}r.remove=function(a){return zw(this,Aw(this,a))};
1053
+ q&&n&&(q.initData=[]);return{oh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Oc(),streams:f,sessionIds:n?ah(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},pf:m}}function tw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1054
+ function uw(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 rw(a,b,c,d){b.expiration=c.Oc();c=ah(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(tw(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}r.remove=function(a){return zw(this,Aw(this,a))};
1056
1055
  function Aw(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:kw();c=Mv(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new sv;va(k,2);return C(k,e.init(),4);case 4:return C(k,wv(e,d.Ua(),d.ua()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Bw(a,h,e),Cw(f,d,h)]),2);case 2:return ya(k),C(k,e.destroy(),8);case 8:za(k,0)}})}
1057
1056
  function Dw(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:Fc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Fc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Bw(a,b,c){return K(function(d){return C(d,Ew(a.g,a.h.drm,c,b),0)})}
1058
1057
  function Cw(a,b,c){function d(){}var e=Fw(c);bw(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Ch=function(){return zw(this,Gw(this))};
@@ -1068,7 +1067,7 @@ function zw(a,b){return K(function(c){if(1==c.g)return a.i.push(b),va(c,2),C(c,b
1068
1067
  function Ew(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=yv(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Dw(d,!1),videoCapabilities:Dw(d,!0)}});return C(h,Xv(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1069
1068
  function Iw(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}
1070
1069
  function ww(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());}N("shaka.offline.Storage",gw);gw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new sv,va(b,2),C(b,zv(a),2)):5!=b.g?(ya(b),C(b,a.destroy(),5)):za(b,0)})};
1071
- gw.prototype.list=gw.prototype.list;gw.prototype.removeEmeSessions=gw.prototype.Ch;gw.prototype.remove=gw.prototype.remove;gw.prototype.store=gw.prototype.store;gw.prototype.getNetworkingEngine=gw.prototype.Kb;gw.prototype.getConfiguration=gw.prototype.getConfiguration;gw.prototype.configure=gw.prototype.configure;gw.prototype.destroy=gw.prototype.destroy;gw.support=hw;
1070
+ gw.prototype.list=gw.prototype.list;gw.prototype.removeEmeSessions=gw.prototype.Ch;gw.prototype.remove=gw.prototype.remove;gw.prototype.store=gw.prototype.store;gw.prototype.getNetworkingEngine=gw.prototype.Lb;gw.prototype.getConfiguration=gw.prototype.getConfiguration;gw.prototype.configure=gw.prototype.configure;gw.prototype.destroy=gw.prototype.destroy;gw.support=hw;
1072
1071
  var xw=(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").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
1073
1072
  mn.offline=hw;function Lw(){}function Mw(a,b){a={priority:b||0,ug:a};for(b=0;b<Nw.length;b++)if(Nw[b].priority<a.priority){Nw.splice(b,0,a);return}Nw.push(a)}N("shaka.polyfill",Lw);Lw.register=Mw;Lw.installAll=function(){for(var a=t(Nw),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ug()}catch(c){Ua("Error installing polyfill!",c)}}};var Nw=[];function Ow(){this.g=new Pw}function Qw(){window.AbortController||(window.AbortController=Ow,window.AbortSignal=Pw)}Ow.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 Q("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Ow.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Lw.AbortController=Ow;Ow.install=Qw;
1074
1073
  function Pw(){Ye.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Pw,Ye);fa.Object.defineProperties(Pw.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Mw(Qw);function Rw(){}function Sw(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Tw(b.value)}function Tw(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)}})}Lw.Aria=Rw;Rw.install=Sw;Mw(Sw);function Uw(){}function Vw(){Ww()}Lw.EncryptionScheme=Uw;Uw.install=Vw;Mw(Vw,-2);function Xw(){}
@@ -1079,179 +1078,179 @@ function cx(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,y,z,x,A;return K(function(B){sw
1079
1078
  (D+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(D)}else e=cb(c.contentType);else qd()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=cb(f)):e=cb(c.contentType);if(!e)return B.return(b)}if(d&&(ud()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=cb(h)):g=cb(d.contentType),!g))return B.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=ld(k),
1080
1079
  !l)||d&&(m=d.contentType,n=ld(m),!n))return B.return(b)}else return B.return(b);if(!a.keySystemConfiguration)return b.supported=!0,B.return(Promise.resolve(b));q=a.keySystemConfiguration;p=[];u=[];q.audio&&(v={robustness:q.audio.robustness||"",contentType:a.audio.contentType},qd()&&a.audio.contentType.includes('codecs="ac-3"')&&(v={robustness:v.robustness,contentType:'audio/mp4; codecs="ec-3"'}),p.push(v));q.video&&(y={robustness:q.video.robustness||"",contentType:a.video.contentType},u.push(y));
1081
1080
  z={initDataTypes:[q.initDataType],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,sessionTypes:q.sessionTypes};p.length&&(z.audioCapabilities=p);u.length&&(z.videoCapabilities=u);x=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ta(B,3);if(x in dx){A=dx[x];B.B(5);break}return C(B,navigator.requestMediaKeySystemAccess(q.keySystem,[z]),6);case 6:A=B.h,dx[x]=A;case 5:wa(B,4);break;case 3:xa(B);case 4:A&&(b.supported=
1082
- !0,b.keySystemAccess=A);case 2:return B.return(b)}})}Lw.MediaCapabilities=$w;$w.install=ax;var bx=null;$w.originalMcap=bx;var dx={};$w.memoizedMediaKeySystemAccessRequests_=dx;Mw(ax,-1);function ex(){}function fx(){var a=yd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?gx():a?10>=a?window.MediaSource=null:12>=a?(hx(),ix()):15>=a&&hx():nd()?jx():(sd()||rd()||pd("Tizen 4"))&&kx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&lx()}
1083
- function hx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function ix(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function jx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
1084
- function kx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Kc(b)[0]&&a(b)}}function gx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
1085
- function lx(){var a=MediaSource.isTypeSupported;pd("Web0S")||(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)})}Lw.MediaSource=ex;ex.install=fx;Mw(fx);function mx(){}function nx(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?ox():void 0!=window.orientation&&px())}function ox(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1086
- function px(){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 qx;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Lw.Orientation=mx;mx.install=nx;function qx(){Ye.call(this);this.type="";this.angle=0}pa(qx,Ye);
1087
- qx.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)};
1088
- qx.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Mw(nx);function rx(){}var sx,tx,ux,vx,wx,xx;function yx(a,b){try{var c=new zx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ax(a){var b=this.mediaKeys;b&&b!=a&&Bx(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Bx(a,this):Promise.resolve()}
1089
- function Cx(a){a=nb(a.initData);if(rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ef(a.subarray(4),!0);a=Hf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=ob(a);this.dispatchEvent(b)}Lw.PatchedMediaKeysApple=rx;
1090
- rx.uninstall=function(){sx&&(sx=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",tx),HTMLMediaElement.prototype.setMediaKeys=ux,window.MediaKeys=vx,window.MediaKeySystemAccess=wx,navigator.requestMediaKeySystemAccess=xx,tx=xx=ux=wx=vx=null,window.shakaMediaKeysPolyfill=!1)};
1091
- rx.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)sx=!0,tx=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),ux=HTMLMediaElement.prototype.setMediaKeys,vx=window.MediaKeys,wx=window.MediaKeySystemAccess,xx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ax;window.MediaKeys=Dx;window.MediaKeySystemAccess=zx;navigator.requestMediaKeySystemAccess=
1092
- yx;window.shakaMediaKeysPolyfill=!0}};
1093
- function zx(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,
1081
+ !0,b.keySystemAccess=A);case 2:return B.return(b)}})}Lw.MediaCapabilities=$w;$w.install=ax;var bx=null;$w.originalMcap=bx;var dx={};$w.memoizedMediaKeySystemAccessRequests_=dx;Mw(ax,-1);function ex(){}function fx(){var a=yd();window.MediaSource&&(ud()?gx():a?10>=a?window.MediaSource=null:12>=a?(hx(),ix()):15>=a&&hx():nd()?gx():(sd()||rd()||pd("Tizen 4"))&&jx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&kx()}
1082
+ function hx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function ix(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function gx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
1083
+ function jx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Kc(b)[0]&&a(b)}}
1084
+ function kx(){var a=MediaSource.isTypeSupported;pd("Web0S")||(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)})}Lw.MediaSource=ex;ex.install=fx;Mw(fx);function lx(){}function mx(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?nx():void 0!=window.orientation&&ox())}function nx(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1085
+ function ox(){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 px;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Lw.Orientation=lx;lx.install=mx;function px(){Ye.call(this);this.type="";this.angle=0}pa(px,Ye);
1086
+ px.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)};
1087
+ px.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Mw(mx);function qx(){}var rx,sx,tx,ux,vx,wx;function xx(a,b){try{var c=new yx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function zx(a){var b=this.mediaKeys;b&&b!=a&&Ax(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ax(a,this):Promise.resolve()}
1088
+ function Bx(a){a=nb(a.initData);if(rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ef(a.subarray(4),!0);a=Hf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=ob(a);this.dispatchEvent(b)}Lw.PatchedMediaKeysApple=qx;
1089
+ qx.uninstall=function(){rx&&(rx=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",sx),HTMLMediaElement.prototype.setMediaKeys=tx,window.MediaKeys=ux,window.MediaKeySystemAccess=vx,navigator.requestMediaKeySystemAccess=wx,sx=wx=tx=vx=ux=null,window.shakaMediaKeysPolyfill=!1)};
1090
+ qx.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)rx=!0,sx=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),tx=HTMLMediaElement.prototype.setMediaKeys,ux=window.MediaKeys,vx=window.MediaKeySystemAccess,wx=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=zx;window.MediaKeys=Cx;window.MediaKeySystemAccess=yx;navigator.requestMediaKeySystemAccess=
1091
+ xx;window.shakaMediaKeysPolyfill=!0}};
1092
+ function yx(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,
1094
1093
  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;}
1095
- zx.prototype.createMediaKeys=function(){var a=new Dx(this.keySystem);return Promise.resolve(a)};zx.prototype.getConfiguration=function(){return this.g};function Dx(a){this.h=new WebKitMediaKeys(a);this.g=new rf}Dx.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ex(this.h,a)};Dx.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1096
- function Bx(a,b){a.g.Xa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Cx);try{return ij(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Dx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Ex(a){Ye.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new rf;this.sessionId="";this.expiration=NaN;this.closed=new Oe;this.keyStatuses=new Fx}pa(Ex,Ye);r=Ex.prototype;
1097
- r.generateRequest=function(a,b){var c=this;this.h=new Oe;try{var d=this.l.createSession("video/mp4",nb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Mb()?"license-request":"license-renewal").set("message",ob(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Gx(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1098
- 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:Gx(c,"output-not-allowed");break;default:Gx(c,"internal-error")}});Gx(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1099
- r.update=function(a){this.g=new Oe;try{this.i.update(nb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Xa()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Gx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
1100
- function Fx(){this.size=0;this.g=void 0}r=Fx.prototype;r.Mb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,ph.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ph.value();return this.g&&lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Hx(){}function Ix(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Jx,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Kx,window.MediaKeys=Lx,window.MediaKeySystemAccess=Mx,window.shakaMediaKeysPolyfill=!0)}function Jx(){return Promise.reject(Error("The key system specified is not supported."))}
1101
- function Kx(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Lw.PatchedMediaKeysNop=Hx;Hx.install=Ix;function Lx(){throw new TypeError("Illegal constructor.");}Lx.prototype.createSession=function(){};Lx.prototype.setServerCertificate=function(){};Lx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Mx(){this.keySystem="";throw new TypeError("Illegal constructor.");}Mx.prototype.getConfiguration=function(){};
1102
- Mx.prototype.createMediaKeys=function(){};Mw(Ix,-10);function Nx(){}
1103
- function Ox(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Px="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Qx;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Rx;window.MediaKeys=Sx;window.MediaKeySystemAccess=Tx;window.shakaMediaKeysPolyfill=!0}}
1104
- function Ux(a){var b=Px;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Qx(a,b){try{var c=new Tx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Rx(a){var b=this.mediaKeys;b&&b!=a&&Vx(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Vx(a,this);return Promise.resolve()}Lw.PatchedMediaKeysWebkit=Nx;Nx.install=Ox;
1105
- function Tx(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),
1094
+ yx.prototype.createMediaKeys=function(){var a=new Cx(this.keySystem);return Promise.resolve(a)};yx.prototype.getConfiguration=function(){return this.g};function Cx(a){this.h=new WebKitMediaKeys(a);this.g=new rf}Cx.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Dx(this.h,a)};Cx.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1095
+ function Ax(a,b){a.g.Xa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",Bx);try{return ij(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Cx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Dx(a){Ye.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new rf;this.sessionId="";this.expiration=NaN;this.closed=new Oe;this.keyStatuses=new Ex}pa(Dx,Ye);r=Dx.prototype;
1096
+ r.generateRequest=function(a,b){var c=this;this.h=new Oe;try{var d=this.l.createSession("video/mp4",nb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Mb()?"license-request":"license-renewal").set("message",ob(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Fx(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1097
+ 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:Fx(c,"output-not-allowed");break;default:Fx(c,"internal-error")}});Fx(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1098
+ r.update=function(a){this.g=new Oe;try{this.i.update(nb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Xa()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Fx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
1099
+ function Ex(){this.size=0;this.g=void 0}r=Ex.prototype;r.Mb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,oh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=oh.value();return this.g&&lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Gx(){}function Hx(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Ix,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Jx,window.MediaKeys=Kx,window.MediaKeySystemAccess=Lx,window.shakaMediaKeysPolyfill=!0)}function Ix(){return Promise.reject(Error("The key system specified is not supported."))}
1100
+ function Jx(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Lw.PatchedMediaKeysNop=Gx;Gx.install=Hx;function Kx(){throw new TypeError("Illegal constructor.");}Kx.prototype.createSession=function(){};Kx.prototype.setServerCertificate=function(){};Kx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Lx(){this.keySystem="";throw new TypeError("Illegal constructor.");}Lx.prototype.getConfiguration=function(){};
1101
+ Lx.prototype.createMediaKeys=function(){};Mw(Hx,-10);function Mx(){}
1102
+ function Nx(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Ox="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Px;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Qx;window.MediaKeys=Rx;window.MediaKeySystemAccess=Sx;window.shakaMediaKeysPolyfill=!0}}
1103
+ function Tx(a){var b=Ox;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Px(a,b){try{var c=new Sx(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Qx(a){var b=this.mediaKeys;b&&b!=a&&Ux(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ux(a,this);return Promise.resolve()}Lw.PatchedMediaKeysWebkit=Mx;Mx.install=Nx;
1104
+ function Sx(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),
1106
1105
  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"]):
1107
- 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;}Tx.prototype.createMediaKeys=function(){var a=new Sx(this.g);return Promise.resolve(a)};Tx.prototype.getConfiguration=function(){return this.h};function Sx(a){this.l=a;this.h=null;this.g=new rf;this.i=[];this.j=new Map}
1108
- function Vx(a,b){a.h=b;a.g.Xa();var c=Px;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=ob(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Wx(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Mb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=Wx(a,d.sessionId))Xx(d,"usable"),
1109
- d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=Wx(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?Xx(e,"output-restricted"):1==f?Xx(e,"expired"):Xx(e,"internal-error"))}}))}
1110
- Sx.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 Yx(b,this.l,a);this.i.push(a);return a};Sx.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Sx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1111
- function Wx(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 Yx(a,b,c){Ye.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 Oe;this.keyStatuses=new Zx}pa(Yx,Ye);
1112
- function $x(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=nb(Hf("LOAD_SESSION|"+c));else{var e=Hf("PERSISTENT|");d=cg(e,b)}else d=nb(b)}catch(g){return Promise.reject(g)}a.h=new Oe;var f=Ux("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new jd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1113
- function ay(a,b,c){if(a.g)a.g.then(function(){return ay(a,b,c)}).catch(function(){return ay(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Df(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=$f(e.keys[0].k);e=$f(e.keys[0].kid)}else d=nb(c),e=null;var f=Ux("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1114
- function Xx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}r=Yx.prototype;r.generateRequest=function(a,b){return $x(this,b,null)};r.load=function(a){return"persistent-license"==this.l?$x(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Oe;ay(this,b,a);return b};
1115
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Ux("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Zx(){this.size=0;this.g=void 0}r=Zx.prototype;r.Mb=function(){return this.g};
1116
- r.forEach=function(a){this.g&&a(this.g,ph.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ph.value();return this.g&&lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Px="";Mw(Ox);function by(){}function cy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=dy,Object.defineProperty(a,"disablePictureInPicture",{get:ey,set:fy,enumerable:!0,configurable:!0}),document.exitPictureInPicture=gy,document.addEventListener("webkitpresentationmodechanged",hy,!0))}}
1117
- function hy(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)}
1118
- function dy(){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 gy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1119
- function ey(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function fy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Lw.PiPWebkit=by;by.install=cy;Mw(cy);function iy(){}function jy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=ky))}function ky(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Lw.RandomUUID=iy;iy.install=jy;Mw(jy);function ly(){}function my(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=ny)}function ny(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Lw.StorageEstimate=ly;ly.install=my;Mw(my);function oy(){}function py(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:qy})}function qy(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Lw.Symbol=oy;oy.install=py;Mw(py);function ry(){}function sy(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Lw.VideoPlayPromise=ry;ry.install=sy;Mw(sy);function ty(){}function uy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||td())&&(a.getVideoPlaybackQuality=vy)}}function vy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Lw.VideoPlaybackQuality=ty;ty.install=uy;Mw(uy);function wy(){}function xy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=yy;else if(6==b)a=zy;else{try{var c=!!yy(1,2,"")}catch(d){c=!1}c&&(a=yy)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function yy(a,b,c){return new window.TextTrackCue(a,b,c)}function zy(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Lw.VTTCue=wy;wy.install=xy;Mw(xy);function Ay(){}Ay.prototype.parseInit=function(){};Ay.prototype.setSequenceMode=function(){};Ay.prototype.setManifestType=function(){};Ay.prototype.parseMedia=function(a,b){var c=null,d=[];a=Df(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=By.exec(e))){var f=Cy.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Cb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1120
- N("shaka.text.LrcTextParser",Ay);Ay.prototype.parseMedia=Ay.prototype.parseMedia;Ay.prototype.setManifestType=Ay.prototype.setManifestType;Ay.prototype.setSequenceMode=Ay.prototype.setSequenceMode;Ay.prototype.parseInit=Ay.prototype.parseInit;var By=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Cy=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Pc["application/x-subtitle-lrc"]=function(){return new Ay};function Dy(){}Dy.prototype.parseInit=function(){};Dy.prototype.setSequenceMode=function(){};Dy.prototype.setManifestType=function(){};
1121
- Dy.prototype.parseMedia=function(a,b,c){var d=Df(a);a=[];if(""==d)return a;var e=yg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=lg(e,Ey,"frameRate"),g=lg(e,Ey,"subFrameRate"),h=lg(e,Ey,"frameRateMultiplier"),k=lg(e,Ey,"tickRate"),l=lg(e,Ey,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=lg(e,Fy,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Gy(f,
1122
- g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Gb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?jg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Db;var v=u.getAttribute("xml:id");if(v){p.id=v;var y=null;n&&(y=Hy.exec(n)||Iy.exec(n));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,x=Jy(u,h,"extent");if(x){var A=(z=Hy.exec(x))||Iy.exec(x);
1123
- null!=A&&(p.width=Number(A[1]),p.height=Number(A[2]),z||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=z||null!=v?Wb:0,p.heightUnits=z||null!=y?Wb:0)}if(u=Jy(u,h,"origin"))if(A=(z=Hy.exec(u))||Iy.exec(u),null!=A)p.viewportAnchorX=Number(A[1]),p.viewportAnchorY=Number(A[2]),z?x||(p.width=100-p.viewportAnchorX,p.widthUnits=Wb,p.height=100-p.viewportAnchorY,p.heightUnits=Wb):(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/
1124
- v)),p.viewportAnchorUnits=z||null!=v?Wb:0}else p=null;p&&k.push(p)}if(gg(d,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");n=t(gg(d,"div"));for(q=n.next();!q.done;q=n.next())if(gg(q.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Ky(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1125
- function Ky(a,b,c,d,e,f,g,h,k,l,m,n){var q=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(Ly),y=v.next();!y.done&&!(u=My(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;var z=lg(p,Ly,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new gc(n),z=new gc(z),(y=y.resolve(z).toString())&&(v=y));if("p"==a.nodeName||u||v)m=!0;a=m;y="default"==(p.getAttribute("xml:space")||
1126
- (h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var x=t(p.childNodes),A=x.next();!A.done;A=x.next())(A=Ky(A.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(A);d=null!=l;n=/\S/.test(p.textContent);A=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(A||n||"br"==p.tagName||0!=h.length||d&&!y))return null;x=Ny(p,c);n=x.start;for(x=x.end;q&&q.nodeType==Node.ELEMENT_NODE&&"tt"!=q.tagName;)x=Oy(q,c,n,x),n=x.start,x=
1127
- x.end,q=q.parentNode;null==n&&(n=0);n+=b.periodStart;x=null==x?Infinity:x+b.periodStart;n=Math.max(n,b.segmentStart);x=Math.min(x,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,x=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new Cb(n,x,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,y&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Cb(n,x,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=My(p,"region",f,"")[0];
1128
- if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=My(l,"region",f,"")[0]);Py(b,p,g,u,v,e,a,0==h.length);return b}
1129
- function Py(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Qy(b,c,f,"direction",g)&&(a.direction="rtl");h=Qy(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=Gb);(h=Qy(b,c,f,"textAlign",!0))?(a.positionAlign=Ry[h],a.lineAlign=Sy[h],a.textAlign=Pb[h.toUpperCase()]):a.textAlign=Fb;if(h=Qy(b,c,f,"displayAlign",!0))a.displayAlign=Qb[h.toUpperCase()];if(h=Qy(b,c,f,"color",g))a.color=h;if(h=Qy(b,c,f,"backgroundColor",
1130
- g))a.backgroundColor=h;if(h=Qy(b,c,f,"border",g))a.border=h;if(h=Qy(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=Qy(b,c,f,"fontWeight",g))&&
1131
- "bold"==h&&(a.fontWeight=700);h=Qy(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Qy(b,c,f,"lineHeight",g))&&h.match(Ty)&&(a.lineHeight=h);(h=Qy(b,c,f,"fontSize",g))&&(h.match(Ty)||h.match(Uy))&&(a.fontSize=h);if(h=Qy(b,c,f,"fontStyle",g))a.fontStyle=Vb[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=Qy(b,
1132
- c,f,"textOutline",g))d=d.split(" "),d[0].match(Ty)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Ty)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Qy(b,c,f,"letterSpacing",g))&&d.match(Ty)&&(a.letterSpacing=d);(d=Qy(b,c,f,"linePadding",g))&&d.match(Ty)&&(a.linePadding=d);if(d=Qy(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=Jy(c,f,"textDecoration"))&&Vy(a,d);(d=Wy(b,f,"textDecoration"))&&Vy(a,d);if(d=Qy(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(Qy(b,c,f,
1106
+ 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;}Sx.prototype.createMediaKeys=function(){var a=new Rx(this.g);return Promise.resolve(a)};Sx.prototype.getConfiguration=function(){return this.h};function Rx(a){this.l=a;this.h=null;this.g=new rf;this.i=[];this.j=new Map}
1107
+ function Ux(a,b){a.h=b;a.g.Xa();var c=Ox;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=ob(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Vx(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Mb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=Vx(a,d.sessionId))Wx(d,"usable"),
1108
+ d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=Vx(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?Wx(e,"output-restricted"):1==f?Wx(e,"expired"):Wx(e,"internal-error"))}}))}
1109
+ Rx.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 Xx(b,this.l,a);this.i.push(a);return a};Rx.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Rx.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1110
+ function Vx(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 Xx(a,b,c){Ye.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 Oe;this.keyStatuses=new Yx}pa(Xx,Ye);
1111
+ function Zx(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=nb(Hf("LOAD_SESSION|"+c));else{var e=Hf("PERSISTENT|");d=cg(e,b)}else d=nb(b)}catch(g){return Promise.reject(g)}a.h=new Oe;var f=Tx("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new jd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
1112
+ function $x(a,b,c){if(a.g)a.g.then(function(){return $x(a,b,c)}).catch(function(){return $x(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Df(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=$f(e.keys[0].k);e=$f(e.keys[0].kid)}else d=nb(c),e=null;var f=Tx("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1113
+ function Wx(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}r=Xx.prototype;r.generateRequest=function(a,b){return Zx(this,b,null)};r.load=function(a){return"persistent-license"==this.l?Zx(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Oe;$x(this,b,a);return b};
1114
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Tx("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Yx(){this.size=0;this.g=void 0}r=Yx.prototype;r.Mb=function(){return this.g};
1115
+ r.forEach=function(a){this.g&&a(this.g,oh.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=oh.value();return this.g&&lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Ox="";Mw(Nx);function ay(){}function by(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=cy,Object.defineProperty(a,"disablePictureInPicture",{get:dy,set:ey,enumerable:!0,configurable:!0}),document.exitPictureInPicture=fy,document.addEventListener("webkitpresentationmodechanged",gy,!0))}}
1116
+ function gy(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)}
1117
+ function cy(){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 fy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1118
+ function dy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ey(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Lw.PiPWebkit=ay;ay.install=by;Mw(by);function hy(){}function iy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=jy))}function jy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Lw.RandomUUID=hy;hy.install=iy;Mw(iy);function ky(){}function ly(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=my)}function my(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Lw.StorageEstimate=ky;ky.install=ly;Mw(ly);function ny(){}function oy(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:py})}function py(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Lw.Symbol=ny;ny.install=oy;Mw(oy);function qy(){}function ry(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Lw.VideoPlayPromise=qy;qy.install=ry;Mw(ry);function sy(){}function ty(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||td())&&(a.getVideoPlaybackQuality=uy)}}function uy(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Lw.VideoPlaybackQuality=sy;sy.install=ty;Mw(ty);function vy(){}function wy(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=xy;else if(6==b)a=yy;else{try{var c=!!xy(1,2,"")}catch(d){c=!1}c&&(a=xy)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function xy(a,b,c){return new window.TextTrackCue(a,b,c)}function yy(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Lw.VTTCue=vy;vy.install=wy;Mw(wy);function zy(){}zy.prototype.parseInit=function(){};zy.prototype.setSequenceMode=function(){};zy.prototype.setManifestType=function(){};zy.prototype.parseMedia=function(a,b){var c=null,d=[];a=Df(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=Ay.exec(e))){var f=By.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Cb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1119
+ N("shaka.text.LrcTextParser",zy);zy.prototype.parseMedia=zy.prototype.parseMedia;zy.prototype.setManifestType=zy.prototype.setManifestType;zy.prototype.setSequenceMode=zy.prototype.setSequenceMode;zy.prototype.parseInit=zy.prototype.parseInit;var Ay=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,By=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Pc["application/x-subtitle-lrc"]=function(){return new zy};function Cy(){}Cy.prototype.parseInit=function(){};Cy.prototype.setSequenceMode=function(){};Cy.prototype.setManifestType=function(){};
1120
+ Cy.prototype.parseMedia=function(a,b,c){var d=Df(a);a=[];if(""==d)return a;var e=yg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=lg(e,Dy,"frameRate"),g=lg(e,Dy,"subFrameRate"),h=lg(e,Dy,"frameRateMultiplier"),k=lg(e,Dy,"tickRate"),l=lg(e,Dy,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=lg(e,Ey,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Fy(f,
1121
+ g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{Hb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?jg(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Db;var v=u.getAttribute("xml:id");if(v){p.id=v;var y=null;n&&(y=Gy.exec(n)||Hy.exec(n));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,x=Iy(u,h,"extent");if(x){var A=(z=Gy.exec(x))||Hy.exec(x);
1122
+ null!=A&&(p.width=Number(A[1]),p.height=Number(A[2]),z||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=z||null!=v?Wb:0,p.heightUnits=z||null!=y?Wb:0)}if(u=Iy(u,h,"origin"))if(A=(z=Gy.exec(u))||Hy.exec(u),null!=A)p.viewportAnchorX=Number(A[1]),p.viewportAnchorY=Number(A[2]),z?x||(p.width=100-p.viewportAnchorX,p.widthUnits=Wb,p.height=100-p.viewportAnchorY,p.heightUnits=Wb):(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/
1123
+ v)),p.viewportAnchorUnits=z||null!=v?Wb:0}else p=null;p&&k.push(p)}if(gg(d,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");n=t(gg(d,"div"));for(q=n.next();!q.done;q=n.next())if(gg(q.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Jy(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1124
+ function Jy(a,b,c,d,e,f,g,h,k,l,m,n){var q=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var u=null,v=t(Ky),y=v.next();!y.done&&!(u=Ly(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;var z=lg(p,Ky,"backgroundImage");n&&z&&!z.startsWith("#")&&(y=new gc(n),z=new gc(z),(y=y.resolve(z).toString())&&(v=y));if("p"==a.nodeName||u||v)m=!0;a=m;y="default"==(p.getAttribute("xml:space")||
1125
+ (h?"default":"preserve"));z=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var x=t(p.childNodes),A=x.next();!A.done;A=x.next())(A=Jy(A.value,b,c,d,e,f,g,y,k,p,m,n))&&h.push(A);d=null!=l;n=/\S/.test(p.textContent);A=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(A||n||"br"==p.tagName||0!=h.length||d&&!y))return null;x=My(p,c);n=x.start;for(x=x.end;q&&q.nodeType==Node.ELEMENT_NODE&&"tt"!=q.tagName;)x=Ny(q,c,n,x),n=x.start,x=
1126
+ x.end,q=q.parentNode;null==n&&(n=0);n+=b.periodStart;x=null==x?Infinity:x+b.periodStart;n=Math.max(n,b.segmentStart);x=Math.min(x,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,x=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new Cb(n,x,""),e.lineBreak=!0,e;b="";z&&(b=p.textContent,y&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Cb(n,x,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Ly(p,"region",f,"")[0];
1127
+ if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=Ly(l,"region",f,"")[0]);Oy(b,p,g,u,v,e,a,0==h.length);return b}
1128
+ function Oy(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Py(b,c,f,"direction",g)&&(a.direction="rtl");h=Py(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=Gb);(h=Py(b,c,f,"textAlign",!0))?(a.positionAlign=Qy[h],a.lineAlign=Ry[h],a.textAlign=Pb[h.toUpperCase()]):a.textAlign=Fb;if(h=Py(b,c,f,"displayAlign",!0))a.displayAlign=Qb[h.toUpperCase()];if(h=Py(b,c,f,"color",g))a.color=h;if(h=Py(b,c,f,"backgroundColor",
1129
+ g))a.backgroundColor=h;if(h=Py(b,c,f,"border",g))a.border=h;if(h=Py(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=Py(b,c,f,"fontWeight",g))&&
1130
+ "bold"==h&&(a.fontWeight=700);h=Py(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Py(b,c,f,"lineHeight",g))&&h.match(Sy)&&(a.lineHeight=h);(h=Py(b,c,f,"fontSize",g))&&(h.match(Sy)||h.match(Ty))&&(a.fontSize=h);if(h=Py(b,c,f,"fontStyle",g))a.fontStyle=Vb[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=Py(b,
1131
+ c,f,"textOutline",g))d=d.split(" "),d[0].match(Sy)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Sy)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Py(b,c,f,"letterSpacing",g))&&d.match(Sy)&&(a.letterSpacing=d);(d=Py(b,c,f,"linePadding",g))&&d.match(Sy)&&(a.linePadding=d);if(d=Py(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=Iy(c,f,"textDecoration"))&&Uy(a,d);(d=Vy(b,f,"textDecoration"))&&Uy(a,d);if(d=Py(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(Py(b,c,f,
1133
1132
  "ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1134
- function Vy(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")&&zb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&zb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1135
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&zb(a.textDecoration,"overline")}}function Qy(a,b,c,d,e){e=void 0===e?!0:e;return(a=Wy(a,c,d))?a:e?Jy(b,c,d):null}function Jy(a,b,c){if(!a)return null;var d=lg(a,Fy,c);return d?d:Xy(a,b,c)}function Wy(a,b,c){var d=lg(a,Fy,c);return d?d:Xy(a,b,c)}
1136
- function Xy(a,b,c){a=My(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=kg(a[e],"urn:ebu:tt:style",c);f||(f=lg(a[e],Fy,c));f||(f=Wy(a[e],b,c));f&&(d=f)}return d}
1137
- function My(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?kg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););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.getAttribute("xml:id")==e){f.push(g);break}return f}function Oy(a,b,c,d){a=Ny(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}}
1138
- function Ny(a,b){var c=Yy(a.getAttribute("begin"),b),d=Yy(a.getAttribute("end"),b);a=Yy(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1139
- function Yy(a,b){var c=null;if(Zy.test(a)){a=Zy.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($y.test(a))c=az($y,a);else if(bz.test(a))c=az(bz,a);else if(cz.test(a))a=cz.exec(a),c=Number(a[1])/b.frameRate;else if(dz.test(a))a=dz.exec(a),c=Number(a[1])/b.g;else if(ez.test(a))c=az(ez,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
1140
- function az(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)}N("shaka.text.TtmlTextParser",Dy);Dy.prototype.parseMedia=Dy.prototype.parseMedia;Dy.prototype.setManifestType=Dy.prototype.setManifestType;Dy.prototype.setSequenceMode=Dy.prototype.setSequenceMode;Dy.prototype.parseInit=Dy.prototype.parseInit;
1141
- function Gy(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]))}
1142
- var Hy=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Uy=/^(\d{1,2}(?:\.\d+)?|100)%$/,Ty=/^(\d+px|\d+em|\d*\.?\d+c)$/,Iy=/^(\d+)px (\d+)px$/,Zy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$y=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,bz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,cz=/^(\d*(?:\.\d*)?)f$/,dz=/^(\d*(?:\.\d*)?)t$/,ez=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Sy={left:Jb,center:"center",right:"end",start:Jb,
1143
- end:"end"},Ry={left:"line-left",center:"center",right:"line-right"},Ey=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Fy=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ly=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Pc["application/ttml+xml"]=function(){return new Dy};function fz(){this.g=new Dy}fz.prototype.parseInit=function(a){var b=!1;(new Nf).box("moov",Sf).box("trak",Sf).box("mdia",Sf).box("minf",Sf).box("stbl",Sf).N("stsd",Uf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};fz.prototype.setSequenceMode=function(){};fz.prototype.setManifestType=function(){};
1144
- fz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Nf).box("mdat",Wf(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new P(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",fz);fz.prototype.parseMedia=fz.prototype.parseMedia;fz.prototype.setManifestType=fz.prototype.setManifestType;fz.prototype.setSequenceMode=fz.prototype.setSequenceMode;fz.prototype.parseInit=fz.prototype.parseInit;Pc['application/mp4; codecs="stpp"']=function(){return new fz};
1145
- Pc['application/mp4; codecs="stpp.ttml"']=function(){return new fz};Pc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new fz};Pc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new fz};function gz(){this.h=!1;this.g="UNKNOWN"}gz.prototype.parseInit=function(){};gz.prototype.setSequenceMode=function(a){this.h=a};gz.prototype.setManifestType=function(a){this.g=a};
1146
- gz.prototype.parseMedia=function(a,b){a=Df(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 P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=hz(new xs(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
1133
+ function Uy(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")&&zb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&zb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1134
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&zb(a.textDecoration,"overline")}}function Py(a,b,c,d,e){e=void 0===e?!0:e;return(a=Vy(a,c,d))?a:e?Iy(b,c,d):null}function Iy(a,b,c){if(!a)return null;var d=lg(a,Ey,c);return d?d:Wy(a,b,c)}function Vy(a,b,c){var d=lg(a,Ey,c);return d?d:Wy(a,b,c)}
1135
+ function Wy(a,b,c){a=Ly(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=kg(a[e],"urn:ebu:tt:style",c);f||(f=lg(a[e],Ey,c));f||(f=Vy(a[e],b,c));f&&(d=f)}return d}
1136
+ function Ly(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?kg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););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.getAttribute("xml:id")==e){f.push(g);break}return f}function Ny(a,b,c,d){a=My(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}}
1137
+ function My(a,b){var c=Xy(a.getAttribute("begin"),b),d=Xy(a.getAttribute("end"),b);a=Xy(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1138
+ function Xy(a,b){var c=null;if(Yy.test(a)){a=Yy.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(Zy.test(a))c=$y(Zy,a);else if(az.test(a))c=$y(az,a);else if(bz.test(a))a=bz.exec(a),c=Number(a[1])/b.frameRate;else if(cz.test(a))a=cz.exec(a),c=Number(a[1])/b.g;else if(dz.test(a))c=$y(dz,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
1139
+ function $y(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)}N("shaka.text.TtmlTextParser",Cy);Cy.prototype.parseMedia=Cy.prototype.parseMedia;Cy.prototype.setManifestType=Cy.prototype.setManifestType;Cy.prototype.setSequenceMode=Cy.prototype.setSequenceMode;Cy.prototype.parseInit=Cy.prototype.parseInit;
1140
+ function Fy(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]))}
1141
+ var Gy=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ty=/^(\d{1,2}(?:\.\d+)?|100)%$/,Sy=/^(\d+px|\d+em|\d*\.?\d+c)$/,Hy=/^(\d+)px (\d+)px$/,Yy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Zy=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,az=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,bz=/^(\d*(?:\.\d*)?)f$/,cz=/^(\d*(?:\.\d*)?)t$/,dz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Ry={left:Jb,center:"center",right:"end",start:Jb,
1142
+ end:"end"},Qy={left:"line-left",center:"center",right:"line-right"},Dy=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ey=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ky=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Pc["application/ttml+xml"]=function(){return new Cy};function ez(){this.g=new Cy}ez.prototype.parseInit=function(a){var b=!1;(new Nf).box("moov",Sf).box("trak",Sf).box("mdia",Sf).box("minf",Sf).box("stbl",Sf).N("stsd",Uf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};ez.prototype.setSequenceMode=function(){};ez.prototype.setManifestType=function(){};
1143
+ ez.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Nf).box("mdat",Wf(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new P(2,2,2007);return f};N("shaka.text.Mp4TtmlParser",ez);ez.prototype.parseMedia=ez.prototype.parseMedia;ez.prototype.setManifestType=ez.prototype.setManifestType;ez.prototype.setSequenceMode=ez.prototype.setSequenceMode;ez.prototype.parseInit=ez.prototype.parseInit;Pc['application/mp4; codecs="stpp"']=function(){return new ez};
1144
+ Pc['application/mp4; codecs="stpp.ttml"']=function(){return new ez};Pc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new ez};Pc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new ez};function fz(){this.h=!1;this.g="UNKNOWN"}fz.prototype.parseInit=function(){};fz.prototype.setSequenceMode=function(a){this.h=a};fz.prototype.setManifestType=function(a){this.g=a};
1145
+ fz.prototype.parseMedia=function(a,b){a=Df(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 P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=gz(new xs(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
1147
1146
  e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new xs(d);var f=new Db;As(d);ys(d);for(var g=As(d);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=
1148
- Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");ys(d);g=As(d)}b.push(f)}e=new Map;iz(e);d=[];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=
1147
+ Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");ys(d);g=As(d)}b.push(f)}e=new Map;hz(e);d=[];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=
1149
1148
  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=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new Cb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;
1150
1149
  case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Mb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&e.set(g,
1151
- 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,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new xs(f[0]),k=hz(g),n=zs(g,/[ \t]+--\x3e[ \t]+/g),l=hz(g),null==k||null==n||null==l)Ua("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Cb(k,l,"");ys(g);for(k=As(g);k;)jz(m,k,b),ys(g),k=As(g);kz(f,
1152
- m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function iz(a){for(var b=t(Object.entries(Sb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Cb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Ub));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Cb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1153
- function kz(a,b,c){if(a.includes("<")){0===c.size&&iz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&
1154
- 0<f&&(f=d.substr(f,e-f),f.match(lz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=
1155
- e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=yg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=mz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())nz(d.value,b,c)}else b.payload=mz(a)}else b.payload=mz(a)}
1156
- function oz(a,b){return a&&0<a.length?a:b}
1157
- function nz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Db;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.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=oz(g.backgroundColor,d.backgroundColor),d.color=oz(g.color,d.color),d.fontFamily=oz(g.fontFamily,
1158
- d.fontFamily),d.fontSize=oz(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=Nb(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.getAttribute("color"))d.color=f;break;case "div":f=a.getAttribute("time");
1159
- if(!f)break;if(f=hz(new xs(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(ng(a)||1==e.length&&ng(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Nb(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=mz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())nz(a.value,d,c)}
1160
- function jz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Fb:a.textAlign=Pb[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"==
1161
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Eb);else if(d=/^region:(.*)$/.exec(b)){if(b=pz(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=Rb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ib,a.line=Number(c[1]),c[2]&&(a.lineAlign=Rb[c[2].toUpperCase()])}
1162
- function pz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function hz(a){a=zs(a,lz);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)}
1163
- function mz(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}N("shaka.text.VttTextParser",gz);gz.prototype.parseMedia=gz.prototype.parseMedia;gz.prototype.setManifestType=gz.prototype.setManifestType;gz.prototype.setSequenceMode=gz.prototype.setSequenceMode;gz.prototype.parseInit=gz.prototype.parseInit;
1164
- var lz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Pc["text/vtt"]=function(){return new gz};Pc['text/vtt; codecs="vtt"']=function(){return new gz};Pc['text/vtt; codecs="wvtt"']=function(){return new gz};function qz(){this.g=null}qz.prototype.parseInit=function(a){var b=this,c=!1;(new Nf).box("moov",Sf).box("trak",Sf).box("mdia",Sf).N("mdhd",function(d){d=Ph(d.reader,d.version);b.g=d.timescale}).box("minf",Sf).box("stbl",Sf).N("stsd",Uf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};qz.prototype.setSequenceMode=function(){};qz.prototype.setManifestType=function(){};
1165
- qz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Nf).box("moof",Sf).box("traf",Sf).N("tfdt",function(A){g=!0;c=Oh(A.reader,A.version).baseMediaDecodeTime}).N("tfhd",function(A){l=Nh(A.reader,A.flags).Ef}).N("trun",function(A){h=!0;d=Qh(A.reader,A.version,A.flags).$f}).box("mdat",Wf(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Kf(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
1166
- q.value;var p=q.cf||l,u=q.Rd?c+q.Rd:a;a=u+(p||0);var v=0;do{var y=m.L();v+=y;var z=m.L(),x=null;"vttc"==Rf(z)?8<y&&(x=m.qb(y-8)):m.skip(y-8);p&&x&&(y=rz(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Xc)};function rz(a,b,c){var d,e,f;(new Nf).box("payl",Wf(function(g){d=Df(g)})).box("iden",Wf(function(g){e=Df(g)})).box("sttg",Wf(function(g){f=Df(g)})).parse(a);return d?sz(d,e,f,b,c):null}
1167
- function sz(a,b,c,d,e){d=new Cb(d,e,"");kz(a,d,new Map);b&&(d.id=b);if(c)for(a=new xs(c),b=As(a);b;)jz(d,b,[]),ys(a),b=As(a);return d}N("shaka.text.Mp4VttParser",qz);qz.prototype.parseMedia=qz.prototype.parseMedia;qz.prototype.setManifestType=qz.prototype.setManifestType;qz.prototype.setSequenceMode=qz.prototype.setSequenceMode;qz.prototype.parseInit=qz.prototype.parseInit;Pc['application/mp4; codecs="wvtt"']=function(){return new qz};function tz(){}tz.prototype.parseInit=function(){};tz.prototype.setSequenceMode=function(){};tz.prototype.setManifestType=function(){};tz.prototype.parseMedia=function(a){var b=Df(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 xs(c[0]),e=uz(d),f=zs(d,/,/g);d=uz(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Cb(e,d,c.slice(1).join("\n").trim()))}return a};
1168
- function uz(a){a=zs(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)}N("shaka.text.SbvTextParser",tz);tz.prototype.parseMedia=tz.prototype.parseMedia;tz.prototype.setManifestType=tz.prototype.setManifestType;tz.prototype.setSequenceMode=tz.prototype.setSequenceMode;tz.prototype.parseInit=tz.prototype.parseInit;Pc["text/x-subviewer"]=function(){return new tz};function vz(){this.g=new gz}vz.prototype.parseInit=function(){};vz.prototype.setSequenceMode=function(){};vz.prototype.setManifestType=function(){};vz.prototype.parseMedia=function(a,b,c){a=Df(a);a=wz(a);a=nb(Hf(a));return this.g.parseMedia(a,b,c)};
1169
- function wz(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}N("shaka.text.SrtTextParser",vz);vz.srt2webvtt=wz;vz.prototype.parseMedia=vz.prototype.parseMedia;
1170
- vz.prototype.setManifestType=vz.prototype.setManifestType;vz.prototype.setSequenceMode=vz.prototype.setSequenceMode;vz.prototype.parseInit=vz.prototype.parseInit;Pc["text/srt"]=function(){return new vz};function xz(){}xz.prototype.parseInit=function(){};xz.prototype.setSequenceMode=function(){};xz.prototype.setManifestType=function(){};
1171
- xz.prototype.parseMedia=function(a){var b="",c="";a=Df(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=yz.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=zz.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Az);else if("Style"==e){e=f.split(Az);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1172
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={$d:e.$d},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=zz.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Az);else if("Dialogue"==f){g=g.split(Az);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Bz(f.Start);var k=Bz(f.End);g=new Cb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.$d=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.$d}}(e)))&&Cz(g,f);d.push(g)}return d};
1173
- function Cz(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Dz(c))a.color=c;if(c=b.BackColour)if(c=Dz(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=Kb;a.textAlign="start";break;case 2:a.displayAlign=Kb;a.textAlign=Fb;break;case 3:a.displayAlign=Kb;a.textAlign="end";
1150
+ 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,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new xs(f[0]),k=gz(g),n=zs(g,/[ \t]+--\x3e[ \t]+/g),l=gz(g),null==k||null==n||null==l)Ua("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Cb(k,l,"");ys(g);for(k=As(g);k;)iz(m,k,b),ys(g),k=As(g);jz(f,
1151
+ m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function hz(a){for(var b=t(Object.entries(Sb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Cb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Ub));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Cb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1152
+ function jz(a,b,c){if(a.includes("<")){0===c.size&&hz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&
1153
+ 0<f&&(f=d.substr(f,e-f),f.match(kz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=
1154
+ e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=yg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=lz(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())mz(d.value,b,c)}else b.payload=lz(a)}else b.payload=lz(a)}
1155
+ function nz(a,b){return a&&0<a.length?a:b}
1156
+ function mz(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Db;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.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=nz(g.backgroundColor,d.backgroundColor),d.color=nz(g.color,d.color),d.fontFamily=nz(g.fontFamily,
1157
+ d.fontFamily),d.fontSize=nz(g.fontSize,d.fontSize),d.textShadow=nz(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=Nb(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.getAttribute("color"))d.color=f;break;case "div":f=
1158
+ a.getAttribute("time");if(!f)break;if(f=gz(new xs(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(ng(a)||1==e.length&&ng(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Nb(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=lz(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())mz(a.value,d,c)}
1159
+ function iz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Fb:a.textAlign=Pb[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"==
1160
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Eb);else if(d=/^region:(.*)$/.exec(b)){if(b=oz(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=Rb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ib,a.line=Number(c[1]),c[2]&&(a.lineAlign=Rb[c[2].toUpperCase()])}
1161
+ function oz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function gz(a){a=zs(a,kz);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)}
1162
+ function lz(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}N("shaka.text.VttTextParser",fz);fz.prototype.parseMedia=fz.prototype.parseMedia;fz.prototype.setManifestType=fz.prototype.setManifestType;fz.prototype.setSequenceMode=fz.prototype.setSequenceMode;fz.prototype.parseInit=fz.prototype.parseInit;
1163
+ var kz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Pc["text/vtt"]=function(){return new fz};Pc['text/vtt; codecs="vtt"']=function(){return new fz};Pc['text/vtt; codecs="wvtt"']=function(){return new fz};function pz(){this.g=null}pz.prototype.parseInit=function(a){var b=this,c=!1;(new Nf).box("moov",Sf).box("trak",Sf).box("mdia",Sf).N("mdhd",function(d){d=Ph(d.reader,d.version);b.g=d.timescale}).box("minf",Sf).box("stbl",Sf).N("stsd",Uf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};pz.prototype.setSequenceMode=function(){};pz.prototype.setManifestType=function(){};
1164
+ pz.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Nf).box("moof",Sf).box("traf",Sf).N("tfdt",function(A){g=!0;c=Oh(A.reader,A.version).baseMediaDecodeTime}).N("tfhd",function(A){l=Nh(A.reader,A.flags).Ef}).N("trun",function(A){h=!0;d=Qh(A.reader,A.version,A.flags).$f}).box("mdat",Wf(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Kf(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
1165
+ q.value;var p=q.cf||l,u=q.Rd?c+q.Rd:a;a=u+(p||0);var v=0;do{var y=m.L();v+=y;var z=m.L(),x=null;"vttc"==Rf(z)?8<y&&(x=m.qb(y-8)):m.skip(y-8);p&&x&&(y=qz(x,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(Xc)};function qz(a,b,c){var d,e,f;(new Nf).box("payl",Wf(function(g){d=Df(g)})).box("iden",Wf(function(g){e=Df(g)})).box("sttg",Wf(function(g){f=Df(g)})).parse(a);return d?rz(d,e,f,b,c):null}
1166
+ function rz(a,b,c,d,e){d=new Cb(d,e,"");jz(a,d,new Map);b&&(d.id=b);if(c)for(a=new xs(c),b=As(a);b;)iz(d,b,[]),ys(a),b=As(a);return d}N("shaka.text.Mp4VttParser",pz);pz.prototype.parseMedia=pz.prototype.parseMedia;pz.prototype.setManifestType=pz.prototype.setManifestType;pz.prototype.setSequenceMode=pz.prototype.setSequenceMode;pz.prototype.parseInit=pz.prototype.parseInit;Pc['application/mp4; codecs="wvtt"']=function(){return new pz};function sz(){}sz.prototype.parseInit=function(){};sz.prototype.setSequenceMode=function(){};sz.prototype.setManifestType=function(){};sz.prototype.parseMedia=function(a){var b=Df(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 xs(c[0]),e=tz(d),f=zs(d,/,/g);d=tz(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Cb(e,d,c.slice(1).join("\n").trim()))}return a};
1167
+ function tz(a){a=zs(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)}N("shaka.text.SbvTextParser",sz);sz.prototype.parseMedia=sz.prototype.parseMedia;sz.prototype.setManifestType=sz.prototype.setManifestType;sz.prototype.setSequenceMode=sz.prototype.setSequenceMode;sz.prototype.parseInit=sz.prototype.parseInit;Pc["text/x-subviewer"]=function(){return new sz};function uz(){this.g=new fz}uz.prototype.parseInit=function(){};uz.prototype.setSequenceMode=function(){};uz.prototype.setManifestType=function(){};uz.prototype.parseMedia=function(a,b,c){a=Df(a);a=vz(a);a=nb(Hf(a));return this.g.parseMedia(a,b,c)};
1168
+ function vz(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}N("shaka.text.SrtTextParser",uz);uz.srt2webvtt=vz;uz.prototype.parseMedia=uz.prototype.parseMedia;
1169
+ uz.prototype.setManifestType=uz.prototype.setManifestType;uz.prototype.setSequenceMode=uz.prototype.setSequenceMode;uz.prototype.parseInit=uz.prototype.parseInit;Pc["text/srt"]=function(){return new uz};function wz(){}wz.prototype.parseInit=function(){};wz.prototype.setSequenceMode=function(){};wz.prototype.setManifestType=function(){};
1170
+ wz.prototype.parseMedia=function(a){var b="",c="";a=Df(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=xz.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=yz.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(zz);else if("Style"==e){e=f.split(zz);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1171
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={$d:e.$d},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=yz.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(zz);else if("Dialogue"==f){g=g.split(zz);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Az(f.Start);var k=Az(f.End);g=new Cb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.$d=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.$d}}(e)))&&Bz(g,f);d.push(g)}return d};
1172
+ function Bz(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Cz(c))a.color=c;if(c=b.BackColour)if(c=Cz(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=Kb;a.textAlign="start";break;case 2:a.displayAlign=Kb;a.textAlign=Fb;break;case 3:a.displayAlign=Kb;a.textAlign="end";
1174
1173
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Fb;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=Fb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1175
- function Dz(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 Bz(a){a=Ez.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",xz);xz.prototype.parseMedia=xz.prototype.parseMedia;xz.prototype.setManifestType=xz.prototype.setManifestType;xz.prototype.setSequenceMode=xz.prototype.setSequenceMode;xz.prototype.parseInit=xz.prototype.parseInit;
1176
- var yz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,zz=/^\s*([^:]+):\s*(.*)/,Az=/\s*,\s*/,Ez=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Pc["text/x-ssa"]=function(){return new xz};function Fz(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)?{Ed:c,S:a}:null}function Gz(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,ga:"mp4a.40."+e}}
1177
- function Hz(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}
1178
- function Iz(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,
1179
- 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 Jz(a){this.i=a;this.h=0;this.g=new Map}r=Jz.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Mc(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1180
- r.transmux=function(a,b,c,d){for(var e=nb(a),f=Mh(e),g=f.length;g<e.length&&!Hz(e,g);g++);a=1E3*c.endTime;f=Lh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Gz(e,g);if(!c)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Fz(e,g);if(!h)return Promise.reject(new P(2,3,3018));var k=h.Ed+h.S;g+k<=e.length&&f.push({data:e.subarray(g+h.Ed,g+k),size:h.S,
1181
- duration:1024,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:f},stream:b};a=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(a),this.g.set(b.id,d));b=wu(a);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",Jz);
1182
- Jz.prototype.transmux=Jz.prototype.transmux;Jz.prototype.getOriginalMimeType=Jz.prototype.getOriginalMimeType;Jz.prototype.convertCodecs=Jz.prototype.convertCodecs;Jz.prototype.isSupported=Jz.prototype.isSupported;Jz.prototype.destroy=Jz.prototype.destroy;Zb("audio/aac",function(){return new Jz("audio/aac")},ec);function Kz(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,
1174
+ function Cz(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 Az(a){a=Dz.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",wz);wz.prototype.parseMedia=wz.prototype.parseMedia;wz.prototype.setManifestType=wz.prototype.setManifestType;wz.prototype.setSequenceMode=wz.prototype.setSequenceMode;wz.prototype.parseInit=wz.prototype.parseInit;
1175
+ var xz=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,yz=/^\s*([^:]+):\s*(.*)/,zz=/\s*,\s*/,Dz=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Pc["text/x-ssa"]=function(){return new wz};function Ez(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)?{Ed:c,S:a}:null}function Fz(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,ga:"mp4a.40."+e}}
1176
+ function Gz(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}
1177
+ function Hz(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,
1178
+ 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 Iz(a){this.i=a;this.h=0;this.g=new Map}r=Iz.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Mc(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1179
+ r.transmux=function(a,b,c,d){for(var e=nb(a),f=Mh(e),g=f.length;g<e.length&&!Gz(e,g);g++);a=1E3*c.endTime;f=Lh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Fz(e,g);if(!c)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Ez(e,g);if(!h)return Promise.reject(new P(2,3,3018));var k=h.Ed+h.S;g+k<=e.length&&f.push({data:e.subarray(g+h.Ed,g+k),size:h.S,
1180
+ duration:1024,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:f},stream:b};a=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(a),this.g.set(b.id,d));b=wu(a);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.AacTransmuxer",Iz);
1181
+ Iz.prototype.transmux=Iz.prototype.transmux;Iz.prototype.getOriginalMimeType=Iz.prototype.getOriginalMimeType;Iz.prototype.convertCodecs=Iz.prototype.convertCodecs;Iz.prototype.isSupported=Iz.prototype.isSupported;Iz.prototype.destroy=Iz.prototype.destroy;Zb("audio/aac",function(){return new Iz("audio/aac")},ec);function Jz(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,
1183
1182
  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,ca:a,S:e}}
1184
- function Lz(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 Mz(a){this.i=a;this.h=0;this.g=new Map}r=Mz.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1185
- r.transmux=function(a,b,c,d){a=nb(a);for(var e=Mh(a),f=e.length;f<a.length&&!Lz(a,f);f++);var g=1E3*c.endTime;e=Lh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Kz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,Ra:0,flags:{Sa:0,
1186
- Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Pa:[],ca:e,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:h},stream:b};a=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(a),this.g.set(b.id,d));b=wu(a);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",Mz);Mz.prototype.transmux=Mz.prototype.transmux;
1187
- Mz.prototype.getOriginalMimeType=Mz.prototype.getOriginalMimeType;Mz.prototype.convertCodecs=Mz.prototype.convertCodecs;Mz.prototype.isSupported=Mz.prototype.isSupported;Mz.prototype.destroy=Mz.prototype.destroy;Zb("audio/ac3",function(){return new Mz("audio/ac3")},ec);function Nz(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Vh(a.subarray(b+2));Yh(c,2);Yh(c,3);var d=Zh(c,11)+1<<1,e=Zh(c,2);if(3==e){e=Zh(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Zh(c,2);var g=Zh(c,3),h=Zh(c,1);c=Zh(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,ca:a,S:d}};function Oz(a){this.i=a;this.h=0;this.g=new Map}r=Oz.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1188
- r.transmux=function(a,b,c,d){a=nb(a);for(var e=Mh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Lh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Nz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,
1189
- Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Pa:[],ca:e,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:h},stream:b};a=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(a),this.g.set(b.id,d));b=wu(a);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",Oz);Oz.prototype.transmux=Oz.prototype.transmux;
1190
- Oz.prototype.getOriginalMimeType=Oz.prototype.getOriginalMimeType;Oz.prototype.convertCodecs=Oz.prototype.convertCodecs;Oz.prototype.isSupported=Oz.prototype.isSupported;Oz.prototype.destroy=Oz.prototype.destroy;Zb("audio/ec3",function(){return new Oz("audio/ec3")},ec);function Pz(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 Vh(b.data),d=ci(c);ci(c);ci(c);ai(c);if(Qz.includes(d)&&(d=T(c),3===d&&Yh(c,1),ai(c),ai(c),Yh(c,1),U(c))){d=3!==d?8:12;for(var e=0;e<d;e++)U(c)&&(6>e?di(c,16):di(c,64))}ai(c);d=T(c);if(0===d)T(c);else if(1===d)for(Yh(c,1),ai(c),ai(c),d=T(c),e=0;e<d;e++)ai(c);ai(c);Yh(c,1);var f=T(c),g=T(c),h=Zh(c,1);0===h&&Yh(c,1);Yh(c,1);var k=0,l=0,m=0,n=0;U(c)&&
1183
+ function Kz(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 Lz(a){this.i=a;this.h=0;this.g=new Map}r=Lz.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1184
+ r.transmux=function(a,b,c,d){a=nb(a);for(var e=Mh(a),f=e.length;f<a.length&&!Kz(a,f);f++);var g=1E3*c.endTime;e=Lh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Jz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,Ra:0,flags:{Sa:0,
1185
+ Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Pa:[],ca:e,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:h},stream:b};a=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(a),this.g.set(b.id,d));b=wu(a);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ac3Transmuxer",Lz);Lz.prototype.transmux=Lz.prototype.transmux;
1186
+ Lz.prototype.getOriginalMimeType=Lz.prototype.getOriginalMimeType;Lz.prototype.convertCodecs=Lz.prototype.convertCodecs;Lz.prototype.isSupported=Lz.prototype.isSupported;Lz.prototype.destroy=Lz.prototype.destroy;Zb("audio/ac3",function(){return new Lz("audio/ac3")},ec);function Mz(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Vh(a.subarray(b+2));Xh(c,2);Xh(c,3);var d=Zh(c,11)+1<<1,e=Zh(c,2);if(3==e){e=Zh(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Zh(c,2);var g=Zh(c,3),h=Zh(c,1);c=Zh(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,ca:a,S:d}};function Nz(a){this.i=a;this.h=0;this.g=new Map}r=Nz.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1187
+ r.transmux=function(a,b,c,d){a=nb(a);for(var e=Mh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Lh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Mz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.S),size:k.S,duration:1536,
1188
+ Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});f+=k.S}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Pa:[],ca:e,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:h},stream:b};a=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(a),this.g.set(b.id,d));b=wu(a);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Ec3Transmuxer",Nz);Nz.prototype.transmux=Nz.prototype.transmux;
1189
+ Nz.prototype.getOriginalMimeType=Nz.prototype.getOriginalMimeType;Nz.prototype.convertCodecs=Nz.prototype.convertCodecs;Nz.prototype.isSupported=Nz.prototype.isSupported;Nz.prototype.destroy=Nz.prototype.destroy;Zb("audio/ec3",function(){return new Nz("audio/ec3")},ec);function Oz(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 Vh(b.data),d=ci(c);ci(c);ci(c);ai(c);if(Pz.includes(d)&&(d=T(c),3===d&&Xh(c,1),ai(c),ai(c),Xh(c,1),U(c))){d=3!==d?8:12;for(var e=0;e<d;e++)U(c)&&(6>e?di(c,16):di(c,64))}ai(c);d=T(c);if(0===d)T(c);else if(1===d)for(Xh(c,1),ai(c),ai(c),d=T(c),e=0;e<d;e++)ai(c);ai(c);Xh(c,1);var f=T(c),g=T(c),h=Zh(c,1);0===h&&Xh(c,1);Xh(c,1);var k=0,l=0,m=0,n=0;U(c)&&
1191
1190
  (k=T(c),l=T(c),m=T(c),n=T(c));e=d=1;if(U(c)&&U(c)){var q=ci(c),p=[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<q&&16>q?(d=p[q-1],e=u[q-1]):255===q&&(d=Zh(c,16),e=Zh(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,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,k[3],k[4],k[5],255,225].concat(k,
1192
1191
  [1],b));return{height:c,width:f,ka:a,ra:d,ta:e}}
1193
- function Rz(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=ei(new Vh(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(cg(h,
1194
- f.fullData)))}return c.length?{data:cg.apply(Xf,w(c)),Tc:b}:null}var Qz=[100,110,122,244,44,83,86,118,128,138,139,134];function Sz(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=Tz(b.fullData);a=Uz(c.fullData);var f=Vz(d.fullData);b=Wz(b.fullData,c.fullData,d.fullData,{Ue:e.Ue,nf:e.nf,ye:a.ye,ze:a.ze,se:a.se,xe:a.xe,te:a.te,ue:a.ue,ve:a.ve,we:a.we,me:a.me,ne:a.ne,oe:a.oe,pe:a.pe,qe:a.qe,re:a.re,ie:a.ie,Md:a.Md,he:a.he,ge:a.ge,fe:a.fe,Xe:f.Xe});return{height:a.height,width:a.width,
1195
- ka:b,ra:a.Ih,ta:a.Hh}}function Tz(a){var b=new Vh(a,!0);ci(b);ci(b);Zh(b,4);Zh(b,2);Zh(b,6);a=Zh(b,3);b=U(b);return{Ue:a+1,nf:b}}
1196
- function Uz(a){a=new Vh(a,!0);ci(a);ci(a);var b=0,c=0,d=0,e=0;Zh(a,4);var f=Zh(a,3);U(a);for(var g=Zh(a,2),h=Zh(a,1),k=Zh(a,5),l=ci(a),m=ci(a),n=ci(a),q=ci(a),p=ci(a),u=ci(a),v=ci(a),y=ci(a),z=ci(a),x=ci(a),A=ci(a),B=[],D=[],F=0;F<f;F++)B.push(U(a)),D.push(U(a));if(0<f)for(F=f;8>F;F++)Zh(a,2);for(F=0;F<f;F++)B[F]&&Zh(a,88),D[F]&&ci(a);T(a);B=T(a);3==B&&Zh(a,1);D=T(a);F=T(a);U(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),G=T(a),H=T(a);if(U(a))for(var I=0;I<=f;I++)T(a),T(a),T(a);else T(a),T(a),
1192
+ function Qz(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=ei(new Vh(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(cg(h,
1193
+ f.fullData)))}return c.length?{data:cg.apply(Xf,w(c)),Tc:b}:null}var Pz=[100,110,122,244,44,83,86,118,128,138,139,134];function Rz(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=Sz(b.fullData);a=Tz(c.fullData);var f=Uz(d.fullData);b=Vz(b.fullData,c.fullData,d.fullData,{Ue:e.Ue,nf:e.nf,ye:a.ye,ze:a.ze,se:a.se,xe:a.xe,te:a.te,ue:a.ue,ve:a.ve,we:a.we,me:a.me,ne:a.ne,oe:a.oe,pe:a.pe,qe:a.qe,re:a.re,ie:a.ie,Md:a.Md,he:a.he,ge:a.ge,fe:a.fe,Xe:f.Xe});return{height:a.height,width:a.width,
1194
+ ka:b,ra:a.Ih,ta:a.Hh}}function Sz(a){var b=new Vh(a,!0);ci(b);ci(b);Zh(b,4);Zh(b,2);Zh(b,6);a=Zh(b,3);b=U(b);return{Ue:a+1,nf:b}}
1195
+ function Tz(a){a=new Vh(a,!0);ci(a);ci(a);var b=0,c=0,d=0,e=0;Zh(a,4);var f=Zh(a,3);U(a);for(var g=Zh(a,2),h=Zh(a,1),k=Zh(a,5),l=ci(a),m=ci(a),n=ci(a),q=ci(a),p=ci(a),u=ci(a),v=ci(a),y=ci(a),z=ci(a),x=ci(a),A=ci(a),B=[],D=[],F=0;F<f;F++)B.push(U(a)),D.push(U(a));if(0<f)for(F=f;8>F;F++)Zh(a,2);for(F=0;F<f;F++)B[F]&&Zh(a,88),D[F]&&ci(a);T(a);B=T(a);3==B&&Zh(a,1);D=T(a);F=T(a);U(a)&&(b+=T(a),c+=T(a),d+=T(a),e+=T(a));var J=T(a),G=T(a),H=T(a);if(U(a))for(var I=0;I<=f;I++)T(a),T(a),T(a);else T(a),T(a),
1197
1196
  T(a);T(a);T(a);T(a);T(a);T(a);T(a);if(U(a)&&U(a))for(I=0;4>I;I++)for(var L=0;L<(3===I?2:6);L++)if(U(a)){var M=Math.min(64,1<<4+(I<<1));1<I&&bi(a);for(var O=0;O<M;O++)bi(a)}else T(a);U(a);U(a);U(a)&&(ci(a),T(a),T(a),U(a));I=T(a);for(M=L=0;M<I;M++)if(O=!1,0!==M&&(O=U(a)),O){M===I&&T(a);U(a);T(a);for(var S=O=0;S<=L;S++){var ca=U(a),W=!1;ca||(W=U(a));(ca||W)&&O++}L=O}else{S=T(a);O=T(a);L=S+O;for(ca=0;ca<S;ca++)T(a),U(a);for(S=0;S<O;S++)T(a),U(a)}if(U(a))for(I=T(a),L=0;L<I;L++){for(M=0;M<H+4;M++)Zh(a,
1198
1197
  1);Zh(a,1)}I=H=1;L=0;U(a);U(a);if(U(a)){U(a)&&(M=ci(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],S=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>M?(H=O[M-1],I=S[M-1]):255===M&&(H=Zh(a,16),I=Zh(a,16)));U(a)&&U(a);U(a)&&(Zh(a,3),U(a),U(a)&&(ci(a),ci(a),ci(a)));U(a)&&(T(a),T(a));U(a);U(a);U(a);if(M=U(a))T(a),T(a),T(a),T(a);if(U(a)&&(Zh(a,32),Zh(a,32),U(a)&&T(a),U(a))){S=!1;M=U(a);O=U(a);if(M||O){if(S=U(a))ci(a),Zh(a,5),U(a),Zh(a,5);Zh(a,4);Zh(a,4);S&&Zh(a,4);Zh(a,5);Zh(a,5);Zh(a,5)}for(ca=
1199
1198
  0;ca<=f;ca++){var da=!0;W=1;U(a)||(da=U(a));var Ba=!1;da?T(a):Ba=U(a);Ba||(W=T(a)+1);if(M){for(da=0;da<W;da++)T(a),T(a),S&&(T(a),T(a));U(a)}if(O){for(da=0;da<W;da++)T(a),T(a),S&&(T(a),T(a));U(a)}}}U(a)&&(U(a),U(a),U(a),L=T(a),T(a),T(a),T(a),T(a))}return{se:A,ye:g,ze:h,xe:k,te:l,ue:m,ve:n,we:q,me:p,ne:u,oe:v,pe:y,qe:z,re:x,Md:L,ie:0,he:B,ge:J,fe:G,width:D-(b+c)*(1===B||2===B?2:1),height:F-(d+e)*(1===B?2:1),Ih:H,Hh:I}}
1200
- function Vz(a){var b=new Vh(a,!0);ci(b);ci(b);T(b);T(b);U(b);U(b);Zh(b,3);U(b);U(b);T(b);T(b);bi(b);U(b);U(b);U(b)&&T(b);bi(b);bi(b);U(b);U(b);U(b);U(b);a=U(b);b=U(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Xe:c}}
1201
- function Wz(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ye&3)<<6|(d.ze?1:0)<<5|d.xe&31;e[2]=d.te;e[3]=d.ue;e[4]=d.ve;e[5]=d.we;e[6]=d.me;e[7]=d.ne;e[8]=d.oe;e[9]=d.pe;e[10]=d.qe;e[11]=d.re;e[12]=d.se;e[13]=240|(d.Md&3840)>>8;e[14]=d.Md&255;e[15]=252|d.Xe&3;e[16]=252|d.he&3;e[17]=248|d.ge&7;e[18]=248|d.fe&7;e[19]=0;e[20]=0;e[21]=(d.ie&3)<<6|(d.Ue&7)<<3|(d.nf?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&
1202
- 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 Xz(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*Yz[14*(3===c?3-d:3===d?3:4)+e-1];f=Zz[3*(3===c?0:2===c?1:2)+f];c=$z[c][d];var h=aA[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,S:k,Gh:8*c*h}}return null}
1203
- function bA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Yz=[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],Zz=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],$z=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],aA=[0,1,1,4];function cA(a){this.i=a;this.h=0;this.g=new Map}r=cA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1204
- r.transmux=function(a,b,c,d){a=nb(a);for(c=Mh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&bA(a,e)){var f=Xz(a,e),g=4;f&&f.S&&(g=f.S);e+=g;e=e===a.length||e+1<a.length&&bA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Xz(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.S<=a.length&&e.push({data:a.subarray(c,c+f.S),size:f.S,duration:1152,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});c+=f.S}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.Gh/h.sampleRate*this.h;d={id:b.id,
1205
- type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:e},stream:b};h=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(h),this.g.set(b.id,d));b=wu(h);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",cA);cA.prototype.transmux=cA.prototype.transmux;cA.prototype.getOriginalMimeType=cA.prototype.getOriginalMimeType;
1206
- cA.prototype.convertCodecs=cA.prototype.convertCodecs;cA.prototype.isSupported=cA.prototype.isSupported;cA.prototype.destroy=cA.prototype.destroy;Zb("audio/mpeg",function(){return new cA("audio/mpeg")},ec);function dA(a){this.h=a;this.g=null}r=dA.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Mc(a).split(","),c=Ac("audio",b);b=Ac("video",b);return!c||b||"mp3"!=Jc(c)?!1:cb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1207
- r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new fi;a=nb(a);a=this.g.parse(a);if("mp3"!=a.Lc().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.Ib());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=Xz(b,c))?(c+d.S<=b.length&&(e=cg(e,b.subarray(c,c+d.S))),c+=d.S):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",dA);dA.prototype.transmux=dA.prototype.transmux;dA.prototype.getOriginalMimeType=dA.prototype.getOriginalMimeType;
1208
- dA.prototype.convertCodecs=dA.prototype.convertCodecs;dA.prototype.isSupported=dA.prototype.isSupported;dA.prototype.destroy=dA.prototype.destroy;Zb("video/mp2t",function(){return new dA("video/mp2t")},dc);/*
1199
+ function Uz(a){var b=new Vh(a,!0);ci(b);ci(b);T(b);T(b);U(b);U(b);Zh(b,3);U(b);U(b);T(b);T(b);bi(b);U(b);U(b);U(b)&&T(b);bi(b);bi(b);U(b);U(b);U(b);U(b);a=U(b);b=U(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Xe:c}}
1200
+ function Vz(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ye&3)<<6|(d.ze?1:0)<<5|d.xe&31;e[2]=d.te;e[3]=d.ue;e[4]=d.ve;e[5]=d.we;e[6]=d.me;e[7]=d.ne;e[8]=d.oe;e[9]=d.pe;e[10]=d.qe;e[11]=d.re;e[12]=d.se;e[13]=240|(d.Md&3840)>>8;e[14]=d.Md&255;e[15]=252|d.Xe&3;e[16]=252|d.he&3;e[17]=248|d.ge&7;e[18]=248|d.fe&7;e[19]=0;e[20]=0;e[21]=(d.ie&3)<<6|(d.Ue&7)<<3|(d.nf?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&
1201
+ 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 Wz(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*Xz[14*(3===c?3-d:3===d?3:4)+e-1];f=Yz[3*(3===c?0:2===c?1:2)+f];c=Zz[c][d];var h=$z[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,S:k,Gh:8*c*h}}return null}
1202
+ function aA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Xz=[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],Yz=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Zz=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],$z=[0,1,1,4];function bA(a){this.i=a;this.h=0;this.g=new Map}r=bA.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?cb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1203
+ r.transmux=function(a,b,c,d){a=nb(a);for(c=Mh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&aA(a,e)){var f=Wz(a,e),g=4;f&&f.S&&(g=f.S);e+=g;e=e===a.length||e+1<a.length&&aA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Wz(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.S<=a.length&&e.push({data:a.subarray(c,c+f.S),size:f.S,duration:1152,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});c+=f.S}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.Gh/h.sampleRate*this.h;d={id:b.id,
1204
+ type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.h,baseMediaDecodeTime:a,Ma:e},stream:b};h=new $t([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=fu(h),this.g.set(b.id,d));b=wu(h);this.h++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.Mp3Transmuxer",bA);bA.prototype.transmux=bA.prototype.transmux;bA.prototype.getOriginalMimeType=bA.prototype.getOriginalMimeType;
1205
+ bA.prototype.convertCodecs=bA.prototype.convertCodecs;bA.prototype.isSupported=bA.prototype.isSupported;bA.prototype.destroy=bA.prototype.destroy;Zb("audio/mpeg",function(){return new bA("audio/mpeg")},ec);function cA(a){this.h=a;this.g=null}r=cA.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Mc(a).split(","),c=Ac("audio",b);b=Ac("video",b);return!c||b||"mp3"!=Jc(c)?!1:cb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1206
+ r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new fi;a=nb(a);a=this.g.parse(a);if("mp3"!=a.Nc().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.Jb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=Wz(b,c))?(c+d.S<=b.length&&(e=cg(e,b.subarray(c,c+d.S))),c+=d.S):c++;return Promise.resolve(e)};N("shaka.transmuxer.MpegTsTransmuxer",cA);cA.prototype.transmux=cA.prototype.transmux;cA.prototype.getOriginalMimeType=cA.prototype.getOriginalMimeType;
1207
+ cA.prototype.convertCodecs=cA.prototype.convertCodecs;cA.prototype.isSupported=cA.prototype.isSupported;cA.prototype.destroy=cA.prototype.destroy;Zb("video/mp2t",function(){return new cA("video/mp2t")},dc);/*
1209
1208
  @license
1210
1209
  MSS Transmuxer
1211
1210
  Copyright 2015 Dash Industry Forum
1212
1211
  SPDX-License-Identifier: BSD-3-Clause
1213
1212
  */
1214
- function eA(a){this.h=a;(this.g=gs.get("ISOBoxer")())&&fA(this)}
1215
- function fA(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",
1213
+ function dA(a){this.h=a;(this.g=gs.get("ISOBoxer")())&&eA(this)}
1214
+ function eA(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",
1216
1215
  "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",
1217
- "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]!==gA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=eA.prototype;r.destroy=function(){};
1216
+ "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]!==fA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=dA.prototype;r.destroy=function(){};
1218
1217
  r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return cb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return cb(b)||cb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
1219
1218
  r.transmux=function(a,b,c){if(!c)return Promise.resolve(nb(a));if(!b.mssPrivateData)return Promise.reject(new P(2,3,3020));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");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
1220
1219
  1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
1221
- 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=hA(u,"traf")+hA(h,"senc")+16);var y=nb(e.write());return Promise.resolve(y)}catch(z){return z instanceof P?Promise.reject(z):Promise.reject(new P(2,3,3022))}};function hA(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}N("shaka.transmuxer.MssTransmuxer",eA);eA.prototype.transmux=eA.prototype.transmux;eA.prototype.getOriginalMimeType=eA.prototype.getOriginalMimeType;
1222
- eA.prototype.convertCodecs=eA.prototype.convertCodecs;eA.prototype.isSupported=eA.prototype.isSupported;eA.prototype.destroy=eA.prototype.destroy;var gA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Zb("mss/audio/mp4",function(){return new eA("mss/audio/mp4")},ec);Zb("mss/video/mp4",function(){return new eA("mss/video/mp4")},ec);function iA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}r=iA.prototype;r.destroy=function(){this.h.clear()};r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Mc(c).split(",");c=Ac("audio",d);d=Ac("video",d);if(c&&(c=Jc(c),!jA.includes(c))||d&&(c=Jc(d),!kA.includes(c)))return!1;if(b)return cb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return cb(b)||cb(a)};
1220
+ 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=gA(u,"traf")+gA(h,"senc")+16);var y=nb(e.write());return Promise.resolve(y)}catch(z){return z instanceof P?Promise.reject(z):Promise.reject(new P(2,3,3022))}};function gA(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}N("shaka.transmuxer.MssTransmuxer",dA);dA.prototype.transmux=dA.prototype.transmux;dA.prototype.getOriginalMimeType=dA.prototype.getOriginalMimeType;
1221
+ dA.prototype.convertCodecs=dA.prototype.convertCodecs;dA.prototype.isSupported=dA.prototype.isSupported;dA.prototype.destroy=dA.prototype.destroy;var fA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Zb("mss/audio/mp4",function(){return new dA("mss/audio/mp4")},ec);Zb("mss/video/mp4",function(){return new dA("mss/video/mp4")},ec);function hA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}r=hA.prototype;r.destroy=function(){this.h.clear()};r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Mc(c).split(",");c=Ac("audio",d);d=Ac("video",d);if(c&&(c=Jc(c),!iA.includes(c))||d&&(c=Jc(d),!jA.includes(c)))return!1;if(b)return cb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return cb(b)||cb(a)};
1223
1222
  r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Mc(b).replace("mp4a.40.34","mp3").split(",").map(this.Ig).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.Ig=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};r.getOriginalMimeType=function(){return this.j};
1224
- r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new fi;a=nb(a);var f=this.i.parse(a);a=[];var g=f.Lc();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.dc();if(!n.length)throw new P(2,3,3023);for(var q=0;q<n.length;q++){var p=n[q],u=p.nalus;m.push.apply(m,w(u));var v=Rz(u);if(v){null==l&&(l=p.dts);var y=void 0;y=q+1<n.length?(n[q+1].dts||0)-(p.dts||0):1<n.length?(p.dts||0)-(n[q-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
1225
- duration:y,Ra:Math.round((p.pts||0)-(p.dts||0)),flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:v.Tc?2:1,Ta:v.Tc?0:1}})}}var z=Pz(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Pa:[],ca:new Uint8Array([]),ka:z.ka,ra:z.ra,ta:z.ta,data:{fb:this.g,baseMediaDecodeTime:l,Ma:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.dc();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=
1223
+ r.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new fi;a=nb(a);var f=this.i.parse(a);a=[];var g=f.Nc();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.fc();if(!n.length)throw new P(2,3,3023);for(var q=0;q<n.length;q++){var p=n[q],u=p.nalus;m.push.apply(m,w(u));var v=Qz(u);if(v){null==l&&(l=p.dts);var y=void 0;y=q+1<n.length?(n[q+1].dts||0)-(p.dts||0):1<n.length?(p.dts||0)-(n[q-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
1224
+ duration:y,Ra:Math.round((p.pts||0)-(p.dts||0)),flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:v.Tc?2:1,Ta:v.Tc?0:1}})}}var z=Oz(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Pa:[],ca:new Uint8Array([]),ka:z.ka,ra:z.ra,ta:z.ta,data:{fb:this.g,baseMediaDecodeTime:l,Ma:k},stream:b};break;case "hvc":n=[];p=null;u=[];k=f.fc();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=
1226
1225
  k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var x=[],A=!1;q=t(m);for(y=q.next();!y.done;y=q.next()){var B=y.value;switch(B.type){case 1:case 0:var D=A=!0;break;case 19:case 20:case 21:z=D=A=!0;break;case 32:D=!0;break;case 33:D=!0;break;case 34:D=!0;break;case 35:A=D=!0;break;case 39:case 40:D=!0;break;default:D=!1}if(A&&D){var F=B.fullData.byteLength,J=new Uint8Array(4);J[0]=F>>24&255;J[1]=F>>16&255;J[2]=F>>8&255;J[3]=F&255;x.push(cg(J,B.fullData))}}var G=x.length?{data:cg.apply(Xf,w(x)),Tc:z}:null;
1227
- G&&(null==p&&null!=l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Ra:Math.round((l.pts||0)-(l.dts||0)),flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:G.Tc?2:1,Ta:G.Tc?0:1}}))}var H=Sz(u);if(!H||null==p)throw new P(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Pa:[],ca:new Uint8Array([]),
1228
- ka:H.ka,ra:H.ra,ta:H.ta,data:{fb:this.g,baseMediaDecodeTime:p,Ma:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,O=t(f.Ib()),S=O.next();!S.done;S=O.next()){var ca=S.value,W=ca.data;if(W){var da=0;L=Gz(W,da);if(!L)throw new P(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==ca.pts&&(M=ca.pts);for(;da<W.length;){var Ba=Fz(W,da);if(Ba){var Sa=Ba.Ed+Ba.S;da+Sa<=W.length&&I.push({data:W.subarray(da+Ba.Ed,da+Sa),
1229
- size:Ba.S,duration:1024,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});da+=Sa}else da++}}}if(!L||null==M){if(!f.dc().length)throw new P(2,3,3018);M=9E4*c.startTime;var xb=Ac("audio",b.codecs.split(","));if(!xb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ga:xb};var db=Iz(xb,b.channelsCount);if(!db)throw new P(2,3,3018);var Tb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Tb;)I.push({data:db,size:db.byteLength,duration:1024,Ra:0,
1230
- flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),f+=1024/L.sampleRate*9E4}var ua=L.sampleRate;f=M/9E4*ua;h={id:b.id,type:"audio",codecs:L.ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:I},stream:b};break;case "ac3":L=[];ua=0;I=new Uint8Array([]);M=null;da=t(f.Ib());for(var eb=da.next();!eb.done;eb=da.next()){var $a=eb.value,yb=$a.data;null==M&&null!==$a.pts&&(M=$a.pts);for(f=0;f<yb.length;){var ab=
1231
- Kz(yb,f);ab?(b.audioSamplingRate=ab.sampleRate,b.channelsCount=ab.channelCount,ua=ab.sampleRate,I=ab.ca,L.push({data:yb.subarray(f,f+ab.S),size:ab.S,duration:1536,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),f+=ab.S):f++}}if(0==ua||0==I.byteLength||null==M)throw new P(2,3,3018);f=M/9E4*ua;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,Pa:[],ca:I,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:L},stream:b};break;case "ec3":L=
1232
- [];ua=0;M=new Uint8Array([]);I=null;for(var mh=t(f.Ib()),xd=mh.next();!xd.done;xd=mh.next()){var te=xd.value,ue=te.data;null==I&&null!==te.pts&&(I=te.pts);for(f=0;f<ue.length;){var jb=Nz(ue,f);jb?(b.audioSamplingRate=jb.sampleRate,b.channelsCount=jb.channelCount,ua=jb.sampleRate,M=jb.ca,L.push({data:ue.subarray(f,f+jb.S),size:jb.S,duration:1536,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),f+=jb.S):f++}}if(0==ua||0==M.byteLength||null==I)throw new P(2,3,3018);f=I/9E4*ua;h={id:b.id,type:"audio",codecs:"ec-3",
1233
- encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,Pa:[],ca:M,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:L},stream:b};break;case "mp3":L=[];var Wh;ua=null;for(var ms=t(f.Ib()),ll=ms.next();!ll.done;ll=ms.next()){var ml=ll.value,If=ml.data;if(If)for(null==ua&&null!==ml.pts&&(ua=ml.pts),f=0;f<If.length;){var Ce=Xz(If,f);Ce?(Wh||(Wh=Ce),f+Ce.S<=If.length&&L.push({data:If.subarray(f,f+Ce.S),size:Ce.S,duration:1152,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),
1234
- f+=Ce.S):f++}}if(!Wh||null==ua)throw new P(2,3,3018);var ns=Wh.sampleRate;f=ua/9E4*ns;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ns,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:L},stream:b}}h&&a.push(h)}}catch(nl){return nl&&3023==nl.code?Promise.resolve(new Uint8Array([])):Promise.reject(nl)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new $t(a);this.h.has(b.id)?d=this.h.get(b.id):
1235
- (d=fu(a),this.h.set(b.id,d));b=wu(a);this.g++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",iA);iA.prototype.transmux=iA.prototype.transmux;iA.prototype.getOriginalMimeType=iA.prototype.getOriginalMimeType;iA.prototype.convertCodecs=iA.prototype.convertCodecs;iA.prototype.isSupported=iA.prototype.isSupported;iA.prototype.destroy=iA.prototype.destroy;var jA=["aac","ac-3","ec-3","mp3"],kA=["avc","hevc"];Zb("video/mp2t",function(){return new iA("video/mp2t")},cc);/*
1226
+ G&&(null==p&&null!=l.dts&&(p=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,Ra:Math.round((l.pts||0)-(l.dts||0)),flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:G.Tc?2:1,Ta:G.Tc?0:1}}))}var H=Rz(u);if(!H||null==p)throw new P(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Pa:[],ca:new Uint8Array([]),
1227
+ ka:H.ka,ra:H.ra,ta:H.ta,data:{fb:this.g,baseMediaDecodeTime:p,Ma:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var I=[],L,M=null,O=t(f.Jb()),S=O.next();!S.done;S=O.next()){var ca=S.value,W=ca.data;if(W){var da=0;L=Fz(W,da);if(!L)throw new P(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==M&&null!==ca.pts&&(M=ca.pts);for(;da<W.length;){var Ba=Ez(W,da);if(Ba){var Sa=Ba.Ed+Ba.S;da+Sa<=W.length&&I.push({data:W.subarray(da+Ba.Ed,da+Sa),
1228
+ size:Ba.S,duration:1024,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}});da+=Sa}else da++}}}if(!L||null==M){if(!f.fc().length)throw new P(2,3,3018);M=9E4*c.startTime;var xb=Ac("audio",b.codecs.split(","));if(!xb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,ga:xb};var db=Hz(xb,b.channelsCount);if(!db)throw new P(2,3,3018);var Tb=M+9E4*(c.endTime-c.startTime);for(f=M;f<Tb;)I.push({data:db,size:db.byteLength,duration:1024,Ra:0,
1229
+ flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),f+=1024/L.sampleRate*9E4}var ua=L.sampleRate;f=M/9E4*ua;h={id:b.id,type:"audio",codecs:L.ga,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:I},stream:b};break;case "ac3":L=[];ua=0;I=new Uint8Array([]);M=null;da=t(f.Jb());for(var eb=da.next();!eb.done;eb=da.next()){var $a=eb.value,yb=$a.data;null==M&&null!==$a.pts&&(M=$a.pts);for(f=0;f<yb.length;){var ab=
1230
+ Jz(yb,f);ab?(b.audioSamplingRate=ab.sampleRate,b.channelsCount=ab.channelCount,ua=ab.sampleRate,I=ab.ca,L.push({data:yb.subarray(f,f+ab.S),size:ab.S,duration:1536,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),f+=ab.S):f++}}if(0==ua||0==I.byteLength||null==M)throw new P(2,3,3018);f=M/9E4*ua;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,Pa:[],ca:I,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:L},stream:b};break;case "ec3":L=
1231
+ [];ua=0;M=new Uint8Array([]);I=null;for(var ph=t(f.Jb()),xd=ph.next();!xd.done;xd=ph.next()){var ue=xd.value,ve=ue.data;null==I&&null!==ue.pts&&(I=ue.pts);for(f=0;f<ve.length;){var jb=Mz(ve,f);jb?(b.audioSamplingRate=jb.sampleRate,b.channelsCount=jb.channelCount,ua=jb.sampleRate,M=jb.ca,L.push({data:ve.subarray(f,f+jb.S),size:jb.S,duration:1536,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),f+=jb.S):f++}}if(0==ua||0==M.byteLength||null==I)throw new P(2,3,3018);f=I/9E4*ua;h={id:b.id,type:"audio",codecs:"ec-3",
1232
+ encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ua,duration:d,Pa:[],ca:M,ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:L},stream:b};break;case "mp3":L=[];var Yh;ua=null;for(var ns=t(f.Jb()),ll=ns.next();!ll.done;ll=ns.next()){var ml=ll.value,Jf=ml.data;if(Jf)for(null==ua&&null!==ml.pts&&(ua=ml.pts),f=0;f<Jf.length;){var De=Wz(Jf,f);De?(Yh||(Yh=De),f+De.S<=Jf.length&&L.push({data:Jf.subarray(f,f+De.S),size:De.S,duration:1152,Ra:0,flags:{Sa:0,Ja:0,Ha:0,Fa:0,Ga:2,Ta:0}}),
1233
+ f+=De.S):f++}}if(!Yh||null==ua)throw new P(2,3,3018);var os=Yh.sampleRate;f=ua/9E4*os;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:os,duration:d,Pa:[],ca:new Uint8Array([]),ka:new Uint8Array([]),ra:0,ta:0,data:{fb:this.g,baseMediaDecodeTime:f,Ma:L},stream:b}}h&&a.push(h)}}catch(nl){return nl&&3023==nl.code?Promise.resolve(new Uint8Array([])):Promise.reject(nl)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new $t(a);this.h.has(b.id)?d=this.h.get(b.id):
1234
+ (d=fu(a),this.h.set(b.id,d));b=wu(a);this.g++;b=cg(d,b);return Promise.resolve(b)};N("shaka.transmuxer.TsTransmuxer",hA);hA.prototype.transmux=hA.prototype.transmux;hA.prototype.getOriginalMimeType=hA.prototype.getOriginalMimeType;hA.prototype.convertCodecs=hA.prototype.convertCodecs;hA.prototype.isSupported=hA.prototype.isSupported;hA.prototype.destroy=hA.prototype.destroy;var iA=["aac","ac-3","ec-3","mp3"],jA=["avc","hevc"];Zb("video/mp2t",function(){return new hA("video/mp2t")},cc);/*
1236
1235
  @license
1237
1236
  EME Encryption Scheme Polyfill
1238
1237
  Copyright 2019 Google LLC
1239
1238
  SPDX-License-Identifier: Apache-2.0
1240
1239
  */
1241
- function lA(){}var mA;function nA(){mA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(mA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=oA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1242
- function oA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,mA.call(c,a,b),2);d=e.h;if(pA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=mA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=qA;return e.return(qA.call(c,
1240
+ function kA(){}var lA;function mA(){lA?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(lA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=nA):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1241
+ function nA(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,lA.call(c,a,b),2);d=e.h;if(oA(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=lA,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=pA;return e.return(pA.call(c,
1243
1242
  a,b))})}
1244
- function qA(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=rA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=sA(h.videoCapabilities,d),l=sA(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."),
1245
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,mA.call(c,a,e),2)}q=p.h;return p.return(new tA(q,d))})}function sA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",lA);lA.install=nA;function uA(){}var vA;
1246
- function wA(){vA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(vA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=xA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1247
- function xA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,vA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&pA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=vA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1248
- navigator.mediaCapabilities.decodingInfo=yA;if(d){f.B(3);break}e=c;return C(f,zA(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(yA.call(b,a))}})}
1249
- function yA(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=rA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,vA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1250
- new tA(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,zA(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1251
- function zA(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
1252
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",uA);uA.install=wA;function tA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1253
- tA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};tA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1254
- function rA(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-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function pA(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}
1255
- function AA(){}function Ww(){nA();wA()}N("EncryptionSchemePolyfills",AA);AA.install=Ww;"undefined"!==typeof module&&module.exports&&(module.exports=AA);}).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})();
1243
+ function pA(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return K(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=qA(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=rA(h.videoCapabilities,d),l=rA(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."),
1244
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,lA.call(c,a,e),2)}q=p.h;return p.return(new sA(q,d))})}function rA(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",kA);kA.install=mA;function tA(){}var uA;
1245
+ function vA(){uA?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(uA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=wA):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1246
+ function wA(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,uA.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&oA(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=uA,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1247
+ navigator.mediaCapabilities.decodingInfo=xA;if(d){f.B(3);break}e=c;return C(f,yA(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(xA.call(b,a))}})}
1248
+ function xA(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=qA(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,uA.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1249
+ new sA(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,yA(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1250
+ function yA(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
1251
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}N("McEncryptionSchemePolyfill",tA);tA.install=vA;function sA(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1252
+ sA.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};sA.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1253
+ function qA(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-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function oA(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}
1254
+ function zA(){}function Ww(){mA();vA()}N("EncryptionSchemePolyfills",zA);zA.install=Ww;"undefined"!==typeof module&&module.exports&&(module.exports=zA);}).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})();
1256
1255
 
1257
1256
  //# sourceMappingURL=shaka-player.compiled.map